From e4ea90ef14d499238540cc892501382406bf612aca38f6b89e4156240c727c2f Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 20 Sep 2021 10:09:59 +0000 Subject: [PATCH] Accepting request 919774 from home:schubi2 - Removed update-alternatives dependency in libalternatives mode. OBS-URL: https://build.opensuse.org/request/show/919774 OBS-URL: https://build.opensuse.org/package/show/security:netfilter/iptables?expand=0&rev=146 --- iptables.changes | 5 +++++ iptables.spec | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) 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"