public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-firewall/ipt_netflow/files/, net-firewall/ipt_netflow/
@ 2016-07-19  9:14 Sergey Popov
  0 siblings, 0 replies; 7+ messages in thread
From: Sergey Popov @ 2016-07-19  9:14 UTC (permalink / raw
  To: gentoo-commits

commit:     d45e06d1e8292e123fa7e7420dd6c7b387da9383
Author:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 19 09:12:41 2016 +0000
Commit:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
CommitDate: Tue Jul 19 09:12:41 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d45e06d1

net-firewall/ipt_netflow: drop old version

Package-Manager: portage-2.2.28

 net-firewall/ipt_netflow/Manifest                  |  1 -
 .../files/ipt_netflow-2.1-linux-3.19.patch         | 45 -----------
 .../ipt_netflow/ipt_netflow-2.1_p20160119.ebuild   | 88 ----------------------
 3 files changed, 134 deletions(-)

diff --git a/net-firewall/ipt_netflow/Manifest b/net-firewall/ipt_netflow/Manifest
index 1dba461..65a6cfc 100644
--- a/net-firewall/ipt_netflow/Manifest
+++ b/net-firewall/ipt_netflow/Manifest
@@ -1,2 +1 @@
-DIST ipt-netflow-2.1_p20160119.tgz 86892 SHA256 9afb3f122f0f2b140d81b331d4500f8ad475898579fb5901ed1090d80783a4e5 SHA512 7f30683240d7516df01a4b4a37ea738980def764741c658c86e9c28ca638592a40e0b2458164105d76f88c90f780f058f5c17a0c60ffaeb775d7cdb38dbb4fe1 WHIRLPOOL fdb1a0bebeb8a2840005abd86cbd0fcbc241b4acaae2138d66d0a463807392a3076113b61d8d091ba0aa8f995ab9cc21a1f1f8e33bd9cd11bc1700b8392791d9
 DIST ipt-netflow-2.2.tgz 96697 SHA256 81be0a334f74894756d022aee2c87b36c89a7aeca6ff1c91ef6b4f3458793198 SHA512 a406ab9bd18616414d8c99f427382a075bdb8000d8c40959f5b6d6e577d7eb4dfc7f8b773664a516ec2228d15590f21c3fbd6aa3d4302f6cdf03810e1702af74 WHIRLPOOL e9c5f13a3efa346b75ec47ceb033e83099744fa90d575d62135225a88f0093b1de556354d972772f13e7ea895659cd58e6e9a3c08817f62fd902336cc8771928

diff --git a/net-firewall/ipt_netflow/files/ipt_netflow-2.1-linux-3.19.patch b/net-firewall/ipt_netflow/files/ipt_netflow-2.1-linux-3.19.patch
deleted file mode 100644
index 47fec4f..0000000
--- a/net-firewall/ipt_netflow/files/ipt_netflow-2.1-linux-3.19.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-commit 582fd497a5f0f5ae5dce24cba042d856d63bfbe1
-Author: ABC <abc@telekom.ru>
-Date:   Mon Feb 16 21:53:54 2015 +0400
-
-    Compatibility of __get_cpu_var with linux 3.19.
-    
-    Fixes #28, thanks boyarsh@github.
-
-diff --git a/ipt_NETFLOW.h b/ipt_NETFLOW.h
-index bc2734f..5548e57 100644
---- a/ipt_NETFLOW.h
-+++ b/ipt_NETFLOW.h
-@@ -396,6 +396,9 @@ struct netflow_aggr_p {
- 	__u16 aggr_port;
- };
- 
-+#ifndef __get_cpu_var
-+#define __get_cpu_var(var)	(*this_cpu_ptr(&(var)))
-+#endif
- #define NETFLOW_STAT_INC(count) (__get_cpu_var(ipt_netflow_stat).count++)
- #define NETFLOW_STAT_ADD(count, val) (__get_cpu_var(ipt_netflow_stat).count += (unsigned long long)val)
- #define NETFLOW_STAT_SET(count, val) (__get_cpu_var(ipt_netflow_stat).count = (unsigned long long)val)
-diff --git a/testing.sh b/testing.sh
-index b465c8d..caa4f03 100755
---- a/testing.sh
-+++ b/testing.sh
-@@ -6,7 +6,7 @@ if [ "$1" = "" ]; then
-   echo Maintainer only tool.
-   exit 1
- elif [ "$1" = all ]; then
--  exec bash $0 linux-2.6.18 centos5 linux-3.11.2 centos6 linux-3.4.66 linux-3.9.11 centos7 linux-3.14 linux-3.17
-+  exec bash $0 linux-2.6.18 centos5 linux-3.11.2 centos6 linux-3.4.66 linux-3.9.11 centos7 linux-3.14 linux-3.17 linux-3.19
-   exit 1
- fi
- 
-@@ -33,6 +33,9 @@ readarray -t opts <<EOF
-   --enable-sampler=hash
-   --enable-promisc
- EOF
-+if [ "$SHORT" ]; then
-+  opts=("")
-+fi
- 
- colorecho() {
-   echo -e "\033[1;32m$@\033[m"

diff --git a/net-firewall/ipt_netflow/ipt_netflow-2.1_p20160119.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.1_p20160119.ebuild
deleted file mode 100644
index ecd1942..0000000
--- a/net-firewall/ipt_netflow/ipt_netflow-2.1_p20160119.ebuild
+++ /dev/null
@@ -1,88 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=6
-MY_PN="${PN/_/-}"
-MY_P="${MY_PN}-${PV}"
-inherit linux-info linux-mod toolchain-funcs
-
-DESCRIPTION="Netflow iptables module"
-HOMEPAGE="http://sourceforge.net/projects/ipt-netflow"
-SRC_URI="http://dev.gentoo.org/~pinkbyte/distfiles/snapshots/${MY_P}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 x86"
-
-IUSE="debug snmp"
-
-RDEPEND="
-	net-firewall/iptables
-	snmp? ( net-analyzer/net-snmp )
-"
-DEPEND="${RDEPEND}
-	virtual/linux-sources
-	virtual/pkgconfig
-"
-
-# set S before MODULE_NAMES
-S="${WORKDIR}/${MY_P}"
-
-pkg_setup() {
-	BUILD_TARGETS="all"
-	MODULE_NAMES="ipt_NETFLOW(ipt_netflow:${S})"
-	IPT_LIB="/usr/$(get_libdir)/xtables"
-	local CONFIG_CHECK="~IP_NF_IPTABLES"
-	use debug && CONFIG_CHECK+=" ~DEBUG_FS"
-	linux-mod_pkg_setup
-}
-
-src_prepare() {
-	sed -i \
-		-e 's:make -C:$(MAKE) -C:g' \
-		-e 's:gcc -O2:$(CC) $(CFLAGS) $(LDFLAGS):' \
-		-e 's:gcc:$(CC) $(CFLAGS) $(LDFLAGS):' \
-		Makefile.in || die
-
-	# Checking for directory is enough
-	sed -i -e 's:-s /etc/snmp/snmpd.conf:-d /etc/snmp:' configure || die
-
-	# bug #455984
-	eapply "${FILESDIR}/${PN}-2.0-configure.patch"
-
-	eapply_user
-}
-
-do_conf() {
-	echo ./configure $*
-	./configure $* ${EXTRA_ECONF} || die 'configure failed'
-}
-
-src_configure() {
-	local IPT_VERSION="$($(tc-getPKG_CONFIG) --modversion xtables)"
-	# this configure script is not based on autotools
-	# ipt-src need to be defined, see bug #455984
-	do_conf \
-		--disable-dkms \
-		--ipt-lib="${IPT_LIB}" \
-		--ipt-src="/usr/" \
-		--ipt-ver="${IPT_VERSION}" \
-		--kdir="${KV_DIR}" \
-		--kver="${KV_FULL}" \
-		$(use debug && echo '--enable-debugfs') \
-		$(use snmp && echo '--enable-snmp-rules' || echo '--disable-snmp-agent')
-}
-
-src_compile() {
-	emake ARCH="$(tc-arch-kernel)" CC="$(tc-getCC)" all
-}
-
-src_install() {
-	linux-mod_src_install
-	exeinto "${IPT_LIB}"
-	doexe libipt_NETFLOW.so
-	use snmp && emake DESTDIR="${D}" SNMPTGSO="/usr/$(get_libdir)/snmp/dlmod/snmp_NETFLOW.so" sinstall
-	doheader ipt_NETFLOW.h
-	dodoc README*
-}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-firewall/ipt_netflow/files/, net-firewall/ipt_netflow/
@ 2017-09-11  9:33 Sergey Popov
  0 siblings, 0 replies; 7+ messages in thread
From: Sergey Popov @ 2017-09-11  9:33 UTC (permalink / raw
  To: gentoo-commits

commit:     3c5c24508b5a3faed392e546e2acdd684e28fdd1
Author:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 11 09:32:01 2017 +0000
Commit:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
CommitDate: Mon Sep 11 09:33:45 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c5c2450

net-firewall/ipt_netflow: backport fix for building with kernel 4.13

Reported-by: Toralf Förster <toralf <AT> gentoo.org>
Closes: https://bugs.gentoo.org/630446

Package-Manager: Portage-2.3.7, Repoman-2.3.1

 .../files/ipt_netflow-2.2-linux-4.13.patch         | 63 ++++++++++++++++++++++
 net-firewall/ipt_netflow/ipt_netflow-2.2-r1.ebuild |  3 ++
 2 files changed, 66 insertions(+)

diff --git a/net-firewall/ipt_netflow/files/ipt_netflow-2.2-linux-4.13.patch b/net-firewall/ipt_netflow/files/ipt_netflow-2.2-linux-4.13.patch
new file mode 100644
index 00000000000..10e8b552afb
--- /dev/null
+++ b/net-firewall/ipt_netflow/files/ipt_netflow-2.2-linux-4.13.patch
@@ -0,0 +1,63 @@
+commit 53a556cb4a705f4eae2bcb49552b6427b231378a
+Author: ABC <abc@telekom.ru>
+Date:   Mon Aug 14 22:55:25 2017 +0300
+
+    Compatibility with kernel 4.13.
+    
+    Offset patch torvalds/linux@14afee4b6092fde451ee17604e5f5c89da33e71e
+
+diff --git a/compat.h b/compat.h
+index 061eb57..275ff58 100644
+--- a/compat.h
++++ b/compat.h
+@@ -636,4 +636,10 @@ static inline unsigned int xt_hooknum(const struct xt_action_param *par)
+ # define SK_CAN_REUSE   1
+ #endif
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,13,0)
++# define compat_refcount_read atomic_read
++#else
++# define compat_refcount_read refcount_read
++#endif
++
+ #endif /* COMPAT_NETFLOW_H */
+diff --git a/ipt_NETFLOW.c b/ipt_NETFLOW.c
+index 494ea74..9365325 100644
+--- a/ipt_NETFLOW.c
++++ b/ipt_NETFLOW.c
+@@ -622,7 +622,7 @@ static int snmp_seq_show(struct seq_file *seq, void *v)
+ 
+ 			seq_printf(seq, " %u %u %u\n",
+ 			    sk->sk_sndbuf,
+-			    atomic_read(&sk->sk_wmem_alloc),
++			    compat_refcount_read(&sk->sk_wmem_alloc),
+ 			    wmem_peak);
+ 		} else
+ 			seq_printf(seq, " 0 0 %u\n", wmem_peak);
+@@ -864,7 +864,7 @@ static int nf_seq_show(struct seq_file *seq, void *v)
+ 			seq_printf(seq, ", sndbuf %u, filled %u, peak %u;"
+ 			    " err: sndbuf reached %u, connect %u, cberr %u, other %u\n",
+ 			    sk->sk_sndbuf,
+-			    atomic_read(&sk->sk_wmem_alloc),
++			    compat_refcount_read(&sk->sk_wmem_alloc),
+ 			    atomic_read(&usock->wmem_peak),
+ 			    usock->err_full,
+ 			    usock->err_connect,
+@@ -2031,7 +2031,7 @@ static void netflow_sendmsg(void *buffer, const int len)
+ 			printk(KERN_INFO "netflow_sendmsg: sendmsg(%d, %d) [%u %u]\n",
+ 			       snum,
+ 			       len,
+-			       atomic_read(&usock->sock->sk->sk_wmem_alloc),
++			       compat_refcount_read(&usock->sock->sk->sk_wmem_alloc),
+ 			       usock->sock->sk->sk_sndbuf);
+ 		ret = kernel_sendmsg(usock->sock, &msg, &iov, 1, (size_t)len);
+ 		if (ret < 0) {
+@@ -2054,7 +2054,7 @@ static void netflow_sendmsg(void *buffer, const int len)
+ 			printk(KERN_ERR "ipt_NETFLOW: sendmsg[%d] error %d: data loss %llu pkt, %llu bytes%s\n",
+ 			       snum, ret, pdu_packets, pdu_traf, suggestion);
+ 		} else {
+-			unsigned int wmem = atomic_read(&usock->sock->sk->sk_wmem_alloc);
++			unsigned int wmem = compat_refcount_read(&usock->sock->sk->sk_wmem_alloc);
+ 			if (wmem > atomic_read(&usock->wmem_peak))
+ 				atomic_set(&usock->wmem_peak, wmem);
+ 			NETFLOW_STAT_INC(exported_pkt);

diff --git a/net-firewall/ipt_netflow/ipt_netflow-2.2-r1.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.2-r1.ebuild
index d7f364065e3..f82263fe40c 100644
--- a/net-firewall/ipt_netflow/ipt_netflow-2.2-r1.ebuild
+++ b/net-firewall/ipt_netflow/ipt_netflow-2.2-r1.ebuild
@@ -56,6 +56,9 @@ src_prepare() {
 	# Compatibility with kernel 4.10, bug #617484
 	eapply "${FILESDIR}/${P}-linux-4.10.patch"
 
+	# Compatibility with kernel 4.13, bug #630446
+	eapply "${FILESDIR}/${P}-linux-4.13.patch"
+
 	eapply_user
 }
 


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-firewall/ipt_netflow/files/, net-firewall/ipt_netflow/
@ 2019-06-19  6:12 Jeroen Roovers
  0 siblings, 0 replies; 7+ messages in thread
From: Jeroen Roovers @ 2019-06-19  6:12 UTC (permalink / raw
  To: gentoo-commits

commit:     5ec2dcfdfa639c7daffc1d068af45ed67cb0a58f
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 19 06:11:57 2019 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Wed Jun 19 06:12:13 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ec2dcfd

net-firewall/ipt_netflow: Fix USE=snmp

Package-Manager: Portage-2.3.67, Repoman-2.3.14
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 .../ipt_netflow/files/ipt_netflow-2.3-flags.patch  | 55 ++++++++++++++++++++++
 .../ipt_netflow/ipt_netflow-2.3_p20190619.ebuild   | 11 +----
 net-firewall/ipt_netflow/ipt_netflow-9999.ebuild   | 11 +----
 3 files changed, 59 insertions(+), 18 deletions(-)

diff --git a/net-firewall/ipt_netflow/files/ipt_netflow-2.3-flags.patch b/net-firewall/ipt_netflow/files/ipt_netflow-2.3-flags.patch
new file mode 100644
index 00000000000..0d89e5ba90a
--- /dev/null
+++ b/net-firewall/ipt_netflow/files/ipt_netflow-2.3-flags.patch
@@ -0,0 +1,55 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -11,7 +11,7 @@
+ SNMPTGSO = /usr/lib/snmp/dlmod/snmp_NETFLOW.so
+ SNMPCONF = /etc/snmp/snmpd.conf
+ SNMPLINE = dlmod netflow $(SNMPTGSO)
+-CC = gcc
++$(CC) ?= gcc
+ 
+ # https://www.kernel.org/doc/Documentation/kbuild/modules.txt
+ # https://www.kernel.org/doc/Documentation/kbuild/makefiles.txt
+@@ -22,29 +22,29 @@
+ 
+ ipt_NETFLOW.ko: version.h ipt_NETFLOW.c ipt_NETFLOW.h compat.h Makefile
+ 	@echo Compiling for kernel $(KVERSION)
+-	make -C $(KDIR) M=$(CURDIR) modules CONFIG_DEBUG_INFO=y
++	$(MAKE) -C $(KDIR) M=$(CURDIR) modules CONFIG_DEBUG_INFO=y
+ 	@touch $@
+ sparse: | version.h ipt_NETFLOW.c ipt_NETFLOW.h compat.h Makefile
+ 	@rm -f ipt_NETFLOW.ko ipt_NETFLOW.o
+ 	@echo Compiling for kernel $(KVERSION)
+-	make -C $(KDIR) M=$(CURDIR) modules C=1
++	$(MAKE) -C $(KDIR) M=$(CURDIR) modules C=1
+ 	@touch ipt_NETFLOW.ko
+ coverity:
+ 	coverity-submit -v
+ 
+ minstall: | ipt_NETFLOW.ko
+ 	@echo " *"
+-	make -C $(KDIR) M=$(CURDIR) modules_install INSTALL_MOD_PATH=$(DESTDIR)
++	$(MAKE) -C $(KDIR) M=$(CURDIR) modules_install INSTALL_MOD_PATH=$(DESTDIR)
+ 	$(DEPMOD)
+ mclean:
+-	make -C $(KDIR) M=$(CURDIR) clean
++	$(MAKE) -C $(KDIR) M=$(CURDIR) clean
+ lclean:
+ 	-rm -f *.so *_sh.o
+ clean: mclean lclean
+ 	-rm -f *.so *.o modules.order version.h
+ 
+ snmp_NETFLOW.so: snmp_NETFLOW.c
+-	$(CC) -fPIC -shared -o $@ $< -lnetsnmp
++	$(CC) $(CFLAGS) $(LDFLAGS) -fPIC -shared -o $@ $< -lnetsnmp
+ 
+ sinstall: | snmp_NETFLOW.so IPT-NETFLOW-MIB.my
+ 	@echo " *"
+@@ -64,7 +64,7 @@
+ 	fi
+ 
+ %_sh.o: libipt_NETFLOW.c
+-	$(CC) $(CFLAGS) -O2 -Wall -Wunused $(IPTABLES_CFLAGS) -fPIC -o $@ -c libipt_NETFLOW.c
++	$(CC) $(CFLAGS) $(LDFLAGS) -Wall -Wunused $(IPTABLES_CFLAGS) -fPIC -o $@ -c libipt_NETFLOW.c
+ 
+ %.so: %_sh.o
+ 	$(CC) -shared -o $@ $<

diff --git a/net-firewall/ipt_netflow/ipt_netflow-2.3_p20190619.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.3_p20190619.ebuild
index 07ddf25ef1d..3a1ad78c15f 100644
--- a/net-firewall/ipt_netflow/ipt_netflow-2.3_p20190619.ebuild
+++ b/net-firewall/ipt_netflow/ipt_netflow-2.3_p20190619.ebuild
@@ -25,10 +25,9 @@ DEPEND="${RDEPEND}
 	virtual/linux-sources
 	virtual/pkgconfig
 "
-
-# set S before MODULE_NAMES
 PATCHES=(
 	"${FILESDIR}/${PN}-2.0-configure.patch" # bug #455984
+	"${FILESDIR}/${PN}-2.3-flags.patch"
 )
 
 pkg_setup() {
@@ -48,19 +47,13 @@ src_unpack() {
 }
 
 src_prepare() {
-	sed -i \
-		-e 's:make -C:$(MAKE) -C:g' \
-		-e 's:gcc -O2:$(CC) $(CFLAGS) $(LDFLAGS):' \
-		-e 's:gcc:$(CC) $(CFLAGS) $(LDFLAGS):' \
-		Makefile.in || die
+	default
 
 	# Fix incorrect module version in sources
 	sed -i -e "/IPT_NETFLOW_VERSION/s/2.2/${PV}/" ipt_NETFLOW.c || die
 
 	# Checking for directory is enough
 	sed -i -e 's:-s /etc/snmp/snmpd.conf:-d /etc/snmp:' configure || die
-
-	default
 }
 
 do_conf() {

diff --git a/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild b/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild
index 6d8feeb6e0a..2a4bba4304b 100644
--- a/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild
+++ b/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild
@@ -25,10 +25,9 @@ DEPEND="${RDEPEND}
 	virtual/linux-sources
 	virtual/pkgconfig
 "
-
-# set S before MODULE_NAMES
 PATCHES=(
 	"${FILESDIR}/${PN}-2.0-configure.patch" # bug #455984
+	"${FILESDIR}/${PN}-2.3-flags.patch"
 )
 
 pkg_setup() {
@@ -42,19 +41,13 @@ pkg_setup() {
 }
 
 src_prepare() {
-	sed -i \
-		-e 's:make -C:$(MAKE) -C:g' \
-		-e 's:gcc -O2:$(CC) $(CFLAGS) $(LDFLAGS):' \
-		-e 's:gcc:$(CC) $(CFLAGS) $(LDFLAGS):' \
-		Makefile.in || die
+	default
 
 	# Fix incorrect module version in sources
 	sed -i -e "/IPT_NETFLOW_VERSION/s/2.2/${PV}/" ipt_NETFLOW.c || die
 
 	# Checking for directory is enough
 	sed -i -e 's:-s /etc/snmp/snmpd.conf:-d /etc/snmp:' configure || die
-
-	default
 }
 
 do_conf() {


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-firewall/ipt_netflow/files/, net-firewall/ipt_netflow/
@ 2020-04-24  7:35 Jeroen Roovers
  0 siblings, 0 replies; 7+ messages in thread
From: Jeroen Roovers @ 2020-04-24  7:35 UTC (permalink / raw
  To: gentoo-commits

commit:     d7addd0edb9627481cf77288ad6edbcdbed86d1e
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 24 07:25:07 2020 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Fri Apr 24 07:35:06 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7addd0e

net-firewall/ipt_netflow: Version 2.5

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 net-firewall/ipt_netflow/Manifest                  |   1 +
 .../ipt_netflow/files/ipt_netflow-2.5-gentoo.patch |  61 ++++++++++++
 net-firewall/ipt_netflow/ipt_netflow-2.5.ebuild    | 104 +++++++++++++++++++++
 3 files changed, 166 insertions(+)

diff --git a/net-firewall/ipt_netflow/Manifest b/net-firewall/ipt_netflow/Manifest
index ee990a70dbd..79bf94164a9 100644
--- a/net-firewall/ipt_netflow/Manifest
+++ b/net-firewall/ipt_netflow/Manifest
@@ -1 +1,2 @@
 DIST ipt_netflow-2.4.tar.gz 92580 BLAKE2B 0197e7e5cdd9c94c7b80b38cb4e2879343139592421922bf73aeaac70ac3af54ea25934bb1474ff455a9f58eab2368995591542f46be48b5c8491a3b6a192f56 SHA512 3c80d02cfda996fbde8d258875df8795000fd8390b5a6f8296771a992067e153eca48f7f4602421529948beaf3030e164adfc2ffe5b528042fbdc15ffb56aa74
+DIST ipt_netflow-2.5.tar.gz 94097 BLAKE2B 5ca8d686e08f6fb0cdb1d502572afc71f146e2633ccf5fc7cb9ad21420fb62e88a2cb393e83ee4f5646200fa964d46a16ef58831958799449a4a59e2da6c9337 SHA512 8cd1bc46ef6e975964e5ddc290ed999f7076b63a9363f1a1f31b5d8db875d4e564ed5f0d5185c29dcf8a86793fe4badf63325b79ba1abbc264088b1ca94a9dad

diff --git a/net-firewall/ipt_netflow/files/ipt_netflow-2.5-gentoo.patch b/net-firewall/ipt_netflow/files/ipt_netflow-2.5-gentoo.patch
new file mode 100644
index 00000000000..508be107795
--- /dev/null
+++ b/net-firewall/ipt_netflow/files/ipt_netflow-2.5-gentoo.patch
@@ -0,0 +1,61 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -11,7 +11,7 @@
+ SNMPTGSO = /usr/lib/snmp/dlmod/snmp_NETFLOW.so
+ SNMPCONF = /etc/snmp/snmpd.conf
+ SNMPLINE = dlmod netflow $(SNMPTGSO)
+-CC = gcc
++CC ?= gcc
+ 
+ # https://www.kernel.org/doc/Documentation/kbuild/modules.txt
+ # https://www.kernel.org/doc/Documentation/kbuild/makefiles.txt
+@@ -22,31 +22,31 @@
+ 
+ ipt_NETFLOW.ko: version.h ipt_NETFLOW.c ipt_NETFLOW.h compat_def.h compat.h Makefile
+ 	@echo Compiling for kernel $(KVERSION)
+-	make -C $(KDIR) M=$(CURDIR) modules CONFIG_DEBUG_INFO=y
++	$(MAKE) -C $(KDIR) M=$(CURDIR) modules CONFIG_DEBUG_INFO=y
+ 	@touch $@
+ compat_def.h: gen_compat_def
+ 	./gen_compat_def > $@
+ sparse: | version.h ipt_NETFLOW.c ipt_NETFLOW.h compat.h Makefile
+ 	@rm -f ipt_NETFLOW.ko ipt_NETFLOW.o
+ 	@echo Compiling for kernel $(KVERSION)
+-	make -C $(KDIR) M=$(CURDIR) modules C=1
++	$(MAKE) -C $(KDIR) M=$(CURDIR) modules C=1
+ 	@touch ipt_NETFLOW.ko
+ coverity:
+ 	coverity-submit -v
+ 
+ minstall: | ipt_NETFLOW.ko
+ 	@echo " *"
+-	make -C $(KDIR) M=$(CURDIR) modules_install INSTALL_MOD_PATH=$(DESTDIR)
++	$(MAKE) -C $(KDIR) M=$(CURDIR) modules_install INSTALL_MOD_PATH=$(DESTDIR)
+ 	$(DEPMOD)
+ mclean:
+-	make -C $(KDIR) M=$(CURDIR) clean
++	$(MAKE) -C $(KDIR) M=$(CURDIR) clean
+ lclean:
+ 	-rm -f *.so *_sh.o
+ clean: mclean lclean
+ 	-rm -f *.so *.o modules.order version.h compat_def.h
+ 
+ snmp_NETFLOW.so: snmp_NETFLOW.c
+-	$(CC) -fPIC -shared -o $@ $< -lnetsnmp
++	$(CC) $(CFLAGS) $(LDFLAGS) -fPIC -shared -o $@ $< -lnetsnmp
+ 
+ sinstall: | snmp_NETFLOW.so IPT-NETFLOW-MIB.my
+ 	@echo " *"
+@@ -66,10 +66,10 @@
+ 	fi
+ 
+ %_sh.o: libipt_NETFLOW.c
+-	$(CC) $(CFLAGS) -O2 -Wall -Wunused $(IPTABLES_CFLAGS) -fPIC -o $@ -c libipt_NETFLOW.c
++	$(CC) $(CFLAGS) -Wall -Wunused $(IPTABLES_CFLAGS) -fPIC -o $@ -c libipt_NETFLOW.c
+ 
+ %.so: %_sh.o
+-	$(CC) -shared -o $@ $<
++	$(CC) $(LDFLAGS) -shared -o $@ $<
+ 
+ version.h: ipt_NETFLOW.c ipt_NETFLOW.h compat.h Makefile
+ 	@./version.sh --define > version.h

diff --git a/net-firewall/ipt_netflow/ipt_netflow-2.5.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.5.ebuild
new file mode 100644
index 00000000000..d5ba624302b
--- /dev/null
+++ b/net-firewall/ipt_netflow/ipt_netflow-2.5.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit linux-info linux-mod toolchain-funcs
+
+DESCRIPTION="Netflow iptables module"
+HOMEPAGE="
+	https://sourceforge.net/projects/ipt-netflow
+	https://github.com/aabc/ipt-netflow
+"
+SRC_URI="https://github.com/aabc/ipt-netflow/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="debug natevents snmp"
+
+RDEPEND="
+	net-firewall/iptables:0=
+	snmp? ( net-analyzer/net-snmp )
+"
+DEPEND="${RDEPEND}
+	virtual/linux-sources
+	virtual/pkgconfig
+"
+PATCHES=(
+	"${FILESDIR}/${PN}-2.0-configure.patch" # bug #455984
+	"${FILESDIR}/${PN}-2.5-gentoo.patch"
+)
+
+pkg_setup() {
+	linux-info_pkg_setup
+
+	local CONFIG_CHECK="~IP_NF_IPTABLES VLAN_8021Q"
+	use debug && CONFIG_CHECK+=" ~DEBUG_FS"
+	if use natevents; then
+		CONFIG_CHECK+=" NF_CONNTRACK_EVENTS"
+		if kernel_is lt 5 2; then
+			CONFIG_CHECK+=" NF_NAT_NEEDED"
+		else
+			CONFIG_CHECK+=" NF_NAT"
+		fi
+	fi
+
+	BUILD_TARGETS="all"
+	MODULE_NAMES="ipt_NETFLOW(ipt_netflow:${S})"
+	IPT_LIB="/usr/$(get_libdir)/xtables"
+
+	linux-mod_pkg_setup
+}
+
+src_unpack() {
+	default
+
+	mv "${WORKDIR}"/${PN/_/-}-* "${WORKDIR}"/${P} || die
+}
+
+src_prepare() {
+	default
+
+	# Checking for directory is enough
+	sed -i -e 's:-s /etc/snmp/snmpd.conf:-d /etc/snmp:' configure || die
+}
+
+do_conf() {
+	tc-export CC
+	echo ./configure $*
+	./configure $* ${EXTRA_ECONF} || die 'configure failed'
+}
+
+src_configure() {
+	local IPT_VERSION="$($(tc-getPKG_CONFIG) --modversion xtables)"
+	# this configure script is not based on autotools
+	# ipt-src need to be defined, see bug #455984
+	do_conf \
+		--disable-dkms \
+		--enable-aggregation \
+		--enable-direction \
+		--enable-macaddress \
+		--enable-vlan \
+		--ipt-lib="${IPT_LIB}" \
+		--ipt-src="/usr/" \
+		--ipt-ver="${IPT_VERSION}" \
+		--kdir="${KV_DIR}" \
+		--kver="${KV_FULL}" \
+		$(use debug && echo '--enable-debugfs') \
+		$(use natevents && echo '--enable-natevents') \
+		$(use snmp && echo '--enable-snmp-rules' || echo '--disable-snmp-agent')
+}
+
+src_compile() {
+	emake ARCH="$(tc-arch-kernel)" CC="$(tc-getCC)" all
+}
+
+src_install() {
+	linux-mod_src_install
+	exeinto "${IPT_LIB}"
+	doexe libipt_NETFLOW.so
+	use snmp && emake DESTDIR="${D}" SNMPTGSO="/usr/$(get_libdir)/snmp/dlmod/snmp_NETFLOW.so" sinstall
+	doheader ipt_NETFLOW.h
+	dodoc README*
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-firewall/ipt_netflow/files/, net-firewall/ipt_netflow/
@ 2021-07-05 14:21 Sergey Popov
  0 siblings, 0 replies; 7+ messages in thread
From: Sergey Popov @ 2021-07-05 14:21 UTC (permalink / raw
  To: gentoo-commits

commit:     205596a0f676638bc1fa3a4f6b552b984c98a5d4
Author:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  5 14:20:50 2021 +0000
Commit:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
CommitDate: Mon Jul  5 14:21:10 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=205596a0

net-firewall/ipt_netflow: backport fix regarding obsolete ref_module call

Closes: https://bugs.gentoo.org/781014
Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Sergey Popov <pinkbyte <AT> gentoo.org>

 .../files/ipt_netflow-2.6-ref_module_fix.patch     | 60 ++++++++++++++++++++++
 net-firewall/ipt_netflow/ipt_netflow-2.6.ebuild    |  1 +
 2 files changed, 61 insertions(+)

diff --git a/net-firewall/ipt_netflow/files/ipt_netflow-2.6-ref_module_fix.patch b/net-firewall/ipt_netflow/files/ipt_netflow-2.6-ref_module_fix.patch
new file mode 100644
index 00000000000..21d64719070
--- /dev/null
+++ b/net-firewall/ipt_netflow/files/ipt_netflow-2.6-ref_module_fix.patch
@@ -0,0 +1,60 @@
+commit 352cdb28eecbb57de3509b18dfc37dcce0455c01
+Author: ABC <abc@openwall.com>
+Date:   Tue Jun 22 19:07:02 2021 +0300
+
+    Fix compile for stable kernels by not using 'ref_module'
+    
+    `ref_module' unexport in 7ef5264de7732 ("modules: mark ref_module
+    static") is back-ported into stable kernels making old `#if
+    LINUX_VERSION_CODE' checks irrelevant or too complicated to update.
+    
+    Do not use `ref_module' API at all since `try_module_get' is ancient
+    enough to use always.
+    
+    Reported-by: https://github.com/xtaran
+    Fixes: https://github.com/aabc/ipt-netflow/issues/177
+
+diff --git a/compat.h b/compat.h
+index 99edf91..30f1d8f 100644
+--- a/compat.h
++++ b/compat.h
+@@ -170,10 +170,6 @@ static int __ethtool_get_settings(struct net_device *dev, struct ethtool_cmd *cm
+ # define CHECK_OK	0
+ #endif
+ 
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)
+-# define use_module	ref_module
+-#endif
+-
+ #ifndef NF_IP_LOCAL_IN /* 2.6.25 */
+ # define NF_IP_PRE_ROUTING	NF_INET_PRE_ROUTING
+ # define NF_IP_LOCAL_IN		NF_INET_LOCAL_IN
+diff --git a/ipt_NETFLOW.c b/ipt_NETFLOW.c
+index d3d3901..c4c049d 100644
+--- a/ipt_NETFLOW.c
++++ b/ipt_NETFLOW.c
+@@ -5494,12 +5494,8 @@ static void register_ct_events(void)
+ 	}
+ 	/* Reference netlink module to prevent it's unsafe unload before us. */
+ 	if (!netlink_m && (netlink_m = find_module(NETLINK_M))) {
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0)
+-		use_module(THIS_MODULE, netlink_m);
+-#else
+ 		if (!try_module_get(netlink_m))
+ 			netlink_m = NULL;
+-#endif
+ 	}
+ 
+ 	/* Register ct events callback. */
+@@ -5527,10 +5523,9 @@ static void unregister_ct_events(void)
+ #else /* < v3.2 */
+ 	unset_notifier_cb();
+ #endif /* v3.2 */
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0)
+ 	module_put(netlink_m);
+ 	netlink_m = NULL;
+-#endif
++
+ 	rcu_assign_pointer(saved_event_cb, NULL);
+ #else /* < v2.6.31 */
+ 	nf_conntrack_unregister_notifier(&ctnl_notifier);

diff --git a/net-firewall/ipt_netflow/ipt_netflow-2.6.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.6.ebuild
index 29ed265510f..35009fb8ac1 100644
--- a/net-firewall/ipt_netflow/ipt_netflow-2.6.ebuild
+++ b/net-firewall/ipt_netflow/ipt_netflow-2.6.ebuild
@@ -31,6 +31,7 @@ BDEPEND="
 PATCHES=(
 	"${FILESDIR}/${PN}-2.0-configure.patch" # bug #455984
 	"${FILESDIR}/${PN}-2.6-gentoo.patch"
+	"${FILESDIR}/${P}-ref_module_fix.patch" # bug #781014
 )
 
 pkg_setup() {


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-firewall/ipt_netflow/files/, net-firewall/ipt_netflow/
@ 2021-12-16 22:37 Sam James
  0 siblings, 0 replies; 7+ messages in thread
From: Sam James @ 2021-12-16 22:37 UTC (permalink / raw
  To: gentoo-commits

commit:     47dba6226b616c192fd3fb9d0f37ec2945498f60
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 16 22:36:56 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec 16 22:37:00 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47dba622

net-firewall/ipt_netflow: fix build with linux-headers-5.14

Closes: https://bugs.gentoo.org/813993
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../ipt_netflow-2.6-fix-linux-headers-5.14.patch   | 29 ++++++++++++++++++++++
 net-firewall/ipt_netflow/ipt_netflow-2.6.ebuild    |  2 ++
 2 files changed, 31 insertions(+)

diff --git a/net-firewall/ipt_netflow/files/ipt_netflow-2.6-fix-linux-headers-5.14.patch b/net-firewall/ipt_netflow/files/ipt_netflow-2.6-fix-linux-headers-5.14.patch
new file mode 100644
index 000000000000..0f52b68d5235
--- /dev/null
+++ b/net-firewall/ipt_netflow/files/ipt_netflow-2.6-fix-linux-headers-5.14.patch
@@ -0,0 +1,29 @@
+https://github.com/aabc/ipt-netflow/commit/66e4304101010108892376866334ec9317b427d8.patch
+https://bugs.gentoo.org/813993
+
+From: ABC <abc@openwall.com>
+Date: Wed, 14 Jul 2021 15:39:42 +0300
+Subject: [PATCH] Namespace sk_error_report
+
+sk_error_report is introduced in v5.14-rc1: e3ae2365efc14 ("net: sock:
+introduce sk_error_report").
+--- a/ipt_NETFLOW.c
++++ b/ipt_NETFLOW.c
+@@ -1943,7 +1943,7 @@ static struct ctl_path netflow_sysctl_path[] = {
+ #endif /* CONFIG_SYSCTL */
+ 
+ /* socket code */
+-static void sk_error_report(struct sock *sk)
++static void netflow_sk_error_report(struct sock *sk)
+ {
+ 	struct ipt_netflow_sock *usock;
+ 
+@@ -1974,7 +1974,7 @@ static struct socket *usock_open_sock(struct ipt_netflow_sock *usock)
+ 	}
+ 	sock->sk->sk_allocation = GFP_ATOMIC;
+ 	sock->sk->sk_prot->unhash(sock->sk); /* hidden from input */
+-	sock->sk->sk_error_report = &sk_error_report; /* clear ECONNREFUSED */
++	sock->sk->sk_error_report = &netflow_sk_error_report; /* clear ECONNREFUSED */
+ 	sock->sk->sk_user_data = usock;
+ 	sock->sk->sk_reuse = SK_CAN_REUSE;
+ 

diff --git a/net-firewall/ipt_netflow/ipt_netflow-2.6.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.6.ebuild
index 35009fb8ac17..4665d475be3d 100644
--- a/net-firewall/ipt_netflow/ipt_netflow-2.6.ebuild
+++ b/net-firewall/ipt_netflow/ipt_netflow-2.6.ebuild
@@ -32,6 +32,8 @@ PATCHES=(
 	"${FILESDIR}/${PN}-2.0-configure.patch" # bug #455984
 	"${FILESDIR}/${PN}-2.6-gentoo.patch"
 	"${FILESDIR}/${P}-ref_module_fix.patch" # bug #781014
+	"${FILESDIR}/${P}-fix-linux-headers-5.14.patch" # bug #813993
+
 )
 
 pkg_setup() {


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-firewall/ipt_netflow/files/, net-firewall/ipt_netflow/
@ 2025-05-21 20:56 Sam James
  0 siblings, 0 replies; 7+ messages in thread
From: Sam James @ 2025-05-21 20:56 UTC (permalink / raw
  To: gentoo-commits

commit:     09ee4581ec218b242141bcdae1f737f39d33b490
Author:     Jaco Kroon <jaco <AT> uls <DOT> co <DOT> za>
AuthorDate: Mon Mar 17 15:32:09 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed May 21 20:55:08 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09ee4581

net-firewall/ipt_netflow: add 2.6_p20250317

Snapshot version of https://github.com/aabc/ipt-netflow/pull/239

Updated the -gentoo.patch to sort out LDFLAGS not respected QA error.

Signed-off-by: Jaco Kroon <jaco <AT> uls.co.za>
Bug: https://bugs.gentoo.org/950506
Bug: https://bugs.gentoo.org/831306
Part-of: https://github.com/gentoo/gentoo/pull/41138
Closes: https://github.com/gentoo/gentoo/pull/41138
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-firewall/ipt_netflow/Manifest                  |   1 +
 .../files/ipt_netflow-9999-gentoo.patch            |  16 +++-
 .../ipt_netflow/ipt_netflow-2.6_p20250317.ebuild   | 106 +++++++++++++++++++++
 3 files changed, 118 insertions(+), 5 deletions(-)

diff --git a/net-firewall/ipt_netflow/Manifest b/net-firewall/ipt_netflow/Manifest
index 8d7eda977928..e5f4998b6c83 100644
--- a/net-firewall/ipt_netflow/Manifest
+++ b/net-firewall/ipt_netflow/Manifest
@@ -1 +1,2 @@
 DIST ipt_netflow-2.6.tar.gz 95752 BLAKE2B 088c7030addd34d9d889cfa705aa060d0793e33be957deb3b703daea4229afc24f7268285ce336e425a024dc9d8139633a5206ff9d769c95cf71c156acbd4f25 SHA512 0ccea556e25dc6bc2d8c7648ed1b4ab366097baf5b06f167ccd19d2adb0a195ad652635181573785f9e9fa208d163f22b6527310eb939455d7ee3bc141cbeed5
+DIST ipt_netflow-2.6_p20250317.tar.gz 96793 BLAKE2B 8d397b79574b472a806da6c5a4aa2e9922765c046682266904f3d291594420f884131c24e45affa989f56c335a10d5e64540a235dffdc8368d78581181ae7192 SHA512 2569b372a24ac3c05505313a0dae2846055d265fcddc7c2f8112145960f857f1eb6b68e33bba7d888f253c34d1f9c1486d0bfaa3881c1c26dd8a83257631048e

diff --git a/net-firewall/ipt_netflow/files/ipt_netflow-9999-gentoo.patch b/net-firewall/ipt_netflow/files/ipt_netflow-9999-gentoo.patch
index de797495f0fd..4853d7505362 100644
--- a/net-firewall/ipt_netflow/files/ipt_netflow-9999-gentoo.patch
+++ b/net-firewall/ipt_netflow/files/ipt_netflow-9999-gentoo.patch
@@ -1,3 +1,5 @@
+diff --git a/Makefile.in b/Makefile.in
+index 65edf4c..7d6ccc8 100644
 --- a/Makefile.in
 +++ b/Makefile.in
 @@ -13,7 +13,7 @@ CARGS = @CARGS@
@@ -9,7 +11,7 @@
  
  # https://www.kernel.org/doc/Documentation/kbuild/modules.txt
  # https://www.kernel.org/doc/Documentation/kbuild/makefiles.txt
-@@ -24,7 +24,7 @@
+@@ -24,7 +24,7 @@ all: ipt_NETFLOW.ko libipt_NETFLOW.so libip6t_NETFLOW.so @SNMPTARGET@
  
  ipt_NETFLOW.ko: version.h ipt_NETFLOW.c ipt_NETFLOW.h compat_def.h compat.h Makefile
  	@echo Compiling $(shell ./version.sh) for kernel $(KVERSION)
@@ -18,7 +20,7 @@
  	@touch $@
  compat_def.h: gen_compat_def
  	./gen_compat_def > $@-
-@@ -32,24 +32,24 @@
+@@ -32,24 +32,24 @@ compat_def.h: gen_compat_def
  sparse: | version.h ipt_NETFLOW.c ipt_NETFLOW.h compat.h Makefile
  	@rm -f ipt_NETFLOW.ko ipt_NETFLOW.o
  	@echo Compiling for kernel $(KVERSION)
@@ -47,12 +49,16 @@
  
  sinstall: | snmp_NETFLOW.so IPT-NETFLOW-MIB.my
  	@echo " *"
-@@ -69,7 +69,7 @@
+@@ -69,10 +69,10 @@ sinstall: | snmp_NETFLOW.so IPT-NETFLOW-MIB.my
  	fi
  
  %_sh.o: libipt_NETFLOW.c
 -	$(CC) $(CFLAGS) -O2 -Wall -Wunused $(IPTABLES_CFLAGS) -fPIC -o $@ -c libipt_NETFLOW.c
-+	$(CC) $(CFLAGS) $(LDFLAGS) -Wall -Wunused $(IPTABLES_CFLAGS) -fPIC -o $@ -c libipt_NETFLOW.c
++	$(CC) $(CFLAGS) -Wall -Wunused $(IPTABLES_CFLAGS) -fPIC -o $@ -c libipt_NETFLOW.c
  
  %.so: %_sh.o
- 	$(CC) -shared -o $@ $<
+-	$(CC) -shared -o $@ $<
++	$(CC) $(LDFLAGS) -shared -o $@ $<
+ 
+ version.h: ipt_NETFLOW.c ipt_NETFLOW.h compat.h Makefile
+ 	@./version.sh --define > version.h

diff --git a/net-firewall/ipt_netflow/ipt_netflow-2.6_p20250317.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.6_p20250317.ebuild
new file mode 100644
index 000000000000..71baeddafbe9
--- /dev/null
+++ b/net-firewall/ipt_netflow/ipt_netflow-2.6_p20250317.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit linux-mod-r1 toolchain-funcs
+
+# Hash of commit point.
+SNAPSHOT=0c5759d002131ac3ae161713f4ce0d515037c1de
+
+DESCRIPTION="Netflow iptables module"
+HOMEPAGE="https://github.com/aabc/ipt-netflow"
+SRC_URI="https://github.com/aabc/ipt-netflow/archive/${SNAPSHOT}.tar.gz -> ${P}.tar.gz"
+
+S="${WORKDIR}/ipt-netflow-${SNAPSHOT}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="natevents snmp"
+
+RDEPEND="
+	net-firewall/iptables:0=
+	snmp? ( net-analyzer/net-snmp )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	virtual/linux-sources
+	virtual/pkgconfig
+"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-2.0-configure.patch" # bug #455984
+	"${FILESDIR}/${PN}-9999-gentoo.patch"
+)
+
+pkg_setup() {
+	local CONFIG_CHECK="BRIDGE_NETFILTER ~IP_NF_IPTABLES VLAN_8021Q"
+	if use natevents; then
+		CONFIG_CHECK+=" NF_CONNTRACK_EVENTS"
+		if kernel_is lt 5 2; then
+			CONFIG_CHECK+=" NF_NAT_NEEDED"
+		else
+			CONFIG_CHECK+=" NF_NAT"
+		fi
+	fi
+
+	IPT_LIB="/usr/$(get_libdir)/xtables"
+	linux-mod-r1_pkg_setup
+}
+
+src_prepare() {
+	default
+
+	# Fix incorrect module version in sources
+	sed -i \
+		-e '/IPT_NETFLOW_VERSION/s#"[0-9.]*"#"'${PV}'"#' \
+		ipt_NETFLOW.c || die
+
+	# Checking for directory is enough
+	sed -i \
+		-e 's:-s /etc/snmp/snmpd.conf:-d /etc/snmp:' \
+		configure || die
+}
+
+do_conf() {
+	tc-export CC
+	echo ./configure $*
+	./configure $* ${EXTRA_ECONF} || die 'configure failed'
+}
+
+src_configure() {
+	local IPT_VERSION="$($(tc-getPKG_CONFIG) --modversion xtables)"
+	# this configure script is not based on autotools
+	# ipt-src need to be defined, see bug #455984
+	do_conf \
+		--disable-dkms \
+		--enable-aggregation \
+		--enable-direction \
+		--enable-macaddress \
+		--enable-vlan \
+		--ipt-lib="${IPT_LIB}" \
+		--ipt-src="/usr/" \
+		--ipt-ver="${IPT_VERSION}" \
+		--kdir="${KV_DIR}" \
+		--kver="${KV_FULL}" \
+		$(use natevents && echo '--enable-natevents') \
+		$(use snmp && echo '--enable-snmp-rules' || echo '--disable-snmp-agent')
+}
+
+src_compile() {
+	local modlist=( ipt_NETFLOW=ipt_netflow )
+	linux-mod-r1_src_compile
+	emake ARCH="$(tc-arch-kernel)" CC="$(tc-getCC)" LD="$(tc-getLD)" OBJDUMP="$(tc-getOBJDUMP)" all
+}
+
+src_install() {
+	linux-mod-r1_src_install
+
+	use snmp && emake DESTDIR="${D}" SNMPTGSO="/usr/$(get_libdir)/snmp/dlmod/snmp_NETFLOW.so" sinstall
+
+	exeinto "${IPT_LIB}"
+	doexe libip{,6}t_NETFLOW.so
+
+	doheader ipt_NETFLOW.h
+}


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-05-21 20:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-19  6:12 [gentoo-commits] repo/gentoo:master commit in: net-firewall/ipt_netflow/files/, net-firewall/ipt_netflow/ Jeroen Roovers
  -- strict thread matches above, loose matches on Subject: below --
2025-05-21 20:56 Sam James
2021-12-16 22:37 Sam James
2021-07-05 14:21 Sergey Popov
2020-04-24  7:35 Jeroen Roovers
2017-09-11  9:33 Sergey Popov
2016-07-19  9:14 Sergey Popov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox