diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2019-05-28 02:39:51 +0200 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2019-05-28 02:41:08 +0200 |
commit | 81518bff4f1a83cba9c65438f6a812f8e523b162 (patch) | |
tree | 0c3ddd3e64e8406f39ce1322f3ee3cadd2f9b90e /net-firewall/iptables | |
parent | net-firewall/iptables: Bump to version 1.8.3 (diff) | |
download | gentoo-81518bff4f1a83cba9c65438f6a812f8e523b162.tar.gz gentoo-81518bff4f1a83cba9c65438f6a812f8e523b162.tar.bz2 gentoo-81518bff4f1a83cba9c65438f6a812f8e523b162.zip |
net-firewall/iptables: Removed old.
Package-Manager: Portage-2.3.67, Repoman-2.3.13
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'net-firewall/iptables')
8 files changed, 0 insertions, 614 deletions
diff --git a/net-firewall/iptables/Manifest b/net-firewall/iptables/Manifest index 5e0703efb125..0199e509e2c6 100644 --- a/net-firewall/iptables/Manifest +++ b/net-firewall/iptables/Manifest @@ -1,6 +1,4 @@ -DIST iptables-1.4.21.tar.bz2 547439 BLAKE2B e30f25581a118b91781dcc02761d4c8c420fb19876ec9e8ade3aff22b574931065f9a1c1ec31983a444c406dd928c47673d02698553da85c3db4f31484b1597d SHA512 dd4baccdb080284d8620e6ed59beafc2677813f3e099051764b07f8e394f6d94ca11861b181f3cce7c55c66de64c1e2add13dc1a0b64e24050cd9fb7aea0689b DIST iptables-1.6.1.tar.bz2 620890 BLAKE2B b45ac26e1fb7e8b17a6df0afab3b6c0e2f0a5df9191367548136b3ce9aadc1bcb875b8bc0403e6f12fcf487054e96418f4ef34da827af8989fd4dcf83cd3cd8d SHA512 12280db6e6ef8e68da2537e9da59fc601790fd02b1ba38a37c90dbb56272018329dccb8be995f96ecd5d94fafa6043204f3e8f8ee96531685d9e3c55359d2ee8 DIST iptables-1.6.2.tar.bz2 639785 BLAKE2B 3d129756fd33c8c73d56d57e3c5595896db86ded14834a45db21b964d82840b62216ce3cea4ae4960e8c5f0671df3cc6bfb222f68d29cf3a8c99e0eee14bf017 SHA512 04f22e969c794246b9aa28055b202638081cfb0bb4a5625c049a30c48ac84cdd41db12a53c5831398cfe47c8f5691aa02b30b0ae3b5afe0f20ec48cf86a799c0 -DIST iptables-1.8.1.tar.bz2 678706 BLAKE2B 671e7329cc07dae0fbc54c1f6061bc148c4823e1f675369ee36a7cd2346cc1a9a516d5aa2e8a3506d5400027c1ba306cbe426940894117710bc61aacd256fccd SHA512 96a896b6dd26c2d0b4e1672d428ea3c3aab0a3c9e56a896af3a2b8428c4212d7378ba555e0be198b0ccb3fd370bca529466ab8b4edc1777eb7deed600d3f0e11 DIST iptables-1.8.2.tar.bz2 679858 BLAKE2B 2004d85c89ecbc37ef0d571ac8ece680fd2e11a51b074f6387d6e9c4892da524c785d6bf3f30e26af4e7c2cb1f401d51bf8bcb21a91e380e24945374553139cb SHA512 8cf0f515764e1dc6e03284581d682d1949b33e8f25fea29c27ae856f1089fe8ca7b1814524b85f4378fd1fc7c7c7d002f06557b257ae2bbc945f8555bad0dc76 DIST iptables-1.8.3.tar.bz2 716257 BLAKE2B 58c606a5753ae2cb8ada9039e4653d2abe03c7c9b6aeef1e458baa3e10e818893f35e8f2aed5221e692415115e618aa673c8fcd33d172f85e9d1b609ed79c7b8 SHA512 84b10080646077cbea78b7f3fcc58c6c6e1898213341c69862e1b48179f37a6820c3d84437c896071f966b61aa6d16b132d91948a85fd8c05740f29be3a0986d diff --git a/net-firewall/iptables/files/iptables-1.4.21-configure.patch b/net-firewall/iptables/files/iptables-1.4.21-configure.patch deleted file mode 100644 index e827885f1688..000000000000 --- a/net-firewall/iptables/files/iptables-1.4.21-configure.patch +++ /dev/null @@ -1,34 +0,0 @@ -https://bugs.gentoo.org/557586 - -From b24e59fba39120bfdb9e521bbd0af8f33a60466e Mon Sep 17 00:00:00 2001 -From: Mike Frysinger <vapier@gentoo.org> -Date: Sat, 15 Aug 2015 14:12:39 -0400 -Subject: [PATCH] configure: fix 3rd arg w/AC_ARG_ENABLE - -The 3rd arg is used when --{enable,disable}-foo are passed in, not when -the feature is enabled. Use the existing $enableval instead. - -Signed-off-by: Mike Frysinger <vapier@gentoo.org> ---- - configure.ac | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/configure -+++ b/configure -@@ -11898,14 +11898,14 @@ fi - - # Check whether --enable-bpf-compiler was given. - if test "${enable_bpf_compiler+set}" = set; then : -- enableval=$enable_bpf_compiler; enable_bpfc="yes" -+ enableval=$enable_bpf_compiler; enable_bpfc="$enableval" - else - enable_bpfc="no" - fi - - # Check whether --enable-nfsynproxy was given. - if test "${enable_nfsynproxy+set}" = set; then : -- enableval=$enable_nfsynproxy; enable_nfsynproxy="yes" -+ enableval=$enable_nfsynproxy; enable_nfsynproxy="$enableval" - else - enable_nfsynproxy="no" - fi diff --git a/net-firewall/iptables/files/iptables-1.4.21-static-connlabel-config.patch b/net-firewall/iptables/files/iptables-1.4.21-static-connlabel-config.patch deleted file mode 100644 index a4183d6d4025..000000000000 --- a/net-firewall/iptables/files/iptables-1.4.21-static-connlabel-config.patch +++ /dev/null @@ -1,77 +0,0 @@ -https://bugs.gentoo.org/558234 -http://git.netfilter.org/iptables/commit/?id=825fbda5482a7d5ec5a6619c81fe07ff865c7d6e - -From 825fbda5482a7d5ec5a6619c81fe07ff865c7d6e Mon Sep 17 00:00:00 2001 -From: Florian Westphal <fw@strlen.de> -Date: Fri, 5 Sep 2014 20:45:56 +0200 -Subject: [PATCH] extensions: libxt_connlabel: do not open config file from - _init hook - -else, static builds will print this for every iptables invocation, -even 'iptables -L'. Delay open until we need to translate a mapping. - -Reported-by: Thomas De Schampheleire <patrickdepinguin@gmail.com> -Signed-off-by: Florian Westphal <fw@strlen.de> ---- - extensions/libxt_connlabel.c | 27 ++++++++++++++++++++------- - 1 file changed, 20 insertions(+), 7 deletions(-) - -diff --git a/extensions/libxt_connlabel.c b/extensions/libxt_connlabel.c -index c84a167..1f83095 100644 ---- a/extensions/libxt_connlabel.c -+++ b/extensions/libxt_connlabel.c -@@ -29,11 +29,26 @@ static const struct xt_option_entry connlabel_mt_opts[] = { - XTOPT_TABLEEND, - }; - -+/* cannot do this via _init, else static builds might spew error message -+ * for every iptables invocation. -+ */ -+static void connlabel_open(void) -+{ -+ if (map) -+ return; -+ -+ map = nfct_labelmap_new(NULL); -+ if (!map && errno) -+ xtables_error(RESOURCE_PROBLEM, "cannot open connlabel.conf: %s\n", -+ strerror(errno)); -+} -+ - static void connlabel_mt_parse(struct xt_option_call *cb) - { - struct xt_connlabel_mtinfo *info = cb->data; - int tmp; - -+ connlabel_open(); - xtables_option_parse(cb); - - switch (cb->entry->id) { -@@ -54,7 +69,11 @@ static void connlabel_mt_parse(struct xt_option_call *cb) - - static const char *connlabel_get_name(int b) - { -- const char *name = nfct_labelmap_get_name(map, b); -+ const char *name; -+ -+ connlabel_open(); -+ -+ name = nfct_labelmap_get_name(map, b); - if (name && strcmp(name, "")) - return name; - return NULL; -@@ -114,11 +133,5 @@ static struct xtables_match connlabel_mt_reg = { - - void _init(void) - { -- map = nfct_labelmap_new(NULL); -- if (!map) { -- fprintf(stderr, "cannot open connlabel.conf, not registering '%s' match: %s\n", -- connlabel_mt_reg.name, strerror(errno)); -- return; -- } - xtables_register_match(&connlabel_mt_reg); - } --- -2.4.4 - diff --git a/net-firewall/iptables/files/iptables-1.8.1-build_limit_without_libnftnl_fix.patch b/net-firewall/iptables/files/iptables-1.8.1-build_limit_without_libnftnl_fix.patch deleted file mode 100644 index a0fca7efa93a..000000000000 --- a/net-firewall/iptables/files/iptables-1.8.1-build_limit_without_libnftnl_fix.patch +++ /dev/null @@ -1,44 +0,0 @@ -From b2fc2a368562d55fadad94d995247bb8cd7e68a3 Mon Sep 17 00:00:00 2001 -From: Florian Westphal <fw@strlen.de> -Date: Wed, 24 Oct 2018 12:00:11 +0200 -Subject: extensions: limit: unbreak build without libnftnl - -Lars Wendler reported 1.8.1 build failure when trying to build without nft backend: - - In file included from ../iptables/nft.h:5, from libxt_limit.c:18: libnftnl/rule.h: No such file or directory - -Reported-by: Lars Wendler <polynomial-c@gentoo.org> -Fixes: 02b80972c43 ("ebtables: Merge libebt_limit.c into libxt_limit.c") -Signed-off-by: Florian Westphal <fw@strlen.de> ---- - extensions/libxt_limit.c | 1 - - iptables/nft-bridge.h | 1 + - 2 files changed, 1 insertion(+), 1 deletion(-) - -diff --git a/extensions/libxt_limit.c b/extensions/libxt_limit.c -index c7b66295..1b324657 100644 ---- a/extensions/libxt_limit.c -+++ b/extensions/libxt_limit.c -@@ -15,7 +15,6 @@ - #include <xtables.h> - #include <linux/netfilter/x_tables.h> - #include <linux/netfilter/xt_limit.h> --#include "iptables/nft.h" - #include "iptables/nft-bridge.h" - - #define XT_LIMIT_AVG "3/hour" -diff --git a/iptables/nft-bridge.h b/iptables/nft-bridge.h -index 9d49ccbe..de52cd71 100644 ---- a/iptables/nft-bridge.h -+++ b/iptables/nft-bridge.h -@@ -68,6 +68,7 @@ int ebt_get_mac_and_mask(const char *from, unsigned char *to, unsigned char *mas - #define EBT_VERDICT_BITS 0x0000000F - - struct nftnl_rule; -+struct iptables_command_state; - - static const char *ebt_standard_targets[NUM_STANDARD_TARGETS] = { - "ACCEPT", --- -cgit v1.2.1 - diff --git a/net-firewall/iptables/iptables-1.4.21-r1.ebuild b/net-firewall/iptables/iptables-1.4.21-r1.ebuild deleted file mode 100644 index 47f4a1757481..000000000000 --- a/net-firewall/iptables/iptables-1.4.21-r1.ebuild +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -# Force users doing their own patches to install their own tools -AUTOTOOLS_AUTO_DEPEND=no - -inherit eutils multilib systemd toolchain-funcs autotools - -DESCRIPTION="Linux kernel (2.4+) firewall, NAT and packet mangling tools" -HOMEPAGE="https://www.netfilter.org/projects/iptables/" -SRC_URI="https://www.netfilter.org/projects/iptables/files/${P}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86" -IUSE="conntrack ipv6 netlink static-libs" - -RDEPEND=" - conntrack? ( net-libs/libnetfilter_conntrack ) - netlink? ( net-libs/libnfnetlink ) -" -DEPEND="${RDEPEND} - virtual/os-headers - virtual/pkgconfig -" - -src_prepare() { - # use the saner headers from the kernel - rm -f include/linux/{kernel,types}.h - - # Only run autotools if user patched something - epatch_user && eautoreconf || elibtoolize -} - -src_configure() { - # Some libs use $(AR) rather than libtool to build #444282 - tc-export AR - - sed -i \ - -e "/nfnetlink=[01]/s:=[01]:=$(usex netlink 1 0):" \ - -e "/nfconntrack=[01]/s:=[01]:=$(usex conntrack 1 0):" \ - configure || die - - econf \ - --sbindir="${EPREFIX}/sbin" \ - --libexecdir="${EPREFIX}/$(get_libdir)" \ - --enable-devel \ - --enable-shared \ - $(use_enable static-libs static) \ - $(use_enable ipv6) -} - -src_compile() { - emake V=1 -} - -src_install() { - default - dodoc INCOMPATIBILITIES iptables/iptables.xslt - - # all the iptables binaries are in /sbin, so might as well - # put these small files in with them - into / - dosbin iptables/iptables-apply - dosym iptables-apply /sbin/ip6tables-apply - doman iptables/iptables-apply.8 - - insinto /usr/include - doins include/iptables.h $(use ipv6 && echo include/ip6tables.h) - insinto /usr/include/iptables - doins include/iptables/internal.h - - keepdir /var/lib/iptables - newinitd "${FILESDIR}"/${PN}-1.4.13-r1.init iptables - newconfd "${FILESDIR}"/${PN}-1.4.13.confd iptables - if use ipv6 ; then - keepdir /var/lib/ip6tables - newinitd "${FILESDIR}"/iptables-1.4.13-r1.init ip6tables - newconfd "${FILESDIR}"/ip6tables-1.4.13.confd ip6tables - fi - - systemd_dounit "${FILESDIR}"/systemd/iptables{,-{re,}store}.service - if use ipv6 ; then - systemd_dounit "${FILESDIR}"/systemd/ip6tables{,-{re,}store}.service - fi - - # Move important libs to /lib #332175 - gen_usr_ldscript -a ip{4,6}tc iptc xtables - - prune_libtool_files -} diff --git a/net-firewall/iptables/iptables-1.4.21-r5.ebuild b/net-firewall/iptables/iptables-1.4.21-r5.ebuild deleted file mode 100644 index 6dbce98c427d..000000000000 --- a/net-firewall/iptables/iptables-1.4.21-r5.ebuild +++ /dev/null @@ -1,104 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -# Force users doing their own patches to install their own tools -AUTOTOOLS_AUTO_DEPEND=no - -inherit eutils multilib systemd toolchain-funcs autotools flag-o-matic - -DESCRIPTION="Linux kernel (2.4+) firewall, NAT and packet mangling tools" -HOMEPAGE="https://www.netfilter.org/projects/iptables/" -SRC_URI="https://www.netfilter.org/projects/iptables/files/${P}.tar.bz2" - -LICENSE="GPL-2" -# Subslot tracks libxtables as that's the one other packages generally link -# against and iptables changes. Will have to revisit if other sonames change. -SLOT="0/10" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="conntrack ipv6 netlink pcap static-libs" - -RDEPEND=" - conntrack? ( net-libs/libnetfilter_conntrack ) - netlink? ( net-libs/libnfnetlink ) - pcap? ( net-libs/libpcap ) -" -DEPEND="${RDEPEND} - virtual/os-headers - virtual/pkgconfig -" - -src_prepare() { - # use the saner headers from the kernel - rm -f include/linux/{kernel,types}.h - - epatch "${FILESDIR}"/${P}-configure.patch #557586 - epatch "${FILESDIR}"/${P}-static-connlabel-config.patch #558234 - - # Only run autotools if user patched something - epatch_user && eautoreconf || elibtoolize -} - -src_configure() { - # Some libs use $(AR) rather than libtool to build #444282 - tc-export AR - - # Hack around struct mismatches between userland & kernel for some ABIs. #472388 - use amd64 && [[ ${ABI} == "x32" ]] && append-flags -fpack-struct - - sed -i \ - -e "/nfnetlink=[01]/s:=[01]:=$(usex netlink 1 0):" \ - -e "/nfconntrack=[01]/s:=[01]:=$(usex conntrack 1 0):" \ - configure || die - - econf \ - --sbindir="${EPREFIX}/sbin" \ - --libexecdir="${EPREFIX}/$(get_libdir)" \ - --enable-devel \ - --enable-shared \ - $(use_enable pcap bpf-compiler) \ - $(use_enable pcap nfsynproxy) \ - $(use_enable static-libs static) \ - $(use_enable ipv6) -} - -src_compile() { - emake V=1 -} - -src_install() { - default - dodoc INCOMPATIBILITIES iptables/iptables.xslt - - # all the iptables binaries are in /sbin, so might as well - # put these small files in with them - into / - dosbin iptables/iptables-apply - dosym iptables-apply /sbin/ip6tables-apply - doman iptables/iptables-apply.8 - - insinto /usr/include - doins include/iptables.h $(use ipv6 && echo include/ip6tables.h) - insinto /usr/include/iptables - doins include/iptables/internal.h - - keepdir /var/lib/iptables - newinitd "${FILESDIR}"/${PN}.init iptables - newconfd "${FILESDIR}"/${PN}-1.4.13.confd iptables - if use ipv6 ; then - keepdir /var/lib/ip6tables - newinitd "${FILESDIR}"/iptables.init ip6tables - newconfd "${FILESDIR}"/ip6tables-1.4.13.confd ip6tables - fi - - systemd_dounit "${FILESDIR}"/systemd/iptables{,-{re,}store}.service - if use ipv6 ; then - systemd_dounit "${FILESDIR}"/systemd/ip6tables{,-{re,}store}.service - fi - - # Move important libs to /lib #332175 - gen_usr_ldscript -a ip{4,6}tc iptc xtables - - prune_libtool_files -} diff --git a/net-firewall/iptables/iptables-1.8.1-r1.ebuild b/net-firewall/iptables/iptables-1.8.1-r1.ebuild deleted file mode 100644 index 0183b70bd77d..000000000000 --- a/net-firewall/iptables/iptables-1.8.1-r1.ebuild +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -# Force users doing their own patches to install their own tools -AUTOTOOLS_AUTO_DEPEND=no - -inherit multilib systemd toolchain-funcs autotools flag-o-matic - -DESCRIPTION="Linux kernel (2.4+) firewall, NAT and packet mangling tools" -HOMEPAGE="https://www.netfilter.org/projects/iptables/" -SRC_URI="https://www.netfilter.org/projects/iptables/files/${P}.tar.bz2" - -LICENSE="GPL-2" -# Subslot tracks libxtables as that's the one other packages generally link -# against and iptables changes. Will have to revisit if other sonames change. -SLOT="0/12" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="conntrack ipv6 netlink nftables pcap static-libs" - -COMMON_DEPEND=" - conntrack? ( >=net-libs/libnetfilter_conntrack-1.0.6 ) - netlink? ( net-libs/libnfnetlink ) - nftables? ( - >=net-libs/libmnl-1.0:0= - >=net-libs/libnftnl-1.1.1:0= - ) - pcap? ( net-libs/libpcap ) -" -DEPEND="${COMMON_DEPEND} - virtual/os-headers - >=sys-kernel/linux-headers-4.4:0 - virtual/pkgconfig - nftables? ( - sys-devel/flex - virtual/yacc - ) -" -RDEPEND="${COMMON_DEPEND} - nftables? ( net-misc/ethertypes ) -" - -src_prepare() { - eapply "${FILESDIR}/${P}-build_limit_without_libnftnl_fix.patch" #669486 - - # use the saner headers from the kernel - rm -f include/linux/{kernel,types}.h - - # Only run autotools if user patched something - eapply_user && eautoreconf || elibtoolize -} - -src_configure() { - # Some libs use $(AR) rather than libtool to build #444282 - tc-export AR - - # Hack around struct mismatches between userland & kernel for some ABIs. #472388 - use amd64 && [[ ${ABI} == "x32" ]] && append-flags -fpack-struct - - sed -i \ - -e "/nfnetlink=[01]/s:=[01]:=$(usex netlink 1 0):" \ - -e "/nfconntrack=[01]/s:=[01]:=$(usex conntrack 1 0):" \ - configure || die - - local myeconfargs=( - --sbindir="${EPREFIX}/sbin" - --libexecdir="${EPREFIX}/$(get_libdir)" - --enable-devel - --enable-shared - $(use_enable nftables) - $(use_enable pcap bpf-compiler) - $(use_enable pcap nfsynproxy) - $(use_enable static-libs static) - $(use_enable ipv6) - ) - econf "${myeconfargs[@]}" -} - -src_compile() { - # Deal with parallel build errors. - use nftables && emake -C iptables xtables-config-parser.h - emake V=1 -} - -src_install() { - default - dodoc INCOMPATIBILITIES iptables/iptables.xslt - - # all the iptables binaries are in /sbin, so might as well - # put these small files in with them - into / - dosbin iptables/iptables-apply - dosym iptables-apply /sbin/ip6tables-apply - doman iptables/iptables-apply.8 - - insinto /usr/include - doins include/iptables.h $(use ipv6 && echo include/ip6tables.h) - insinto /usr/include/iptables - doins include/iptables/internal.h - - keepdir /var/lib/iptables - newinitd "${FILESDIR}"/${PN}.init iptables - newconfd "${FILESDIR}"/${PN}-1.4.13.confd iptables - if use ipv6 ; then - keepdir /var/lib/ip6tables - newinitd "${FILESDIR}"/iptables.init ip6tables - newconfd "${FILESDIR}"/ip6tables-1.4.13.confd ip6tables - fi - - if use nftables; then - # Bug 647458 - rm "${ED%/}"/etc/ethertypes || die - - # Bug 660886 - rm "${ED%/}"/sbin/{arptables,ebtables} || die - - # Bug 669894 - rm "${ED%/}"/sbin/ebtables-{save,restore} || die - fi - - systemd_dounit "${FILESDIR}"/systemd/iptables-{re,}store.service - if use ipv6 ; then - systemd_dounit "${FILESDIR}"/systemd/ip6tables-{re,}store.service - fi - - # Move important libs to /lib #332175 - gen_usr_ldscript -a ip{4,6}tc iptc xtables - - find "${ED}" -name "*.la" -delete || die -} diff --git a/net-firewall/iptables/iptables-1.8.2.ebuild b/net-firewall/iptables/iptables-1.8.2.ebuild deleted file mode 100644 index cbf85327a99a..000000000000 --- a/net-firewall/iptables/iptables-1.8.2.ebuild +++ /dev/null @@ -1,129 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -# Force users doing their own patches to install their own tools -AUTOTOOLS_AUTO_DEPEND=no - -inherit multilib systemd toolchain-funcs autotools flag-o-matic - -DESCRIPTION="Linux kernel (2.4+) firewall, NAT and packet mangling tools" -HOMEPAGE="https://www.netfilter.org/projects/iptables/" -SRC_URI="https://www.netfilter.org/projects/iptables/files/${P}.tar.bz2" - -LICENSE="GPL-2" -# Subslot tracks libxtables as that's the one other packages generally link -# against and iptables changes. Will have to revisit if other sonames change. -SLOT="0/12" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="conntrack ipv6 netlink nftables pcap static-libs" - -COMMON_DEPEND=" - conntrack? ( >=net-libs/libnetfilter_conntrack-1.0.6 ) - netlink? ( net-libs/libnfnetlink ) - nftables? ( - >=net-libs/libmnl-1.0:0= - >=net-libs/libnftnl-1.1.1:0= - ) - pcap? ( net-libs/libpcap ) -" -DEPEND="${COMMON_DEPEND} - virtual/os-headers - >=sys-kernel/linux-headers-4.4:0 - virtual/pkgconfig - nftables? ( - sys-devel/flex - virtual/yacc - ) -" -RDEPEND="${COMMON_DEPEND} - nftables? ( net-misc/ethertypes ) -" - -src_prepare() { - # use the saner headers from the kernel - rm -f include/linux/{kernel,types}.h - - # Only run autotools if user patched something - eapply_user && eautoreconf || elibtoolize -} - -src_configure() { - # Some libs use $(AR) rather than libtool to build #444282 - tc-export AR - - # Hack around struct mismatches between userland & kernel for some ABIs. #472388 - use amd64 && [[ ${ABI} == "x32" ]] && append-flags -fpack-struct - - sed -i \ - -e "/nfnetlink=[01]/s:=[01]:=$(usex netlink 1 0):" \ - -e "/nfconntrack=[01]/s:=[01]:=$(usex conntrack 1 0):" \ - configure || die - - local myeconfargs=( - --sbindir="${EPREFIX}/sbin" - --libexecdir="${EPREFIX}/$(get_libdir)" - --enable-devel - --enable-shared - $(use_enable nftables) - $(use_enable pcap bpf-compiler) - $(use_enable pcap nfsynproxy) - $(use_enable static-libs static) - $(use_enable ipv6) - ) - econf "${myeconfargs[@]}" -} - -src_compile() { - # Deal with parallel build errors. - use nftables && emake -C iptables xtables-config-parser.h - emake V=1 -} - -src_install() { - default - dodoc INCOMPATIBILITIES iptables/iptables.xslt - - # all the iptables binaries are in /sbin, so might as well - # put these small files in with them - into / - dosbin iptables/iptables-apply - dosym iptables-apply /sbin/ip6tables-apply - doman iptables/iptables-apply.8 - - insinto /usr/include - doins include/iptables.h $(use ipv6 && echo include/ip6tables.h) - insinto /usr/include/iptables - doins include/iptables/internal.h - - keepdir /var/lib/iptables - newinitd "${FILESDIR}"/${PN}.init iptables - newconfd "${FILESDIR}"/${PN}-1.4.13.confd iptables - if use ipv6 ; then - keepdir /var/lib/ip6tables - newinitd "${FILESDIR}"/iptables.init ip6tables - newconfd "${FILESDIR}"/ip6tables-1.4.13.confd ip6tables - fi - - if use nftables; then - # Bug 647458 - rm "${ED%/}"/etc/ethertypes || die - - # Bug 660886 - rm "${ED%/}"/sbin/{arptables,ebtables} || die - - # Bug 669894 - rm "${ED%/}"/sbin/ebtables-{save,restore} || die - fi - - systemd_dounit "${FILESDIR}"/systemd/iptables-{re,}store.service - if use ipv6 ; then - systemd_dounit "${FILESDIR}"/systemd/ip6tables-{re,}store.service - fi - - # Move important libs to /lib #332175 - gen_usr_ldscript -a ip{4,6}tc iptc xtables - - find "${ED}" -name "*.la" -delete || die -} |