1 |
commit: 3f098e0602aaaca4b711af00a8f4db8c53206b54 |
2 |
Author: Sergey Popov <pinkbyte <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 29 14:50:32 2017 +0000 |
4 |
Commit: Sergey Popov <pinkbyte <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 29 14:50:45 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f098e06 |
7 |
|
8 |
net-firewall/ipt_netflow: revision bump |
9 |
|
10 |
Add NAT translation events support via dedicated |
11 |
USE-flag. Add some other upstream features |
12 |
(aggregation, VLAN and MAC address info in packets), |
13 |
which does not required specific kernel features |
14 |
and thus - enabled by default. |
15 |
|
16 |
Package-Manager: Portage-2.3.10, Repoman-2.3.1 |
17 |
|
18 |
net-firewall/ipt_netflow/ipt_netflow-2.2-r2.ebuild | 102 +++++++++++++++++++++ |
19 |
net-firewall/ipt_netflow/metadata.xml | 3 + |
20 |
2 files changed, 105 insertions(+) |
21 |
|
22 |
diff --git a/net-firewall/ipt_netflow/ipt_netflow-2.2-r2.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.2-r2.ebuild |
23 |
new file mode 100644 |
24 |
index 00000000000..9fa1da5e448 |
25 |
--- /dev/null |
26 |
+++ b/net-firewall/ipt_netflow/ipt_netflow-2.2-r2.ebuild |
27 |
@@ -0,0 +1,102 @@ |
28 |
+# Copyright 1999-2017 Gentoo Foundation |
29 |
+# Distributed under the terms of the GNU General Public License v2 |
30 |
+ |
31 |
+EAPI=6 |
32 |
+MY_PN="${PN/_/-}" |
33 |
+MY_P="${MY_PN}-${PV}" |
34 |
+inherit linux-info linux-mod toolchain-funcs |
35 |
+ |
36 |
+DESCRIPTION="Netflow iptables module" |
37 |
+HOMEPAGE="https://sourceforge.net/projects/ipt-netflow" |
38 |
+SRC_URI="mirror://sourceforge/${MY_PN}/${MY_P}.tgz" |
39 |
+ |
40 |
+LICENSE="GPL-2" |
41 |
+SLOT="0" |
42 |
+KEYWORDS="~amd64 ~x86" |
43 |
+ |
44 |
+IUSE="debug natevents snmp" |
45 |
+ |
46 |
+RDEPEND=" |
47 |
+ net-firewall/iptables |
48 |
+ snmp? ( net-analyzer/net-snmp ) |
49 |
+" |
50 |
+DEPEND="${RDEPEND} |
51 |
+ virtual/linux-sources |
52 |
+ virtual/pkgconfig |
53 |
+" |
54 |
+ |
55 |
+# set S before MODULE_NAMES |
56 |
+S="${WORKDIR}/${MY_P}" |
57 |
+ |
58 |
+pkg_setup() { |
59 |
+ BUILD_TARGETS="all" |
60 |
+ MODULE_NAMES="ipt_NETFLOW(ipt_netflow:${S})" |
61 |
+ IPT_LIB="/usr/$(get_libdir)/xtables" |
62 |
+ local CONFIG_CHECK="~IP_NF_IPTABLES" |
63 |
+ use debug && CONFIG_CHECK+=" ~DEBUG_FS" |
64 |
+ use natevents && CONFIG_CHECK+=" NF_CONNTRACK_EVENTS NF_NAT_NEEDED" |
65 |
+ linux-mod_pkg_setup |
66 |
+} |
67 |
+ |
68 |
+src_prepare() { |
69 |
+ sed -i \ |
70 |
+ -e 's:make -C:$(MAKE) -C:g' \ |
71 |
+ -e 's:gcc -O2:$(CC) $(CFLAGS) $(LDFLAGS):' \ |
72 |
+ -e 's:gcc:$(CC) $(CFLAGS) $(LDFLAGS):' \ |
73 |
+ Makefile.in || die |
74 |
+ |
75 |
+ # Checking for directory is enough |
76 |
+ sed -i -e 's:-s /etc/snmp/snmpd.conf:-d /etc/snmp:' configure || die |
77 |
+ |
78 |
+ # bug #455984 |
79 |
+ eapply "${FILESDIR}/${PN}-2.0-configure.patch" |
80 |
+ |
81 |
+ # Compatibility with kernel 4.6 |
82 |
+ eapply "${FILESDIR}/${P}-linux-4.6.patch" |
83 |
+ |
84 |
+ # Compatibility with kernel 4.10, bug #617484 |
85 |
+ eapply "${FILESDIR}/${P}-linux-4.10.patch" |
86 |
+ |
87 |
+ # Compatibility with kernel 4.13, bug #630446 |
88 |
+ eapply "${FILESDIR}/${P}-linux-4.13.patch" |
89 |
+ |
90 |
+ eapply_user |
91 |
+} |
92 |
+ |
93 |
+do_conf() { |
94 |
+ echo ./configure $* |
95 |
+ ./configure $* ${EXTRA_ECONF} || die 'configure failed' |
96 |
+} |
97 |
+ |
98 |
+src_configure() { |
99 |
+ local IPT_VERSION="$($(tc-getPKG_CONFIG) --modversion xtables)" |
100 |
+ # this configure script is not based on autotools |
101 |
+ # ipt-src need to be defined, see bug #455984 |
102 |
+ do_conf \ |
103 |
+ --disable-dkms \ |
104 |
+ --enable-aggregation \ |
105 |
+ --enable-direction \ |
106 |
+ --enable-macaddress \ |
107 |
+ --enable-vlan \ |
108 |
+ --ipt-lib="${IPT_LIB}" \ |
109 |
+ --ipt-src="/usr/" \ |
110 |
+ --ipt-ver="${IPT_VERSION}" \ |
111 |
+ --kdir="${KV_DIR}" \ |
112 |
+ --kver="${KV_FULL}" \ |
113 |
+ $(use debug && echo '--enable-debugfs') \ |
114 |
+ $(use_enable natevents) \ |
115 |
+ $(use snmp && echo '--enable-snmp-rules' || echo '--disable-snmp-agent') |
116 |
+} |
117 |
+ |
118 |
+src_compile() { |
119 |
+ emake ARCH="$(tc-arch-kernel)" CC="$(tc-getCC)" all |
120 |
+} |
121 |
+ |
122 |
+src_install() { |
123 |
+ linux-mod_src_install |
124 |
+ exeinto "${IPT_LIB}" |
125 |
+ doexe libipt_NETFLOW.so |
126 |
+ use snmp && emake DESTDIR="${D}" SNMPTGSO="/usr/$(get_libdir)/snmp/dlmod/snmp_NETFLOW.so" sinstall |
127 |
+ doheader ipt_NETFLOW.h |
128 |
+ dodoc README* |
129 |
+} |
130 |
|
131 |
diff --git a/net-firewall/ipt_netflow/metadata.xml b/net-firewall/ipt_netflow/metadata.xml |
132 |
index 2405d92f746..76cfd517551 100644 |
133 |
--- a/net-firewall/ipt_netflow/metadata.xml |
134 |
+++ b/net-firewall/ipt_netflow/metadata.xml |
135 |
@@ -9,6 +9,9 @@ |
136 |
<email>netmon@g.o</email> |
137 |
<name>Gentoo network monitoring and analysis project</name> |
138 |
</maintainer> |
139 |
+ <use> |
140 |
+ <flag name="natevents">Netflow NAT translation events (NEL) support</flag> |
141 |
+ </use> |
142 |
<upstream> |
143 |
<remote-id type="sourceforge">ipt-netflow</remote-id> |
144 |
</upstream> |