summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2015-02-09 19:02:43 (GMT)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2015-02-24 11:15:37 (GMT)
commit263aca37ecf5f977f68d87b54f2fb30584725781 (patch)
tree9b18710b118a49d9d47553326957e904eecdce70 /configure.ac
parent614e5aa8723484d351005b4bbbeed9b4ef8332ee (diff)
downloaddbus-263aca37ecf5f977f68d87b54f2fb30584725781.tar.gz
Optionally install systemd user units for a per-user bus
The socket path used here, $XDG_RUNTIME_DIR/bus, does not match what was used in user-session-units, but is what Lennart recommended on fd.o #61303, and is also what kdbus will use for its bus proxy. Installation of these units switches D-Bus to a different model of the system: instead of considering each login session (approximately, each password typed in) to be its own session, the user-session model is that all concurrent logins by the same user form one large session. This allows the same bus to be shared by a graphical session, cron jobs, tty/ssh sessions, screen/tmux sessions and so on. Because this is a different world-view, it is compile-time optional: OS builders can choose which world their OS will live in. The default is still the login-session model used in earlier D-Bus releases, but might change to the user-session model in future. Explicit configuration is recommended. In OSs that support both models (either for sysadmin flexibility or as a transitional measure), the OS builder should enable the user bus units, but split them off into a dpkg binary package, RPM subpackage etc.; the sysadmin can choose whether to enable the user-session model by choosing whether to install that package. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61301 Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac19
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index ac3ae26..303bc34 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1560,6 +1560,16 @@ if test "x$with_systemdsystemunitdir" != xno; then
fi
AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$have_systemd" != "xno" -a -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
+AC_ARG_WITH([systemduserunitdir],
+AS_HELP_STRING([--with-systemduserunitdir=DIR], [Directory for systemd user service files]),
+ [],
+ [
+ PKG_CHECK_EXISTS([systemd],
+ [with_systemduserunitdir=$($PKG_CONFIG --variable=systemduserunitdir systemd)],
+ [with_systemduserunitdir='${libdir}/systemd/user'])
+ ])
+AC_SUBST([systemduserunitdir], [$with_systemduserunitdir])
+
##### Set up location for system bus socket
if ! test -z "$with_system_socket"; then
DBUS_SYSTEM_SOCKET=$with_system_socket
@@ -1813,6 +1823,13 @@ if test "x$enable_stats" = xyes; then
[Define to enable bus daemon usage statistics])
fi
+AC_ARG_ENABLE([user-session],
+ [AS_HELP_STRING([--enable-user-session],
+ [enable user-session semantics for session bus under systemd])],
+ [], [enable_user_session=no])
+AM_CONDITIONAL([DBUS_ENABLE_USER_SESSION],
+ [test "x$enable_user_session" = xyes])
+
AC_CONFIG_FILES([
Doxyfile
dbus/Version
@@ -1828,6 +1845,8 @@ bus/org.freedesktop.dbus-session.plist
bus/rc.messagebus
bus/dbus.service
bus/dbus.socket
+bus/systemd-user/dbus.service
+bus/systemd-user/dbus.socket
Makefile
dbus/Makefile
bus/Makefile