iptables-1.8.7-8

- Drop hacks to maintain upgrade path

Related: RHBZ#1927721
This commit is contained in:
Phil Sutter 2021-04-19 15:25:59 +02:00
parent 724cb78453
commit 3c640d04d2

View File

@ -11,7 +11,7 @@ Name: iptables
Summary: Tools for managing Linux kernel packet filtering capabilities Summary: Tools for managing Linux kernel packet filtering capabilities
URL: https://www.netfilter.org/projects/iptables URL: https://www.netfilter.org/projects/iptables
Version: 1.8.7 Version: 1.8.7
Release: 7%{?dist} Release: 8%{?dist}
Source: %{url}/files/%{name}-%{version}.tar.bz2 Source: %{url}/files/%{name}-%{version}.tar.bz2
Source1: iptables.init Source1: iptables.init
Source2: iptables-config Source2: iptables-config
@ -51,17 +51,6 @@ The iptables utility controls the network packet filtering code in the
Linux kernel. If you need to set up firewalls and/or IP masquerading, Linux kernel. If you need to set up firewalls and/or IP masquerading,
you should install this package. you should install this package.
%package compat
Summary: Temporary transitioning package
Obsoletes: %{name} < 1.8.7-4
Requires: %{name}-legacy = %{version}-%{release}
Requires: %{name}-utils = %{version}-%{release}
%description compat
This package only exists to help transition iptables users to the new
package split. It will be removed after one distribution release cycle, please
do not reference it or depend on it in any way.
%package legacy %package legacy
Summary: Legacy tools for managing Linux kernel packet filtering capabilities Summary: Legacy tools for managing Linux kernel packet filtering capabilities
Requires: %{name}-legacy-libs%{?_isa} = %{version}-%{release} Requires: %{name}-legacy-libs%{?_isa} = %{version}-%{release}
@ -104,8 +93,6 @@ For more information about this, please have a look at
%package devel %package devel
Summary: Development package for iptables Summary: Development package for iptables
Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: %{name}-libs%{?_isa} = %{version}-%{release}
# XXX: Drop this after two releases or so
Requires: %{name}-legacy-devel%{?_isa} = %{version}-%{release}
Requires: pkgconfig Requires: pkgconfig
%description devel %description devel
@ -126,10 +113,6 @@ stable and may change with every new version. It is therefore unsupported.
Summary: iptables and ip6tables services for iptables Summary: iptables and ip6tables services for iptables
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
%{?systemd_ordering} %{?systemd_ordering}
# obsolete old main package
Obsoletes: %{name} < 1.4.16.1
# obsolete ipv6 sub package
Obsoletes: %{name}-ipv6 < 1.4.11.1
%description services %description services
iptables services for IPv4 and IPv6 iptables services for IPv4 and IPv6
@ -153,7 +136,6 @@ Summary: nftables compatibility for iptables, arptables and ebtables
Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires(post): %{_sbindir}/update-alternatives Requires(post): %{_sbindir}/update-alternatives
Requires(postun): %{_sbindir}/update-alternatives Requires(postun): %{_sbindir}/update-alternatives
Obsoletes: iptables-compat < 1.6.2-4
Provides: arptables-helper Provides: arptables-helper
Provides: iptables Provides: iptables
Provides: arptables Provides: arptables
@ -252,29 +234,6 @@ if [ $1 -eq 0 ]; then
iptables %{_sbindir}/iptables-legacy iptables %{_sbindir}/iptables-legacy
fi fi
# iptables-1.8.0-1 introduced the use of alternatives
# when upgrading, its %postun script runs due to the package renaming
# fix this by repeating the install into alternatives
# also keep the old alternatives configuration to not change the system
%triggerun legacy -- iptables > 1.8.0
alternatives --list | awk '/^iptables/{print $3; exit}' \
>/var/tmp/alternatives.iptables.current
cp /var/lib/alternatives/iptables /var/tmp/alternatives.iptables.setup
%triggerpostun legacy -- iptables > 1.8.0
pfx=%{_sbindir}/iptables
pfx6=%{_sbindir}/ip6tables
%{_sbindir}/update-alternatives --install \
$pfx iptables $pfx-legacy 10 \
--slave $pfx6 ip6tables $pfx6-legacy \
--slave $pfx-restore iptables-restore $pfx-legacy-restore \
--slave $pfx-save iptables-save $pfx-legacy-save \
--slave $pfx6-restore ip6tables-restore $pfx6-legacy-restore \
--slave $pfx6-save ip6tables-save $pfx6-legacy-save
alternatives --set iptables $(</var/tmp/alternatives.iptables.current)
rm /var/tmp/alternatives.iptables.current
mv /var/tmp/alternatives.iptables.setup /var/lib/alternatives/iptables
%post services %post services
%systemd_post iptables.service ip6tables.service %systemd_post iptables.service ip6tables.service
@ -343,8 +302,6 @@ if [ $1 -eq 0 ]; then
done done
fi fi
%files compat
%files legacy %files legacy
%doc INCOMPATIBILITIES %doc INCOMPATIBILITIES
%{_sbindir}/ip{,6}tables-legacy* %{_sbindir}/ip{,6}tables-legacy*
@ -417,6 +374,9 @@ fi
%changelog %changelog
* Mon Apr 19 2021 Phil Sutter <psutter@redhat.com> - 1.8.7-8
- Drop hacks to maintain upgrade path
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.8.7-7 * Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.8.7-7
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937