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.
This commit is contained in:
Kalev Lember 2021-10-01 12:35:19 +02:00
parent ee7c2a1777
commit 4271a2a974

View File

@ -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 <klember@redhat.com> - 29-4
- Avoid systemd_requires as per updated packaging guidelines
* Thu Jul 29 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 29-3
- Drop the ordering on sysinit.target (#1976653)