From e3c936d24b800d84e0a781449bea3680c8edb6267d62c3de3b86ac2d443c99a4 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 5 Sep 2018 14:38:38 +0000 Subject: [PATCH] merge iptables-default-backend into iptables (else there will be %post errors because iptables-backend-default gets installed before iptables is) OBS-URL: https://build.opensuse.org/package/show/security:netfilter/iptables?expand=0&rev=108 --- iptables.spec | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/iptables.spec b/iptables.spec index 6e78faf..888eb0e 100644 --- a/iptables.spec +++ b/iptables.spec @@ -44,7 +44,6 @@ BuildRequires: pkgconfig(libmnl) >= 1.0 BuildRequires: pkgconfig(libnetfilter_conntrack) >= 1.0.4 BuildRequires: pkgconfig(libnfnetlink) >= 1.0.0 BuildRequires: pkgconfig(libnftnl) >= 1.0.5 -Requires: iptables-default-backend Requires: netcfg >= 11.6 Requires: xtables-plugins = %version-%release @@ -52,21 +51,10 @@ Requires: xtables-plugins = %version-%release iptables is used to set up, maintain, and inspect the rule tables of the various Netfilter packet filter engines inside the Linux kernel. -%package backend-legacy -Summary: Metapackage to make x_tables the default backend for iptables -Group: Productivity/Networking/Security -Provides: iptables-default-backend - -%description backend-legacy -Installation of this package adds alternatives symlinks (cf. -update-alternatives) that make the iptables and ip6tables commands -point to a program variant that uses the classic kernel interface -provided by ip_tables.ko and ip6_tables.ko. - %package backend-nft Summary: Metapackage to make nft the default backend for iptables/arptables/ebtables Group: Productivity/Networking/Security -Provides: iptables-default-backend +Requires: iptables >= 1.8.0 %description backend-nft Installation of this package adds higher priority alternatives (cf. @@ -181,7 +169,7 @@ mv "$b/%_sbindir/ebtables-save" "$b/%_sbindir/ebtables-nft-save" %fdupes %buildroot/%_prefix %endif -%post backend-legacy +%post update-alternatives \ --install "%_sbindir/iptables" iptables "%_sbindir/xtables-legacy-multi" 1 \ --slave "%_sbindir/iptables-restore" iptables-restore "%_sbindir/xtables-legacy-multi" \ @@ -239,8 +227,7 @@ fi %_sbindir/xtables* %_mandir/man1/*tables* %_mandir/man8/*tables* - -%files backend-legacy +# backend-legacy (implicit) %ghost %_sysconfdir/alternatives/iptables %ghost %_sysconfdir/alternatives/iptables-restore %ghost %_sysconfdir/alternatives/iptables-save