summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/dbus/dbus-1.6.10
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/dbus/dbus-1.6.10')
-rw-r--r--meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init116
-rw-r--r--meta/recipes-core/dbus/dbus-1.6.10/ptest.patch154
-rwxr-xr-xmeta/recipes-core/dbus/dbus-1.6.10/run-ptest3
-rw-r--r--meta/recipes-core/dbus/dbus-1.6.10/test-run-path.patch26
-rw-r--r--meta/recipes-core/dbus/dbus-1.6.10/tmpdir.patch44
5 files changed, 343 insertions, 0 deletions
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..64f2170255
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-1.6.10/dbus-1.init
@@ -0,0 +1,116 @@
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
17set -e
18
19DAEMON=@bindir@/dbus-daemon
20NAME=dbus
21DAEMONUSER=messagebus # must match /etc/dbus-1/system.conf
22PIDFILE=/var/run/messagebus.pid # must match /etc/dbus-1/system.conf
23UUIDDIR=/var/lib/dbus
24DESC="system message bus"
25EVENTDIR=/etc/dbus-1/event.d
26
27test -x $DAEMON || exit 0
28
29# Source defaults file; edit that file to configure this script.
30ENABLED=1
31PARAMS=""
32if [ -e /etc/default/dbus ]; then
33 . /etc/default/dbus
34fi
35
36test "$ENABLED" != "0" || exit 0
37
38start_it_up()
39{
40 mkdir -p "`dirname $PIDFILE`"
41 if [ -e $PIDFILE ]; then
42 PIDDIR=/proc/$(cat $PIDFILE)
43 if [ -d ${PIDDIR} -a "$(readlink -f ${PIDDIR}/exe)" = "${DAEMON}" ]; then
44 echo "$DESC already started; not starting."
45 else
46 echo "Removing stale PID file $PIDFILE."
47 rm -f $PIDFILE
48 fi
49 fi
50
51 if [ ! -d $UUIDDIR ]; then
52 mkdir -p $UUIDDIR
53 chown $DAEMONUSER $UUIDDIR
54 chgrp $DAEMONUSER $UUIDDIR
55 fi
56
57 dbus-uuidgen --ensure
58
59 echo -n "Starting $DESC: "
60 start-stop-daemon --start --quiet --pidfile $PIDFILE \
61 --user $DAEMONUSER --exec $DAEMON -- --system $PARAMS
62 echo "$NAME."
63 if [ -d $EVENTDIR ]; then
64 run-parts --arg=start $EVENTDIR
65 fi
66}
67
68shut_it_down()
69{
70 if [ -d $EVENTDIR ]; then
71 # TODO: --reverse when busybox supports it
72 run-parts --arg=stop $EVENTDIR
73 fi
74 echo -n "Stopping $DESC: "
75 start-stop-daemon --stop --quiet --pidfile $PIDFILE \
76 --user $DAEMONUSER
77 # We no longer include these arguments so that start-stop-daemon
78 # can do its job even given that we may have been upgraded.
79 # We rely on the pidfile being sanely managed
80 # --exec $DAEMON -- --system $PARAMS
81 echo "$NAME."
82 rm -f $PIDFILE
83}
84
85reload_it()
86{
87 echo -n "Reloading $DESC config: "
88 dbus-send --print-reply --system --type=method_call \
89 --dest=org.freedesktop.DBus \
90 / org.freedesktop.DBus.ReloadConfig > /dev/null
91 # hopefully this is enough time for dbus to reload it's config file.
92 echo "done."
93}
94
95case "$1" in
96 start)
97 start_it_up
98 ;;
99 stop)
100 shut_it_down
101 ;;
102 reload|force-reload)
103 reload_it
104 ;;
105 restart)
106 shut_it_down
107 sleep 1
108 start_it_up
109 ;;
110 *)
111 echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload|force-reload}" >&2
112 exit 1
113 ;;
114esac
115
116exit 0
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 @@
1Add install-ptest rules.
2Change 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
13Signed-off-by: Björn Stenberg <bjst@enea.com>
14Upstream-Status: Pending
15
16diff -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
31diff -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
44diff -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
57diff -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
105diff -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
125diff -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
144diff -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-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 @@
1#!/bin/sh
2cd test
3make -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 @@
1
2
3Signed-off-by: Björn Stenberg <bjst@enea.com>
4Upstream-Status: Pending
5
6--- a/test/Makefile.am 2012-06-15 15:25:43.000000000 +0200
7+++ b/test/Makefile.am 2012-11-16 09:24:44.263140840 +0100
8@@ -119,12 +119,13 @@
9 DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \
10 DBUS_TEST_SYSCONFDIR=$(DESTDIR)$(sysconfdir)
11
12+ptest_run_dir = ..
13+
14 TESTS_ENVIRONMENT = \
15- DBUS_BLOCK_ON_ABORT=1 \
16- DBUS_FATAL_WARNINGS=1 \
17- DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT) \
18- DBUS_TEST_DATA=@abs_top_builddir@/test/data \
19- DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \
20+ DBUS_FATAL_WARNINGS=0 \
21+ DBUS_TEST_DAEMON=$(ptest_run_dir)/bus/dbus-daemon$(EXEEXT) \
22+ DBUS_TEST_DATA=$(ptest_run_dir)/test/data \
23+ DBUS_TEST_HOMEDIR=$(ptest_run_dir)/dbus \
24 $(NULL)
25
26 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 @@
1From 5105fedd7fa13dadd2d0d864fb77873b83b79a4b Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Thu, 23 Jun 2011 13:52:09 +0200
4Subject: [PATCH] buildsys: hardcode socketdir to /tmp
5
6the TMPDIR env var isn't always pointing to the right target path
7
8Upstream-Status: Inappropriate [embedded]
9
10Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
11
12Original 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
20diff --git a/configure.ac b/configure.ac
21index 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--
431.6.6.1
44