summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/dbus
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/dbus')
-rw-r--r--meta/recipes-core/dbus/dbus-glib-0.100.2/no-examples.patch15
-rw-r--r--meta/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch15
-rw-r--r--meta/recipes-core/dbus/dbus-glib-0.100.2/test-install-makefile.patch48
-rw-r--r--meta/recipes-core/dbus/dbus-glib.inc44
-rw-r--r--meta/recipes-core/dbus/dbus-glib_0.100.2.bb5
-rw-r--r--meta/recipes-core/dbus/dbus-test_1.6.18.bb54
-rw-r--r--meta/recipes-core/dbus/dbus.inc157
-rw-r--r--meta/recipes-core/dbus/dbus/Set-correct-address-when-using-address-systemd.patch193
-rw-r--r--meta/recipes-core/dbus/dbus/avoid_parallel_tests.patch19
-rw-r--r--meta/recipes-core/dbus/dbus/clear-guid_from_server-if-send_negotiate_unix_f.patch104
-rw-r--r--meta/recipes-core/dbus/dbus/dbus-1.init123
-rw-r--r--meta/recipes-core/dbus/dbus/fixed-memory-freeing-if-error-during-listing-service.patch45
-rw-r--r--meta/recipes-core/dbus/dbus/os-test.patch35
-rw-r--r--meta/recipes-core/dbus/dbus/ptest.patch154
-rw-r--r--meta/recipes-core/dbus/dbus/python-config.patch25
-rwxr-xr-xmeta/recipes-core/dbus/dbus/run-ptest3
-rw-r--r--meta/recipes-core/dbus/dbus/tmpdir.patch44
-rw-r--r--meta/recipes-core/dbus/dbus_1.6.18.bb4
18 files changed, 1087 insertions, 0 deletions
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 0000000..fbb4967
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-glib-0.100.2/no-examples.patch
@@ -0,0 +1,15 @@
1Disable compiling examples
2
3Upstream-Status: Inappropriate [disable feature]
4
5Signed-off-by: Kevin Tian <kevin.tian@intel.com>
6Signed-off-by: Scott Garman <scott.a.garman@intel.com>
7
8--- dbus-glib-0.70/dbus/Makefile.am.orig 2006-07-23 16:04:43.000000000 +0200
9+++ dbus-glib-0.70/dbus/Makefile.am 2006-07-23 16:04:52.000000000 +0200
10@@ -1,4 +1,4 @@
11-SUBDIRS = . examples
12+SUBDIRS = .
13
14 INCLUDES=-I$(top_srcdir) $(DBUS_CFLAGS) $(DBUS_GLIB_CFLAGS) $(DBUS_GLIB_TOOL_CFLAGS) -DDBUS_COMPILATION=1 -DDBUS_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\"
15
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 0000000..40e3b12
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch
@@ -0,0 +1,15 @@
1Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=59003]
2
3Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
4diff -Nurd dbus-glib-0.100/configure.ac dbus-glib-0.100/configure.ac
5--- dbus-glib-0.100/configure.ac 2012-06-25 19:26:39.000000000 +0300
6+++ dbus-glib-0.100/configure.ac 2013-01-03 04:53:22.314976758 +0200
7@@ -8,7 +8,7 @@
8
9 AM_INIT_AUTOMAKE([1.9])
10
11-AM_CONFIG_HEADER(config.h)
12+AC_CONFIG_HEADERS(config.h)
13
14 # Honor aclocal flags
15 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 0000000..2e8e178
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-glib-0.100.2/test-install-makefile.patch
@@ -0,0 +1,48 @@
1Change Makefile.am to install regression tests for test package purpose.
2
3Upstream-Status: Inappropriate [test not install is for purpose from upstream]
4
5Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
6
7diff --git a/test/Makefile.am b/test/Makefile.am
8index 7ba11a8..249f0e7 100644
9--- a/test/Makefile.am
10+++ b/test/Makefile.am
11@@ -13,7 +13,8 @@ else
12 TEST_BINARIES=
13 endif
14
15-noinst_PROGRAMS= $(TEST_BINARIES)
16+testdir = $(datadir)/@PACKAGE@/tests
17+test_PROGRAMS= $(TEST_BINARIES)
18
19 test_service_SOURCES= \
20 test-service.c
21diff --git a/test/interfaces/Makefile.am b/test/interfaces/Makefile.am
22index 3cb2c39..e6de67d 100644
23--- a/test/interfaces/Makefile.am
24+++ b/test/interfaces/Makefile.am
25@@ -39,7 +39,8 @@ if DBUS_BUILD_TESTS
26
27 ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we
28 ## build even when not doing "make check"
29-noinst_PROGRAMS = test-service test-client
30+testdir = $(datadir)/@PACKAGE@/tests/interfaces
31+test_PROGRAMS = test-service test-client
32
33 test_service_SOURCES = \
34 test-interfaces.c \
35diff --git a/test/core/Makefile.am b/test/core/Makefile.am
36index ef6cb26..9786c3a 100644
37--- a/test/core/Makefile.am
38+++ b/test/core/Makefile.am
39@@ -46,7 +46,8 @@ endif
40
41 ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we
42 ## build even when not doing "make check"
43-noinst_PROGRAMS = \
44+testdir = $(datadir)/@PACKAGE@/tests/core
45+test_PROGRAMS = \
46 test-dbus-glib \
47 test-service-glib \
48 $(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 0000000..6c60d9e
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-glib.inc
@@ -0,0 +1,44 @@
1SUMMARY = "High level language (GLib) binding for D-Bus"
2DESCRIPTION = "GLib bindings for the D-Bus message bus that integrate \
3the D-Bus library with the GLib thread abstraction and main loop."
4HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
5LICENSE = "AFL-2 | GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=cf5b3a2f7083750d504333114e738656 \
7 file://dbus/dbus-glib.h;beginline=7;endline=21;md5=7755c9d7abccd5dbd25a6a974538bb3c"
8SECTION = "base"
9
10DEPENDS = "expat glib-2.0 virtual/libintl dbus-glib-native dbus"
11DEPENDS_class-native = "glib-2.0-native dbus-native"
12
13SRC_URI = "http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-${PV}.tar.gz \
14 file://no-examples.patch \
15 file://test-install-makefile.patch \
16 file://obsolete_automake_macros.patch \
17"
18
19inherit autotools pkgconfig gettext
20
21#default disable regression tests, some unit test code in non testing code
22#PACKAGECONFIG_pn-${PN} = "tests" enable regression tests local.conf
23PACKAGECONFIG ??= ""
24PACKAGECONFIG[tests] = "--enable-tests,,,"
25
26EXTRA_OECONF = "--with-introspect-xml=${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml \
27 --with-dbus-binding-tool=${STAGING_BINDIR_NATIVE}/dbus-binding-tool"
28EXTRA_OECONF_class-native = "--with-introspect-xml=${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml"
29
30PACKAGES += "${PN}-bash-completion ${PN}-tests-dbg ${PN}-tests"
31
32FILES_${PN} = "${libdir}/lib*${SOLIBS}"
33FILES_${PN}-bash-completion = "${sysconfdir}/bash_completion.d/dbus-bash-completion.sh \
34 ${libexecdir}/dbus-bash-completion-helper"
35FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
36FILES_${PN}-dev += "${bindir}/dbus-binding-tool"
37
38RDEPENDS_${PN}-tests += "dbus-x11"
39FILES_${PN}-tests = "${datadir}/${BPN}/tests"
40FILES_${PN}-tests-dbg = "${datadir}/${BPN}/tests/.debug/* \
41 ${datadir}/${BPN}/tests/core/.debug/* \
42 ${datadir}/${BPN}/tests/interfaces/.debug/*"
43
44BBCLASSEXTEND = "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 0000000..c1bb06a
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-glib_0.100.2.bb
@@ -0,0 +1,5 @@
1require dbus-glib.inc
2
3
4SRC_URI[md5sum] = "ad0920c7e3aad669163bb59171cf138e"
5SRC_URI[sha256sum] = "a5bb42da921f51c28161e0e54a5a8241d94a1c0499a14007150e9ce743da6ac5"
diff --git a/meta/recipes-core/dbus/dbus-test_1.6.18.bb b/meta/recipes-core/dbus/dbus-test_1.6.18.bb
new file mode 100644
index 0000000..9a7cdc5
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus-test_1.6.18.bb
@@ -0,0 +1,54 @@
1SUMMARY = "D-Bus test package (for D-bus functionality testing only)"
2HOMEPAGE = "http://dbus.freedesktop.org"
3SECTION = "base"
4LICENSE = "AFL-2 | GPLv2+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
6 file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
7
8DEPENDS = "python-pygobject dbus dbus-glib"
9
10RDEPENDS_${PN} += "make"
11RDEPENDS_${PN}-dev = ""
12
13SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
14 file://tmpdir.patch \
15 file://ptest.patch \
16 file://dbus-1.init \
17 file://run-ptest \
18 file://python-config.patch \
19 file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
20 file://avoid_parallel_tests.patch \
21 "
22
23SRC_URI[md5sum] = "b02e9c95027a416987b81f9893831061"
24SRC_URI[sha256sum] = "7085a0895a9eb11a952394cdbea6d8b4358e17cb991fed0e8fb85e2b9e686dcd"
25
26S="${WORKDIR}/dbus-${PV}"
27FILESPATH = "${FILE_DIRNAME}/dbus"
28
29inherit autotools pkgconfig gettext ptest
30
31EXTRA_OECONF_X = "${@base_contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
32EXTRA_OECONF_X_class-native = "--without-x"
33
34EXTRA_OECONF = "--enable-tests \
35 --enable-modular-tests \
36 --enable-installed-tests \
37 --enable-checks \
38 --enable-asserts \
39 --enable-verbose-mode \
40 --disable-xml-docs \
41 --disable-doxygen-docs \
42 --disable-libaudit \
43 --with-xml=expat \
44 --disable-systemd \
45 --without-systemdsystemunitdir \
46 --with-dbus-test-dir=${PTEST_PATH} \
47 ${EXTRA_OECONF_X}"
48
49do_install() {
50}
51
52do_install_ptest() {
53 find ${D}${PTEST_PATH} -name Makefile | xargs sed -i 's/^Makefile:/_Makefile:/'
54}
diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
new file mode 100644
index 0000000..035221f
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -0,0 +1,157 @@
1SUMMARY = "D-Bus message bus"
2DESCRIPTION = "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."
3HOMEPAGE = "http://dbus.freedesktop.org"
4SECTION = "base"
5LICENSE = "AFL-2 | GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
7 file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
8DEPENDS = "expat virtual/libintl"
9RDEPENDS_dbus_class-native = ""
10RDEPENDS_dbus_class-nativesdk = ""
11PACKAGES += "${@bb.utils.contains('PTEST_ENABLED', '1', 'dbus-ptest', '', d)}"
12ALLOW_EMPTY_dbus-ptest = "1"
13RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest"
14
15SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
16 file://tmpdir.patch \
17 file://dbus-1.init \
18 file://os-test.patch \
19 file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
20 file://Set-correct-address-when-using-address-systemd.patch \
21 file://fixed-memory-freeing-if-error-during-listing-service.patch \
22"
23
24inherit useradd autotools pkgconfig gettext update-rc.d
25
26INITSCRIPT_NAME = "dbus-1"
27INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
28
29python __anonymous() {
30 if not oe.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
31 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
32}
33
34USERADD_PACKAGES = "${PN}"
35GROUPADD_PARAM_${PN} = "-r netdev"
36USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \
37 --no-create-home --shell /bin/false \
38 --user-group messagebus"
39
40CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
41
42DEBIANNAME_${PN} = "dbus-1"
43
44PACKAGES =+ "${PN}-lib"
45
46OLDPKGNAME = "dbus-x11"
47OLDPKGNAME_class-nativesdk = ""
48
49# for compatibility
50RPROVIDES_${PN} = "${OLDPKGNAME}"
51RREPLACES_${PN} += "${OLDPKGNAME}"
52
53FILES_${PN} = "${bindir}/dbus-daemon* \
54 ${bindir}/dbus-uuidgen \
55 ${bindir}/dbus-cleanup-sockets \
56 ${bindir}/dbus-send \
57 ${bindir}/dbus-monitor \
58 ${bindir}/dbus-launch \
59 ${libexecdir}/dbus* \
60 ${sysconfdir} \
61 ${localstatedir} \
62 ${datadir}/dbus-1/services \
63 ${datadir}/dbus-1/system-services \
64 ${systemd_unitdir}/system/"
65FILES_${PN}-lib = "${libdir}/lib*.so.*"
66RRECOMMENDS_${PN}-lib = "${PN}"
67FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
68
69pkg_postinst_dbus() {
70 # If both systemd and sysvinit are enabled, mask the dbus-1 init script
71 if ${@base_contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
72 if [ -n "$D" ]; then
73 OPTS="--root=$D"
74 fi
75 systemctl $OPTS mask dbus-1.service
76 fi
77
78 if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
79 /etc/init.d/populate-volatile.sh update
80 fi
81}
82
83EXTRA_OECONF = "--disable-tests \
84 --disable-xml-docs \
85 --disable-doxygen-docs \
86 --disable-libaudit \
87 --with-xml=expat \
88 --disable-systemd"
89
90PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
91 ${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
92PACKAGECONFIG_class-native = ""
93PACKAGECONFIG_class-nativesdk = ""
94
95# Would like to --enable-systemd but that's a circular build-dependency between
96# systemd<->dbus
97PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir"
98PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
99
100do_install() {
101 autotools_do_install
102
103 if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
104 install -d ${D}${sysconfdir}/init.d
105 sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init >${WORKDIR}/dbus-1.init.sh
106 install -m 0755 ${WORKDIR}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1
107 fi
108
109 install -d ${D}${sysconfdir}/default/volatiles
110 echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" \
111 > ${D}${sysconfdir}/default/volatiles/99_dbus
112
113
114 mkdir -p ${D}${localstatedir}/lib/dbus
115
116 chown messagebus:messagebus ${D}${localstatedir}/lib/dbus
117
118 chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper
119 chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper
120
121 # Remove Red Hat initscript
122 rm -rf ${D}${sysconfdir}/rc.d
123
124 # Remove empty testexec directory as we don't build tests
125 rm -rf ${D}${libdir}/dbus-1.0/test
126
127 # Remove /var/run as it is created on startup
128 rm -rf ${D}${localstatedir}/run
129}
130
131do_install_class-native() {
132 autotools_do_install
133
134 # for dbus-glib-native introspection generation
135 install -d ${STAGING_DATADIR_NATIVE}/dbus/
136 # N.B. is below install actually required?
137 install -m 0644 bus/session.conf ${STAGING_DATADIR_NATIVE}/dbus/session.conf
138
139 # dbus-glib-native and dbus-glib need this xml file
140 ./bus/dbus-daemon --introspect > ${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml
141
142 # dbus-launch has no X support so lets not install it in case the host
143 # has a more featured and useful version
144 rm -f ${D}${bindir}/dbus-launch
145}
146
147do_install_class-nativesdk() {
148 autotools_do_install
149
150 # dbus-launch has no X support so lets not install it in case the host
151 # has a more featured and useful version
152 rm -f ${D}${bindir}/dbus-launch
153
154 # Remove /var/run to avoid QA error
155 rm -rf ${D}${localstatedir}/run
156}
157BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-core/dbus/dbus/Set-correct-address-when-using-address-systemd.patch b/meta/recipes-core/dbus/dbus/Set-correct-address-when-using-address-systemd.patch
new file mode 100644
index 0000000..1fca9bb
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus/Set-correct-address-when-using-address-systemd.patch
@@ -0,0 +1,193 @@
1From d728fdc655f17031da3bb129ab2fd17dadf0fe3a Mon Sep 17 00:00:00 2001
2From: Simon Peeters <peeters.simon@gmail.com>
3Date: Sun, 7 Oct 2012 16:59:30 +0200
4Subject: [PATCH] Set correct address when using --address=systemd:
5
6When dbus gets launched through systemd, we need to create an address
7string based on the sockets passed.
8
9The _dbus_append_addres_from_socket() function is responsible for
10extracting the address information from the file-descriptor and
11formatting it in a dbus friendly way.
12
13This fixes bus activation when running dbus under a systemd session.
14
15https://bugs.freedesktop.org/show_bug.cgi?id=50962
16
17Upstream-Status: Backport
18
19Signed-off-by: Simon Peeters <peeters.simon@gmail.com>
20Signed-off-by: Jonathan Liu <net147@gmail.com>
21---
22 dbus/dbus-server-unix.c | 38 ++++++++++++++++++---------
23 dbus/dbus-sysdeps-unix.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++
24 dbus/dbus-sysdeps-unix.h | 4 +++
25 3 files changed, 97 insertions(+), 13 deletions(-)
26
27diff --git a/dbus/dbus-server-unix.c b/dbus/dbus-server-unix.c
28index 130f66e..d995240 100644
29--- a/dbus/dbus-server-unix.c
30+++ b/dbus/dbus-server-unix.c
31@@ -149,7 +149,7 @@ _dbus_server_listen_platform_specific (DBusAddressEntry *entry,
32 }
33 else if (strcmp (method, "systemd") == 0)
34 {
35- int n, *fds;
36+ int i, n, *fds;
37 DBusString address;
38
39 n = _dbus_listen_systemd_sockets (&fds, error);
40@@ -159,27 +159,39 @@ _dbus_server_listen_platform_specific (DBusAddressEntry *entry,
41 return DBUS_SERVER_LISTEN_DID_NOT_CONNECT;
42 }
43
44- _dbus_string_init_const (&address, "systemd:");
45+ if (!_dbus_string_init (&address))
46+ goto systemd_oom;
47
48- *server_p = _dbus_server_new_for_socket (fds, n, &address, NULL);
49- if (*server_p == NULL)
50+ for (i = 0; i < n; i++)
51 {
52- int i;
53-
54- for (i = 0; i < n; i++)
55+ if (i > 0)
56 {
57- _dbus_close_socket (fds[i], NULL);
58+ if (!_dbus_string_append (&address, ";"))
59+ goto systemd_oom;
60 }
61- dbus_free (fds);
62-
63- dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);
64- return DBUS_SERVER_LISTEN_DID_NOT_CONNECT;
65+ if (!_dbus_append_address_from_socket (fds[i], &address, error))
66+ goto systemd_err;
67 }
68
69+ *server_p = _dbus_server_new_for_socket (fds, n, &address, NULL);
70+ if (*server_p == NULL)
71+ goto systemd_oom;
72+
73 dbus_free (fds);
74
75 return DBUS_SERVER_LISTEN_OK;
76- }
77+ systemd_oom:
78+ _DBUS_SET_OOM (error);
79+ systemd_err:
80+ for (i = 0; i < n; i++)
81+ {
82+ _dbus_close_socket (fds[i], NULL);
83+ }
84+ dbus_free (fds);
85+ _dbus_string_free (&address);
86+
87+ return DBUS_SERVER_LISTEN_DID_NOT_CONNECT;
88+ }
89 #ifdef DBUS_ENABLE_LAUNCHD
90 else if (strcmp (method, "launchd") == 0)
91 {
92diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c
93index b4ecc96..55743b1 100644
94--- a/dbus/dbus-sysdeps-unix.c
95+++ b/dbus/dbus-sysdeps-unix.c
96@@ -55,6 +55,7 @@
97 #include <netinet/in.h>
98 #include <netdb.h>
99 #include <grp.h>
100+#include <arpa/inet.h>
101
102 #ifdef HAVE_ERRNO_H
103 #include <errno.h>
104@@ -4160,4 +4161,71 @@ _dbus_check_setuid (void)
105 #endif
106 }
107
108+/**
109+ * Read the address from the socket and append it to the string
110+ *
111+ * @param fd the socket
112+ * @param address
113+ * @param error return location for error code
114+ */
115+dbus_bool_t
116+_dbus_append_address_from_socket (int fd,
117+ DBusString *address,
118+ DBusError *error)
119+{
120+ union {
121+ struct sockaddr sa;
122+ struct sockaddr_storage storage;
123+ struct sockaddr_un un;
124+ struct sockaddr_in ipv4;
125+ struct sockaddr_in6 ipv6;
126+ } socket;
127+ char hostip[INET6_ADDRSTRLEN];
128+ int size = sizeof (socket);
129+
130+ if (getsockname (fd, &socket.sa, &size))
131+ goto err;
132+
133+ switch (socket.sa.sa_family)
134+ {
135+ case AF_UNIX:
136+ if (socket.un.sun_path[0]=='\0')
137+ {
138+ if (_dbus_string_append_printf (address, "unix:abstract=%s", &(socket.un.sun_path[1])))
139+ return TRUE;
140+ }
141+ else
142+ {
143+ if (_dbus_string_append_printf (address, "unix:path=%s", socket.un.sun_path))
144+ return TRUE;
145+ }
146+ break;
147+ case AF_INET:
148+ if (inet_ntop (AF_INET, &socket.ipv4.sin_addr, hostip, sizeof (hostip)))
149+ if (_dbus_string_append_printf (address, "tcp:family=ipv4,host=%s,port=%u",
150+ hostip, ntohs (socket.ipv4.sin_port)))
151+ return TRUE;
152+ break;
153+#ifdef AF_INET6
154+ case AF_INET6:
155+ if (inet_ntop (AF_INET6, &socket.ipv6.sin6_addr, hostip, sizeof (hostip)))
156+ if (_dbus_string_append_printf (address, "tcp:family=ipv6,host=%s,port=%u",
157+ hostip, ntohs (socket.ipv6.sin6_port)))
158+ return TRUE;
159+ break;
160+#endif
161+ default:
162+ dbus_set_error (error,
163+ _dbus_error_from_errno (EINVAL),
164+ "Failed to read address from socket: Unknown socket type.");
165+ return FALSE;
166+ }
167+ err:
168+ dbus_set_error (error,
169+ _dbus_error_from_errno (errno),
170+ "Failed to open socket: %s",
171+ _dbus_strerror (errno));
172+ return FALSE;
173+}
174+
175 /* tests in dbus-sysdeps-util.c */
176diff --git a/dbus/dbus-sysdeps-unix.h b/dbus/dbus-sysdeps-unix.h
177index 9b70896..a265b33 100644
178--- a/dbus/dbus-sysdeps-unix.h
179+++ b/dbus/dbus-sysdeps-unix.h
180@@ -138,6 +138,10 @@ dbus_bool_t _dbus_parse_uid (const DBusString *uid_str,
181
182 void _dbus_close_all (void);
183
184+dbus_bool_t _dbus_append_address_from_socket (int fd,
185+ DBusString *address,
186+ DBusError *error);
187+
188 /** @} */
189
190 DBUS_END_DECLS
191--
1921.9.0
193
diff --git a/meta/recipes-core/dbus/dbus/avoid_parallel_tests.patch b/meta/recipes-core/dbus/dbus/avoid_parallel_tests.patch
new file mode 100644
index 0000000..763b242
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus/avoid_parallel_tests.patch
@@ -0,0 +1,19 @@
1ptest needs buildtest-TESTS and runtest-TESTS targets.
2serial-tests is required to generate those targets.
3
4Signed-off-by: Alexandra Safta <alexandra.safta@enea.com>
5Upstream-Status: Pending
6
7diff -ruN a/configure.ac b/configure.ac
8
9--- a/configure.ac 2014-05-27 10:45:55.224225040 +0200
10+++ b/configure.ac 2014-05-27 10:46:28.810814636 +0200
11@@ -13,7 +13,7 @@
12 AC_CONFIG_HEADERS([config.h])
13 AC_CONFIG_MACRO_DIR([m4])
14
15-AM_INIT_AUTOMAKE([1.10 tar-ustar -Wno-portability])
16+AM_INIT_AUTOMAKE([1.10 tar-ustar -Wno-portability serial-tests])
17
18 GETTEXT_PACKAGE=dbus-1
19 AC_SUBST(GETTEXT_PACKAGE)
diff --git a/meta/recipes-core/dbus/dbus/clear-guid_from_server-if-send_negotiate_unix_f.patch b/meta/recipes-core/dbus/dbus/clear-guid_from_server-if-send_negotiate_unix_f.patch
new file mode 100644
index 0000000..6bb6d9c
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus/clear-guid_from_server-if-send_negotiate_unix_f.patch
@@ -0,0 +1,104 @@
1From b8f84bd39485d3977625c9a8b8e8cff5d23be56f Mon Sep 17 00:00:00 2001
2From: Roy Li <rongqing.li@windriver.com>
3Date: Thu, 27 Feb 2014 09:05:02 +0800
4Subject: [PATCH] dbus: clear guid_from_server if send_negotiate_unix_fd
5 failed
6
7Upstream-Status: Submitted
8
9bus-test dispatch test failed with below information:
10 ./bus/bus-test: Running message dispatch test
11 Activating service name='org.freedesktop.DBus.TestSuiteEchoService'
12 Successfully activated service 'org.freedesktop.DBus.TestSuiteEchoService'
13 6363: assertion failed "_dbus_string_get_length (& DBUS_AUTH_CLIENT (auth)->guid_from_server) == 0" file "dbus-auth.c" line 1545 function process_ok
14 ./bus/bus-test(_dbus_print_backtrace+0x29) [0x80cb969]
15 ./bus/bus-test(_dbus_abort+0x14) [0x80cfb44]
16 ./bus/bus-test(_dbus_real_assert+0x53) [0x80b52c3]
17 ./bus/bus-test() [0x80e24da]
18 ./bus/bus-test(_dbus_auth_do_work+0x388) [0x80e3848]
19 ./bus/bus-test() [0x80aea49]
20 ./bus/bus-test() [0x80affde]
21 ./bus/bus-test(_dbus_transport_handle_watch+0xb1) [0x80ad841]
22 ./bus/bus-test(_dbus_connection_handle_watch+0x104) [0x8089174]
23 ./bus/bus-test(dbus_watch_handle+0xd8) [0x80b15e8]
24 ./bus/bus-test(_dbus_loop_iterate+0x4a9) [0x80d1509]
25 ./bus/bus-test(bus_test_run_clients_loop+0x5d) [0x808129d]
26 ./bus/bus-test() [0x806cab0]
27 ./bus/bus-test() [0x806e0ca]
28 ./bus/bus-test() [0x806da6f]
29 ./bus/bus-test(_dbus_test_oom_handling+0x18c) [0x80b5c8c]
30 ./bus/bus-test() [0x806f723]
31 ./bus/bus-test(bus_dispatch_test+0x3c) [0x8071aac]
32 ./bus/bus-test(main+0x1b7) [0x805acc7]
33 /lib/libc.so.6(__libc_start_main+0xf3) [0x45f919b3]
34 ./bus/bus-test() [0x805ae39]
35
36The stack is below:
37 #0 0xffffe425 in __kernel_vsyscall ()
38 #1 0x45fa62d6 in raise () from /lib/libc.so.6
39 #2 0x45fa9653 in abort () from /lib/libc.so.6
40 #3 0x080cfb65 in _dbus_abort () at dbus-sysdeps.c:94
41 #4 0x080b52c3 in _dbus_real_assert (condition=0,
42 condition_text=condition_text@entry=0x8117a38 "_dbus_string_get_length (& DBUS_AUTH_CLIENT (auth)->guid_from_server) == 0",
43 file=file@entry=0x8117273 "dbus-auth.c", line=line@entry=1545,
44 func=func@entry=0x8117f8e <__FUNCTION__.3492> "process_ok")
45 data=0x8157290) at dbus-connection.c:1515
46 #0 0x00000033fee353e9 in raise () from /lib64/libc.so.6
47 #1 0x00000033fee38508 in abort () from /lib64/libc.so.6
48 #2 0x000000000047d585 in _dbus_abort () at dbus-sysdeps.c:94
49 #3 0x0000000000466486 in _dbus_real_assert (condition=<optimized out>,
50 condition_text=condition_text@entry=0x4c2988 "_dbus_string_get_length (& DBUS_AUTH_CLIENT (auth)->guid_from_server) == 0",
51 file=file@entry=0x4c21a5 "dbus-auth.c", line=line@entry=1546,
52 func=func@entry=0x4c2fce <__FUNCTION__.3845> "process_ok")
53 at dbus-internals.c:931
54 #4 0x000000000048d424 in process_ok (args_from_ok=0x7fffffffe480,
55 auth=0x6ff340) at dbus-auth.c:1546
56 #5 handle_client_state_waiting_for_data (auth=0x6ff340,
57 command=<optimized out>, args=0x7fffffffe480) at dbus-auth.c:1996
58 #6 0x000000000048e789 in process_command (auth=0x6ff340) at dbus-auth.c:2208
59 #7 _dbus_auth_do_work (auth=0x6ff340) at dbus-auth.c:2458
60 #8 0x000000000046091d in do_authentication (
61 transport=transport@entry=0x6ffaa0, do_reading=do_reading@entry=1,
62 do_writing=do_writing@entry=0,
63 auth_completed=auth_completed@entry=0x7fffffffe55c)
64 at dbus-transport-socket.c:442
65 #9 0x0000000000461d08 in socket_handle_watch (transport=0x6ffaa0,
66 watch=0x6f4190, flags=1) at dbus-transport-socket.c:921
67 #10 0x000000000045fa3a in _dbus_transport_handle_watch (transport=0x6ffaa0,
68
69Once send_negotiate_unix_fd failed, this failure will happen, since
70auth->guid_from_server has been set to some value before
71send_negotiate_unix_fd. send_negotiate_unix_fd failure will lead to
72this auth be handled by process_ok again, but this auth->guid_from_server
73is not zero.
74
75So we should clear auth->guid_from_server if send_negotiate_unix_fd failed
76
77Signed-off-by: Roy Li <rongqing.li@windriver.com>
78---
79 dbus/dbus-auth.c | 9 +++++++--
80 1 file changed, 7 insertions(+), 2 deletions(-)
81
82diff --git a/dbus/dbus-auth.c b/dbus/dbus-auth.c
83index d2c37a7..37b45c6 100644
84--- a/dbus/dbus-auth.c
85+++ b/dbus/dbus-auth.c
86@@ -1571,8 +1571,13 @@ process_ok(DBusAuth *auth,
87 _dbus_verbose ("Got GUID '%s' from the server\n",
88 _dbus_string_get_const_data (& DBUS_AUTH_CLIENT (auth)->guid_from_server));
89
90- if (auth->unix_fd_possible)
91- return send_negotiate_unix_fd(auth);
92+ if (auth->unix_fd_possible) {
93+ if (!send_negotiate_unix_fd(auth)) {
94+ _dbus_string_set_length (& DBUS_AUTH_CLIENT (auth)->guid_from_server, 0);
95+ return FALSE;
96+ }
97+ return TRUE;
98+ }
99
100 _dbus_verbose("Not negotiating unix fd passing, since not possible\n");
101 return send_begin (auth);
102--
1031.7.10.4
104
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 0000000..42c8629
--- /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
22DAEMON=@bindir@/dbus-daemon
23NAME=dbus
24DAEMONUSER=messagebus # must match /etc/dbus-1/system.conf
25PIDFILE=/var/run/messagebus.pid # must match /etc/dbus-1/system.conf
26UUIDDIR=/var/lib/dbus
27DESC="system message bus"
28EVENTDIR=/etc/dbus-1/event.d
29
30test -x $DAEMON || exit 0
31
32# Source defaults file; edit that file to configure this script.
33ENABLED=1
34PARAMS=""
35if [ -e /etc/default/dbus ]; then
36 . /etc/default/dbus
37fi
38
39test "$ENABLED" != "0" || exit 0
40
41start_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
71shut_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
88reload_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
98case "$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 ;;
121esac
122
123exit 0
diff --git a/meta/recipes-core/dbus/dbus/fixed-memory-freeing-if-error-during-listing-service.patch b/meta/recipes-core/dbus/dbus/fixed-memory-freeing-if-error-during-listing-service.patch
new file mode 100644
index 0000000..96290f4
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus/fixed-memory-freeing-if-error-during-listing-service.patch
@@ -0,0 +1,45 @@
1From 03aeaccbffa97c9237b57ca067e3da7388862129 Mon Sep 17 00:00:00 2001
2From: Radoslaw Pajak <r.pajak@samsung.com>
3Date: Fri, 8 Nov 2013 13:51:32 +0100
4Subject: [PATCH] fixed memory freeing if error during listing services
5
6Upstream-Status: Backport
7
8Signed-off-by: Radoslaw Pajak <r.pajak@samsung.com>
9Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
10Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71526
11Signed-off-by: Jonathan Liu <net147@gmail.com>
12---
13 bus/activation.c | 2 +-
14 bus/services.c | 2 +-
15 2 files changed, 2 insertions(+), 2 deletions(-)
16
17diff --git a/bus/activation.c b/bus/activation.c
18index fcb7133..ea48a26 100644
19--- a/bus/activation.c
20+++ b/bus/activation.c
21@@ -2179,7 +2179,7 @@ bus_activation_list_services (BusActivation *activation,
22
23 error:
24 for (j = 0; j < i; j++)
25- dbus_free (retval[i]);
26+ dbus_free (retval[j]);
27 dbus_free (retval);
28
29 return FALSE;
30diff --git a/bus/services.c b/bus/services.c
31index 6f380fa..01a720e 100644
32--- a/bus/services.c
33+++ b/bus/services.c
34@@ -368,7 +368,7 @@ bus_registry_list_services (BusRegistry *registry,
35
36 error:
37 for (j = 0; j < i; j++)
38- dbus_free (retval[i]);
39+ dbus_free (retval[j]);
40 dbus_free (retval);
41
42 return FALSE;
43--
441.9.0
45
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 0000000..79554b1
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus/os-test.patch
@@ -0,0 +1,35 @@
1dbus: remove build host test in configure script
2
3The dbus build tests the build host to detect what initscript
4environment it expects. Remove the test and set it to "redhat"
5unconditionally as the oe-core initscript has a redhat-style pid file
6path.
7
8Signed-off-by: Andy Ross <andy.ross@windriver.com>
9Upstream-Status: innappropriate [embedded]
10
11diff -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 0000000..263d17e
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus/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/python-config.patch b/meta/recipes-core/dbus/dbus/python-config.patch
new file mode 100644
index 0000000..2944002
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus/python-config.patch
@@ -0,0 +1,25 @@
1When building the dbus-ptest package, we have to enable python. However
2checking if the host-system python has the necessary library isn't useful.
3
4Disable the python module check for cross compiling.
5
6Upstream-Status: Inappropriate [oe specific]
7
8Signed-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 0000000..e08ecb1
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus/run-ptest
@@ -0,0 +1,3 @@
1#!/bin/sh
2cd test
3make -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 0000000..bf086e1
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus/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
diff --git a/meta/recipes-core/dbus/dbus_1.6.18.bb b/meta/recipes-core/dbus/dbus_1.6.18.bb
new file mode 100644
index 0000000..7270c36
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus_1.6.18.bb
@@ -0,0 +1,4 @@
1include dbus.inc
2
3SRC_URI[md5sum] = "b02e9c95027a416987b81f9893831061"
4SRC_URI[sha256sum] = "7085a0895a9eb11a952394cdbea6d8b4358e17cb991fed0e8fb85e2b9e686dcd"