./0000775000175000017500000000000012511411356011434 5ustar nielsenrnielsenr./os-test.patch0000664000175000017500000000223612511411356014056 0ustar nielsenrnielsenrdbus: 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 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 ./python-config.patch0000664000175000017500000000201112511411356015233 0ustar nielsenrnielsenrWhen 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 --- 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], [], [:]) ./clear-guid_from_server-if-send_negotiate_unix_f.patch0000664000175000017500000001156712511411356024046 0ustar nielsenrnielsenrFrom b8f84bd39485d3977625c9a8b8e8cff5d23be56f Mon Sep 17 00:00:00 2001 From: Roy Li 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=, 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=, 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 --- 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 ./dbus-1.init0000664000175000017500000000550712511411356013423 0ustar nielsenrnielsenr#! /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 # 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 ./run-ptest0000775000175000017500000000030312511411356013317 0ustar nielsenrnielsenr#!/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 ./tmpdir.patch0000664000175000017500000000242112511411356013753 0ustar nielsenrnielsenrFrom 5105fedd7fa13dadd2d0d864fb77873b83b79a4b Mon Sep 17 00:00:00 2001 From: Koen Kooi 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 Original comment: avoid to check tmp dir at build time. instead uses hard coded /tmp here comment added by Kevin Tian --- 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