diff --git a/iptables.spec b/iptables.spec index 6c55721..258f9dc 100644 --- a/iptables.spec +++ b/iptables.spec @@ -11,7 +11,7 @@ Name: iptables Summary: Tools for managing Linux kernel packet filtering capabilities URL: https://www.netfilter.org/projects/iptables Version: 1.8.7 -Release: 5%{?dist} +Release: 6%{?dist} Source: %{url}/files/%{name}-%{version}.tar.bz2 Source1: iptables.init Source2: iptables-config @@ -255,6 +255,12 @@ 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 @@ -265,6 +271,9 @@ pfx6=%{_sbindir}/ip6tables --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 $( - 1.8.7-6 +- Restore alternatives configuration after upgrade +- Fix license location + * Tue Mar 23 2021 Phil Sutter - 1.8.7-5 - Fix upgrade path with package rename - Add missing dependencies to iptables-nft package