Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-firewall/iptables/
Date: Mon, 09 Jul 2018 09:04:25
Message-Id: 1531127053.6faab6d7fce15b3ff03ab00d0500e0d24751cfcd.polynomial-c@gentoo
1 commit: 6faab6d7fce15b3ff03ab00d0500e0d24751cfcd
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 9 09:03:22 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 9 09:04:13 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6faab6d7
7
8 net-firewall/iptables: Bump to version 1.8.0
9
10 Package-Manager: Portage-2.3.41, Repoman-2.3.9
11
12 net-firewall/iptables/Manifest | 1 +
13 net-firewall/iptables/iptables-1.8.0.ebuild | 123 ++++++++++++++++++++++++++++
14 2 files changed, 124 insertions(+)
15
16 diff --git a/net-firewall/iptables/Manifest b/net-firewall/iptables/Manifest
17 index 9797bcf5115..d558eddc3ac 100644
18 --- a/net-firewall/iptables/Manifest
19 +++ b/net-firewall/iptables/Manifest
20 @@ -1,3 +1,4 @@
21 DIST iptables-1.4.21.tar.bz2 547439 BLAKE2B e30f25581a118b91781dcc02761d4c8c420fb19876ec9e8ade3aff22b574931065f9a1c1ec31983a444c406dd928c47673d02698553da85c3db4f31484b1597d SHA512 dd4baccdb080284d8620e6ed59beafc2677813f3e099051764b07f8e394f6d94ca11861b181f3cce7c55c66de64c1e2add13dc1a0b64e24050cd9fb7aea0689b
22 DIST iptables-1.6.1.tar.bz2 620890 BLAKE2B b45ac26e1fb7e8b17a6df0afab3b6c0e2f0a5df9191367548136b3ce9aadc1bcb875b8bc0403e6f12fcf487054e96418f4ef34da827af8989fd4dcf83cd3cd8d SHA512 12280db6e6ef8e68da2537e9da59fc601790fd02b1ba38a37c90dbb56272018329dccb8be995f96ecd5d94fafa6043204f3e8f8ee96531685d9e3c55359d2ee8
23 DIST iptables-1.6.2.tar.bz2 639785 BLAKE2B 3d129756fd33c8c73d56d57e3c5595896db86ded14834a45db21b964d82840b62216ce3cea4ae4960e8c5f0671df3cc6bfb222f68d29cf3a8c99e0eee14bf017 SHA512 04f22e969c794246b9aa28055b202638081cfb0bb4a5625c049a30c48ac84cdd41db12a53c5831398cfe47c8f5691aa02b30b0ae3b5afe0f20ec48cf86a799c0
24 +DIST iptables-1.8.0.tar.bz2 677980 BLAKE2B ce874572d736087f46ea5a6e393cf9b32bf7328efda0fd9faee94dfa11428fc0e124d5ed81329484032ac4ebe89b2604b26dbb135e152c0e0f4c74d88db52d00 SHA512 5f3fe4c15f02e29a2e6ee2905a242f450f8a3b51553618e0cdc59301c35b8bb663e8f2ea70dfcaed8d4e53192c01519906b60ff649385c693e0602622742890f
25
26 diff --git a/net-firewall/iptables/iptables-1.8.0.ebuild b/net-firewall/iptables/iptables-1.8.0.ebuild
27 new file mode 100644
28 index 00000000000..78051935b05
29 --- /dev/null
30 +++ b/net-firewall/iptables/iptables-1.8.0.ebuild
31 @@ -0,0 +1,123 @@
32 +# Copyright 1999-2018 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=6
36 +
37 +# Force users doing their own patches to install their own tools
38 +AUTOTOOLS_AUTO_DEPEND=no
39 +
40 +inherit multilib systemd toolchain-funcs autotools flag-o-matic
41 +
42 +DESCRIPTION="Linux kernel (2.4+) firewall, NAT and packet mangling tools"
43 +HOMEPAGE="https://www.netfilter.org/projects/iptables/"
44 +SRC_URI="https://www.netfilter.org/projects/iptables/files/${P}.tar.bz2"
45 +
46 +LICENSE="GPL-2"
47 +# Subslot tracks libxtables as that's the one other packages generally link
48 +# against and iptables changes. Will have to revisit if other sonames change.
49 +SLOT="0/12"
50 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
51 +IUSE="conntrack ipv6 netlink nftables pcap static-libs"
52 +
53 +COMMON_DEPEND="
54 + conntrack? ( >=net-libs/libnetfilter_conntrack-1.0.6 )
55 + netlink? ( net-libs/libnfnetlink )
56 + nftables? (
57 + >=net-libs/libmnl-1.0:0=
58 + >=net-libs/libnftnl-1.1.1:0=
59 + )
60 + pcap? ( net-libs/libpcap )
61 +"
62 +DEPEND="${COMMON_DEPEND}
63 + virtual/os-headers
64 + >=sys-kernel/linux-headers-4.4:0
65 + virtual/pkgconfig
66 + nftables? (
67 + sys-devel/flex
68 + virtual/yacc
69 + )
70 +"
71 +RDEPEND="${COMMON_DEPEND}
72 + nftables? ( net-misc/ethertypes )
73 +"
74 +
75 +src_prepare() {
76 + # use the saner headers from the kernel
77 + rm -f include/linux/{kernel,types}.h
78 +
79 + # Only run autotools if user patched something
80 + eapply_user && eautoreconf || elibtoolize
81 +}
82 +
83 +src_configure() {
84 + # Some libs use $(AR) rather than libtool to build #444282
85 + tc-export AR
86 +
87 + # Hack around struct mismatches between userland & kernel for some ABIs. #472388
88 + use amd64 && [[ ${ABI} == "x32" ]] && append-flags -fpack-struct
89 +
90 + sed -i \
91 + -e "/nfnetlink=[01]/s:=[01]:=$(usex netlink 1 0):" \
92 + -e "/nfconntrack=[01]/s:=[01]:=$(usex conntrack 1 0):" \
93 + configure || die
94 +
95 + local myeconfargs=(
96 + --sbindir="${EPREFIX}/sbin"
97 + --libexecdir="${EPREFIX}/$(get_libdir)"
98 + --enable-devel
99 + --enable-shared
100 + $(use_enable nftables)
101 + $(use_enable pcap bpf-compiler)
102 + $(use_enable pcap nfsynproxy)
103 + $(use_enable static-libs static)
104 + $(use_enable ipv6)
105 + )
106 + econf "${myeconfargs[@]}"
107 +}
108 +
109 +src_compile() {
110 + # Deal with parallel build errors.
111 + use nftables && emake -C iptables xtables-config-parser.h
112 + emake V=1
113 +}
114 +
115 +src_install() {
116 + default
117 + dodoc INCOMPATIBILITIES iptables/iptables.xslt
118 +
119 + # all the iptables binaries are in /sbin, so might as well
120 + # put these small files in with them
121 + into /
122 + dosbin iptables/iptables-apply
123 + dosym iptables-apply /sbin/ip6tables-apply
124 + doman iptables/iptables-apply.8
125 +
126 + insinto /usr/include
127 + doins include/iptables.h $(use ipv6 && echo include/ip6tables.h)
128 + insinto /usr/include/iptables
129 + doins include/iptables/internal.h
130 +
131 + keepdir /var/lib/iptables
132 + newinitd "${FILESDIR}"/${PN}.init iptables
133 + newconfd "${FILESDIR}"/${PN}-1.4.13.confd iptables
134 + if use ipv6 ; then
135 + keepdir /var/lib/ip6tables
136 + newinitd "${FILESDIR}"/iptables.init ip6tables
137 + newconfd "${FILESDIR}"/ip6tables-1.4.13.confd ip6tables
138 + fi
139 +
140 + if use nftables; then
141 + # Bug 647458
142 + rm "${ED%/}"/etc/ethertypes || die
143 + fi
144 +
145 + systemd_dounit "${FILESDIR}"/systemd/iptables-{re,}store.service
146 + if use ipv6 ; then
147 + systemd_dounit "${FILESDIR}"/systemd/ip6tables-{re,}store.service
148 + fi
149 +
150 + # Move important libs to /lib #332175
151 + gen_usr_ldscript -a ip{4,6}tc iptc xtables
152 +
153 + find "${ED}" -name "*.la" -delete || die
154 +}