From: Jan Alexander Steffens (heftig) Date: Thu, 22 Oct 2015 17:50:29 +0000 (+0200) Subject: user dbus.socket: Set DBUS_SESSION_BUS_ADDRESS X-Git-Tag: dbus-1.10.2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=98e4499240050ea3b41951fda0c06b863b89b152;p=thirdparty%2Fdbus.git user dbus.socket: Set DBUS_SESSION_BUS_ADDRESS As discussed in . See also , Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92612 [smcv: use AC_PATH_PROG to find systemctl; ignore systemctl failure] Signed-off-by: Simon McVittie Reviewed-by: David Herrmann [smcv: add links to earlier bug reports elsewhere] --- diff --git a/bus/systemd-user/dbus.socket.in b/bus/systemd-user/dbus.socket.in index 77958f7c3..4793d1d4f 100644 --- a/bus/systemd-user/dbus.socket.in +++ b/bus/systemd-user/dbus.socket.in @@ -3,6 +3,7 @@ Description=D-Bus User Message Bus Socket [Socket] ListenStream=%t/bus +ExecStartPost=-@SYSTEMCTL@ --user set-environment DBUS_SESSION_BUS_ADDRESS=unix:path=%t/bus [Install] WantedBy=sockets.target diff --git a/configure.ac b/configure.ac index da14b704f..cfb9034ee 100644 --- a/configure.ac +++ b/configure.ac @@ -1202,6 +1202,12 @@ if test x$enable_systemd = xyes -a x$have_systemd != xyes ; then AC_MSG_ERROR([Explicitly requested systemd support, but systemd not found]) fi +# If not found in $PATH, we might still have systemd and systemctl at runtime +# (perhaps dbus is being compiled in a minimal chroot with no systemd). +# Assume the upstream-recommended location. Distributors with split /usr +# can override this with ./configure SYSTEMCTL=/bin/systemctl +AC_PATH_PROG([SYSTEMCTL], [systemctl], [/usr/bin/systemctl]) + # libaudit detection if test x$enable_libaudit = xno ; then have_libaudit=no;