diff -Nru dbus-1.10.6/debian/changelog dbus-1.10.6/debian/changelog --- dbus-1.10.6/debian/changelog 2016-04-01 01:25:06.000000000 +0000 +++ dbus-1.10.6/debian/changelog 2016-05-24 19:25:50.000000000 +0000 @@ -1,3 +1,20 @@ +dbus (1.10.6-1ubuntu4) yakkety; urgency=medium + + * debian/dbus.user-session.upstart: + - Don't start a new session bus if there already is one (e. g. via + dbus-user-session), as this would lead to different services talking to + different buses and thus not seeing each other. As we still need the + actual job itself running, run "sleep infinity" instead in this case. + - Drop "expect fork" and "--fork" argument. There is little point in the + daemon forking, upstart already manages it. This makes debugging easier + and also avoids having to fork "sleep" in the case that dbus-daemon is + already running. + - Drop "mkdir ~/.cache/upstart". This doesn't belong into a job, isn't + necessary (upstart already creates it on start) and would be too late + anyway. + + -- Martin Pitt Tue, 24 May 2016 21:25:46 +0200 + dbus (1.10.6-1ubuntu3) xenial; urgency=medium * debian/dbus.preinst: divert the dbus-daemon-launch-helper if upgrading diff -Nru dbus-1.10.6/debian/dbus.user-session.upstart dbus-1.10.6/debian/dbus.user-session.upstart --- dbus-1.10.6/debian/dbus.user-session.upstart 2015-09-01 16:31:53.000000000 +0000 +++ dbus-1.10.6/debian/dbus.user-session.upstart 2016-05-24 11:22:44.000000000 +0000 @@ -6,17 +6,27 @@ env DBUS_DEBUG_OUTPUT=1 respawn -expect fork + pre-start script - DBUS_SESSION_BUS_ADDRESS=unix:abstract=$(mktemp -u /tmp/dbus-XXXXXXXXXX) + if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then + DBUS_SESSION_BUS_ADDRESS=unix:abstract=$(mktemp -u /tmp/dbus-XXXXXXXXXX) + initctl set-env do_launch=1 + fi initctl set-env DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS end script -exec dbus-daemon --fork --session --address="$DBUS_SESSION_BUS_ADDRESS" +script + if [ -n "$do_launch" ]; then + exec dbus-daemon --session --address="$DBUS_SESSION_BUS_ADDRESS" + else + # if there already is an existing user bus, don't launch another one, + # but keep running to start jobs that trigger on dbus + exec sleep infinity + fi +end script post-start script initctl set-env --global DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS - [ -d "$HOME/.cache/upstart" ] || mkdir -p "$HOME/.cache/upstart" || true echo "DBUS_SESSION_BUS_ADDRESS=${DBUS_SESSION_BUS_ADDRESS}" >$XDG_RUNTIME_DIR/dbus-session || true initctl notify-dbus-address "$DBUS_SESSION_BUS_ADDRESS" || true end script