From 4271a2a974408a8aaeef2eb52a86ada13b5bef94 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Fri, 1 Oct 2021 12:35:19 +0200 Subject: [PATCH] Avoid systemd_requires as per updated packaging guidelines There is no need to have them as systemd correctly handles reloading depending on the transaction ordering (even if systemd is installed _after_ the package that installs the unit file). Additionally, this also drops hard requires on /usr/bin/systemctl and just makes the scriptlets that call systemctl conditional on systemctl being present. All of this helps avoid pulling in full systemd for container setups. --- dbus-broker.spec | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/dbus-broker.spec b/dbus-broker.spec index a500b9f..e22fd04 100644 --- a/dbus-broker.spec +++ b/dbus-broker.spec @@ -2,13 +2,12 @@ Name: dbus-broker Version: 29 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Linux D-Bus Message Broker License: ASL 2.0 URL: https://github.com/bus1/dbus-broker Source0: https://github.com/bus1/dbus-broker/releases/download/v%{version}/dbus-broker-%{version}.tar.xz Patch0000: 28af5ac996c94922fc49660e0efa955f57575187.patch -%{?systemd_requires} BuildRequires: pkgconfig(audit) BuildRequires: pkgconfig(expat) BuildRequires: pkgconfig(dbus-1) @@ -22,9 +21,6 @@ BuildRequires: meson BuildRequires: python3-docutils Requires: dbus-common Requires(pre): shadow-utils -Requires(post): /usr/bin/systemctl -# for triggerpostun -Requires: /usr/bin/systemctl %description dbus-broker is an implementation of a message bus as defined by the D-Bus @@ -72,7 +68,7 @@ exit 0 %systemd_user_postun dbus-broker.service %triggerpostun -- dbus-daemon -if [ $2 -eq 0 ] ; then +if [ $2 -eq 0 ] && [ -x /usr/bin/systemctl ] ; then # The `dbus-daemon` package used to provide the default D-Bus # implementation. We continue to make sure that if you uninstall it, we # re-evaluate whether to enable dbus-broker to replace it. If we didnt, @@ -94,6 +90,9 @@ fi %{_userunitdir}/dbus-broker.service %changelog +* Fri Oct 01 2021 Kalev Lember - 29-4 +- Avoid systemd_requires as per updated packaging guidelines + * Thu Jul 29 2021 Zbigniew Jędrzejewski-Szmek - 29-3 - Drop the ordering on sysinit.target (#1976653)