diff --git a/iptables.changes b/iptables.changes index 6518b77..94ac68f 100644 --- a/iptables.changes +++ b/iptables.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Sep 16 11:40:45 UTC 2021 - Stefan Schubert + +- Removed update-alternatives dependency in libalternatives mode. + ------------------------------------------------------------------- Tue Aug 3 07:13:19 UTC 2021 - Stefan Schubert diff --git a/iptables.spec b/iptables.spec index 60ce34c..17fb13b 100644 --- a/iptables.spec +++ b/iptables.spec @@ -51,8 +51,6 @@ Requires: netcfg >= 11.6 Requires: xtables-plugins = %version-%release %if %{with libalternatives} Requires: alts -Requires: libalternatives >= 1.2 -Requires(pre): update-alternatives %else Requires(post): update-alternatives Requires(postun):update-alternatives @@ -246,7 +244,7 @@ done %if %{with libalternatives} %pre # removing old update-alternatives entries -if [ "$1" > 0 ] ; then +if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then update-alternatives --remove iptables "%_sbindir/xtables-legacy-multi" fi %else @@ -269,7 +267,7 @@ fi %if %{with libalternatives} %pre backend-nft # removing old update-alternatives entries -if test "$1" = 0; then +if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then update-alternatives --remove iptables "%_sbindir/xtables-nft-multi" update-alternatives --remove arptables "%_sbindir/xtables-nft-multi" update-alternatives --remove ebtables "%_sbindir/xtables-nft-multi"