From 82e30ad9f2fbe98d20b68b362d86db71db2a65cd Mon Sep 17 00:00:00 2001 From: David Rheinsberg Date: Mon, 4 May 2020 10:00:47 +0200 Subject: [PATCH] dbus-broker: drop live-system conversion With F33 released, we now have 4 Fedora releases (F30-F33) that contain a live-upgrade of `dbus-daemon` to `dbus-broker`. This allowed us to convert existing machines out there to the new bus implementation. However, the live-conversion is fragile, since it requires relinking systemd services at runtime, tricking it into believing they did not change. This is not guaranteed to work forever, nor do we want to rely on it. Hence, this drops this code-path. This effectively means that if you update pre-F29 machines to post-F34, you will continue using `dbus-daemon`. This is completely fine and a consistent *and* supported system setup. However, you no longer get the benefits of dbus-broker automatically. Instead, you must explicitly switch from dbus-daemon to dbus-broker. The easiest way to do that is to install dbus-broker and uninstall dbus-daemon. This will automatically convert the services to the new daemon. Lastly, any fresh Fedora install will now always pick up dbus-broker, since the `fedora-release` presets are merged and correctly configure dbus-broker. Hence, this change only affects old installs. Signed-off-by: David Rheinsberg --- dbus-broker.spec | 67 +++++++++++------------------------------------- 1 file changed, 15 insertions(+), 52 deletions(-) diff --git a/dbus-broker.spec b/dbus-broker.spec index 194df15..ed78836 100644 --- a/dbus-broker.spec +++ b/dbus-broker.spec @@ -2,7 +2,7 @@ Name: dbus-broker Version: 22 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Linux D-Bus Message Broker License: ASL 2.0 URL: https://github.com/bus1/dbus-broker @@ -63,52 +63,8 @@ fi exit 0 %post -# Since F30 dbus-broker is the default bus implementation. However, changing -# the systemd presets does not automatically switch over. Instead, we have to -# explicitly disable dbus-daemon and enable dbus-broker. We do this on the first -# install of this package. -# -# Note that there is a virtual circular dependency between this package and the -# fedora presets (in 'fedora-release'). To break this, we explicitly enable -# dbus-broker here. Once the presets are in, we will be able to drop the -# explicit 'enable' calls and rely on the presets below. -#systemd_post dbus-broker.service -#systemd_user_post dbus-broker.service -# -# systemd has special checks if dbus.socket and dbus.service are active and -# will close the dbus connection if they are not. When the symlinks are changed -# from dbus-daemon to dbus-broker, systemd would think that dbus is gone, -# because dbus.service (which now is an alias for dbus-broker.service) is not -# active. Let's add a temporary override that will keep pid1 happy. - -if [ $1 -eq 1 ] ; then - if systemctl is-enabled -q dbus-daemon.service; then - # Install a temporary generator that'll keep providing the - # alias as it was. - mkdir -p /run/systemd/system-generators/ - cat >>/run/systemd/system-generators/dbus-symlink-generator <>/run/systemd/user-generators/dbus-symlink-generator < - 22-3 +- Drop dbus-daemon -> dbus-broker live system conversion. New setups will + automatically pick up dbus-broker as default implementation. If you upgrade + from pre-F30, you will not get any auto upgrade anymore. Deinstalling the + dbus-daemon package will, however, automatically pick up dbus-broker. + * Tue Jan 28 2020 Fedora Release Engineering - 21-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild