From 03e015bacdc35b7bebf2e000ac376a510c6cbe96 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 8 Feb 2022 21:21:42 +0100 Subject: [PATCH] priv-helper: remove D-Bus Alias for "nm-priv-helper.service" In systemd, it's common that a D-Bus activatable service references `SystemdService=dbus-$BUSNAME.service` instead the real service name. Together with an `[Install].Alias=dbus-$BUSNAME.service` directive, this allowed to enable/disable D-Bus activation without uninstalling the service altogether ([1]). Currently, when we install the RPM then `nm-priv-helper.service` is not enabled, consequently the alias is not created, and D-Bus activation does not work. I guess, we should fix that by enabling the service in the %post section or via a systemd preset? Dunno. Anyway. It seems that nm-priv-helper.service is more of an implementation detail of NetworkManager. It makes not sense for the user to interact directly, or to enable/disable D-Bus activation (because that is how it works). So, drop the alias. See-also: [1] https://docs.fedoraproject.org/en-US/packaging-guidelines/Systemd/#activation_dbus (cherry picked from commit d849807521cab8118d2d088b1619e9858f1f30d2) --- data/nm-priv-helper.service.in | 4 ---- src/nm-priv-helper/org.freedesktop.nm_priv_helper.service.in | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/data/nm-priv-helper.service.in b/data/nm-priv-helper.service.in index df2868f527..7b083bbb21 100644 --- a/data/nm-priv-helper.service.in +++ b/data/nm-priv-helper.service.in @@ -73,7 +73,3 @@ CapabilityBoundingSet=CAP_DAC_OVERRIDE PrivateUsers=no RestrictAddressFamilies=AF_UNIX SystemCallFilter=@resources - - -[Install] -Alias=dbus-org.freedesktop.nm_priv_helper.service diff --git a/src/nm-priv-helper/org.freedesktop.nm_priv_helper.service.in b/src/nm-priv-helper/org.freedesktop.nm_priv_helper.service.in index 5e2c5e1dc4..9e86a635b2 100644 --- a/src/nm-priv-helper/org.freedesktop.nm_priv_helper.service.in +++ b/src/nm-priv-helper/org.freedesktop.nm_priv_helper.service.in @@ -2,4 +2,4 @@ Name=org.freedesktop.nm_priv_helper Exec=@libexecdir@/nm-priv-helper User=root -SystemdService=dbus-org.freedesktop.nm_priv_helper.service +SystemdService=nm-priv-helper.service