iptables-1.8.7-6

- Restore alternatives configuration after upgrade
- Fix license location
This commit is contained in:
Phil Sutter 2021-03-23 21:16:19 +01:00
parent 3fe153906e
commit ad1732dc5d

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: 5%{?dist} Release: 6%{?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
@ -255,6 +255,12 @@ fi
# iptables-1.8.0-1 introduced the use of alternatives # iptables-1.8.0-1 introduced the use of alternatives
# when upgrading, its %postun script runs due to the package renaming # when upgrading, its %postun script runs due to the package renaming
# fix this by repeating the install into alternatives # 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 %triggerpostun legacy -- iptables > 1.8.0
pfx=%{_sbindir}/iptables pfx=%{_sbindir}/iptables
pfx6=%{_sbindir}/ip6tables pfx6=%{_sbindir}/ip6tables
@ -265,6 +271,9 @@ pfx6=%{_sbindir}/ip6tables
--slave $pfx-save iptables-save $pfx-legacy-save \ --slave $pfx-save iptables-save $pfx-legacy-save \
--slave $pfx6-restore ip6tables-restore $pfx6-legacy-restore \ --slave $pfx6-restore ip6tables-restore $pfx6-legacy-restore \
--slave $pfx6-save ip6tables-save $pfx6-legacy-save --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
@ -337,7 +346,6 @@ fi
%files compat %files compat
%files legacy %files legacy
%license COPYING
%doc INCOMPATIBILITIES %doc INCOMPATIBILITIES
%{_sbindir}/ip{,6}tables-legacy* %{_sbindir}/ip{,6}tables-legacy*
%{_sbindir}/xtables-legacy-multi %{_sbindir}/xtables-legacy-multi
@ -347,6 +355,7 @@ fi
%ghost %{_sbindir}/ip{,6}tables{,-save,-restore} %ghost %{_sbindir}/ip{,6}tables{,-save,-restore}
%files libs %files libs
%license COPYING
%{_libdir}/libxtables.so.12* %{_libdir}/libxtables.so.12*
%dir %{_libdir}/xtables %dir %{_libdir}/xtables
%{_libdir}/xtables/lib{ip,ip6,x}t* %{_libdir}/xtables/lib{ip,ip6,x}t*
@ -354,6 +363,7 @@ fi
%{_mandir}/man8/ip{,6}tables-{extensions,save,restore}.8.gz %{_mandir}/man8/ip{,6}tables-{extensions,save,restore}.8.gz
%files legacy-libs %files legacy-libs
%license COPYING
%{_libdir}/libip{4,6}tc.so.%{ipXtc_so_ver}* %{_libdir}/libip{4,6}tc.so.%{ipXtc_so_ver}*
%files devel %files devel
@ -376,6 +386,7 @@ fi
%{legacy_actions}/ip{,6}tables/{save,panic} %{legacy_actions}/ip{,6}tables/{save,panic}
%files utils %files utils
%license COPYING
%{_sbindir}/nfnl_osf %{_sbindir}/nfnl_osf
%{_sbindir}/nfbpf_compile %{_sbindir}/nfbpf_compile
%{_sbindir}/ip{,6}tables-apply %{_sbindir}/ip{,6}tables-apply
@ -406,6 +417,10 @@ fi
%changelog %changelog
* Tue Mar 23 2021 Phil Sutter <psutter@redhat.com> - 1.8.7-6
- Restore alternatives configuration after upgrade
- Fix license location
* Tue Mar 23 2021 Phil Sutter <psutter@redhat.com> - 1.8.7-5 * Tue Mar 23 2021 Phil Sutter <psutter@redhat.com> - 1.8.7-5
- Fix upgrade path with package rename - Fix upgrade path with package rename
- Add missing dependencies to iptables-nft package - Add missing dependencies to iptables-nft package