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#1668678
Related-Bug: #1804822
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
This commit is contained in:
Bogdan Dobrelya 2019-01-23 11:31:38 +01:00
parent 3ee5faca7e
commit abf89772b1

View File

@ -7,7 +7,7 @@
Name: iptables Name: iptables
Summary: Tools for managing Linux kernel packet filtering capabilities Summary: Tools for managing Linux kernel packet filtering capabilities
Version: 1.8.0 Version: 1.8.0
Release: 3%{?dist} Release: 4%{?dist}
Source: http://www.netfilter.org/projects/iptables/files/%{name}-%{version}.tar.bz2 Source: http://www.netfilter.org/projects/iptables/files/%{name}-%{version}.tar.bz2
Source1: iptables.init Source1: iptables.init
Source2: iptables-config Source2: iptables-config
@ -77,9 +77,7 @@ stable and may change with every new version. It is therefore unsupported.
%package services %package services
Summary: iptables and ip6tables services for iptables Summary: iptables and ip6tables services for iptables
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
Requires(post): systemd %{?systemd_ordering}
Requires(preun): systemd
Requires(postun): systemd
# obsolete old main package # obsolete old main package
Obsoletes: %{name} < 1.4.16.1 Obsoletes: %{name} < 1.4.16.1
# obsolete ipv6 sub package # obsolete ipv6 sub package
@ -347,6 +345,9 @@ fi
%ghost %{_sbindir}/arptables %ghost %{_sbindir}/arptables
%changelog %changelog
* Wed Jan 23 2019 Bogdan Dobrelya <bdobreli@redhat.com> - 1.8.0-4
- Use systemd_ordering macro
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.0-3 * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild