summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/meta/recipes-core/dbus
diff options
context:
space:
mode:
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-core/dbus')
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib.inc39
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib/no-examples.patch15
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib/test-install-makefile.patch57
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib_0.106.bb4
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.6.bb61
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus/dbus/0001-configure.ac-support-large-file-for-stat64.patch53
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus/dbus/clear-guid_from_server-if-send_negotiate_unix_f.patch104
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus/dbus/dbus-1.init123
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus/dbus/os-test.patch35
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus/dbus/python-config.patch34
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-core/dbus/dbus/run-ptest10
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus/dbus/tmpdir.patch44
-rw-r--r--import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.10.6.bb181
13 files changed, 760 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib.inc b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib.inc
new file mode 100644
index 000000000..4661e3af5
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib.inc
@@ -0,0 +1,39 @@
+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 \
+"
+
+inherit autotools pkgconfig gettext bash-completion
+
+#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}-tests"
+
+FILES_${PN} = "${libdir}/lib*${SOLIBS}"
+FILES_${PN}-bash-completion += "${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"
+
+BBCLASSEXTEND = "native"
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib/no-examples.patch b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib/no-examples.patch
new file mode 100644
index 000000000..fbb496782
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib/no-examples.patch
@@ -0,0 +1,15 @@
+Disable compiling examples
+
+Upstream-Status: Inappropriate [disable feature]
+
+Signed-off-by: Kevin Tian <kevin.tian@intel.com>
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+
+--- 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/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib/test-install-makefile.patch b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib/test-install-makefile.patch
new file mode 100644
index 000000000..027c82b27
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib/test-install-makefile.patch
@@ -0,0 +1,57 @@
+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 <yao.zhao@windriver.com>
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ test/Makefile.am | 3 ++-
+ test/core/Makefile.am | 3 ++-
+ test/interfaces/Makefile.am | 3 ++-
+ 3 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/test/Makefile.am b/test/Makefile.am
+index 379c8c3..6580927 100644
+--- a/test/Makefile.am
++++ b/test/Makefile.am
+@@ -48,7 +48,8 @@ TESTS = \
+ $(test_scripts) \
+ $(NULL)
+
+-noinst_PROGRAMS = \
++testdir = $(datadir)/@PACKAGE@/tests
++test_PROGRAMS = \
+ $(test_programs) \
+ $(test_related_programs) \
+ $(NULL)
+diff --git a/test/core/Makefile.am b/test/core/Makefile.am
+index e4bceb4..54b077d 100644
+--- a/test/core/Makefile.am
++++ b/test/core/Makefile.am
+@@ -64,7 +64,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-error-mapping \
+ test-service-glib \
+diff --git a/test/interfaces/Makefile.am b/test/interfaces/Makefile.am
+index a94d08d..707dcac 100644
+--- a/test/interfaces/Makefile.am
++++ b/test/interfaces/Makefile.am
+@@ -57,7 +57,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 \
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib_0.106.bb b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib_0.106.bb
new file mode 100644
index 000000000..0ae848e40
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-glib_0.106.bb
@@ -0,0 +1,4 @@
+require dbus-glib.inc
+
+SRC_URI[md5sum] = "2eea0b7f52b49f600a07abfd8535d4e4"
+SRC_URI[sha256sum] = "b38952706dcf68bad9c302999ef0f420b8cf1a2428227123f0ac4764b689c046"
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.6.bb b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.6.bb
new file mode 100644
index 000000000..a768a09c4
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.6.bb
@@ -0,0 +1,61 @@
+SUMMARY = "D-Bus test package (for D-bus functionality testing only)"
+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"
+
+RDEPENDS_${PN} += "make"
+RDEPENDS_${PN}-dev = ""
+
+SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
+ file://tmpdir.patch \
+ file://dbus-1.init \
+ file://run-ptest \
+ file://python-config.patch \
+ file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
+ "
+
+SRC_URI[md5sum] = "26d0cf3a1c9782cb0e342101f0450440"
+SRC_URI[sha256sum] = "b5fefa08a77edd76cd64d872db949eebc02cf6f3f8be82e4bbc641742af5d35f"
+
+S="${WORKDIR}/dbus-${PV}"
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/dbus:"
+
+inherit autotools pkgconfig gettext ptest upstream-version-is-even
+
+EXTRA_OECONF_X = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
+EXTRA_OECONF_X_class-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 \
+ --disable-systemd \
+ --without-systemdsystemunitdir \
+ --with-dbus-test-dir=${PTEST_PATH} \
+ ${EXTRA_OECONF_X}"
+
+do_install() {
+ :
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/test
+ case1="shell printf refs syslog"
+ for i in ${case1}; do install ${B}/test/test-$i ${D}${PTEST_PATH}/test; done
+ case2="marshal syntax corrupt dbus-daemon dbus-daemon-eavesdrop loopback relay"
+ for i in ${case2}; do install ${B}/test/.libs/test-$i ${D}${PTEST_PATH}/test; done
+ case3="bus bus-system bus-launch-helper"
+ for i in ${case3}; do install ${B}/bus/test-$i ${D}${PTEST_PATH}/test; done
+ install ${B}/dbus/test-dbus ${D}${PTEST_PATH}/test
+ cp -r ${B}/test/data ${D}${PTEST_PATH}/test
+}
+RDEPENDS_${PN}-ptest += "bash"
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/0001-configure.ac-support-large-file-for-stat64.patch b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/0001-configure.ac-support-large-file-for-stat64.patch
new file mode 100644
index 000000000..c6eac2b7d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/0001-configure.ac-support-large-file-for-stat64.patch
@@ -0,0 +1,53 @@
+From e18bd3a571be716d90bedc835a014472470ae7bd Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 30 Dec 2015 10:58:39 +0800
+Subject: [PATCH] configure.ac: support large-file for stat64
+
+While starting dbus-daemon on a 32-bit linux host and it invokes
+fstat to load /etc/dbus-1/system.conf through NFS. If system.conf
+was created with a large indoe number on 64-bit host. The above
+fstat invoking failed. Here is the log of strace:
+............
+$ ls -i /etc/dbus-1/system.conf
+53778558109 /etc/dbus-1/system.conf
+
+$ strace /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
+|open("/etc/dbus-1/system.conf", O_RDONLY) = 4
+|fstat64(4, {st_mode=S_IFREG|0644, st_size=3340, ...}) = 0
+|close(4) = 0
+|close(3) = 0
+|write(2, "Failed to start message bus: Fai"..., 109Failed to start message bus:
+Failed to stat "/etc/dbus-1/system.conf": Value too large for defined data type
+|) = 109
+|exit_group(1) = ?
+|+++ exited with 1 +++
+............
+
+In this situation, we should support large-file for stat64. Add marco
+AC_SYS_LARGEFILE to do the detection at configure time. It can be disabled
+by configuring with the `--disable-largefile' option.
+
+Upstream-Status: Backport
+
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93545
+https://bugs.freedesktop.org/attachment.cgi?id=120747
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index 82806ba..cb5a60b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -64,6 +64,7 @@ AC_SUBST(DBUS_VERSION)
+ AC_PROG_CC
+ AM_PROG_CC_C_O
+ AC_PROG_CXX
+ AC_USE_SYSTEM_EXTENSIONS
++AC_SYS_LARGEFILE
+ AC_ISC_POSIX
+ AC_HEADER_STDC
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/clear-guid_from_server-if-send_negotiate_unix_f.patch b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/clear-guid_from_server-if-send_negotiate_unix_f.patch
new file mode 100644
index 000000000..6bb6d9c82
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/clear-guid_from_server-if-send_negotiate_unix_f.patch
@@ -0,0 +1,104 @@
+From b8f84bd39485d3977625c9a8b8e8cff5d23be56f Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Thu, 27 Feb 2014 09:05:02 +0800
+Subject: [PATCH] dbus: clear guid_from_server if send_negotiate_unix_fd
+ failed
+
+Upstream-Status: Submitted
+
+bus-test dispatch test failed with below information:
+ ./bus/bus-test: Running message dispatch test
+ Activating service name='org.freedesktop.DBus.TestSuiteEchoService'
+ Successfully activated service 'org.freedesktop.DBus.TestSuiteEchoService'
+ 6363: assertion failed "_dbus_string_get_length (& DBUS_AUTH_CLIENT (auth)->guid_from_server) == 0" file "dbus-auth.c" line 1545 function process_ok
+ ./bus/bus-test(_dbus_print_backtrace+0x29) [0x80cb969]
+ ./bus/bus-test(_dbus_abort+0x14) [0x80cfb44]
+ ./bus/bus-test(_dbus_real_assert+0x53) [0x80b52c3]
+ ./bus/bus-test() [0x80e24da]
+ ./bus/bus-test(_dbus_auth_do_work+0x388) [0x80e3848]
+ ./bus/bus-test() [0x80aea49]
+ ./bus/bus-test() [0x80affde]
+ ./bus/bus-test(_dbus_transport_handle_watch+0xb1) [0x80ad841]
+ ./bus/bus-test(_dbus_connection_handle_watch+0x104) [0x8089174]
+ ./bus/bus-test(dbus_watch_handle+0xd8) [0x80b15e8]
+ ./bus/bus-test(_dbus_loop_iterate+0x4a9) [0x80d1509]
+ ./bus/bus-test(bus_test_run_clients_loop+0x5d) [0x808129d]
+ ./bus/bus-test() [0x806cab0]
+ ./bus/bus-test() [0x806e0ca]
+ ./bus/bus-test() [0x806da6f]
+ ./bus/bus-test(_dbus_test_oom_handling+0x18c) [0x80b5c8c]
+ ./bus/bus-test() [0x806f723]
+ ./bus/bus-test(bus_dispatch_test+0x3c) [0x8071aac]
+ ./bus/bus-test(main+0x1b7) [0x805acc7]
+ /lib/libc.so.6(__libc_start_main+0xf3) [0x45f919b3]
+ ./bus/bus-test() [0x805ae39]
+
+The stack is below:
+ #0 0xffffe425 in __kernel_vsyscall ()
+ #1 0x45fa62d6 in raise () from /lib/libc.so.6
+ #2 0x45fa9653 in abort () from /lib/libc.so.6
+ #3 0x080cfb65 in _dbus_abort () at dbus-sysdeps.c:94
+ #4 0x080b52c3 in _dbus_real_assert (condition=0,
+ condition_text=condition_text@entry=0x8117a38 "_dbus_string_get_length (& DBUS_AUTH_CLIENT (auth)->guid_from_server) == 0",
+ file=file@entry=0x8117273 "dbus-auth.c", line=line@entry=1545,
+ func=func@entry=0x8117f8e <__FUNCTION__.3492> "process_ok")
+ data=0x8157290) at dbus-connection.c:1515
+ #0 0x00000033fee353e9 in raise () from /lib64/libc.so.6
+ #1 0x00000033fee38508 in abort () from /lib64/libc.so.6
+ #2 0x000000000047d585 in _dbus_abort () at dbus-sysdeps.c:94
+ #3 0x0000000000466486 in _dbus_real_assert (condition=<optimized out>,
+ condition_text=condition_text@entry=0x4c2988 "_dbus_string_get_length (& DBUS_AUTH_CLIENT (auth)->guid_from_server) == 0",
+ file=file@entry=0x4c21a5 "dbus-auth.c", line=line@entry=1546,
+ func=func@entry=0x4c2fce <__FUNCTION__.3845> "process_ok")
+ at dbus-internals.c:931
+ #4 0x000000000048d424 in process_ok (args_from_ok=0x7fffffffe480,
+ auth=0x6ff340) at dbus-auth.c:1546
+ #5 handle_client_state_waiting_for_data (auth=0x6ff340,
+ command=<optimized out>, args=0x7fffffffe480) at dbus-auth.c:1996
+ #6 0x000000000048e789 in process_command (auth=0x6ff340) at dbus-auth.c:2208
+ #7 _dbus_auth_do_work (auth=0x6ff340) at dbus-auth.c:2458
+ #8 0x000000000046091d in do_authentication (
+ transport=transport@entry=0x6ffaa0, do_reading=do_reading@entry=1,
+ do_writing=do_writing@entry=0,
+ auth_completed=auth_completed@entry=0x7fffffffe55c)
+ at dbus-transport-socket.c:442
+ #9 0x0000000000461d08 in socket_handle_watch (transport=0x6ffaa0,
+ watch=0x6f4190, flags=1) at dbus-transport-socket.c:921
+ #10 0x000000000045fa3a in _dbus_transport_handle_watch (transport=0x6ffaa0,
+
+Once send_negotiate_unix_fd failed, this failure will happen, since
+auth->guid_from_server has been set to some value before
+send_negotiate_unix_fd. send_negotiate_unix_fd failure will lead to
+this auth be handled by process_ok again, but this auth->guid_from_server
+is not zero.
+
+So we should clear auth->guid_from_server if send_negotiate_unix_fd failed
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ dbus/dbus-auth.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/dbus/dbus-auth.c b/dbus/dbus-auth.c
+index d2c37a7..37b45c6 100644
+--- a/dbus/dbus-auth.c
++++ b/dbus/dbus-auth.c
+@@ -1571,8 +1571,13 @@ process_ok(DBusAuth *auth,
+ _dbus_verbose ("Got GUID '%s' from the server\n",
+ _dbus_string_get_const_data (& DBUS_AUTH_CLIENT (auth)->guid_from_server));
+
+- if (auth->unix_fd_possible)
+- return send_negotiate_unix_fd(auth);
++ if (auth->unix_fd_possible) {
++ if (!send_negotiate_unix_fd(auth)) {
++ _dbus_string_set_length (& DBUS_AUTH_CLIENT (auth)->guid_from_server, 0);
++ return FALSE;
++ }
++ return TRUE;
++ }
+
+ _dbus_verbose("Not negotiating unix fd passing, since not possible\n");
+ return send_begin (auth);
+--
+1.7.10.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/dbus-1.init b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/dbus-1.init
new file mode 100644
index 000000000..42c86297c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/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 <walters@debian.org>
+
+# 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/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/os-test.patch b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/os-test.patch
new file mode 100644
index 000000000..54c257f81
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/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 <andy.ross@windriver.com>
+Upstream-Status: Inappropriate [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/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/python-config.patch b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/python-config.patch
new file mode 100644
index 000000000..da2f10c72
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/python-config.patch
@@ -0,0 +1,34 @@
+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 <mark.hatle@windriver.com>
+
+---
+ configure.ac | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 80d27b4..becc1cc 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -279,13 +279,6 @@ if test "x$enable_tests" = xyes; then
+ # full test coverage is required, Python is a hard dependency
+ AC_MSG_NOTICE([Full test coverage (--enable-tests=yes) requires Python, dbus-python, pygi])
+ AM_PATH_PYTHON([2.6])
+- AC_MSG_CHECKING([for Python modules for full test coverage])
+- if "$PYTHON" -c "import dbus, gi.repository.GObject, dbus.mainloop.glib"; then
+- AC_MSG_RESULT([yes])
+- else
+- AC_MSG_RESULT([no])
+- AC_MSG_ERROR([cannot import dbus, gi.repository.GObject, dbus.mainloop.glib Python modules])
+- fi
+ else
+ # --enable-tests not given: do not abort if Python is missing
+ AM_PATH_PYTHON([2.6], [], [:])
+--
+1.9.1
+
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/run-ptest b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/run-ptest
new file mode 100755
index 000000000..c72d083a9
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/run-ptest
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+output() {
+ if [ $? -eq 0 ]
+ then echo "PASS: $i"
+ else echo "FAIL: $i"
+ fi
+}
+
+for i in `ls test/test-*`; do ./$i ./test/data DBUS_TEST_HOMEDIR=./test >/dev/null; output; done
diff --git a/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/tmpdir.patch b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/tmpdir.patch
new file mode 100644
index 000000000..bf086e178
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus/tmpdir.patch
@@ -0,0 +1,44 @@
+From 5105fedd7fa13dadd2d0d864fb77873b83b79a4b Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+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 <koen@dominion.thruhere.net>
+
+Original comment:
+
+ avoid to check tmp dir at build time. instead uses hard coded /tmp here
+ comment added by Kevin Tian <kevin.tian@intel.com>
+---
+ 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/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.10.6.bb b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.10.6.bb
new file mode 100644
index 000000000..245798a00
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-core/dbus/dbus_1.10.6.bb
@@ -0,0 +1,181 @@
+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"
+DEPENDS = "expat virtual/libintl"
+RDEPENDS_dbus_class-native = ""
+RDEPENDS_dbus_class-nativesdk = ""
+PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}"
+ALLOW_EMPTY_dbus-ptest = "1"
+RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest"
+
+SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
+ file://tmpdir.patch \
+ file://dbus-1.init \
+ file://os-test.patch \
+ file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
+ file://0001-configure.ac-support-large-file-for-stat64.patch \
+"
+
+SRC_URI[md5sum] = "26d0cf3a1c9782cb0e342101f0450440"
+SRC_URI[sha256sum] = "b5fefa08a77edd76cd64d872db949eebc02cf6f3f8be82e4bbc641742af5d35f"
+
+inherit useradd autotools pkgconfig gettext update-rc.d upstream-version-is-even
+
+INITSCRIPT_NAME = "dbus-1"
+INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
+
+python __anonymous() {
+ if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+ 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 \
+ ${bindir}/dbus-run-session \
+ ${bindir}/dbus-update-activation-environment \
+ ${libexecdir}/dbus* \
+ ${sysconfdir} \
+ ${localstatedir} \
+ ${datadir}/dbus-1/services \
+ ${datadir}/dbus-1/system-services \
+ ${datadir}/dbus-1/session.d \
+ ${datadir}/dbus-1/session.conf \
+ ${datadir}/dbus-1/system.d \
+ ${datadir}/dbus-1/system.conf \
+ ${systemd_system_unitdir} \
+ ${systemd_user_unitdir} \
+"
+FILES_${PN}-lib = "${libdir}/lib*.so.*"
+RRECOMMENDS_${PN}-lib = "${PN}"
+FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-test-tool"
+
+pkg_postinst_dbus() {
+ # If both systemd and sysvinit are enabled, mask the dbus-1 init script
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
+ if [ -n "$D" ]; then
+ OPTS="--root=$D"
+ fi
+ systemctl $OPTS mask dbus-1.service
+ fi
+
+ if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
+ /etc/init.d/populate-volatile.sh update
+ fi
+}
+
+EXTRA_OECONF = "--disable-tests \
+ --disable-xml-docs \
+ --disable-doxygen-docs \
+ --disable-libaudit \
+ "
+
+EXTRA_OECONF_append_class-native = " --disable-selinux"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG_class-native = ""
+PACKAGECONFIG_class-nativesdk = ""
+
+PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd --without-systemdsystemunitdir,systemd"
+PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
+PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,,"
+PACKAGECONFIG[user-session] = "--enable-user-session --with-systemduserunitdir=${systemd_user_unitdir},--disable-user-session"
+
+do_install() {
+ autotools_do_install
+
+ if ${@bb.utils.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
+
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ for i in dbus.target.wants sockets.target.wants multi-user.target.wants; do \
+ install -d ${D}${systemd_system_unitdir}/$i; done
+ install -m 0644 ${B}/bus/dbus.service ${B}/bus/dbus.socket ${D}${systemd_system_unitdir}/
+ cd ${D}${systemd_system_unitdir}/dbus.target.wants/
+ ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/dbus.target.wants/dbus.socket
+ ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/sockets.target.wants/dbus.socket
+ ln -fs ../dbus.service ${D}${systemd_system_unitdir}/multi-user.target.wants/dbus.service
+ 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 ${D}${STAGING_DATADIR_NATIVE}/dbus/
+ # N.B. is below install actually required?
+ install -m 0644 bus/session.conf ${D}${STAGING_DATADIR_NATIVE}/dbus/session.conf
+
+ # dbus-glib-native and dbus-glib need this xml file
+ ./bus/dbus-daemon --introspect > ${D}${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"
+
+INSANE_SKIP_${PN}-ptest += "build-deps"
OpenPOWER on IntegriCloud