[systemd-commits] 2 commits - configure.ac Makefile.am src/dbus.c src/org.freedesktop.systemd1.conf

Lennart Poettering lennart at kemper.freedesktop.org
Sun Jun 6 19:15:45 PDT 2010


 Makefile.am                       |   16 ++++++++++++----
 configure.ac                      |   16 ++++++++++++++++
 src/dbus.c                        |    2 ++
 src/org.freedesktop.systemd1.conf |    5 +++++
 4 files changed, 35 insertions(+), 4 deletions(-)

New commits:
commit af25ec12e3d39d65f77633182799f3da695f2868
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Jun 7 04:15:37 2010 +0200

    dbus: allow systemd to receive activation requests

diff --git a/src/dbus.c b/src/dbus.c
index 7e6d65e..a14dbda 100644
--- a/src/dbus.c
+++ b/src/dbus.c
@@ -397,6 +397,8 @@ static DBusHandlerResult api_bus_message_filter(DBusConnection  *connection, DBu
                         if (r < 0) {
                                 const char *id, *text;
 
+                                log_warning("D-Bus activation failed for %s: %s", name, strerror(-r));
+
                                 if (!(reply = dbus_message_new_signal("/org/freedesktop/systemd1", "org.freedesktop.systemd1.Activator", "ActivationFailure")))
                                         goto oom;
 
diff --git a/src/org.freedesktop.systemd1.conf b/src/org.freedesktop.systemd1.conf
index 377e001..831df59 100644
--- a/src/org.freedesktop.systemd1.conf
+++ b/src/org.freedesktop.systemd1.conf
@@ -16,8 +16,13 @@
         <policy user="root">
                 <allow own="org.freedesktop.systemd1"/>
 
+                <!-- Root clients can do everything -->
                 <allow send_destination="org.freedesktop.systemd1"/>
                 <allow receive_sender="org.freedesktop.systemd1"/>
+
+                <!-- systemd may receive activator requests -->
+                <allow receive_interface="org.freedesktop.systemd1.Activator"
+                       receive_member="ActivationRequest"/>
         </policy>
 
         <policy context="default">
commit d122948d6fbaac4505cf14a08f1237daa89efdd0
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Jun 7 04:14:39 2010 +0200

    dbus: install bus activation file

diff --git a/Makefile.am b/Makefile.am
index 28e52fe..56047c3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,9 +18,11 @@
 ACLOCAL_AMFLAGS = -I m4
 
 # Dirs of external packages
-dbuspolicydir=$(sysconfdir)/dbus-1/system.d
+dbuspolicydir=@dbuspolicydir@
+dbussessionservicedir=@dbussessionservicedir@
+dbussystemservicedir=@dbussystemservicedir@
+dbusinterfacedir=@dbusinterfacedir@
 udevrulesdir=@udevrulesdir@
-interfacedir=$(datadir)/dbus-1/interfaces
 
 # Our own, non-special dirs
 pkgsysconfdir=$(sysconfdir)/systemd
@@ -67,10 +69,13 @@ noinst_PROGRAMS = \
 dist_dbuspolicy_DATA = \
 	src/org.freedesktop.systemd1.conf
 
+dist_dbussystemservice_DATA = \
+	src/org.freedesktop.systemd1.service
+
 dist_udevrules_DATA = \
 	src/99-systemd.rules
 
-interface_DATA = \
+dbusinterface_DATA = \
 	org.freedesktop.systemd1.Manager.xml \
 	org.freedesktop.systemd1.Job.xml \
 	org.freedesktop.systemd1.Unit.xml \
@@ -464,7 +469,7 @@ endif
 org.freedesktop.systemd1.%.xml: systemd
 	$(AM_V_GEN)./systemd --introspect=${@:.xml=} > $@
 
-CLEANFILES += $(interface_DATA)
+CLEANFILES += $(dbusinterface_DATA)
 
 install-data-hook:
 	$(MKDIR_P) -m 0755 \
@@ -531,6 +536,9 @@ install-data-hook:
 		$(LN_S) ../proc-sys-fs-binfmt_misc.automount proc-sys-fs-binfmt_misc.automount && \
 		$(LN_S) ../sys-kernel-debug.automount sys-kernel-debug.automount && \
 		$(LN_S) ../sys-kernel-security.automount sys-kernel-security.automount )
+	( cd $(DESTDIR)$(dbussessionservicedir) && \
+		rm -f org.freedesktop.systemd1.service && \
+		$(LN_S) ../system-services/org.freedesktop.systemd1.service org.freedesktop.systemd1.service )
 if TARGET_FEDORA
 	( cd $(DESTDIR)$(pkgsysconfdir)/system && \
 		rm -f display-manager.service && \
diff --git a/configure.ac b/configure.ac
index af20151..5a4b5e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -263,6 +263,18 @@ AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware)
 AC_DEFINE_UNQUOTED(SPECIAL_DBUS_SERVICE, ["$SPECIAL_DBUS_SERVICE"], [D-Bus service name])
 AC_DEFINE_UNQUOTED(SPECIAL_SYSLOG_SERVICE, ["$SPECIAL_SYSLOG_SERVICE"], [Syslog service name])
 
+dbuspolicydir=`pkg-config --variable=sysconfdir dbus-1`/dbus-1/system.d
+AC_SUBST([dbuspolicydir], [$dbuspolicydir])
+
+dbussessionservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`
+AC_SUBST([dbussessionservicedir], [$dbussessionservicedir])
+
+dbussystemservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../system-services
+AC_SUBST([dbussystemservicedir], [$dbussystemservicedir])
+
+dbusinterfacedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../interfaces
+AC_SUBST([dbusinterfacedir], [$dbusinterfacedir])
+
 AC_ARG_WITH([udevrulesdir],
         AS_HELP_STRING([--with-udevrulesdir=DIR], [Diectory for udev rules]),
         [],
@@ -290,4 +302,8 @@ echo "
         prefix:                  ${prefix}
         root dir:                ${with_rootdir}
         udev rules dir:          ${with_udevrulesdir}
+        dbus policy dir:         ${dbuspolicydir}
+        dbus session dir:        ${dbussessionservicedir}
+        dbus system dir:         ${dbussystemservicedir}
+        dbus interfaces dir:     ${dbusinterfacedir}
 "


More information about the systemd-commits mailing list