diff options
Diffstat (limited to 'meta/recipes-core/dbus/dbus')
-rw-r--r-- | meta/recipes-core/dbus/dbus/dbus-1.init | 123 | ||||
-rw-r--r-- | meta/recipes-core/dbus/dbus/os-test.patch | 35 | ||||
-rw-r--r-- | meta/recipes-core/dbus/dbus/ptest.patch | 154 | ||||
-rw-r--r-- | meta/recipes-core/dbus/dbus/python-config.patch | 25 | ||||
-rwxr-xr-x | meta/recipes-core/dbus/dbus/run-ptest | 3 | ||||
-rw-r--r-- | meta/recipes-core/dbus/dbus/tmpdir.patch | 44 |
6 files changed, 384 insertions, 0 deletions
diff --git a/meta/recipes-core/dbus/dbus/dbus-1.init b/meta/recipes-core/dbus/dbus/dbus-1.init new file mode 100644 index 0000000000..42c86297c3 --- /dev/null +++ b/meta/recipes-core/dbus/dbus/dbus-1.init | |||
@@ -0,0 +1,123 @@ | |||
1 | #! /bin/sh | ||
2 | ### BEGIN INIT INFO | ||
3 | # Provides: dbus | ||
4 | # Required-Start: $remote_fs $syslog | ||
5 | # Required-Stop: $remote_fs $syslog | ||
6 | # Default-Start: 2 3 4 5 | ||
7 | # Default-Stop: 1 | ||
8 | # Short-Description: D-Bus systemwide message bus | ||
9 | # Description: D-Bus is a simple interprocess messaging system, used | ||
10 | # for sending messages between applications. | ||
11 | ### END INIT INFO | ||
12 | # | ||
13 | # -*- coding: utf-8 -*- | ||
14 | # Debian init.d script for D-BUS | ||
15 | # Copyright © 2003 Colin Walters <walters@debian.org> | ||
16 | |||
17 | # set -e | ||
18 | |||
19 | # Source function library. | ||
20 | . /etc/init.d/functions | ||
21 | |||
22 | DAEMON=@bindir@/dbus-daemon | ||
23 | NAME=dbus | ||
24 | DAEMONUSER=messagebus # must match /etc/dbus-1/system.conf | ||
25 | PIDFILE=/var/run/messagebus.pid # must match /etc/dbus-1/system.conf | ||
26 | UUIDDIR=/var/lib/dbus | ||
27 | DESC="system message bus" | ||
28 | EVENTDIR=/etc/dbus-1/event.d | ||
29 | |||
30 | test -x $DAEMON || exit 0 | ||
31 | |||
32 | # Source defaults file; edit that file to configure this script. | ||
33 | ENABLED=1 | ||
34 | PARAMS="" | ||
35 | if [ -e /etc/default/dbus ]; then | ||
36 | . /etc/default/dbus | ||
37 | fi | ||
38 | |||
39 | test "$ENABLED" != "0" || exit 0 | ||
40 | |||
41 | start_it_up() | ||
42 | { | ||
43 | mkdir -p "`dirname $PIDFILE`" | ||
44 | if [ -e $PIDFILE ]; then | ||
45 | PIDDIR=/proc/$(cat $PIDFILE) | ||
46 | if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then | ||
47 | echo "$DESC already started; not starting." | ||
48 | else | ||
49 | echo "Removing stale PID file $PIDFILE." | ||
50 | rm -f $PIDFILE | ||
51 | fi | ||
52 | fi | ||
53 | |||
54 | if [ ! -d $UUIDDIR ]; then | ||
55 | mkdir -p $UUIDDIR | ||
56 | chown $DAEMONUSER $UUIDDIR | ||
57 | chgrp $DAEMONUSER $UUIDDIR | ||
58 | fi | ||
59 | |||
60 | dbus-uuidgen --ensure | ||
61 | |||
62 | echo -n "Starting $DESC: " | ||
63 | start-stop-daemon -o --start --quiet --pidfile $PIDFILE \ | ||
64 | --user $DAEMONUSER --exec $DAEMON -- --system $PARAMS | ||
65 | echo "$NAME." | ||
66 | if [ -d $EVENTDIR ]; then | ||
67 | run-parts --arg=start $EVENTDIR | ||
68 | fi | ||
69 | } | ||
70 | |||
71 | shut_it_down() | ||
72 | { | ||
73 | if [ -d $EVENTDIR ]; then | ||
74 | # TODO: --reverse when busybox supports it | ||
75 | run-parts --arg=stop $EVENTDIR | ||
76 | fi | ||
77 | echo -n "Stopping $DESC: " | ||
78 | start-stop-daemon -o --stop --quiet --pidfile $PIDFILE \ | ||
79 | --user $DAEMONUSER | ||
80 | # We no longer include these arguments so that start-stop-daemon | ||
81 | # can do its job even given that we may have been upgraded. | ||
82 | # We rely on the pidfile being sanely managed | ||
83 | # --exec $DAEMON -- --system $PARAMS | ||
84 | echo "$NAME." | ||
85 | rm -f $PIDFILE | ||
86 | } | ||
87 | |||
88 | reload_it() | ||
89 | { | ||
90 | echo -n "Reloading $DESC config: " | ||
91 | dbus-send --print-reply --system --type=method_call \ | ||
92 | --dest=org.freedesktop.DBus \ | ||
93 | / org.freedesktop.DBus.ReloadConfig > /dev/null | ||
94 | # hopefully this is enough time for dbus to reload it's config file. | ||
95 | echo "done." | ||
96 | } | ||
97 | |||
98 | case "$1" in | ||
99 | start) | ||
100 | start_it_up | ||
101 | ;; | ||
102 | stop) | ||
103 | shut_it_down | ||
104 | ;; | ||
105 | status) | ||
106 | status $DAEMON | ||
107 | exit $? | ||
108 | ;; | ||
109 | reload|force-reload) | ||
110 | reload_it | ||
111 | ;; | ||
112 | restart) | ||
113 | shut_it_down | ||
114 | sleep 1 | ||
115 | start_it_up | ||
116 | ;; | ||
117 | *) | ||
118 | echo "Usage: /etc/init.d/$NAME {start|stop|status|restart|reload|force-reload}" >&2 | ||
119 | exit 1 | ||
120 | ;; | ||
121 | esac | ||
122 | |||
123 | exit 0 | ||
diff --git a/meta/recipes-core/dbus/dbus/os-test.patch b/meta/recipes-core/dbus/dbus/os-test.patch new file mode 100644 index 0000000000..79554b1ee1 --- /dev/null +++ b/meta/recipes-core/dbus/dbus/os-test.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | dbus: remove build host test in configure script | ||
2 | |||
3 | The dbus build tests the build host to detect what initscript | ||
4 | environment it expects. Remove the test and set it to "redhat" | ||
5 | unconditionally as the oe-core initscript has a redhat-style pid file | ||
6 | path. | ||
7 | |||
8 | Signed-off-by: Andy Ross <andy.ross@windriver.com> | ||
9 | Upstream-Status: innappropriate [embedded] | ||
10 | |||
11 | diff -u a/configure.ac b/configure.ac | ||
12 | --- a/configure.ac 2012-08-28 11:23:43.040609874 -0700 | ||
13 | +++ b/configure.ac 2012-08-28 11:54:25.602913945 -0700 | ||
14 | @@ -1348,19 +1348,8 @@ | ||
15 | AS_AC_EXPAND(EXPANDED_LIBEXECDIR, "$libexecdir") | ||
16 | AS_AC_EXPAND(EXPANDED_DATADIR, "$datadir") | ||
17 | |||
18 | -#### Check our operating system | ||
19 | -operating_system=unknown | ||
20 | -if test -f /etc/redhat-release || test -f $EXPANDED_SYSCONFDIR/redhat-release ; then | ||
21 | - operating_system=redhat | ||
22 | -fi | ||
23 | - | ||
24 | -if test -f /etc/slackware-version || test -f $EXPANDED_SYSCONFDIR/slackware-version ; then | ||
25 | - operating_system=slackware | ||
26 | -fi | ||
27 | - | ||
28 | -if test -f /usr/bin/cygwin1.dll || test -f $EXPANDED_BINDIR/cygwin1.dll ; then | ||
29 | - operating_system=cygwin | ||
30 | -fi | ||
31 | +#### Build host test removed from upstream code, openembedded initscript is redhat-like: | ||
32 | +operating_system=redhat | ||
33 | |||
34 | #### Sort out init scripts | ||
35 | |||
diff --git a/meta/recipes-core/dbus/dbus/ptest.patch b/meta/recipes-core/dbus/dbus/ptest.patch new file mode 100644 index 0000000000..263d17eff7 --- /dev/null +++ b/meta/recipes-core/dbus/dbus/ptest.patch | |||
@@ -0,0 +1,154 @@ | |||
1 | Add install-ptest rules. | ||
2 | Change TEST_ENVIRONMENT to allow running outside build dir. | ||
3 | |||
4 | Makefile.am | 7 +++++++ | ||
5 | bus/Makefile.am | 6 ++++++ | ||
6 | dbus/Makefile.am | 6 ++++++ | ||
7 | doc/Makefile.am | 4 ++++ | ||
8 | test/Makefile.am | 25 ++++++++++++++++++++----- | ||
9 | test/name-test/Makefile.am | 9 +++++++++ | ||
10 | tools/Makefile.am | 12 ++++++++++++ | ||
11 | 7 files changed, 64 insertions(+), 5 deletions(-) | ||
12 | |||
13 | Signed-off-by: Björn Stenberg <bjst@enea.com> | ||
14 | Upstream-Status: Pending | ||
15 | |||
16 | diff -ur a/Makefile.am b/Makefile.am | ||
17 | --- a/Makefile.am 2012-12-06 14:34:01.157414449 +0100 | ||
18 | +++ b/Makefile.am 2012-12-06 15:21:14.447113035 +0100 | ||
19 | @@ -30,4 +30,11 @@ | ||
20 | |||
21 | ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} | ||
22 | |||
23 | +if DBUS_BUILD_TESTS | ||
24 | +install-ptest: | ||
25 | + @for subdir in $(SUBDIRS); do \ | ||
26 | + $(MAKE) -C $$subdir DESTDIR=$(DESTDIR)/$$subdir $@; \ | ||
27 | + done | ||
28 | +endif | ||
29 | + | ||
30 | include tools/lcov.am | ||
31 | diff -ur a/bus/Makefile.am b/bus/Makefile.am | ||
32 | --- a/bus/Makefile.am 2012-12-06 14:34:01.169413931 +0100 | ||
33 | +++ b/bus/Makefile.am 2012-12-06 15:21:14.463112346 +0100 | ||
34 | @@ -290,3 +290,9 @@ | ||
35 | #### Extra dist | ||
36 | |||
37 | EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES) | ||
38 | + | ||
39 | +if DBUS_BUILD_TESTS | ||
40 | +install-ptest: | ||
41 | + @$(MKDIR_P) $(DESTDIR) | ||
42 | + @install $(dbus_daemon_exec_PROGRAMS) $(noinst_PROGRAMS) $(DESTDIR) | ||
43 | +endif | ||
44 | diff -ur a/dbus/Makefile.am b/dbus/Makefile.am | ||
45 | --- a/dbus/Makefile.am 2012-12-06 14:34:01.161414276 +0100 | ||
46 | +++ b/dbus/Makefile.am 2012-12-06 15:21:14.451112862 +0100 | ||
47 | @@ -310,3 +310,9 @@ | ||
48 | update-systemd: | ||
49 | curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c > sd-daemon.c | ||
50 | curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.h > sd-daemon.h | ||
51 | + | ||
52 | +if DBUS_BUILD_TESTS | ||
53 | +install-ptest: | ||
54 | + @$(MKDIR_P) $(DESTDIR) | ||
55 | + @install $(noinst_PROGRAMS) $(DESTDIR) | ||
56 | +endif | ||
57 | diff -ur a/test/Makefile.am b/test/Makefile.am | ||
58 | --- a/test/Makefile.am 2012-12-06 14:34:01.165414103 +0100 | ||
59 | +++ b/test/Makefile.am 2012-12-06 15:21:14.455112690 +0100 | ||
60 | @@ -119,12 +119,13 @@ | ||
61 | DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \ | ||
62 | DBUS_TEST_SYSCONFDIR=$(DESTDIR)$(sysconfdir) | ||
63 | |||
64 | +ptest_run_dir = .. | ||
65 | + | ||
66 | TESTS_ENVIRONMENT = \ | ||
67 | - DBUS_BLOCK_ON_ABORT=1 \ | ||
68 | - DBUS_FATAL_WARNINGS=1 \ | ||
69 | - DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT) \ | ||
70 | - DBUS_TEST_DATA=@abs_top_builddir@/test/data \ | ||
71 | - DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \ | ||
72 | + DBUS_FATAL_WARNINGS=0 \ | ||
73 | + DBUS_TEST_DAEMON=$(ptest_run_dir)/bus/dbus-daemon$(EXEEXT) \ | ||
74 | + DBUS_TEST_DATA=$(ptest_run_dir)/test/data \ | ||
75 | + DBUS_TEST_HOMEDIR=$(ptest_run_dir)/dbus \ | ||
76 | $(NULL) | ||
77 | |||
78 | test_corrupt_SOURCES = corrupt.c | ||
79 | @@ -325,3 +325,25 @@ | ||
80 | data/valid-config-files/system.conf: $(top_builddir)/bus/system.conf | ||
81 | $(AM_V_at)$(MKDIR_P) data/valid-config-files | ||
82 | $(AM_V_GEN)cp $< $@ | ||
83 | + | ||
84 | +if DBUS_BUILD_TESTS | ||
85 | +install-ptest: install-ptest-nonrecursive | ||
86 | + @for subdir in $(SUBDIRS); do \ | ||
87 | + if [ $$subdir != "." ]; then \ | ||
88 | + $(MAKE) -C $$subdir DESTDIR=$(DESTDIR)/$$subdir $@; \ | ||
89 | + fi; \ | ||
90 | + done | ||
91 | + | ||
92 | +install-ptest-nonrecursive: | ||
93 | + @$(MKDIR_P) $(DESTDIR)/data/valid-config-files/session.d | ||
94 | + @for file in Makefile $(installable_tests) $(noinst_PROGRAMS) $(noinst_DATA) ; do \ | ||
95 | + if [ -f .libs/$$file ]; then \ | ||
96 | + install .libs/$$file $(DESTDIR); \ | ||
97 | + else \ | ||
98 | + install -D $${file%.in} $(DESTDIR)/$${file%.in}; \ | ||
99 | + fi; \ | ||
100 | + done; | ||
101 | + @for file in $(EXTRA_DIST); do \ | ||
102 | + install -D ${srcdir}/$${file%.in} $(DESTDIR)/$${file%.in}; \ | ||
103 | + done; | ||
104 | +endif | ||
105 | diff -ur a/test/name-test/Makefile.am b/test/name-test/Makefile.am | ||
106 | --- a/test/name-test/Makefile.am 2012-12-06 14:34:01.169413931 +0100 | ||
107 | +++ b/test/name-test/Makefile.am 2012-12-06 15:21:14.459112518 +0100 | ||
108 | @@ -36,4 +36,16 @@ | ||
109 | test_privserver_client_LDADD=../libdbus-testutils.la | ||
110 | test_autolaunch_LDADD=../libdbus-testutils.la | ||
111 | |||
112 | +install-ptest: | ||
113 | + @$(MKDIR_P) $(DESTDIR) | ||
114 | + @for file in Makefile $(noinst_PROGRAMS); do \ | ||
115 | + if [ -f .libs/$$file ]; then \ | ||
116 | + install .libs/$$file $(DESTDIR); \ | ||
117 | + else \ | ||
118 | + install $$file $(DESTDIR); \ | ||
119 | + fi \ | ||
120 | + done; | ||
121 | + @for file in $(EXTRA_DIST); do \ | ||
122 | + cp $(srcdir)/$$file $(DESTDIR); \ | ||
123 | + done; | ||
124 | endif | ||
125 | diff -ur a/tools/Makefile.am b/tools/Makefile.am | ||
126 | --- a/tools/Makefile.am 2012-12-06 14:34:01.161414276 +0100 | ||
127 | +++ b/tools/Makefile.am 2012-12-06 15:21:14.455112690 +0100 | ||
128 | @@ -78,3 +78,15 @@ | ||
129 | |||
130 | installcheck-local: | ||
131 | test -d $(DESTDIR)$(localstatedir)/lib/dbus | ||
132 | + | ||
133 | +if DBUS_BUILD_TESTS | ||
134 | +install-ptest: | ||
135 | + @$(MKDIR_P) $(DESTDIR) | ||
136 | + @for file in $(bin_PROGRAMS); do \ | ||
137 | + if [ -f .libs/$$file ]; then \ | ||
138 | + install .libs/$$file $(DESTDIR); \ | ||
139 | + else \ | ||
140 | + install $$file $(DESTDIR); \ | ||
141 | + fi; \ | ||
142 | + done; | ||
143 | +endif | ||
144 | diff -ur a/doc/Makefile.am b/doc/Makefile.am | ||
145 | --- a/doc/Makefile.am 2012-06-06 12:45:55.000000000 +0200 | ||
146 | +++ b/doc/Makefile.am 2012-12-06 16:04:58.990070587 +0100 | ||
147 | @@ -174,3 +174,7 @@ | ||
148 | |||
149 | maintainer-clean-local: | ||
150 | rm -f $(XMLTO_OUTPUT) | ||
151 | + | ||
152 | +if DBUS_BUILD_TESTS | ||
153 | +install-ptest: | ||
154 | +endif | ||
diff --git a/meta/recipes-core/dbus/dbus/python-config.patch b/meta/recipes-core/dbus/dbus/python-config.patch new file mode 100644 index 0000000000..294400247e --- /dev/null +++ b/meta/recipes-core/dbus/dbus/python-config.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | When building the dbus-ptest package, we have to enable python. However | ||
2 | checking if the host-system python has the necessary library isn't useful. | ||
3 | |||
4 | Disable the python module check for cross compiling. | ||
5 | |||
6 | Upstream-Status: Inappropriate [oe specific] | ||
7 | |||
8 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> | ||
9 | |||
10 | --- dbus-1.6.8/configure.ac.orig 2013-07-11 14:15:58.834554799 -0500 | ||
11 | +++ dbus-1.6.8/configure.ac 2013-07-11 14:14:40.969554848 -0500 | ||
12 | @@ -257,13 +257,6 @@ | ||
13 | # full test coverage is required, Python is a hard dependency | ||
14 | AC_MSG_NOTICE([Full test coverage (--enable-tests=yes) requires Python, dbus-python, pygobject]) | ||
15 | AM_PATH_PYTHON([2.6]) | ||
16 | - AC_MSG_CHECKING([for Python modules for full test coverage]) | ||
17 | - if "$PYTHON" -c "import dbus, gobject, dbus.mainloop.glib"; then | ||
18 | - AC_MSG_RESULT([yes]) | ||
19 | - else | ||
20 | - AC_MSG_RESULT([no]) | ||
21 | - AC_MSG_ERROR([cannot import dbus, gobject, dbus.mainloop.glib Python modules]) | ||
22 | - fi | ||
23 | else | ||
24 | # --enable-tests not given: do not abort if Python is missing | ||
25 | AM_PATH_PYTHON([2.6], [], [:]) | ||
diff --git a/meta/recipes-core/dbus/dbus/run-ptest b/meta/recipes-core/dbus/dbus/run-ptest new file mode 100755 index 0000000000..e08ecb1a63 --- /dev/null +++ b/meta/recipes-core/dbus/dbus/run-ptest | |||
@@ -0,0 +1,3 @@ | |||
1 | #!/bin/sh | ||
2 | cd test | ||
3 | make -k runtest-TESTS | ||
diff --git a/meta/recipes-core/dbus/dbus/tmpdir.patch b/meta/recipes-core/dbus/dbus/tmpdir.patch new file mode 100644 index 0000000000..bf086e1788 --- /dev/null +++ b/meta/recipes-core/dbus/dbus/tmpdir.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From 5105fedd7fa13dadd2d0d864fb77873b83b79a4b Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Thu, 23 Jun 2011 13:52:09 +0200 | ||
4 | Subject: [PATCH] buildsys: hardcode socketdir to /tmp | ||
5 | |||
6 | the TMPDIR env var isn't always pointing to the right target path | ||
7 | |||
8 | Upstream-Status: Inappropriate [embedded] | ||
9 | |||
10 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
11 | |||
12 | Original comment: | ||
13 | |||
14 | avoid to check tmp dir at build time. instead uses hard coded /tmp here | ||
15 | comment added by Kevin Tian <kevin.tian@intel.com> | ||
16 | --- | ||
17 | configure.ac | 11 +---------- | ||
18 | 1 files changed, 1 insertions(+), 10 deletions(-) | ||
19 | |||
20 | diff --git a/configure.ac b/configure.ac | ||
21 | index 408054b..6d26180 100644 | ||
22 | --- a/configure.ac | ||
23 | +++ b/configure.ac | ||
24 | @@ -1483,16 +1483,7 @@ AC_SUBST(TEST_LAUNCH_HELPER_BINARY) | ||
25 | AC_DEFINE_UNQUOTED(DBUS_TEST_LAUNCH_HELPER_BINARY, "$TEST_LAUNCH_HELPER_BINARY", | ||
26 | [Full path to the launch helper test program in the builddir]) | ||
27 | |||
28 | -#### Find socket directories | ||
29 | -if ! test -z "$TMPDIR" ; then | ||
30 | - DEFAULT_SOCKET_DIR=$TMPDIR | ||
31 | -elif ! test -z "$TEMP" ; then | ||
32 | - DEFAULT_SOCKET_DIR=$TEMP | ||
33 | -elif ! test -z "$TMP" ; then | ||
34 | - DEFAULT_SOCKET_DIR=$TMP | ||
35 | -else | ||
36 | - DEFAULT_SOCKET_DIR=/tmp | ||
37 | -fi | ||
38 | +DEFAULT_SOCKET_DIR=/tmp | ||
39 | |||
40 | DEFAULT_SOCKET_DIR=`echo $DEFAULT_SOCKET_DIR | sed 's/+/%2B/g'` | ||
41 | |||
42 | -- | ||
43 | 1.6.6.1 | ||
44 | |||