backport yocto dbus to 1.6.18
authorRonan Le Martret <ronan@fridu.net>
Thu, 12 Jun 2014 10:05:20 +0000 (12:05 +0200)
committerRonan Le Martret <ronan@fridu.net>
Thu, 12 Jun 2014 10:05:20 +0000 (12:05 +0200)
Change-Id: I29467e29ad9c042b84632181ef9da31db8fb22b5
Signed-off-by: Ronan Le Martret <ronan@fridu.net>
18 files changed:
recipes-core/dbus/dbus-glib-0.100.2/no-examples.patch [new file with mode: 0644]
recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch [new file with mode: 0644]
recipes-core/dbus/dbus-glib-0.100.2/test-install-makefile.patch [new file with mode: 0644]
recipes-core/dbus/dbus-glib.inc [new file with mode: 0644]
recipes-core/dbus/dbus-glib_0.100.2.bb [new file with mode: 0644]
recipes-core/dbus/dbus-test_1.6.18.bb [new file with mode: 0644]
recipes-core/dbus/dbus.inc [new file with mode: 0644]
recipes-core/dbus/dbus/Set-correct-address-when-using-address-systemd.patch [new file with mode: 0644]
recipes-core/dbus/dbus/clear-guid_from_server-if-send_negotiate_unix_f.patch [new file with mode: 0644]
recipes-core/dbus/dbus/dbus-1.init [new file with mode: 0644]
recipes-core/dbus/dbus/fixed-memory-freeing-if-error-during-listing-service.patch [new file with mode: 0644]
recipes-core/dbus/dbus/os-test.patch [new file with mode: 0644]
recipes-core/dbus/dbus/ptest.patch [new file with mode: 0644]
recipes-core/dbus/dbus/python-config.patch [new file with mode: 0644]
recipes-core/dbus/dbus/run-ptest [new file with mode: 0755]
recipes-core/dbus/dbus/tmpdir.patch [new file with mode: 0644]
recipes-core/dbus/dbus_1.6.18.bb [new file with mode: 0644]
recipes-core/dbus/dbus_1.8.2.bbappend [deleted file]

diff --git a/recipes-core/dbus/dbus-glib-0.100.2/no-examples.patch b/recipes-core/dbus/dbus-glib-0.100.2/no-examples.patch
new file mode 100644 (file)
index 0000000..fbb4967
--- /dev/null
@@ -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/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch b/recipes-core/dbus/dbus-glib-0.100.2/obsolete_automake_macros.patch
new file mode 100644 (file)
index 0000000..40e3b12
--- /dev/null
@@ -0,0 +1,15 @@
+Upstream-Status: Submitted [https://bugs.freedesktop.org/show_bug.cgi?id=59003]
+
+Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
+diff -Nurd dbus-glib-0.100/configure.ac dbus-glib-0.100/configure.ac
+--- dbus-glib-0.100/configure.ac       2012-06-25 19:26:39.000000000 +0300
++++ dbus-glib-0.100/configure.ac       2013-01-03 04:53:22.314976758 +0200
+@@ -8,7 +8,7 @@
+
+ AM_INIT_AUTOMAKE([1.9])
+
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS(config.h)
+
+ # Honor aclocal flags
+ ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
diff --git a/recipes-core/dbus/dbus-glib-0.100.2/test-install-makefile.patch b/recipes-core/dbus/dbus-glib-0.100.2/test-install-makefile.patch
new file mode 100644 (file)
index 0000000..2e8e178
--- /dev/null
@@ -0,0 +1,48 @@
+Change Makefile.am to install regression tests for test package purpose.
+
+Upstream-Status: Inappropriate [test not install is for purpose from upstream]
+
+Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
+
+diff --git a/test/Makefile.am b/test/Makefile.am
+index 7ba11a8..249f0e7 100644
+--- a/test/Makefile.am
++++ b/test/Makefile.am
+@@ -13,7 +13,8 @@ else
+ TEST_BINARIES=
+ endif
+-noinst_PROGRAMS= $(TEST_BINARIES)
++testdir = $(datadir)/@PACKAGE@/tests
++test_PROGRAMS= $(TEST_BINARIES)
+ test_service_SOURCES=                         \
+       test-service.c
+diff --git a/test/interfaces/Makefile.am b/test/interfaces/Makefile.am
+index 3cb2c39..e6de67d 100644
+--- a/test/interfaces/Makefile.am
++++ b/test/interfaces/Makefile.am
+@@ -39,7 +39,8 @@ if DBUS_BUILD_TESTS
+ ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we
+ ## build even when not doing "make check"
+-noinst_PROGRAMS = test-service test-client
++testdir = $(datadir)/@PACKAGE@/tests/interfaces
++test_PROGRAMS = test-service test-client
+ test_service_SOURCES = \
+       test-interfaces.c \
+diff --git a/test/core/Makefile.am b/test/core/Makefile.am
+index ef6cb26..9786c3a 100644
+--- a/test/core/Makefile.am
++++ b/test/core/Makefile.am
+@@ -46,7 +46,8 @@ endif
+ ## we use noinst_PROGRAMS not check_PROGRAMS for TESTS so that we
+ ## build even when not doing "make check"
+-noinst_PROGRAMS = \
++testdir = $(datadir)/@PACKAGE@/tests/core
++test_PROGRAMS = \
+       test-dbus-glib \
+       test-service-glib \
+       $(THREAD_APPS) \
diff --git a/recipes-core/dbus/dbus-glib.inc b/recipes-core/dbus/dbus-glib.inc
new file mode 100644 (file)
index 0000000..6c60d9e
--- /dev/null
@@ -0,0 +1,44 @@
+SUMMARY = "High level language (GLib) binding for D-Bus"
+DESCRIPTION = "GLib bindings for the D-Bus message bus that integrate \
+the D-Bus library with the GLib thread abstraction and main loop."
+HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
+LICENSE = "AFL-2 | GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=cf5b3a2f7083750d504333114e738656 \
+                    file://dbus/dbus-glib.h;beginline=7;endline=21;md5=7755c9d7abccd5dbd25a6a974538bb3c"
+SECTION = "base"
+
+DEPENDS = "expat glib-2.0 virtual/libintl dbus-glib-native dbus"
+DEPENDS_class-native = "glib-2.0-native dbus-native"
+
+SRC_URI = "http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-${PV}.tar.gz \
+           file://no-examples.patch \
+           file://test-install-makefile.patch \
+           file://obsolete_automake_macros.patch \
+"
+
+inherit autotools pkgconfig gettext
+
+#default disable regression tests, some unit test code in non testing code
+#PACKAGECONFIG_pn-${PN} = "tests" enable regression tests local.conf
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[tests] = "--enable-tests,,,"
+
+EXTRA_OECONF = "--with-introspect-xml=${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml \
+                --with-dbus-binding-tool=${STAGING_BINDIR_NATIVE}/dbus-binding-tool"
+EXTRA_OECONF_class-native = "--with-introspect-xml=${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml"
+
+PACKAGES += "${PN}-bash-completion ${PN}-tests-dbg ${PN}-tests"
+
+FILES_${PN} = "${libdir}/lib*${SOLIBS}"
+FILES_${PN}-bash-completion = "${sysconfdir}/bash_completion.d/dbus-bash-completion.sh \
+   ${libexecdir}/dbus-bash-completion-helper"
+FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
+FILES_${PN}-dev += "${bindir}/dbus-binding-tool"
+
+RDEPENDS_${PN}-tests += "dbus-x11"
+FILES_${PN}-tests = "${datadir}/${BPN}/tests"
+FILES_${PN}-tests-dbg = "${datadir}/${BPN}/tests/.debug/* \
+                         ${datadir}/${BPN}/tests/core/.debug/* \
+                         ${datadir}/${BPN}/tests/interfaces/.debug/*"
+
+BBCLASSEXTEND = "native"
diff --git a/recipes-core/dbus/dbus-glib_0.100.2.bb b/recipes-core/dbus/dbus-glib_0.100.2.bb
new file mode 100644 (file)
index 0000000..c1bb06a
--- /dev/null
@@ -0,0 +1,5 @@
+require dbus-glib.inc
+
+
+SRC_URI[md5sum] = "ad0920c7e3aad669163bb59171cf138e"
+SRC_URI[sha256sum] = "a5bb42da921f51c28161e0e54a5a8241d94a1c0499a14007150e9ce743da6ac5"
diff --git a/recipes-core/dbus/dbus-test_1.6.18.bb b/recipes-core/dbus/dbus-test_1.6.18.bb
new file mode 100644 (file)
index 0000000..9ea0f4d
--- /dev/null
@@ -0,0 +1,53 @@
+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 dbus-glib"
+
+RDEPENDS_${PN} += "make"
+RDEPENDS_${PN}-dev = ""
+
+SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
+           file://tmpdir.patch \
+           file://ptest.patch \
+           file://dbus-1.init  \
+           file://run-ptest \
+           file://python-config.patch \
+           file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
+           "
+
+SRC_URI[md5sum] = "b02e9c95027a416987b81f9893831061"
+SRC_URI[sha256sum] = "7085a0895a9eb11a952394cdbea6d8b4358e17cb991fed0e8fb85e2b9e686dcd"
+
+S="${WORKDIR}/dbus-${PV}"
+FILESPATH = "${FILE_DIRNAME}/dbus"
+
+inherit autotools pkgconfig gettext ptest
+
+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 \
+                --with-xml=expat \
+                --disable-systemd \
+                --without-systemdsystemunitdir \
+                --with-dbus-test-dir=${PTEST_PATH} \
+                ${EXTRA_OECONF_X}"
+
+do_install() {
+}
+
+do_install_ptest() {
+    find ${D}${PTEST_PATH} -name Makefile | xargs sed -i 's/^Makefile:/_Makefile:/'
+}
diff --git a/recipes-core/dbus/dbus.inc b/recipes-core/dbus/dbus.inc
new file mode 100644 (file)
index 0000000..c7e1e63
--- /dev/null
@@ -0,0 +1,157 @@
+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', 'dbus-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://Set-correct-address-when-using-address-systemd.patch \
+           file://fixed-memory-freeing-if-error-during-listing-service.patch \
+"
+
+inherit useradd autotools pkgconfig gettext update-rc.d
+
+INITSCRIPT_NAME = "dbus-1"
+INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
+
+python __anonymous() {
+    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 \
+               ${libexecdir}/dbus* \
+               ${sysconfdir} \
+               ${localstatedir} \
+               ${datadir}/dbus-1/services \
+               ${datadir}/dbus-1/system-services \
+               ${systemd_unitdir}/system/"
+FILES_${PN}-lib = "${libdir}/lib*.so.*"
+RRECOMMENDS_${PN}-lib = "${PN}"
+FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
+
+pkg_postinst_dbus() {
+       # If 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 \
+                --with-xml=expat \
+                --disable-systemd"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG_class-native = ""
+PACKAGECONFIG_class-nativesdk = ""
+
+# Would like to --enable-systemd but that's a circular build-dependency between
+# systemd<->dbus
+PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir"
+PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
+
+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
+
+       install -d ${D}${sysconfdir}/default/volatiles
+       echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" \
+            > ${D}${sysconfdir}/default/volatiles/99_dbus
+
+
+       mkdir -p ${D}${localstatedir}/lib/dbus
+
+       chown messagebus:messagebus ${D}${localstatedir}/lib/dbus
+
+       chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper
+       chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper
+
+       # Remove Red Hat initscript
+       rm -rf ${D}${sysconfdir}/rc.d
+
+       # Remove empty testexec directory as we don't build tests
+       rm -rf ${D}${libdir}/dbus-1.0/test
+
+       # Remove /var/run as it is created on startup
+       rm -rf ${D}${localstatedir}/run
+}
+
+do_install_class-native() {
+       autotools_do_install
+
+       # for dbus-glib-native introspection generation
+       install -d ${STAGING_DATADIR_NATIVE}/dbus/
+       # N.B. is below install actually required?
+       install -m 0644 bus/session.conf ${STAGING_DATADIR_NATIVE}/dbus/session.conf
+
+       # dbus-glib-native and dbus-glib need this xml file
+       ./bus/dbus-daemon --introspect > ${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml
+       
+       # dbus-launch has no X support so lets not install it in case the host
+       # has a more featured and useful version
+       rm -f ${D}${bindir}/dbus-launch
+}
+
+do_install_class-nativesdk() {
+       autotools_do_install
+
+       # dbus-launch has no X support so lets not install it in case the host
+       # has a more featured and useful version
+       rm -f ${D}${bindir}/dbus-launch
+
+       # Remove /var/run to avoid QA error
+       rm -rf ${D}${localstatedir}/run
+}
+BBCLASSEXTEND = "native nativesdk"
diff --git a/recipes-core/dbus/dbus/Set-correct-address-when-using-address-systemd.patch b/recipes-core/dbus/dbus/Set-correct-address-when-using-address-systemd.patch
new file mode 100644 (file)
index 0000000..1fca9bb
--- /dev/null
@@ -0,0 +1,193 @@
+From d728fdc655f17031da3bb129ab2fd17dadf0fe3a Mon Sep 17 00:00:00 2001
+From: Simon Peeters <peeters.simon@gmail.com>
+Date: Sun, 7 Oct 2012 16:59:30 +0200
+Subject: [PATCH] Set correct address when using --address=systemd:
+
+When dbus gets launched through systemd, we need to create an address
+string based on the sockets passed.
+
+The _dbus_append_addres_from_socket() function is responsible for
+extracting the address information from the file-descriptor and
+formatting it in a dbus friendly way.
+
+This fixes bus activation when running dbus under a systemd session.
+
+https://bugs.freedesktop.org/show_bug.cgi?id=50962
+
+Upstream-Status: Backport
+
+Signed-off-by: Simon Peeters <peeters.simon@gmail.com>
+Signed-off-by: Jonathan Liu <net147@gmail.com>
+---
+ dbus/dbus-server-unix.c  | 38 ++++++++++++++++++---------
+ dbus/dbus-sysdeps-unix.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++
+ dbus/dbus-sysdeps-unix.h |  4 +++
+ 3 files changed, 97 insertions(+), 13 deletions(-)
+
+diff --git a/dbus/dbus-server-unix.c b/dbus/dbus-server-unix.c
+index 130f66e..d995240 100644
+--- a/dbus/dbus-server-unix.c
++++ b/dbus/dbus-server-unix.c
+@@ -149,7 +149,7 @@ _dbus_server_listen_platform_specific (DBusAddressEntry *entry,
+     }
+   else if (strcmp (method, "systemd") == 0)
+     {
+-      int n, *fds;
++      int i, n, *fds;
+       DBusString address;
+       n = _dbus_listen_systemd_sockets (&fds, error);
+@@ -159,27 +159,39 @@ _dbus_server_listen_platform_specific (DBusAddressEntry *entry,
+           return DBUS_SERVER_LISTEN_DID_NOT_CONNECT;
+         }
+-      _dbus_string_init_const (&address, "systemd:");
++      if (!_dbus_string_init (&address))
++          goto systemd_oom;
+-      *server_p = _dbus_server_new_for_socket (fds, n, &address, NULL);
+-      if (*server_p == NULL)
++      for (i = 0; i < n; i++)
+         {
+-          int i;
+-
+-          for (i = 0; i < n; i++)
++          if (i > 0)
+             {
+-              _dbus_close_socket (fds[i], NULL);
++              if (!_dbus_string_append (&address, ";"))
++                goto systemd_oom;
+             }
+-          dbus_free (fds);
+-
+-          dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);
+-          return DBUS_SERVER_LISTEN_DID_NOT_CONNECT;
++          if (!_dbus_append_address_from_socket (fds[i], &address, error))
++            goto systemd_err;
+         }
++      *server_p = _dbus_server_new_for_socket (fds, n, &address, NULL);
++      if (*server_p == NULL)
++        goto systemd_oom;
++
+       dbus_free (fds);
+       return DBUS_SERVER_LISTEN_OK;
+-      }
++  systemd_oom:
++      _DBUS_SET_OOM (error);
++  systemd_err:
++      for (i = 0; i < n; i++)
++        {
++          _dbus_close_socket (fds[i], NULL);
++        }
++      dbus_free (fds);
++      _dbus_string_free (&address);
++
++      return DBUS_SERVER_LISTEN_DID_NOT_CONNECT;
++    }
+ #ifdef DBUS_ENABLE_LAUNCHD
+   else if (strcmp (method, "launchd") == 0)
+     {
+diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c
+index b4ecc96..55743b1 100644
+--- a/dbus/dbus-sysdeps-unix.c
++++ b/dbus/dbus-sysdeps-unix.c
+@@ -55,6 +55,7 @@
+ #include <netinet/in.h>
+ #include <netdb.h>
+ #include <grp.h>
++#include <arpa/inet.h>
+ #ifdef HAVE_ERRNO_H
+ #include <errno.h>
+@@ -4160,4 +4161,71 @@ _dbus_check_setuid (void)
+ #endif
+ }
++/**
++ * Read the address from the socket and append it to the string
++ *
++ * @param fd the socket
++ * @param address
++ * @param error return location for error code
++ */
++dbus_bool_t
++_dbus_append_address_from_socket (int         fd,
++                                  DBusString *address,
++                                  DBusError  *error)
++{
++  union {
++      struct sockaddr sa;
++      struct sockaddr_storage storage;
++      struct sockaddr_un un;
++      struct sockaddr_in ipv4;
++      struct sockaddr_in6 ipv6;
++  } socket;
++  char hostip[INET6_ADDRSTRLEN];
++  int size = sizeof (socket);
++
++  if (getsockname (fd, &socket.sa, &size))
++    goto err;
++
++  switch (socket.sa.sa_family)
++    {
++    case AF_UNIX:
++      if (socket.un.sun_path[0]=='\0')
++        {
++          if (_dbus_string_append_printf (address, "unix:abstract=%s", &(socket.un.sun_path[1])))
++            return TRUE;
++        }
++      else
++        {
++          if (_dbus_string_append_printf (address, "unix:path=%s", socket.un.sun_path))
++            return TRUE;
++        }
++      break;
++    case AF_INET:
++      if (inet_ntop (AF_INET, &socket.ipv4.sin_addr, hostip, sizeof (hostip)))
++        if (_dbus_string_append_printf (address, "tcp:family=ipv4,host=%s,port=%u",
++                   hostip, ntohs (socket.ipv4.sin_port)))
++          return TRUE;
++      break;
++#ifdef AF_INET6
++    case AF_INET6:
++      if (inet_ntop (AF_INET6, &socket.ipv6.sin6_addr, hostip, sizeof (hostip)))
++        if (_dbus_string_append_printf (address, "tcp:family=ipv6,host=%s,port=%u",
++                   hostip, ntohs (socket.ipv6.sin6_port)))
++          return TRUE;
++      break;
++#endif
++    default:
++      dbus_set_error (error,
++                      _dbus_error_from_errno (EINVAL),
++                      "Failed to read address from socket: Unknown socket type.");
++      return FALSE;
++    }
++ err:
++  dbus_set_error (error,
++                  _dbus_error_from_errno (errno),
++                  "Failed to open socket: %s",
++                  _dbus_strerror (errno));
++  return FALSE;
++}
++
+ /* tests in dbus-sysdeps-util.c */
+diff --git a/dbus/dbus-sysdeps-unix.h b/dbus/dbus-sysdeps-unix.h
+index 9b70896..a265b33 100644
+--- a/dbus/dbus-sysdeps-unix.h
++++ b/dbus/dbus-sysdeps-unix.h
+@@ -138,6 +138,10 @@ dbus_bool_t _dbus_parse_uid (const DBusString  *uid_str,
+ void _dbus_close_all (void);
++dbus_bool_t _dbus_append_address_from_socket (int         fd,
++                                              DBusString *address,
++                                              DBusError  *error);
++
+ /** @} */
+ DBUS_END_DECLS
+-- 
+1.9.0
+
diff --git a/recipes-core/dbus/dbus/clear-guid_from_server-if-send_negotiate_unix_f.patch b/recipes-core/dbus/dbus/clear-guid_from_server-if-send_negotiate_unix_f.patch
new file mode 100644 (file)
index 0000000..6bb6d9c
--- /dev/null
@@ -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/recipes-core/dbus/dbus/dbus-1.init b/recipes-core/dbus/dbus/dbus-1.init
new file mode 100644 (file)
index 0000000..42c8629
--- /dev/null
@@ -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/recipes-core/dbus/dbus/fixed-memory-freeing-if-error-during-listing-service.patch b/recipes-core/dbus/dbus/fixed-memory-freeing-if-error-during-listing-service.patch
new file mode 100644 (file)
index 0000000..96290f4
--- /dev/null
@@ -0,0 +1,45 @@
+From 03aeaccbffa97c9237b57ca067e3da7388862129 Mon Sep 17 00:00:00 2001
+From: Radoslaw Pajak <r.pajak@samsung.com>
+Date: Fri, 8 Nov 2013 13:51:32 +0100
+Subject: [PATCH] fixed memory freeing if error during listing services
+
+Upstream-Status: Backport
+
+Signed-off-by: Radoslaw Pajak <r.pajak@samsung.com>
+Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71526
+Signed-off-by: Jonathan Liu <net147@gmail.com>
+---
+ bus/activation.c | 2 +-
+ bus/services.c   | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/bus/activation.c b/bus/activation.c
+index fcb7133..ea48a26 100644
+--- a/bus/activation.c
++++ b/bus/activation.c
+@@ -2179,7 +2179,7 @@ bus_activation_list_services (BusActivation *activation,
+  error:
+   for (j = 0; j < i; j++)
+-    dbus_free (retval[i]);
++    dbus_free (retval[j]);
+   dbus_free (retval);
+   return FALSE;
+diff --git a/bus/services.c b/bus/services.c
+index 6f380fa..01a720e 100644
+--- a/bus/services.c
++++ b/bus/services.c
+@@ -368,7 +368,7 @@ bus_registry_list_services (BusRegistry *registry,
+   
+  error:
+   for (j = 0; j < i; j++)
+-    dbus_free (retval[i]);
++    dbus_free (retval[j]);
+   dbus_free (retval);
+   return FALSE;
+-- 
+1.9.0
+
diff --git a/recipes-core/dbus/dbus/os-test.patch b/recipes-core/dbus/dbus/os-test.patch
new file mode 100644 (file)
index 0000000..79554b1
--- /dev/null
@@ -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: innappropriate [embedded]
+
+diff -u a/configure.ac b/configure.ac
+--- a/configure.ac     2012-08-28 11:23:43.040609874 -0700
++++ b/configure.ac     2012-08-28 11:54:25.602913945 -0700
+@@ -1348,19 +1348,8 @@
+ AS_AC_EXPAND(EXPANDED_LIBEXECDIR, "$libexecdir")
+ AS_AC_EXPAND(EXPANDED_DATADIR, "$datadir")
+-#### Check our operating system
+-operating_system=unknown
+-if test -f /etc/redhat-release || test -f $EXPANDED_SYSCONFDIR/redhat-release ; then
+-   operating_system=redhat
+-fi
+-
+-if test -f /etc/slackware-version || test -f $EXPANDED_SYSCONFDIR/slackware-version ; then
+-   operating_system=slackware
+-fi
+-
+-if test -f /usr/bin/cygwin1.dll || test -f $EXPANDED_BINDIR/cygwin1.dll ; then
+-   operating_system=cygwin
+-fi
++#### Build host test removed from upstream code, openembedded initscript is redhat-like:
++operating_system=redhat
+ #### Sort out init scripts
diff --git a/recipes-core/dbus/dbus/ptest.patch b/recipes-core/dbus/dbus/ptest.patch
new file mode 100644 (file)
index 0000000..263d17e
--- /dev/null
@@ -0,0 +1,154 @@
+Add install-ptest rules.
+Change TEST_ENVIRONMENT to allow running outside build dir.
+
+ Makefile.am                |    7 +++++++
+ bus/Makefile.am            |    6 ++++++
+ dbus/Makefile.am           |    6 ++++++
+ doc/Makefile.am            |    4 ++++
+ test/Makefile.am           |   25 ++++++++++++++++++++-----
+ test/name-test/Makefile.am |    9 +++++++++
+ tools/Makefile.am          |   12 ++++++++++++
+ 7 files changed, 64 insertions(+), 5 deletions(-)
+
+Signed-off-by: Björn Stenberg <bjst@enea.com>
+Upstream-Status: Pending
+
+diff -ur a/Makefile.am b/Makefile.am
+--- a/Makefile.am      2012-12-06 14:34:01.157414449 +0100
++++ b/Makefile.am      2012-12-06 15:21:14.447113035 +0100
+@@ -30,4 +30,11 @@
+ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
++if DBUS_BUILD_TESTS
++install-ptest:
++      @for subdir in $(SUBDIRS); do \
++              $(MAKE) -C $$subdir DESTDIR=$(DESTDIR)/$$subdir $@; \
++      done
++endif
++
+ include tools/lcov.am
+diff -ur a/bus/Makefile.am b/bus/Makefile.am
+--- a/bus/Makefile.am  2012-12-06 14:34:01.169413931 +0100
++++ b/bus/Makefile.am  2012-12-06 15:21:14.463112346 +0100
+@@ -290,3 +290,9 @@
+ #### Extra dist
+ EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES)
++
++if DBUS_BUILD_TESTS
++install-ptest:
++      @$(MKDIR_P) $(DESTDIR)
++      @install $(dbus_daemon_exec_PROGRAMS) $(noinst_PROGRAMS) $(DESTDIR)
++endif
+diff -ur a/dbus/Makefile.am b/dbus/Makefile.am
+--- a/dbus/Makefile.am 2012-12-06 14:34:01.161414276 +0100
++++ b/dbus/Makefile.am 2012-12-06 15:21:14.451112862 +0100
+@@ -310,3 +310,9 @@
+ update-systemd:
+       curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c > sd-daemon.c
+       curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.h > sd-daemon.h
++
++if DBUS_BUILD_TESTS
++install-ptest:
++      @$(MKDIR_P) $(DESTDIR)
++      @install $(noinst_PROGRAMS) $(DESTDIR)
++endif
+diff -ur a/test/Makefile.am b/test/Makefile.am
+--- a/test/Makefile.am 2012-12-06 14:34:01.165414103 +0100
++++ b/test/Makefile.am 2012-12-06 15:21:14.455112690 +0100
+@@ -119,12 +119,13 @@
+       DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \
+       DBUS_TEST_SYSCONFDIR=$(DESTDIR)$(sysconfdir)
++ptest_run_dir = ..
++
+ TESTS_ENVIRONMENT = \
+-      DBUS_BLOCK_ON_ABORT=1 \
+-      DBUS_FATAL_WARNINGS=1 \
+-      DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT) \
+-      DBUS_TEST_DATA=@abs_top_builddir@/test/data \
+-      DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \
++      DBUS_FATAL_WARNINGS=0 \
++      DBUS_TEST_DAEMON=$(ptest_run_dir)/bus/dbus-daemon$(EXEEXT) \
++      DBUS_TEST_DATA=$(ptest_run_dir)/test/data \
++      DBUS_TEST_HOMEDIR=$(ptest_run_dir)/dbus \
+       $(NULL)
+ test_corrupt_SOURCES = corrupt.c
+@@ -325,3 +325,25 @@
+ data/valid-config-files/system.conf: $(top_builddir)/bus/system.conf
+       $(AM_V_at)$(MKDIR_P) data/valid-config-files
+       $(AM_V_GEN)cp $< $@
++
++if DBUS_BUILD_TESTS
++install-ptest: install-ptest-nonrecursive
++      @for subdir in $(SUBDIRS); do \
++              if [ $$subdir != "." ]; then \
++                      $(MAKE) -C $$subdir DESTDIR=$(DESTDIR)/$$subdir $@; \
++              fi; \
++      done
++
++install-ptest-nonrecursive:
++      @$(MKDIR_P) $(DESTDIR)/data/valid-config-files/session.d
++      @for file in Makefile $(installable_tests) $(noinst_PROGRAMS) $(noinst_DATA) ; do \
++              if [ -f .libs/$$file ]; then \
++                      install .libs/$$file $(DESTDIR); \
++              else \
++                      install -D $${file%.in} $(DESTDIR)/$${file%.in}; \
++              fi; \
++      done;
++      @for file in $(EXTRA_DIST); do \
++              install -D ${srcdir}/$${file%.in} $(DESTDIR)/$${file%.in}; \
++      done;
++endif
+diff -ur a/test/name-test/Makefile.am b/test/name-test/Makefile.am
+--- a/test/name-test/Makefile.am       2012-12-06 14:34:01.169413931 +0100
++++ b/test/name-test/Makefile.am       2012-12-06 15:21:14.459112518 +0100
+@@ -36,4 +36,16 @@
+ test_privserver_client_LDADD=../libdbus-testutils.la
+ test_autolaunch_LDADD=../libdbus-testutils.la
++install-ptest:
++      @$(MKDIR_P) $(DESTDIR)
++      @for file in Makefile $(noinst_PROGRAMS); do \
++              if [ -f .libs/$$file ]; then \
++                      install .libs/$$file $(DESTDIR); \
++              else \
++                      install $$file $(DESTDIR); \
++              fi \
++      done;
++      @for file in $(EXTRA_DIST); do \
++              cp $(srcdir)/$$file $(DESTDIR); \
++      done;
+ endif
+diff -ur a/tools/Makefile.am b/tools/Makefile.am
+--- a/tools/Makefile.am        2012-12-06 14:34:01.161414276 +0100
++++ b/tools/Makefile.am        2012-12-06 15:21:14.455112690 +0100
+@@ -78,3 +78,15 @@
+ installcheck-local:
+       test -d $(DESTDIR)$(localstatedir)/lib/dbus
++
++if DBUS_BUILD_TESTS
++install-ptest:
++      @$(MKDIR_P) $(DESTDIR)
++      @for file in $(bin_PROGRAMS); do \
++              if [ -f .libs/$$file ]; then \
++                      install .libs/$$file $(DESTDIR); \
++              else \
++                      install $$file $(DESTDIR); \
++              fi; \
++      done;
++endif
+diff -ur a/doc/Makefile.am b/doc/Makefile.am
+--- a/doc/Makefile.am  2012-06-06 12:45:55.000000000 +0200
++++ b/doc/Makefile.am  2012-12-06 16:04:58.990070587 +0100
+@@ -174,3 +174,7 @@
+ maintainer-clean-local:
+       rm -f $(XMLTO_OUTPUT)
++
++if DBUS_BUILD_TESTS
++install-ptest:
++endif
diff --git a/recipes-core/dbus/dbus/python-config.patch b/recipes-core/dbus/dbus/python-config.patch
new file mode 100644 (file)
index 0000000..2944002
--- /dev/null
@@ -0,0 +1,25 @@
+When building the dbus-ptest package, we have to enable python.  However
+checking if the host-system python has the necessary library isn't useful.
+
+Disable the python module check for cross compiling.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+--- dbus-1.6.8/configure.ac.orig       2013-07-11 14:15:58.834554799 -0500
++++ dbus-1.6.8/configure.ac    2013-07-11 14:14:40.969554848 -0500
+@@ -257,13 +257,6 @@
+   # full test coverage is required, Python is a hard dependency
+   AC_MSG_NOTICE([Full test coverage (--enable-tests=yes) requires Python, dbus-python, pygobject])
+   AM_PATH_PYTHON([2.6])
+-  AC_MSG_CHECKING([for Python modules for full test coverage])
+-  if "$PYTHON" -c "import dbus, gobject, dbus.mainloop.glib"; then
+-    AC_MSG_RESULT([yes])
+-  else
+-    AC_MSG_RESULT([no])
+-    AC_MSG_ERROR([cannot import dbus, gobject, dbus.mainloop.glib Python modules])
+-  fi
+ else
+   # --enable-tests not given: do not abort if Python is missing
+   AM_PATH_PYTHON([2.6], [], [:])
diff --git a/recipes-core/dbus/dbus/run-ptest b/recipes-core/dbus/dbus/run-ptest
new file mode 100755 (executable)
index 0000000..e08ecb1
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+cd test
+make -k runtest-TESTS
diff --git a/recipes-core/dbus/dbus/tmpdir.patch b/recipes-core/dbus/dbus/tmpdir.patch
new file mode 100644 (file)
index 0000000..bf086e1
--- /dev/null
@@ -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/recipes-core/dbus/dbus_1.6.18.bb b/recipes-core/dbus/dbus_1.6.18.bb
new file mode 100644 (file)
index 0000000..7270c36
--- /dev/null
@@ -0,0 +1,4 @@
+include dbus.inc
+
+SRC_URI[md5sum] = "b02e9c95027a416987b81f9893831061"
+SRC_URI[sha256sum] = "7085a0895a9eb11a952394cdbea6d8b4358e17cb991fed0e8fb85e2b9e686dcd"
diff --git a/recipes-core/dbus/dbus_1.8.2.bbappend b/recipes-core/dbus/dbus_1.8.2.bbappend
deleted file mode 100644 (file)
index e9a50fa..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-SRC_URI += " file://dbus-user.service \
-             file://dbus-user.socket \
-           "
-
-#SRC_URI += " file://0001-Set-correct-address-when-using-address-systemd.patch "
-
-SRC_URI += " file://0002-Add-_DBUS_GNUC_WARN_UNUSED_RESULT-similar-to-GLib-s.patch \
-             file://0003-DBusAtomic-on-Unix-use-pthreads-mutexes-for-fallback.patch \
-             file://0004-dbus_threads_init-call-_dbus_threads_init_platform_s.patch \
-             file://0005-dbus_threads_init_default-dbus_threads_init-be-safe-.patch \
-             file://0006-Remove-unused-global-mutexes-for-win_fds-sid_atom_ca.patch \
-             file://0007-Turn-a-runtime-assertion-into-a-compile-time-asserti.patch \
-             file://0008-Replace-individual-global-lock-variables-with-an-arr.patch \
-             file://0009-Make-taking-a-global-lock-automatically-initialize-l.patch \
-             file://0010-Always-initialize-threading-before-allocating-a-dyna.patch \
-             file://0011-Add-a-statically-initialized-implementation-of-_dbus.patch \
-             file://0012-Enable-checking-of-smack-context-from-DBus-interface.patch \
-             file://0013-Enforce-smack-policy-from-conf-file.patch \
-           "
-
-do_install_append() {
-       mkdir -p ${D}${systemd_unitdir}/user
-       install -m 0644 ${WORKDIR}/dbus-user.service ${D}${systemd_unitdir}/user/dbus.service
-       install -m 0644 ${WORKDIR}/dbus-user.socket ${D}${systemd_unitdir}/user/dbus.socket
-}
-
-FILES_${PN} += "${systemd_unitdir}/user/dbus.service \
-               ${systemd_unitdir}/user/dbus.socket \
-              "
-
-EXTRA_OECONF += " --enable-smack "