Optimize systemd dependency for containers

According to https://fedoraproject.org/wiki/Packaging:Scriptlets:
If a package is suitable for installation without systemd (in a
container image, for example) and does not require any of the
systemd mechanisms such as tmpfiles.d, then the systemd_ordering macro
MAY be used instead of the systemd_requires macro.

That is exactly the case we want to address for container images
when installing packages in it.

Resolves: rhbz#1654672
Related-Bug: #1804822
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
epel9
Bogdan Dobrelya 6 years ago
parent e3e8e56c1f
commit e07ed63d65

@ -104,7 +104,7 @@ Provides: hiera-puppet = %{version}-%{release}
Requires(pre): shadow-utils Requires(pre): shadow-utils
%if 0%{?_with_systemd} %if 0%{?_with_systemd}
%{?systemd_requires} %{?systemd_ordering}
BuildRequires: systemd BuildRequires: systemd
%else %else
Requires(post): chkconfig Requires(post): chkconfig
@ -126,7 +126,7 @@ Group: System Environment/Base
Summary: Server for the puppet system management tool Summary: Server for the puppet system management tool
Requires: puppet = %{version}-%{release} Requires: puppet = %{version}-%{release}
%if 0%{?_with_systemd} %if 0%{?_with_systemd}
%{?systemd_requires} %{?systemd_ordering}
BuildRequires: systemd BuildRequires: systemd
%else %else
Requires(post): chkconfig Requires(post): chkconfig

Loading…
Cancel
Save