From e2e6f6fe07049f33cb6348780fa975162752e421 Mon Sep 17 00:00:00 2001 From: Adrian Dudau Date: Thu, 12 Dec 2013 13:38:32 +0100 Subject: initial commit of Enea Linux 3.1 Migrated from the internal git server on the dora-enea branch Signed-off-by: Adrian Dudau --- meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init | 123 ++++++++++++++++ meta/recipes-core/dbus/dbus-1.6.10/os-test.patch | 35 +++++ meta/recipes-core/dbus/dbus-1.6.10/ptest.patch | 154 +++++++++++++++++++++ .../dbus/dbus-1.6.10/python-config.patch | 25 ++++ meta/recipes-core/dbus/dbus-1.6.10/run-ptest | 3 + .../dbus/dbus-1.6.10/test-run-path.patch | 26 ++++ meta/recipes-core/dbus/dbus-1.6.10/tmpdir.patch | 44 ++++++ .../dbus/dbus-glib-0.100.2/no-examples.patch | 15 ++ .../obsolete_automake_macros.patch | 15 ++ .../dbus-glib-0.100.2/test-install-makefile.patch | 48 +++++++ meta/recipes-core/dbus/dbus-glib.inc | 44 ++++++ meta/recipes-core/dbus/dbus-glib_0.100.2.bb | 6 + meta/recipes-core/dbus/dbus-ptest_1.6.10.bb | 51 +++++++ meta/recipes-core/dbus/dbus.inc | 148 ++++++++++++++++++++ meta/recipes-core/dbus/dbus_1.6.10.bb | 6 + 15 files changed, 743 insertions(+) create mode 100644 meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init create mode 100644 meta/recipes-core/dbus/dbus-1.6.10/os-test.patch create mode 100644 meta/recipes-core/dbus/dbus-1.6.10/ptest.patch create mode 100644 meta/recipes-core/dbus/dbus-1.6.10/python-config.patch create mode 100755 meta/recipes-core/dbus/dbus-1.6.10/run-ptest create mode 100644 meta/recipes-core/dbus/dbus-1.6.10/test-run-path.patch create mode 100644 meta/recipes-core/dbus/dbus-1.6.10/tmpdir.patch create mode 100644 meta/recipes-core/dbus/dbus-glib-0.100.2/no-examples.patch create mode 100644 meta/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch create mode 100644 meta/recipes-core/dbus/dbus-glib-0.100.2/test-install-makefile.patch create mode 100644 meta/recipes-core/dbus/dbus-glib.inc create mode 100644 meta/recipes-core/dbus/dbus-glib_0.100.2.bb create mode 100644 meta/recipes-core/dbus/dbus-ptest_1.6.10.bb create mode 100644 meta/recipes-core/dbus/dbus.inc create mode 100644 meta/recipes-core/dbus/dbus_1.6.10.bb (limited to 'meta/recipes-core/dbus') diff --git a/meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init b/meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init new file mode 100644 index 0000000000..04025e65f8 --- /dev/null +++ b/meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init @@ -0,0 +1,123 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: dbus +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 1 +# Short-Description: D-Bus systemwide message bus +# Description: D-Bus is a simple interprocess messaging system, used +# for sending messages between applications. +### END INIT INFO +# +# -*- coding: utf-8 -*- +# Debian init.d script for D-BUS +# Copyright © 2003 Colin Walters + +set -e + +# Source function library. +. /etc/init.d/functions + +DAEMON=@bindir@/dbus-daemon +NAME=dbus +DAEMONUSER=messagebus # must match /etc/dbus-1/system.conf +PIDFILE=/var/run/messagebus.pid # must match /etc/dbus-1/system.conf +UUIDDIR=/var/lib/dbus +DESC="system message bus" +EVENTDIR=/etc/dbus-1/event.d + +test -x $DAEMON || exit 0 + +# Source defaults file; edit that file to configure this script. +ENABLED=1 +PARAMS="" +if [ -e /etc/default/dbus ]; then + . /etc/default/dbus +fi + +test "$ENABLED" != "0" || exit 0 + +start_it_up() +{ + mkdir -p "`dirname $PIDFILE`" + if [ -e $PIDFILE ]; then + PIDDIR=/proc/$(cat $PIDFILE) + if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then + echo "$DESC already started; not starting." + else + echo "Removing stale PID file $PIDFILE." + rm -f $PIDFILE + fi + fi + + if [ ! -d $UUIDDIR ]; then + mkdir -p $UUIDDIR + chown $DAEMONUSER $UUIDDIR + chgrp $DAEMONUSER $UUIDDIR + fi + + dbus-uuidgen --ensure + + echo -n "Starting $DESC: " + start-stop-daemon -o --start --quiet --pidfile $PIDFILE \ + --user $DAEMONUSER --exec $DAEMON -- --system $PARAMS + echo "$NAME." + if [ -d $EVENTDIR ]; then + run-parts --arg=start $EVENTDIR + fi +} + +shut_it_down() +{ + if [ -d $EVENTDIR ]; then + # TODO: --reverse when busybox supports it + run-parts --arg=stop $EVENTDIR + fi + echo -n "Stopping $DESC: " + start-stop-daemon -o --stop --quiet --pidfile $PIDFILE \ + --user $DAEMONUSER + # We no longer include these arguments so that start-stop-daemon + # can do its job even given that we may have been upgraded. + # We rely on the pidfile being sanely managed + # --exec $DAEMON -- --system $PARAMS + echo "$NAME." + rm -f $PIDFILE +} + +reload_it() +{ + echo -n "Reloading $DESC config: " + dbus-send --print-reply --system --type=method_call \ + --dest=org.freedesktop.DBus \ + / org.freedesktop.DBus.ReloadConfig > /dev/null + # hopefully this is enough time for dbus to reload it's config file. + echo "done." +} + +case "$1" in + start) + start_it_up + ;; + stop) + shut_it_down + ;; + status) + status $DAEMON + exit $? + ;; + reload|force-reload) + reload_it + ;; + restart) + shut_it_down + sleep 1 + start_it_up + ;; + *) + echo "Usage: /etc/init.d/$NAME {start|stop|status|restart|reload|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/meta/recipes-core/dbus/dbus-1.6.10/os-test.patch b/meta/recipes-core/dbus/dbus-1.6.10/os-test.patch new file mode 100644 index 0000000000..79554b1ee1 --- /dev/null +++ b/meta/recipes-core/dbus/dbus-1.6.10/os-test.patch @@ -0,0 +1,35 @@ +dbus: remove build host test in configure script + +The dbus build tests the build host to detect what initscript +environment it expects. Remove the test and set it to "redhat" +unconditionally as the oe-core initscript has a redhat-style pid file +path. + +Signed-off-by: Andy Ross +Upstream-Status: innappropriate [embedded] + +diff -u a/configure.ac b/configure.ac +--- a/configure.ac 2012-08-28 11:23:43.040609874 -0700 ++++ b/configure.ac 2012-08-28 11:54:25.602913945 -0700 +@@ -1348,19 +1348,8 @@ + AS_AC_EXPAND(EXPANDED_LIBEXECDIR, "$libexecdir") + AS_AC_EXPAND(EXPANDED_DATADIR, "$datadir") + +-#### Check our operating system +-operating_system=unknown +-if test -f /etc/redhat-release || test -f $EXPANDED_SYSCONFDIR/redhat-release ; then +- operating_system=redhat +-fi +- +-if test -f /etc/slackware-version || test -f $EXPANDED_SYSCONFDIR/slackware-version ; then +- operating_system=slackware +-fi +- +-if test -f /usr/bin/cygwin1.dll || test -f $EXPANDED_BINDIR/cygwin1.dll ; then +- operating_system=cygwin +-fi ++#### Build host test removed from upstream code, openembedded initscript is redhat-like: ++operating_system=redhat + + #### Sort out init scripts + diff --git a/meta/recipes-core/dbus/dbus-1.6.10/ptest.patch b/meta/recipes-core/dbus/dbus-1.6.10/ptest.patch new file mode 100644 index 0000000000..263d17eff7 --- /dev/null +++ b/meta/recipes-core/dbus/dbus-1.6.10/ptest.patch @@ -0,0 +1,154 @@ +Add install-ptest rules. +Change TEST_ENVIRONMENT to allow running outside build dir. + + Makefile.am | 7 +++++++ + bus/Makefile.am | 6 ++++++ + dbus/Makefile.am | 6 ++++++ + doc/Makefile.am | 4 ++++ + test/Makefile.am | 25 ++++++++++++++++++++----- + test/name-test/Makefile.am | 9 +++++++++ + tools/Makefile.am | 12 ++++++++++++ + 7 files changed, 64 insertions(+), 5 deletions(-) + +Signed-off-by: Björn Stenberg +Upstream-Status: Pending + +diff -ur a/Makefile.am b/Makefile.am +--- a/Makefile.am 2012-12-06 14:34:01.157414449 +0100 ++++ b/Makefile.am 2012-12-06 15:21:14.447113035 +0100 +@@ -30,4 +30,11 @@ + + ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} + ++if DBUS_BUILD_TESTS ++install-ptest: ++ @for subdir in $(SUBDIRS); do \ ++ $(MAKE) -C $$subdir DESTDIR=$(DESTDIR)/$$subdir $@; \ ++ done ++endif ++ + include tools/lcov.am +diff -ur a/bus/Makefile.am b/bus/Makefile.am +--- a/bus/Makefile.am 2012-12-06 14:34:01.169413931 +0100 ++++ b/bus/Makefile.am 2012-12-06 15:21:14.463112346 +0100 +@@ -290,3 +290,9 @@ + #### Extra dist + + EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES) ++ ++if DBUS_BUILD_TESTS ++install-ptest: ++ @$(MKDIR_P) $(DESTDIR) ++ @install $(dbus_daemon_exec_PROGRAMS) $(noinst_PROGRAMS) $(DESTDIR) ++endif +diff -ur a/dbus/Makefile.am b/dbus/Makefile.am +--- a/dbus/Makefile.am 2012-12-06 14:34:01.161414276 +0100 ++++ b/dbus/Makefile.am 2012-12-06 15:21:14.451112862 +0100 +@@ -310,3 +310,9 @@ + update-systemd: + curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c > sd-daemon.c + curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.h > sd-daemon.h ++ ++if DBUS_BUILD_TESTS ++install-ptest: ++ @$(MKDIR_P) $(DESTDIR) ++ @install $(noinst_PROGRAMS) $(DESTDIR) ++endif +diff -ur a/test/Makefile.am b/test/Makefile.am +--- a/test/Makefile.am 2012-12-06 14:34:01.165414103 +0100 ++++ b/test/Makefile.am 2012-12-06 15:21:14.455112690 +0100 +@@ -119,12 +119,13 @@ + DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \ + DBUS_TEST_SYSCONFDIR=$(DESTDIR)$(sysconfdir) + ++ptest_run_dir = .. ++ + TESTS_ENVIRONMENT = \ +- DBUS_BLOCK_ON_ABORT=1 \ +- DBUS_FATAL_WARNINGS=1 \ +- DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT) \ +- DBUS_TEST_DATA=@abs_top_builddir@/test/data \ +- DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \ ++ DBUS_FATAL_WARNINGS=0 \ ++ DBUS_TEST_DAEMON=$(ptest_run_dir)/bus/dbus-daemon$(EXEEXT) \ ++ DBUS_TEST_DATA=$(ptest_run_dir)/test/data \ ++ DBUS_TEST_HOMEDIR=$(ptest_run_dir)/dbus \ + $(NULL) + + test_corrupt_SOURCES = corrupt.c +@@ -325,3 +325,25 @@ + data/valid-config-files/system.conf: $(top_builddir)/bus/system.conf + $(AM_V_at)$(MKDIR_P) data/valid-config-files + $(AM_V_GEN)cp $< $@ ++ ++if DBUS_BUILD_TESTS ++install-ptest: install-ptest-nonrecursive ++ @for subdir in $(SUBDIRS); do \ ++ if [ $$subdir != "." ]; then \ ++ $(MAKE) -C $$subdir DESTDIR=$(DESTDIR)/$$subdir $@; \ ++ fi; \ ++ done ++ ++install-ptest-nonrecursive: ++ @$(MKDIR_P) $(DESTDIR)/data/valid-config-files/session.d ++ @for file in Makefile $(installable_tests) $(noinst_PROGRAMS) $(noinst_DATA) ; do \ ++ if [ -f .libs/$$file ]; then \ ++ install .libs/$$file $(DESTDIR); \ ++ else \ ++ install -D $${file%.in} $(DESTDIR)/$${file%.in}; \ ++ fi; \ ++ done; ++ @for file in $(EXTRA_DIST); do \ ++ install -D ${srcdir}/$${file%.in} $(DESTDIR)/$${file%.in}; \ ++ done; ++endif +diff -ur a/test/name-test/Makefile.am b/test/name-test/Makefile.am +--- a/test/name-test/Makefile.am 2012-12-06 14:34:01.169413931 +0100 ++++ b/test/name-test/Makefile.am 2012-12-06 15:21:14.459112518 +0100 +@@ -36,4 +36,16 @@ + test_privserver_client_LDADD=../libdbus-testutils.la + test_autolaunch_LDADD=../libdbus-testutils.la + ++install-ptest: ++ @$(MKDIR_P) $(DESTDIR) ++ @for file in Makefile $(noinst_PROGRAMS); do \ ++ if [ -f .libs/$$file ]; then \ ++ install .libs/$$file $(DESTDIR); \ ++ else \ ++ install $$file $(DESTDIR); \ ++ fi \ ++ done; ++ @for file in $(EXTRA_DIST); do \ ++ cp $(srcdir)/$$file $(DESTDIR); \ ++ done; + endif +diff -ur a/tools/Makefile.am b/tools/Makefile.am +--- a/tools/Makefile.am 2012-12-06 14:34:01.161414276 +0100 ++++ b/tools/Makefile.am 2012-12-06 15:21:14.455112690 +0100 +@@ -78,3 +78,15 @@ + + installcheck-local: + test -d $(DESTDIR)$(localstatedir)/lib/dbus ++ ++if DBUS_BUILD_TESTS ++install-ptest: ++ @$(MKDIR_P) $(DESTDIR) ++ @for file in $(bin_PROGRAMS); do \ ++ if [ -f .libs/$$file ]; then \ ++ install .libs/$$file $(DESTDIR); \ ++ else \ ++ install $$file $(DESTDIR); \ ++ fi; \ ++ done; ++endif +diff -ur a/doc/Makefile.am b/doc/Makefile.am +--- a/doc/Makefile.am 2012-06-06 12:45:55.000000000 +0200 ++++ b/doc/Makefile.am 2012-12-06 16:04:58.990070587 +0100 +@@ -174,3 +174,7 @@ + + maintainer-clean-local: + rm -f $(XMLTO_OUTPUT) ++ ++if DBUS_BUILD_TESTS ++install-ptest: ++endif diff --git a/meta/recipes-core/dbus/dbus-1.6.10/python-config.patch b/meta/recipes-core/dbus/dbus-1.6.10/python-config.patch new file mode 100644 index 0000000000..294400247e --- /dev/null +++ b/meta/recipes-core/dbus/dbus-1.6.10/python-config.patch @@ -0,0 +1,25 @@ +When building the dbus-ptest package, we have to enable python. However +checking if the host-system python has the necessary library isn't useful. + +Disable the python module check for cross compiling. + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Mark Hatle + +--- dbus-1.6.8/configure.ac.orig 2013-07-11 14:15:58.834554799 -0500 ++++ dbus-1.6.8/configure.ac 2013-07-11 14:14:40.969554848 -0500 +@@ -257,13 +257,6 @@ + # full test coverage is required, Python is a hard dependency + AC_MSG_NOTICE([Full test coverage (--enable-tests=yes) requires Python, dbus-python, pygobject]) + AM_PATH_PYTHON([2.6]) +- AC_MSG_CHECKING([for Python modules for full test coverage]) +- if "$PYTHON" -c "import dbus, gobject, dbus.mainloop.glib"; then +- AC_MSG_RESULT([yes]) +- else +- AC_MSG_RESULT([no]) +- AC_MSG_ERROR([cannot import dbus, gobject, dbus.mainloop.glib Python modules]) +- fi + else + # --enable-tests not given: do not abort if Python is missing + AM_PATH_PYTHON([2.6], [], [:]) diff --git a/meta/recipes-core/dbus/dbus-1.6.10/run-ptest b/meta/recipes-core/dbus/dbus-1.6.10/run-ptest new file mode 100755 index 0000000000..e08ecb1a63 --- /dev/null +++ b/meta/recipes-core/dbus/dbus-1.6.10/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh +cd test +make -k runtest-TESTS diff --git a/meta/recipes-core/dbus/dbus-1.6.10/test-run-path.patch b/meta/recipes-core/dbus/dbus-1.6.10/test-run-path.patch new file mode 100644 index 0000000000..5c08c9354a --- /dev/null +++ b/meta/recipes-core/dbus/dbus-1.6.10/test-run-path.patch @@ -0,0 +1,26 @@ + + +Signed-off-by: Björn Stenberg +Upstream-Status: Pending + +--- a/test/Makefile.am 2012-06-15 15:25:43.000000000 +0200 ++++ b/test/Makefile.am 2012-11-16 09:24:44.263140840 +0100 +@@ -119,12 +119,13 @@ + DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \ + DBUS_TEST_SYSCONFDIR=$(DESTDIR)$(sysconfdir) + ++ptest_run_dir = .. ++ + TESTS_ENVIRONMENT = \ +- DBUS_BLOCK_ON_ABORT=1 \ +- DBUS_FATAL_WARNINGS=1 \ +- DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT) \ +- DBUS_TEST_DATA=@abs_top_builddir@/test/data \ +- DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \ ++ DBUS_FATAL_WARNINGS=0 \ ++ DBUS_TEST_DAEMON=$(ptest_run_dir)/bus/dbus-daemon$(EXEEXT) \ ++ DBUS_TEST_DATA=$(ptest_run_dir)/test/data \ ++ DBUS_TEST_HOMEDIR=$(ptest_run_dir)/dbus \ + $(NULL) + + test_corrupt_SOURCES = corrupt.c diff --git a/meta/recipes-core/dbus/dbus-1.6.10/tmpdir.patch b/meta/recipes-core/dbus/dbus-1.6.10/tmpdir.patch new file mode 100644 index 0000000000..bf086e1788 --- /dev/null +++ b/meta/recipes-core/dbus/dbus-1.6.10/tmpdir.patch @@ -0,0 +1,44 @@ +From 5105fedd7fa13dadd2d0d864fb77873b83b79a4b Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Thu, 23 Jun 2011 13:52:09 +0200 +Subject: [PATCH] buildsys: hardcode socketdir to /tmp + +the TMPDIR env var isn't always pointing to the right target path + +Upstream-Status: Inappropriate [embedded] + +Signed-off-by: Koen Kooi + +Original comment: + + avoid to check tmp dir at build time. instead uses hard coded /tmp here + comment added by Kevin Tian +--- + configure.ac | 11 +---------- + 1 files changed, 1 insertions(+), 10 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 408054b..6d26180 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1483,16 +1483,7 @@ AC_SUBST(TEST_LAUNCH_HELPER_BINARY) + AC_DEFINE_UNQUOTED(DBUS_TEST_LAUNCH_HELPER_BINARY, "$TEST_LAUNCH_HELPER_BINARY", + [Full path to the launch helper test program in the builddir]) + +-#### Find socket directories +-if ! test -z "$TMPDIR" ; then +- DEFAULT_SOCKET_DIR=$TMPDIR +-elif ! test -z "$TEMP" ; then +- DEFAULT_SOCKET_DIR=$TEMP +-elif ! test -z "$TMP" ; then +- DEFAULT_SOCKET_DIR=$TMP +-else +- DEFAULT_SOCKET_DIR=/tmp +-fi ++DEFAULT_SOCKET_DIR=/tmp + + DEFAULT_SOCKET_DIR=`echo $DEFAULT_SOCKET_DIR | sed 's/+/%2B/g'` + +-- +1.6.6.1 + diff --git a/meta/recipes-core/dbus/dbus-glib-0.100.2/no-examples.patch b/meta/recipes-core/dbus/dbus-glib-0.100.2/no-examples.patch new file mode 100644 index 0000000000..fbb4967828 --- /dev/null +++ b/meta/recipes-core/dbus/dbus-glib-0.100.2/no-examples.patch @@ -0,0 +1,15 @@ +Disable compiling examples + +Upstream-Status: Inappropriate [disable feature] + +Signed-off-by: Kevin Tian +Signed-off-by: Scott Garman + +--- dbus-glib-0.70/dbus/Makefile.am.orig 2006-07-23 16:04:43.000000000 +0200 ++++ dbus-glib-0.70/dbus/Makefile.am 2006-07-23 16:04:52.000000000 +0200 +@@ -1,4 +1,4 @@ +-SUBDIRS = . examples ++SUBDIRS = . + + INCLUDES=-I$(top_srcdir) $(DBUS_CFLAGS) $(DBUS_GLIB_CFLAGS) $(DBUS_GLIB_TOOL_CFLAGS) -DDBUS_COMPILATION=1 -DDBUS_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" + diff --git a/meta/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch b/meta/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch new file mode 100644 index 0000000000..40e3b12b5d --- /dev/null +++ b/meta/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch @@ -0,0 +1,15 @@ +Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=59003] + +Signed-off-by: Marko Lindqvist +diff -Nurd dbus-glib-0.100/configure.ac dbus-glib-0.100/configure.ac +--- dbus-glib-0.100/configure.ac 2012-06-25 19:26:39.000000000 +0300 ++++ dbus-glib-0.100/configure.ac 2013-01-03 04:53:22.314976758 +0200 +@@ -8,7 +8,7 @@ + + AM_INIT_AUTOMAKE([1.9]) + +-AM_CONFIG_HEADER(config.h) ++AC_CONFIG_HEADERS(config.h) + + # Honor aclocal flags + ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" diff --git a/meta/recipes-core/dbus/dbus-glib-0.100.2/test-install-makefile.patch b/meta/recipes-core/dbus/dbus-glib-0.100.2/test-install-makefile.patch new file mode 100644 index 0000000000..2e8e178bb7 --- /dev/null +++ b/meta/recipes-core/dbus/dbus-glib-0.100.2/test-install-makefile.patch @@ -0,0 +1,48 @@ +Change Makefile.am to install regression tests for test package purpose. + +Upstream-Status: Inappropriate [test not install is for purpose from upstream] + +Signed-off-by: Yao Zhao + +diff --git a/test/Makefile.am b/test/Makefile.am +index 7ba11a8..249f0e7 100644 +--- a/test/Makefile.am ++++ b/test/Makefile.am +@@ -13,7 +13,8 @@ else + TEST_BINARIES= + endif + +-noinst_PROGRAMS= $(TEST_BINARIES) ++testdir = $(datadir)/@PACKAGE@/tests ++test_PROGRAMS= $(TEST_BINARIES) + + test_service_SOURCES= \ + test-service.c +diff --git a/test/interfaces/Makefile.am b/test/interfaces/Makefile.am +index 3cb2c39..e6de67d 100644 +--- a/test/interfaces/Makefile.am ++++ b/test/interfaces/Makefile.am +@@ -39,7 +39,8 @@ if DBUS_BUILD_TESTS + + ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we + ## build even when not doing "make check" +-noinst_PROGRAMS = test-service test-client ++testdir = $(datadir)/@PACKAGE@/tests/interfaces ++test_PROGRAMS = test-service test-client + + test_service_SOURCES = \ + test-interfaces.c \ +diff --git a/test/core/Makefile.am b/test/core/Makefile.am +index ef6cb26..9786c3a 100644 +--- a/test/core/Makefile.am ++++ b/test/core/Makefile.am +@@ -46,7 +46,8 @@ endif + + ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we + ## build even when not doing "make check" +-noinst_PROGRAMS = \ ++testdir = $(datadir)/@PACKAGE@/tests/core ++test_PROGRAMS = \ + test-dbus-glib \ + test-service-glib \ + $(THREAD_APPS) \ diff --git a/meta/recipes-core/dbus/dbus-glib.inc b/meta/recipes-core/dbus/dbus-glib.inc new file mode 100644 index 0000000000..6c60d9e408 --- /dev/null +++ b/meta/recipes-core/dbus/dbus-glib.inc @@ -0,0 +1,44 @@ +SUMMARY = "High level language (GLib) binding for D-Bus" +DESCRIPTION = "GLib bindings for the D-Bus message bus that integrate \ +the D-Bus library with the GLib thread abstraction and main loop." +HOMEPAGE = "http://www.freedesktop.org/Software/dbus" +LICENSE = "AFL-2 | GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=cf5b3a2f7083750d504333114e738656 \ + file://dbus/dbus-glib.h;beginline=7;endline=21;md5=7755c9d7abccd5dbd25a6a974538bb3c" +SECTION = "base" + +DEPENDS = "expat glib-2.0 virtual/libintl dbus-glib-native dbus" +DEPENDS_class-native = "glib-2.0-native dbus-native" + +SRC_URI = "http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-${PV}.tar.gz \ + file://no-examples.patch \ + file://test-install-makefile.patch \ + file://obsolete_automake_macros.patch \ +" + +inherit autotools pkgconfig gettext + +#default disable regression tests, some unit test code in non testing code +#PACKAGECONFIG_pn-${PN} = "tests" enable regression tests local.conf +PACKAGECONFIG ??= "" +PACKAGECONFIG[tests] = "--enable-tests,,," + +EXTRA_OECONF = "--with-introspect-xml=${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml \ + --with-dbus-binding-tool=${STAGING_BINDIR_NATIVE}/dbus-binding-tool" +EXTRA_OECONF_class-native = "--with-introspect-xml=${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml" + +PACKAGES += "${PN}-bash-completion ${PN}-tests-dbg ${PN}-tests" + +FILES_${PN} = "${libdir}/lib*${SOLIBS}" +FILES_${PN}-bash-completion = "${sysconfdir}/bash_completion.d/dbus-bash-completion.sh \ + ${libexecdir}/dbus-bash-completion-helper" +FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool" +FILES_${PN}-dev += "${bindir}/dbus-binding-tool" + +RDEPENDS_${PN}-tests += "dbus-x11" +FILES_${PN}-tests = "${datadir}/${BPN}/tests" +FILES_${PN}-tests-dbg = "${datadir}/${BPN}/tests/.debug/* \ + ${datadir}/${BPN}/tests/core/.debug/* \ + ${datadir}/${BPN}/tests/interfaces/.debug/*" + +BBCLASSEXTEND = "native" diff --git a/meta/recipes-core/dbus/dbus-glib_0.100.2.bb b/meta/recipes-core/dbus/dbus-glib_0.100.2.bb new file mode 100644 index 0000000000..e08e3564d1 --- /dev/null +++ b/meta/recipes-core/dbus/dbus-glib_0.100.2.bb @@ -0,0 +1,6 @@ +require dbus-glib.inc + +PR = "r0" + +SRC_URI[md5sum] = "ad0920c7e3aad669163bb59171cf138e" +SRC_URI[sha256sum] = "a5bb42da921f51c28161e0e54a5a8241d94a1c0499a14007150e9ce743da6ac5" diff --git a/meta/recipes-core/dbus/dbus-ptest_1.6.10.bb b/meta/recipes-core/dbus/dbus-ptest_1.6.10.bb new file mode 100644 index 0000000000..84ed287cb2 --- /dev/null +++ b/meta/recipes-core/dbus/dbus-ptest_1.6.10.bb @@ -0,0 +1,51 @@ +DESCRIPTION = "D-Bus test package, only used for D-bus functionality test." +HOMEPAGE = "http://dbus.freedesktop.org" +SECTION = "base" +LICENSE = "AFL-2 | GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \ + file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c" + +DEPENDS = "python-pygobject dbus dbus-glib" + +RDEPENDS_${PN} += "make" +RDEPENDS_${PN}-dev = "" + +SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \ + file://tmpdir.patch \ + file://ptest.patch \ + file://dbus-1.init \ + file://run-ptest \ + file://python-config.patch \ + " + +SRC_URI[md5sum] = "de4970c20629aeb958a12132415b3630" +SRC_URI[sha256sum] = "1f3d6f4a53a7121328f6cd685fc14440d72e6c0006ecb3312cc779c495915e86" + +S="${WORKDIR}/dbus-${PV}" +FILESPATH = "${FILE_DIRNAME}/dbus-${PV}" + +inherit autotools pkgconfig gettext ptest + +EXTRA_OECONF_X = "${@base_contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}" +EXTRA_OECONF_X_virtclass-native = "--without-x" + +EXTRA_OECONF = "--enable-tests \ + --enable-modular-tests \ + --enable-installed-tests \ + --enable-checks \ + --enable-asserts \ + --enable-verbose-mode \ + --disable-xml-docs \ + --disable-doxygen-docs \ + --disable-libaudit \ + --with-xml=expat \ + --with-systemdsystemunitdir=${systemd_unitdir}/system/ \ + --with-dbus-test-dir=${PTEST_PATH} \ + ${EXTRA_OECONF_X}" + +do_install() { +} + +do_install_ptest() { + find ${D}${PTEST_PATH} -name Makefile | xargs sed -i 's/^Makefile:/_Makefile:/' +} diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc new file mode 100644 index 0000000000..5864643996 --- /dev/null +++ b/meta/recipes-core/dbus/dbus.inc @@ -0,0 +1,148 @@ +SUMMARY = "D-Bus message bus" +DESCRIPTION = "D-Bus is a message bus system, a simple way for applications to talk to one another. In addition to interprocess communication, D-Bus helps coordinate process lifecycle; it makes it simple and reliable to code a \"single instance\" application or daemon, and to launch applications and daemons on demand when their services are needed." +HOMEPAGE = "http://dbus.freedesktop.org" +SECTION = "base" +LICENSE = "AFL-2 | GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \ + file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c" +X11DEPENDS = "virtual/libx11 libsm" +DEPENDS = "expat virtual/libintl ${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}" +DEPENDS_class-native = "expat-native virtual/libintl-native" +DEPENDS_class-nativesdk = "nativesdk-expat virtual/nativesdk-libintl" +RDEPENDS_dbus = "${@base_contains('DISTRO_FEATURES', 'ptest', 'dbus-ptest-ptest', '', d)}" +RDEPENDS_class-native = "" + +INC_PR = "r6" + +SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \ + file://tmpdir.patch; \ + file://dbus-1.init \ + file://os-test.patch \ +" + +inherit useradd autotools pkgconfig gettext update-rc.d + +INITSCRIPT_NAME = "dbus-1" +INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ." + +python __anonymous() { + features = d.getVar("DISTRO_FEATURES", True).split() + if "sysvinit" not in features: + d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") +} + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM_${PN} = "-r netdev" +USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \ + --no-create-home --shell /bin/false \ + --user-group messagebus" + +CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf" + +DEBIANNAME_${PN} = "dbus-1" + +PACKAGES =+ "${PN}-lib" + +OLDPKGNAME = "dbus-x11" +OLDPKGNAME_class-nativesdk = "" + +# for compatibility +RPROVIDES_${PN} = "${OLDPKGNAME}" +RREPLACES_${PN} += "${OLDPKGNAME}" + +FILES_${PN} = "${bindir}/dbus-daemon* \ + ${bindir}/dbus-uuidgen \ + ${bindir}/dbus-cleanup-sockets \ + ${bindir}/dbus-send \ + ${bindir}/dbus-monitor \ + ${bindir}/dbus-launch \ + ${libexecdir}/dbus* \ + ${sysconfdir} \ + ${localstatedir} \ + ${datadir}/dbus-1/services \ + ${datadir}/dbus-1/system-services \ + ${systemd_unitdir}/system/" +FILES_${PN}-lib = "${libdir}/lib*.so.*" +RRECOMMENDS_${PN}-lib = "${PN}" +FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool" + +pkg_postinst_dbus() { + if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then + /etc/init.d/populate-volatile.sh update + fi +} + +EXTRA_OECONF_X = "${@base_contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}" +EXTRA_OECONF_X_class-native = "--without-x --disable-x11-autolaunch" +# TODO: would like to --enable-systemd but that's a circular build-dependency +# between systemd<->dbus +EXTRA_OECONF_SYSTEMD = "${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}" + +EXTRA_OECONF = "--disable-tests \ + --disable-checks \ + --disable-xml-docs \ + --disable-doxygen-docs \ + --disable-libaudit \ + --with-xml=expat \ + --disable-systemd \ + ${EXTRA_OECONF_SYSTEMD} \ + ${EXTRA_OECONF_X}" + +do_install() { + autotools_do_install + + if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/init.d + sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init >${WORKDIR}/dbus-1.init.sh + install -m 0755 ${WORKDIR}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1 + fi + + install -d ${D}${sysconfdir}/default/volatiles + echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" \ + > ${D}${sysconfdir}/default/volatiles/99_dbus + + + mkdir -p ${D}${localstatedir}/lib/dbus + + chown messagebus:messagebus ${D}${localstatedir}/lib/dbus + + chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper + chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper + + # Remove Red Hat initscript + rm -rf ${D}${sysconfdir}/rc.d + + # Remove empty testexec directory as we don't build tests + rm -rf ${D}${libdir}/dbus-1.0/test + + # Remove /var/run as it is created on startup + rm -rf ${D}${localstatedir}/run +} + +do_install_class-native() { + autotools_do_install + + # for dbus-glib-native introspection generation + install -d ${STAGING_DATADIR_NATIVE}/dbus/ + # N.B. is below install actually required? + install -m 0644 bus/session.conf ${STAGING_DATADIR_NATIVE}/dbus/session.conf + + # dbus-glib-native and dbus-glib need this xml file + ./bus/dbus-daemon --introspect > ${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml + + # dbus-launch has no X support so lets not install it in case the host + # has a more featured and useful version + rm -f ${D}${bindir}/dbus-launch +} + +do_install_class-nativesdk() { + autotools_do_install + + # dbus-launch has no X support so lets not install it in case the host + # has a more featured and useful version + rm -f ${D}${bindir}/dbus-launch + + # Remove /var/run to avoid QA error + rm -rf ${D}${localstatedir}/run +} +BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-core/dbus/dbus_1.6.10.bb b/meta/recipes-core/dbus/dbus_1.6.10.bb new file mode 100644 index 0000000000..5b8220c8ff --- /dev/null +++ b/meta/recipes-core/dbus/dbus_1.6.10.bb @@ -0,0 +1,6 @@ +include dbus.inc + +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "de4970c20629aeb958a12132415b3630" +SRC_URI[sha256sum] = "1f3d6f4a53a7121328f6cd685fc14440d72e6c0006ecb3312cc779c495915e86" -- cgit v1.2.3-54-g00ecf