build: hook up traditional dbus activation
On systems using systemd dbus will use the SystemdServices= directive, but on non-systemd systems the so called "traditional dbus activation" method involves reading the Exec= directive. Setting that to /bin/false means this service is not relevant on non-systemd systems, but apparently there's an interest from users of such systems to use iwd (and possibly ead). Thus hook up the expansion of the paths in the Exec= directive of the dbus service files to allow the traditional dbus activation to start respective daemon.
--- Makefile.am | 11 ++++++----- src/net.connman.iwd.service | 5 ----- src/net.connman.iwd.service.in | 5 +++++ wired/net.connman.ead.service | 5 ----- wired/net.connman.ead.service.in | 5 +++++ 5 files changed, 16 insertions(+), 15 deletions(-) delete mode 100644 src/net.connman.iwd.service create mode 100644 src/net.connman.iwd.service.in delete mode 100644 wired/net.connman.ead.service create mode 100644 wired/net.connman.ead.service.in
Makefile.am +6 -5
@@ -250,7 +250,7 @@ dist_dbus_data_DATA += src/iwd-dbus.conf endif if SYSTEMD_SERVICE -src_iwd_DEPENDENCIES += src/iwd.service +src_iwd_DEPENDENCIES += src/iwd.service src/net.connman.iwd.service systemd_unit_DATA += src/iwd.service dbus_bus_DATA += src/net.connman.iwd.service
@@ -328,7 +328,7 @@ dist_dbus_data_DATA += wired/ead-dbus.conf endif if SYSTEMD_SERVICE -wired_ead_DEPENDENCIES += wired/ead.service +wired_ead_DEPENDENCIES += wired/ead.service wired/net.connman.ead.service systemd_unit_DATA += wired/ead.service dbus_bus_DATA += wired/net.connman.ead.service
@@ -524,8 +524,8 @@ unit_test_p2p_LDADD = $(ell_ldadd) TESTS = $(unit_tests) -EXTRA_DIST = src/genbuiltin src/iwd.service.in src/net.connman.iwd.service \ - wired/ead.service.in wired/net.connman.ead.service \ +EXTRA_DIST = src/genbuiltin src/iwd.service.in src/net.connman.iwd.service.in \ + wired/ead.service.in wired/net.connman.ead.service.in \ src/80-iwd.link src/pkcs8.conf unit/gencerts.cnf \ $(manual_pages) $(patsubst %.1,%.rst, \ $(patsubst %.5,%.rst, \
@@ -539,7 +539,8 @@ if MAINTAINER_MODE AM_CFLAGS += -DHAVE_PKCS8_SUPPORT endif -CLEANFILES = src/iwd.service wired/ead.service +CLEANFILES = src/iwd.service wired/ead.service \ + src/net.connman.iwd.service wired/net.connman.ead.service DISTCHECK_CONFIGURE_FLAGS = --disable-dbus-policy --disable-systemd-service \ --enable-sim-hardcoded \
src/net.connman.iwd.service deleted +0 -5
@@ -1,5 +0,0 @@ -[D-BUS Service] -Name=net.connman.iwd -Exec=/bin/false -User=root -SystemdService=iwd.service
src/net.connman.iwd.service.in new file +5 -0
@@ -0,0 +1,5 @@ +[D-BUS Service] +Name=net.connman.iwd +Exec=@libexecdir@/iwd +User=root +SystemdService=iwd.service
wired/net.connman.ead.service deleted +0 -5
@@ -1,5 +0,0 @@ -[D-BUS Service] -Name=net.connman.ead -Exec=/bin/false -User=root -SystemdService=ead.service
wired/net.connman.ead.service.in new file +5 -0
@@ -0,0 +1,5 @@ +[D-BUS Service] +Name=net.connman.ead +Exec=@libexecdir@/ead +User=root +SystemdService=ead.service
Hi Andreas,
Quoted 104 lines
On systems using systemd dbus will use the SystemdServices= directive, but on non-systemd systems the so called "traditional dbus activation" method involves reading the Exec= directive. Setting that to
/bin/falsemeans this service is not relevant on non-systemd systems, but apparently there's an interest from users of such systems to use iwd (and possibly ead). Thus hook up the expansion of the paths in the Exec= directive of the dbus service files to allow the traditional dbus activation to start respective daemon.Signed-off-by Andreas Henriksson <[email protected]>---
Makefile.am | 11 ++++++----- src/net.connman.iwd.service | 5 ----- src/net.connman.iwd.service.in | 5 +++++ wired/net.connman.ead.service | 5 ----- wired/net.connman.ead.service.in | 5 +++++ 5 files changed, 16 insertions(+), 15 deletions(-)delete mode 100644 src/net.connman.iwd.service create mode 100644 src/net.connman.iwd.service.in delete mode 100644 wired/net.connman.ead.service create mode 100644 wired/net.connman.ead.service.in
Makefile.am +0
-0@@ -250,7 +250,7 @@ dist_dbus_data_DATA += src/iwd-dbus.confendif
if
SYSTEMD_SERVICEMakefile.am +1
-1-src_iwd_DEPENDENCIES += src/iwd.service +src_iwd_DEPENDENCIES += src/iwd.service src/net.connman.iwd.service
systemd_unit_DATA+= src/iwd.servicedbus_bus_DATA+= src/net.connman.iwd.serviceMakefile.am +0
-0@@ -328,7 +328,7 @@ dist_dbus_data_DATA += wired/ead-dbus.confendif
if
SYSTEMD_SERVICEMakefile.am +1
-1-wired_ead_DEPENDENCIES += wired/ead.service +wired_ead_DEPENDENCIES += wired/ead.service wired/net.connman.ead.service
systemd_unit_DATA+= wired/ead.servicedbus_bus_DATA+= wired/net.connman.ead.serviceMakefile.am +2
-2@@ -524,8 +524,8 @@ unit_test_p2p_LDADD = $(ell_ldadd) TESTS = $(unit_tests) -EXTRA_DIST = src/genbuiltin src/iwd.service.in src/net.connman.iwd.service \ - wired/ead.service.in wired/net.connman.ead.service \ +EXTRA_DIST = src/genbuiltin src/iwd.service.in src/net.connman.iwd.service.in \ + wired/ead.service.in wired/net.connman.ead.service.in \ src/80-iwd.link src/pkcs8.conf unit/gencerts.cnf \ $(manual_pages) $(patsubst %.1,%.rst, \ $(patsubst %.5,%.rst, \@@ -539,7 +539,8 @@ if MAINTAINER_MODE
AM_CFLAGS+= -DHAVE_PKCS8_SUPPORT
endifMakefile.am +2
-1-CLEANFILES = src/iwd.service wired/ead.service +CLEANFILES = src/iwd.service wired/ead.service \ + src/net.connman.iwd.service wired/net.connman.ead.serviceDISTCHECK_CONFIGURE_FLAGS = --disable-dbus-policy --disable-systemd-service \ --enable-sim-hardcoded \src/net.connman.iwd.service deleted +0
-5@@ -1,5 +0,0 @@ -[D-BUS Service] -Name=net.connman.iwd -Exec=/bin/false -User=root -SystemdService=iwd.servicesrc/net.connman.iwd.service.in new file +5
-0@@ -0,0 +1,5 @@ +[D-BUS Service] +Name=net.connman.iwd +Exec=@libexecdir@/iwd +User=root +SystemdService=iwd.servicewired/net.connman.ead.service deleted +0
-5@@ -1,5 +0,0 @@ -[D-BUS Service] -Name=net.connman.ead -Exec=/bin/false -User=root -SystemdService=ead.servicewired/net.connman.ead.service.in new file +0
-0
wired/net.connman.ead.service.in line 5
Quoted 5 lines
wired/net.connman.ead.service.in new file +5
-0@@ -0,0 +1,5 @@ +[D-BUS Service] +Name=net.connman.ead +Exec=@libexecdir@/ead +User=root +SystemdService=ead.service
I am reluctant to go back to this since it is also not really working like this. This most likely needs a two-stage setup with an Alias (which we had at one point). And frankly the non-systemd distros can ship a modified file. We don’t have to make everybody happy.
Regards
Marcel
Hello Marcel,
On Fri, Jul 31, 2020 at 08:39:25PM +0200, Marcel Holtmann wrote:
[...]
Quoted 3 lines
I am reluctant to go back to this since it is also not really working like this. This most likely needs a two-stage setup with an Alias (which we had at one point).
Thanks for your quick reply. (And no I didn't actually test if this worked, just that the build generated the result I expected.)
With your hints about alias I looked at git history but only found the systemd service using an alias in the past, never the Exec= in the dbus configuration being anything else than /bin/false... sure you're not mixing up past memories?
FWIW I was about to add that shipping the dbus configuration (and mangling it to remove SystemdService=....) even when building with --disable-systemd-service is also left as an excercise for those with haptephobia.
(I have no personal interest in any of this.)
Quoted 2 lines
And frankly the non-systemd distros can ship a modified file. We don’t have to make everybody happy.
Hopefully this discussion gives enough hints for them to figure out how to get the dbus activation going for themselves...
Regards,
Andreas Henriksson
Hi Andreas,
Quoted 8 lines · Andreas Henriksson
On systems using systemd dbus will use the SystemdServices= directive, but on non-systemd systems the so called "traditional dbus activation" method involves reading the Exec= directive. Setting that to
/bin/falsemeans this service is not relevant on non-systemd systems, but apparently there's an interest from users of such systems to use iwd (and possibly ead). Thus hook up the expansion of the paths in the Exec= directive of the dbus service files to allow the traditional dbus activation to start respective daemon.
Just curious. Can you elaborate a bit on the reasons behind the request?
Quoted 2 lines
Signed-off-by Andreas Henriksson <[email protected]>
We do not use SoB btw.
Regards,
-Denis
Hello Denis Kenzior,
On Fri, Jul 31, 2020 at 01:52:35PM -0500, Denis Kenzior wrote:
[...]
Quoted 1 line
Just curious. Can you elaborate a bit on the reasons behind the request?
[...]
I (as Debian package maintainer) got a bug report with over-inflated severity from the Devuan people about sysvinit. Figured they probably need help to understand dbus activation so decided to send a patch on for their benefit and see what gives. The original reporter is CCed and can likely expand on their reasoning.
(I have no personal interest in this topic.)
Regards,
Andreas Henriksson