1
0
forked from jengelh/iptables

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
This commit is contained in:
Jan Engelhardt 2018-09-05 14:38:38 +00:00 committed by Git OBS Bridge
parent eacc4f7ab6
commit e3c936d24b

View File

@ -44,7 +44,6 @@ BuildRequires: pkgconfig(libmnl) >= 1.0
BuildRequires: pkgconfig(libnetfilter_conntrack) >= 1.0.4 BuildRequires: pkgconfig(libnetfilter_conntrack) >= 1.0.4
BuildRequires: pkgconfig(libnfnetlink) >= 1.0.0 BuildRequires: pkgconfig(libnfnetlink) >= 1.0.0
BuildRequires: pkgconfig(libnftnl) >= 1.0.5 BuildRequires: pkgconfig(libnftnl) >= 1.0.5
Requires: iptables-default-backend
Requires: netcfg >= 11.6 Requires: netcfg >= 11.6
Requires: xtables-plugins = %version-%release 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 iptables is used to set up, maintain, and inspect the rule tables of
the various Netfilter packet filter engines inside the Linux kernel. 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 %package backend-nft
Summary: Metapackage to make nft the default backend for iptables/arptables/ebtables Summary: Metapackage to make nft the default backend for iptables/arptables/ebtables
Group: Productivity/Networking/Security Group: Productivity/Networking/Security
Provides: iptables-default-backend Requires: iptables >= 1.8.0
%description backend-nft %description backend-nft
Installation of this package adds higher priority alternatives (cf. 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 %fdupes %buildroot/%_prefix
%endif %endif
%post backend-legacy %post
update-alternatives \ update-alternatives \
--install "%_sbindir/iptables" iptables "%_sbindir/xtables-legacy-multi" 1 \ --install "%_sbindir/iptables" iptables "%_sbindir/xtables-legacy-multi" 1 \
--slave "%_sbindir/iptables-restore" iptables-restore "%_sbindir/xtables-legacy-multi" \ --slave "%_sbindir/iptables-restore" iptables-restore "%_sbindir/xtables-legacy-multi" \
@ -239,8 +227,7 @@ fi
%_sbindir/xtables* %_sbindir/xtables*
%_mandir/man1/*tables* %_mandir/man1/*tables*
%_mandir/man8/*tables* %_mandir/man8/*tables*
# backend-legacy (implicit)
%files backend-legacy
%ghost %_sysconfdir/alternatives/iptables %ghost %_sysconfdir/alternatives/iptables
%ghost %_sysconfdir/alternatives/iptables-restore %ghost %_sysconfdir/alternatives/iptables-restore
%ghost %_sysconfdir/alternatives/iptables-save %ghost %_sysconfdir/alternatives/iptables-save