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

commit:     13a3eb076dd1b4ebd058333275c0363c7632f761
Author:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 15 15:26:44 2020 +0000
Commit:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
CommitDate: Sun Nov 15 15:26:44 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13a3eb07

net-firewall/ipt_netflow: backport some fixes for recent kernels

Reported-by: Agostino Sarubbo <ago <AT> gentoo.org>
Closes: https://bugs.gentoo.org/738062
Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Sergey Popov <pinkbyte <AT> gentoo.org>

 .../files/ipt_netflow-2.5.1-vlan_dev_priv.patch    | 32 ++++++++++++++++++++++
 .../ipt_netflow/ipt_netflow-2.5.1-r1.ebuild        |  1 +
 2 files changed, 33 insertions(+)

diff --git a/net-firewall/ipt_netflow/files/ipt_netflow-2.5.1-vlan_dev_priv.patch b/net-firewall/ipt_netflow/files/ipt_netflow-2.5.1-vlan_dev_priv.patch
new file mode 100644
index 00000000000..49721e547fd
--- /dev/null
+++ b/net-firewall/ipt_netflow/files/ipt_netflow-2.5.1-vlan_dev_priv.patch
@@ -0,0 +1,32 @@
+commit 1153f73f038205dc17303e6e6c455bbbb56191f7
+Author: ABC <abc@openwall.com>
+Date:   Wed Oct 14 15:35:57 2020 +0300
+
+    gen_compat_def: Check for vlan_dev_priv instead of version if
+
+diff --git a/gen_compat_def b/gen_compat_def
+index c0f20f6..3965e94 100755
+--- a/gen_compat_def
++++ b/gen_compat_def
+@@ -85,6 +85,8 @@ kbuild_test_struct proc_ops linux/proc_fs.h
+ kbuild_test_struct proc_ops linux/proc_fs.h
+ # No since v5.1, but present in CentOS-8's 4.18.0-227
+ kbuild_test_symbol synchronize_sched linux/rcupdate.h
++# Stumbled on 5.9
++kbuild_test_struct vlan_dev_priv linux/if_vlan.h
+ 
+ echo "// End of compat_def.h"
+ 
+diff --git a/ipt_NETFLOW.c b/ipt_NETFLOW.c
+index 01055df..6f95166 100644
+--- a/ipt_NETFLOW.c
++++ b/ipt_NETFLOW.c
+@@ -4874,7 +4874,7 @@ static void parse_l2_header(const struct sk_buff *skb, struct ipt_netflow_tuple
+ 		tuple->tag[tag_num++] = htons(vlan_tx_tag_get(skb));
+ 	else if (skb->dev && is_vlan_dev(skb->dev)) {
+ 		struct net_device *vlan_dev = skb->dev;
+-# if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)
++# ifdef HAVE_VLAN_DEV_PRIV
+ 		struct vlan_dev_priv *vlan = vlan_dev_priv(vlan_dev);
+ 
+ 		/* `if` condition is `#if`ed intentionally, and this is

diff --git a/net-firewall/ipt_netflow/ipt_netflow-2.5.1-r1.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.5.1-r1.ebuild
index 8fd0b2ad8ee..8fa83402ada 100644
--- a/net-firewall/ipt_netflow/ipt_netflow-2.5.1-r1.ebuild
+++ b/net-firewall/ipt_netflow/ipt_netflow-2.5.1-r1.ebuild
@@ -28,6 +28,7 @@ DEPEND="${RDEPEND}
 PATCHES=(
 	"${FILESDIR}/${PN}-2.0-configure.patch" # bug #455984
 	"${FILESDIR}/${PN}-2.5-gentoo.patch"
+	"${FILESDIR}/${P}-vlan_dev_priv.patch"
 )
 
 pkg_setup() {


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-firewall/ipt_netflow/, net-firewall/ipt_netflow/files/
@ 2024-01-19 12:23 Sergey Popov
  0 siblings, 0 replies; 13+ messages in thread
From: Sergey Popov @ 2024-01-19 12:23 UTC (permalink / raw
  To: gentoo-commits

commit:     a5debd13910f26e1a5c3e1d025f3bb79b3d52613
Author:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 19 12:20:57 2024 +0000
Commit:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
CommitDate: Fri Jan 19 12:22:29 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5debd13

net-firewall/ipt_netflow: fix build with kernel 6.4

Closes: https://bugs.gentoo.org/921589
Reported-by: Aurelien Minet <amlabs <AT> free.fr>
Signed-off-by: Sergey Popov <pinkbyte <AT> gentoo.org>

 .../files/ipt_netflow-2.6-kernel-6.4.patch         | 66 ++++++++++++++++++++++
 net-firewall/ipt_netflow/ipt_netflow-2.6-r1.ebuild |  4 +-
 2 files changed, 68 insertions(+), 2 deletions(-)

diff --git a/net-firewall/ipt_netflow/files/ipt_netflow-2.6-kernel-6.4.patch b/net-firewall/ipt_netflow/files/ipt_netflow-2.6-kernel-6.4.patch
new file mode 100644
index 000000000000..cfbca8823d79
--- /dev/null
+++ b/net-firewall/ipt_netflow/files/ipt_netflow-2.6-kernel-6.4.patch
@@ -0,0 +1,66 @@
+From 0eb2092e930c78fc726d5d05abbcc81aa6c41b89 Mon Sep 17 00:00:00 2001
+From: ABC <abc@openwall.com>
+Date: Mon, 26 Jun 2023 16:29:58 -0300
+Subject: [PATCH] Build compatibility with v6.4 (register_sysctl_paths)
+
+'register_sysctl_paths' is missed from v6.4 due to 0199849acd07
+("sysctl: remove register_sysctl_paths()").
+
+Signed-off-by: ABC <abc@openwall.com>
+
+Slightly modified to fit on 2.6 release
+---
+ gen_compat_def |  2 ++
+ ipt_NETFLOW.c  | 10 ++++++++--
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/gen_compat_def b/gen_compat_def
+index 396fdb9..a9cb95e 100755
+--- a/gen_compat_def
++++ b/gen_compat_def
+@@ -87,6 +87,8 @@
+ kbuild_test_symbol nf_bridge_info_get linux/netfilter_bridge.h
+ # Stumbled on 5.9
+ kbuild_test_struct vlan_dev_priv linux/if_vlan.h
++# 6.4: 0199849acd07 ("sysctl: remove register_sysctl_paths()")
++kbuild_test_symbol register_sysctl_paths linux/sysctl.h
+ 
+ echo "// End of compat_def.h"
+ 
+diff --git a/ipt_NETFLOW.c b/ipt_NETFLOW.c
+index b3c2c99..eee8074 100644
+--- a/ipt_NETFLOW.c
++++ b/ipt_NETFLOW.c
+@@ -1929,16 +1929,18 @@ static ctl_table netflow_net_table[] = {
+ 	{ }
+ };
+ #else /* >= 2.6.25 */
++# ifdef HAVE_REGISTER_SYSCTL_PATHS
+ static struct ctl_path netflow_sysctl_path[] = {
+ 	{
+ 		.procname = "net",
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
++#  if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
+ 		.ctl_name = CTL_NET
+-#endif
++#  endif
+ 	},
+ 	{ .procname = "netflow" },
+ 	{ }
+ };
++# endif
+ #endif /* 2.6.25 */
+ #endif /* CONFIG_SYSCTL */
+ 
+@@ -5666,7 +5668,11 @@ static int __init ipt_netflow_init(void)
+ #endif
+ 						      );
+ #else /* 2.6.25 */
++# ifdef HAVE_REGISTER_SYSCTL_PATHS
+ 	netflow_sysctl_header = register_sysctl_paths(netflow_sysctl_path, netflow_sysctl_table);
++# else
++	netflow_sysctl_header = register_sysctl("net/netflow", netflow_sysctl_table);
++# endif
+ #endif
+ 	if (!netflow_sysctl_header) {
+ 		printk(KERN_ERR "netflow: can't register to sysctl\n");

diff --git a/net-firewall/ipt_netflow/ipt_netflow-2.6-r1.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.6-r1.ebuild
index 5cbcfb78c715..08997f3178c2 100644
--- a/net-firewall/ipt_netflow/ipt_netflow-2.6-r1.ebuild
+++ b/net-firewall/ipt_netflow/ipt_netflow-2.6-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -33,7 +33,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-2.6-gentoo.patch"
 	"${FILESDIR}/${P}-ref_module_fix.patch" # bug #781014
 	"${FILESDIR}/${P}-fix-linux-headers-5.14.patch" # bug #813993
-
+	"${FILESDIR}/${P}-kernel-6.4.patch" # bug #921589
 )
 
 pkg_setup() {


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-firewall/ipt_netflow/, net-firewall/ipt_netflow/files/
@ 2023-06-27  8:58 Sergey Popov
  0 siblings, 0 replies; 13+ messages in thread
From: Sergey Popov @ 2023-06-27  8:58 UTC (permalink / raw
  To: gentoo-commits

commit:     7c8a3effadf1997628b137b7855a1f4e1fe5f969
Author:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 27 08:55:47 2023 +0000
Commit:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
CommitDate: Tue Jun 27 08:58:06 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c8a3eff

net-firewall/ipt_netflow: revision bump

Bump EAPI to 8. Migrate to linux-mod-r1 eclass
Sync live ebuild
Add missing remote-id in metadata.xml

Signed-off-by: Sergey Popov <pinkbyte <AT> gentoo.org>

 .../files/ipt_netflow-9999-gentoo.patch            | 15 ++++-----
 ...tflow-9999.ebuild => ipt_netflow-2.6-r1.ebuild} | 36 ++++++++++++----------
 net-firewall/ipt_netflow/ipt_netflow-9999.ebuild   | 18 +++++------
 net-firewall/ipt_netflow/metadata.xml              |  1 +
 4 files changed, 35 insertions(+), 35 deletions(-)

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 675e8b16f725..de797495f0fd 100644
--- a/net-firewall/ipt_netflow/files/ipt_netflow-9999-gentoo.patch
+++ b/net-firewall/ipt_netflow/files/ipt_netflow-9999-gentoo.patch
@@ -1,6 +1,6 @@
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -11,7 +11,7 @@ CARGS = @CARGS@
+@@ -13,7 +13,7 @@ CARGS = @CARGS@
  SNMPTGSO = /usr/lib/snmp/dlmod/snmp_NETFLOW.so
  SNMPCONF = /etc/snmp/snmpd.conf
  SNMPLINE = dlmod netflow $(SNMPTGSO)
@@ -9,15 +9,16 @@
  
  # https://www.kernel.org/doc/Documentation/kbuild/modules.txt
  # https://www.kernel.org/doc/Documentation/kbuild/makefiles.txt
-@@ -22,31 +22,31 @@ all: ipt_NETFLOW.ko libipt_NETFLOW.so libip6t_NETFLOW.so @SNMPTARGET@
+@@ -24,7 +24,7 @@
  
  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
+ 	@echo Compiling $(shell ./version.sh) for kernel $(KVERSION)
+-	make -C $(KDIR) M=$(CURDIR) modules
++	$(MAKE) -C $(KDIR) M=$(CURDIR) modules
  	@touch $@
  compat_def.h: gen_compat_def
- 	./gen_compat_def > $@
+ 	./gen_compat_def > $@-
+@@ -32,24 +32,24 @@
  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)
@@ -46,7 +47,7 @@
  
  sinstall: | snmp_NETFLOW.so IPT-NETFLOW-MIB.my
  	@echo " *"
-@@ -66,7 +66,7 @@ sinstall: | snmp_NETFLOW.so IPT-NETFLOW-MIB.my
+@@ -69,7 +69,7 @@
  	fi
  
  %_sh.o: libipt_NETFLOW.c

diff --git a/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.6-r1.ebuild
similarity index 78%
copy from net-firewall/ipt_netflow/ipt_netflow-9999.ebuild
copy to net-firewall/ipt_netflow/ipt_netflow-2.6-r1.ebuild
index 986e6de1d7a8..ed681389901d 100644
--- a/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild
+++ b/net-firewall/ipt_netflow/ipt_netflow-2.6-r1.ebuild
@@ -1,19 +1,21 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
-inherit git-r3 linux-info linux-mod toolchain-funcs
+inherit linux-mod-r1 toolchain-funcs
 
 DESCRIPTION="Netflow iptables module"
 HOMEPAGE="
 	https://sourceforge.net/projects/ipt-netflow
 	https://github.com/aabc/ipt-netflow
 "
-EGIT_REPO_URI="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="
@@ -28,12 +30,13 @@ BDEPEND="
 
 PATCHES=(
 	"${FILESDIR}/${PN}-2.0-configure.patch" # bug #455984
-	"${FILESDIR}/${PN}-9999-gentoo.patch"
+	"${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() {
-	linux-info_pkg_setup
-
 	local CONFIG_CHECK="BRIDGE_NETFILTER ~IP_NF_IPTABLES VLAN_8021Q"
 	use debug && CONFIG_CHECK+=" ~DEBUG_FS"
 	if use natevents; then
@@ -45,21 +48,19 @@ pkg_setup() {
 		fi
 	fi
 
-	BUILD_TARGETS="all"
-	MODULE_NAMES="ipt_NETFLOW(ipt_netflow)"
 	IPT_LIB="/usr/$(get_libdir)/xtables"
+	linux-mod-r1_pkg_setup
+}
 
-	linux-mod_pkg_setup
+src_unpack() {
+	default
+
+	mv "${WORKDIR}"/${PN/_/-}-* "${WORKDIR}"/${P} || die
 }
 
 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:' \
@@ -93,11 +94,13 @@ src_configure() {
 }
 
 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_src_install
+	linux-mod-r1_src_install
 
 	use snmp && emake DESTDIR="${D}" SNMPTGSO="/usr/$(get_libdir)/snmp/dlmod/snmp_NETFLOW.so" sinstall
 
@@ -105,5 +108,4 @@ src_install() {
 	doexe libip{,6}t_NETFLOW.so
 
 	doheader ipt_NETFLOW.h
-	dodoc README*
 }

diff --git a/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild b/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild
index 986e6de1d7a8..2ea5558fb6e6 100644
--- a/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild
+++ b/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
-inherit git-r3 linux-info linux-mod toolchain-funcs
+inherit git-r3 linux-mod-r1 toolchain-funcs
 
 DESCRIPTION="Netflow iptables module"
 HOMEPAGE="
@@ -32,8 +32,6 @@ PATCHES=(
 )
 
 pkg_setup() {
-	linux-info_pkg_setup
-
 	local CONFIG_CHECK="BRIDGE_NETFILTER ~IP_NF_IPTABLES VLAN_8021Q"
 	use debug && CONFIG_CHECK+=" ~DEBUG_FS"
 	if use natevents; then
@@ -45,11 +43,8 @@ pkg_setup() {
 		fi
 	fi
 
-	BUILD_TARGETS="all"
-	MODULE_NAMES="ipt_NETFLOW(ipt_netflow)"
 	IPT_LIB="/usr/$(get_libdir)/xtables"
-
-	linux-mod_pkg_setup
+	linux-mod-r1_pkg_setup
 }
 
 src_prepare() {
@@ -93,11 +88,13 @@ src_configure() {
 }
 
 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_src_install
+	linux-mod-r1_src_install
 
 	use snmp && emake DESTDIR="${D}" SNMPTGSO="/usr/$(get_libdir)/snmp/dlmod/snmp_NETFLOW.so" sinstall
 
@@ -105,5 +102,4 @@ src_install() {
 	doexe libip{,6}t_NETFLOW.so
 
 	doheader ipt_NETFLOW.h
-	dodoc README*
 }

diff --git a/net-firewall/ipt_netflow/metadata.xml b/net-firewall/ipt_netflow/metadata.xml
index 288dfc140e2d..1c60427303d3 100644
--- a/net-firewall/ipt_netflow/metadata.xml
+++ b/net-firewall/ipt_netflow/metadata.xml
@@ -14,5 +14,6 @@
 	</use>
 	<upstream>
 		<remote-id type="sourceforge">ipt-netflow</remote-id>
+		<remote-id type="github">aabc/ipt-netflow</remote-id>
 	</upstream>
 </pkgmetadata>


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

commit:     646844f1f2373014a76b78442bb66f244aa23aa5
Author:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  5 14:12:59 2021 +0000
Commit:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
CommitDate: Mon Jul  5 14:15:04 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=646844f1

net-firewall/ipt_netflow-2.6: stable on amd64/x86

Drop old version

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

 net-firewall/ipt_netflow/Manifest                  |   1 -
 .../ipt_netflow/files/ipt_netflow-2.5-gentoo.patch |  61 -----------
 .../files/ipt_netflow-2.5.1-vlan_dev_priv.patch    |  32 ------
 .../ipt_netflow/ipt_netflow-2.5.1-r1.ebuild        | 111 ---------------------
 net-firewall/ipt_netflow/ipt_netflow-2.6.ebuild    |   2 +-
 5 files changed, 1 insertion(+), 206 deletions(-)

diff --git a/net-firewall/ipt_netflow/Manifest b/net-firewall/ipt_netflow/Manifest
index a779559db91..8d7eda97792 100644
--- a/net-firewall/ipt_netflow/Manifest
+++ b/net-firewall/ipt_netflow/Manifest
@@ -1,2 +1 @@
-DIST ipt_netflow-2.5.1.tar.gz 94627 BLAKE2B 440daed1f0c02e4700c6d4a97da08abc7bf51c73cd824a67fd2b7b9394b47d493ca7acfea34467d93cdce6dded2c5b24b4a2600b9f717aa54561d1f88a123dbc SHA512 dd0bde358f788f2d62ace6a0b1529128f0a686f9b776deeae3502d45d06d13971e8ea249d2647d00b00e73625c515bc12a4b7bd8d34fafd5f3b32f290d48cdce
 DIST ipt_netflow-2.6.tar.gz 95752 BLAKE2B 088c7030addd34d9d889cfa705aa060d0793e33be957deb3b703daea4229afc24f7268285ce336e425a024dc9d8139633a5206ff9d769c95cf71c156acbd4f25 SHA512 0ccea556e25dc6bc2d8c7648ed1b4ab366097baf5b06f167ccd19d2adb0a195ad652635181573785f9e9fa208d163f22b6527310eb939455d7ee3bc141cbeed5

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
deleted file mode 100644
index 508be107795..00000000000
--- a/net-firewall/ipt_netflow/files/ipt_netflow-2.5-gentoo.patch
+++ /dev/null
@@ -1,61 +0,0 @@
---- 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/files/ipt_netflow-2.5.1-vlan_dev_priv.patch b/net-firewall/ipt_netflow/files/ipt_netflow-2.5.1-vlan_dev_priv.patch
deleted file mode 100644
index 49721e547fd..00000000000
--- a/net-firewall/ipt_netflow/files/ipt_netflow-2.5.1-vlan_dev_priv.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-commit 1153f73f038205dc17303e6e6c455bbbb56191f7
-Author: ABC <abc@openwall.com>
-Date:   Wed Oct 14 15:35:57 2020 +0300
-
-    gen_compat_def: Check for vlan_dev_priv instead of version if
-
-diff --git a/gen_compat_def b/gen_compat_def
-index c0f20f6..3965e94 100755
---- a/gen_compat_def
-+++ b/gen_compat_def
-@@ -85,6 +85,8 @@ kbuild_test_struct proc_ops linux/proc_fs.h
- kbuild_test_struct proc_ops linux/proc_fs.h
- # No since v5.1, but present in CentOS-8's 4.18.0-227
- kbuild_test_symbol synchronize_sched linux/rcupdate.h
-+# Stumbled on 5.9
-+kbuild_test_struct vlan_dev_priv linux/if_vlan.h
- 
- echo "// End of compat_def.h"
- 
-diff --git a/ipt_NETFLOW.c b/ipt_NETFLOW.c
-index 01055df..6f95166 100644
---- a/ipt_NETFLOW.c
-+++ b/ipt_NETFLOW.c
-@@ -4874,7 +4874,7 @@ static void parse_l2_header(const struct sk_buff *skb, struct ipt_netflow_tuple
- 		tuple->tag[tag_num++] = htons(vlan_tx_tag_get(skb));
- 	else if (skb->dev && is_vlan_dev(skb->dev)) {
- 		struct net_device *vlan_dev = skb->dev;
--# if LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)
-+# ifdef HAVE_VLAN_DEV_PRIV
- 		struct vlan_dev_priv *vlan = vlan_dev_priv(vlan_dev);
- 
- 		/* `if` condition is `#if`ed intentionally, and this is

diff --git a/net-firewall/ipt_netflow/ipt_netflow-2.5.1-r1.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.5.1-r1.ebuild
deleted file mode 100644
index bf18a5d0083..00000000000
--- a/net-firewall/ipt_netflow/ipt_netflow-2.5.1-r1.ebuild
+++ /dev/null
@@ -1,111 +0,0 @@
-# Copyright 1999-2021 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}"
-BDEPEND="
-	virtual/linux-sources
-	virtual/pkgconfig
-"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-2.0-configure.patch" # bug #455984
-	"${FILESDIR}/${PN}-2.5-gentoo.patch"
-	"${FILESDIR}/${P}-vlan_dev_priv.patch"
-)
-
-pkg_setup() {
-	linux-info_pkg_setup
-
-	local CONFIG_CHECK="BRIDGE_NETFILTER ~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)" LD="$(tc-getLD)" OBJDUMP="$(tc-getOBJDUMP)" all
-}
-
-src_install() {
-	linux-mod_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
-	dodoc README*
-}

diff --git a/net-firewall/ipt_netflow/ipt_netflow-2.6.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.6.ebuild
index 97fce443ce9..29ed265510f 100644
--- a/net-firewall/ipt_netflow/ipt_netflow-2.6.ebuild
+++ b/net-firewall/ipt_netflow/ipt_netflow-2.6.ebuild
@@ -14,7 +14,7 @@ SRC_URI="https://github.com/aabc/ipt-netflow/archive/v${PV}.tar.gz -> ${P}.tar.g
 
 LICENSE="GPL-2"
 SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="amd64 x86"
 
 IUSE="debug natevents snmp"
 


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-firewall/ipt_netflow/, net-firewall/ipt_netflow/files/
@ 2021-05-27 10:04 Sergey Popov
  0 siblings, 0 replies; 13+ messages in thread
From: Sergey Popov @ 2021-05-27 10:04 UTC (permalink / raw
  To: gentoo-commits

commit:     490a3ecbbc4e4e43a7e1b4d2253490f1ca169212
Author:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
AuthorDate: Thu May 27 10:01:51 2021 +0000
Commit:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
CommitDate: Thu May 27 10:01:51 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=490a3ecb

net-firewall/ipt_netflow: version bump

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

 net-firewall/ipt_netflow/Manifest                  |   1 +
 .../ipt_netflow/files/ipt_netflow-2.6-gentoo.patch |  61 ++++++++++++
 net-firewall/ipt_netflow/ipt_netflow-2.6.ebuild    | 110 +++++++++++++++++++++
 3 files changed, 172 insertions(+)

diff --git a/net-firewall/ipt_netflow/Manifest b/net-firewall/ipt_netflow/Manifest
index 595c50a16e3..a779559db91 100644
--- a/net-firewall/ipt_netflow/Manifest
+++ b/net-firewall/ipt_netflow/Manifest
@@ -1 +1,2 @@
 DIST ipt_netflow-2.5.1.tar.gz 94627 BLAKE2B 440daed1f0c02e4700c6d4a97da08abc7bf51c73cd824a67fd2b7b9394b47d493ca7acfea34467d93cdce6dded2c5b24b4a2600b9f717aa54561d1f88a123dbc SHA512 dd0bde358f788f2d62ace6a0b1529128f0a686f9b776deeae3502d45d06d13971e8ea249d2647d00b00e73625c515bc12a4b7bd8d34fafd5f3b32f290d48cdce
+DIST ipt_netflow-2.6.tar.gz 95752 BLAKE2B 088c7030addd34d9d889cfa705aa060d0793e33be957deb3b703daea4229afc24f7268285ce336e425a024dc9d8139633a5206ff9d769c95cf71c156acbd4f25 SHA512 0ccea556e25dc6bc2d8c7648ed1b4ab366097baf5b06f167ccd19d2adb0a195ad652635181573785f9e9fa208d163f22b6527310eb939455d7ee3bc141cbeed5

diff --git a/net-firewall/ipt_netflow/files/ipt_netflow-2.6-gentoo.patch b/net-firewall/ipt_netflow/files/ipt_netflow-2.6-gentoo.patch
new file mode 100644
index 00000000000..44dcfdec6d7
--- /dev/null
+++ b/net-firewall/ipt_netflow/files/ipt_netflow-2.6-gentoo.patch
@@ -0,0 +1,61 @@
+--- a/Makefile.in	2021-05-27 12:57:29.600377496 +0300
++++ b/Makefile.in	2021-05-27 12:58:55.111381725 +0300
+@@ -13,7 +13,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
+@@ -24,31 +24,31 @@
+ 
+ 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)
+-	make -C $(KDIR) M=$(CURDIR) modules
++	$(MAKE) -C $(KDIR) M=$(CURDIR) modules
+ 	@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 " *"
+@@ -68,10 +68,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.6.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.6.ebuild
new file mode 100644
index 00000000000..97fce443ce9
--- /dev/null
+++ b/net-firewall/ipt_netflow/ipt_netflow-2.6.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2021 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}"
+BDEPEND="
+	virtual/linux-sources
+	virtual/pkgconfig
+"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-2.0-configure.patch" # bug #455984
+	"${FILESDIR}/${PN}-2.6-gentoo.patch"
+)
+
+pkg_setup() {
+	linux-info_pkg_setup
+
+	local CONFIG_CHECK="BRIDGE_NETFILTER ~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)" LD="$(tc-getLD)" OBJDUMP="$(tc-getOBJDUMP)" all
+}
+
+src_install() {
+	linux-mod_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
+	dodoc README*
+}


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-firewall/ipt_netflow/, net-firewall/ipt_netflow/files/
@ 2020-12-02  7:19 Sergey Popov
  0 siblings, 0 replies; 13+ messages in thread
From: Sergey Popov @ 2020-12-02  7:19 UTC (permalink / raw
  To: gentoo-commits

commit:     36ff33603222f02db016a4a184e676f1e5b5c745
Author:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
AuthorDate: Wed Dec  2 07:17:57 2020 +0000
Commit:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
CommitDate: Wed Dec  2 07:19:44 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36ff3360

net-firewall/ipt_netflow: drop old version

Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Sergey Popov <pinkbyte <AT> gentoo.org>

 net-firewall/ipt_netflow/Manifest                  |   1 -
 .../ipt_netflow/files/ipt_netflow-2.3-flags.patch  |  55 -----------
 .../files/ipt_netflow-2.4-bridge_netfilter.patch   |  61 ------------
 net-firewall/ipt_netflow/ipt_netflow-2.4-r1.ebuild | 105 ---------------------
 4 files changed, 222 deletions(-)

diff --git a/net-firewall/ipt_netflow/Manifest b/net-firewall/ipt_netflow/Manifest
index 592cc2926c3..595c50a16e3 100644
--- a/net-firewall/ipt_netflow/Manifest
+++ b/net-firewall/ipt_netflow/Manifest
@@ -1,2 +1 @@
-DIST ipt_netflow-2.4.tar.gz 92580 BLAKE2B 0197e7e5cdd9c94c7b80b38cb4e2879343139592421922bf73aeaac70ac3af54ea25934bb1474ff455a9f58eab2368995591542f46be48b5c8491a3b6a192f56 SHA512 3c80d02cfda996fbde8d258875df8795000fd8390b5a6f8296771a992067e153eca48f7f4602421529948beaf3030e164adfc2ffe5b528042fbdc15ffb56aa74
 DIST ipt_netflow-2.5.1.tar.gz 94627 BLAKE2B 440daed1f0c02e4700c6d4a97da08abc7bf51c73cd824a67fd2b7b9394b47d493ca7acfea34467d93cdce6dded2c5b24b4a2600b9f717aa54561d1f88a123dbc SHA512 dd0bde358f788f2d62ace6a0b1529128f0a686f9b776deeae3502d45d06d13971e8ea249d2647d00b00e73625c515bc12a4b7bd8d34fafd5f3b32f290d48cdce

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
deleted file mode 100644
index 0d89e5ba90a..00000000000
--- a/net-firewall/ipt_netflow/files/ipt_netflow-2.3-flags.patch
+++ /dev/null
@@ -1,55 +0,0 @@
---- 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/files/ipt_netflow-2.4-bridge_netfilter.patch b/net-firewall/ipt_netflow/files/ipt_netflow-2.4-bridge_netfilter.patch
deleted file mode 100644
index cde23bc9fe7..00000000000
--- a/net-firewall/ipt_netflow/files/ipt_netflow-2.4-bridge_netfilter.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 9288e30f493d252ee85b492a894f78073e4f6d41 Mon Sep 17 00:00:00 2001
-From: ABC <abc@openwall.com>
-Date: Sat, 28 Sep 2019 23:29:40 +0300
-Subject: [PATCH] Don't compile physdev-override if BRIDGE_NETFILTER is
- disabled.
-
-Fixes #120 "Compile error nf_bridge / nf_trace" reported by DocMAX.
-
-Fixes: 51bdc2b ("Use nf_bridge_info_get() instead of skb->nf_bridge").
----
- compat.h      | 2 ++
- configure     | 1 +
- ipt_NETFLOW.c | 5 +++++
- 3 files changed, 8 insertions(+)
-
-diff --git a/compat.h b/compat.h
-index 0f9896b..66e224b 100644
---- a/compat.h
-+++ b/compat.h
-@@ -680,11 +680,13 @@ static inline int is_vlan_dev(struct net_device *dev)
- #endif
- 
- #if LINUX_VERSION_CODE < KERNEL_VERSION(5,0,0)
-+# ifdef CONFIG_BRIDGE_NETFILTER
- static inline struct nf_bridge_info *
- nf_bridge_info_get(const struct sk_buff *skb)
- {
- 	return skb->nf_bridge;
- }
-+# endif
- #endif
- 
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0)
-diff --git a/configure b/configure
-index 74eece5..8aae8bf 100755
---- a/configure
-+++ b/configure
-@@ -470,6 +470,7 @@ kernel_check_config() {
-   kconfig CONFIG_NF_CONNTRACK_EVENTS	"natevents"
-   kconfig CONFIG_IPV6			"IPv6"
-   kconfig CONFIG_IP6_NF_IPTABLES	"ip6tables target"
-+  kconfig CONFIG_BRIDGE_NETFILTER	"physdev override"
- }
- 
- kernel_check_include() {
-diff --git a/ipt_NETFLOW.c b/ipt_NETFLOW.c
-index fe25655..064de6c 100644
---- a/ipt_NETFLOW.c
-+++ b/ipt_NETFLOW.c
-@@ -83,6 +83,11 @@
- #if defined(CONFIG_NF_NAT_NEEDED) && LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)
- # include <net/netfilter/nf_conntrack_timestamp.h>
- #endif
-+#ifdef ENABLE_PHYSDEV_OVER
-+# ifndef CONFIG_BRIDGE_NETFILTER
-+#  undef ENABLE_PHYSDEV_OVER
-+# endif
-+#endif
- 
- #define IPT_NETFLOW_VERSION "2.4"   /* Note that if you are using git, you
- 				       will see version in other format. */

diff --git a/net-firewall/ipt_netflow/ipt_netflow-2.4-r1.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.4-r1.ebuild
deleted file mode 100644
index e36de51a30c..00000000000
--- a/net-firewall/ipt_netflow/ipt_netflow-2.4-r1.ebuild
+++ /dev/null
@@ -1,105 +0,0 @@
-# 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.3-flags.patch"
-	"${FILESDIR}/${P}-bridge_netfilter.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)" LD="$(tc-getLD)" OBJDUMP="$(tc-getOBJDUMP)" 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] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-firewall/ipt_netflow/, net-firewall/ipt_netflow/files/
@ 2020-04-24  7:35 Jeroen Roovers
  0 siblings, 0 replies; 13+ messages in thread
From: Jeroen Roovers @ 2020-04-24  7:35 UTC (permalink / raw
  To: gentoo-commits

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

net-firewall/ipt_netflow: Rename patch

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

 .../{ipt_netflow-9999-flags.patch => ipt_netflow-9999-gentoo.patch}   | 0
 net-firewall/ipt_netflow/ipt_netflow-9999.ebuild                      | 4 ++--
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net-firewall/ipt_netflow/files/ipt_netflow-9999-flags.patch b/net-firewall/ipt_netflow/files/ipt_netflow-9999-gentoo.patch
similarity index 100%
rename from net-firewall/ipt_netflow/files/ipt_netflow-9999-flags.patch
rename to net-firewall/ipt_netflow/files/ipt_netflow-9999-gentoo.patch

diff --git a/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild b/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild
index 06411e1ae6d..b0382acd22d 100644
--- a/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild
+++ b/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -27,7 +27,7 @@ DEPEND="${RDEPEND}
 "
 PATCHES=(
 	"${FILESDIR}/${PN}-2.0-configure.patch" # bug #455984
-	"${FILESDIR}/${PN}-9999-flags.patch"
+	"${FILESDIR}/${PN}-9999-gentoo.patch"
 )
 
 pkg_setup() {


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-firewall/ipt_netflow/, net-firewall/ipt_netflow/files/
@ 2020-01-28  9:22 Sergey Popov
  0 siblings, 0 replies; 13+ messages in thread
From: Sergey Popov @ 2020-01-28  9:22 UTC (permalink / raw
  To: gentoo-commits

commit:     a0bd2ac5ca14b0b670df2b0934fea96b1b89a1fc
Author:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 28 09:21:28 2020 +0000
Commit:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
CommitDate: Tue Jan 28 09:22:48 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0bd2ac5

net-firewall/ipt_netflow-2.4: build-time fixes

Fix building with kernel where CONFIG_BRIDGE_NETFILTER is not set

Signed-off-by: Sergey Popov <pinkbyte <AT> gentoo.org>
Package-Manager: Portage-2.3.84, Repoman-2.3.11

 .../files/ipt_netflow-2.4-bridge_netfilter.patch   | 61 ++++++++++++++++++++++
 net-firewall/ipt_netflow/ipt_netflow-2.4.ebuild    |  3 +-
 2 files changed, 63 insertions(+), 1 deletion(-)

diff --git a/net-firewall/ipt_netflow/files/ipt_netflow-2.4-bridge_netfilter.patch b/net-firewall/ipt_netflow/files/ipt_netflow-2.4-bridge_netfilter.patch
new file mode 100644
index 00000000000..cde23bc9fe7
--- /dev/null
+++ b/net-firewall/ipt_netflow/files/ipt_netflow-2.4-bridge_netfilter.patch
@@ -0,0 +1,61 @@
+From 9288e30f493d252ee85b492a894f78073e4f6d41 Mon Sep 17 00:00:00 2001
+From: ABC <abc@openwall.com>
+Date: Sat, 28 Sep 2019 23:29:40 +0300
+Subject: [PATCH] Don't compile physdev-override if BRIDGE_NETFILTER is
+ disabled.
+
+Fixes #120 "Compile error nf_bridge / nf_trace" reported by DocMAX.
+
+Fixes: 51bdc2b ("Use nf_bridge_info_get() instead of skb->nf_bridge").
+---
+ compat.h      | 2 ++
+ configure     | 1 +
+ ipt_NETFLOW.c | 5 +++++
+ 3 files changed, 8 insertions(+)
+
+diff --git a/compat.h b/compat.h
+index 0f9896b..66e224b 100644
+--- a/compat.h
++++ b/compat.h
+@@ -680,11 +680,13 @@ static inline int is_vlan_dev(struct net_device *dev)
+ #endif
+ 
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(5,0,0)
++# ifdef CONFIG_BRIDGE_NETFILTER
+ static inline struct nf_bridge_info *
+ nf_bridge_info_get(const struct sk_buff *skb)
+ {
+ 	return skb->nf_bridge;
+ }
++# endif
+ #endif
+ 
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0)
+diff --git a/configure b/configure
+index 74eece5..8aae8bf 100755
+--- a/configure
++++ b/configure
+@@ -470,6 +470,7 @@ kernel_check_config() {
+   kconfig CONFIG_NF_CONNTRACK_EVENTS	"natevents"
+   kconfig CONFIG_IPV6			"IPv6"
+   kconfig CONFIG_IP6_NF_IPTABLES	"ip6tables target"
++  kconfig CONFIG_BRIDGE_NETFILTER	"physdev override"
+ }
+ 
+ kernel_check_include() {
+diff --git a/ipt_NETFLOW.c b/ipt_NETFLOW.c
+index fe25655..064de6c 100644
+--- a/ipt_NETFLOW.c
++++ b/ipt_NETFLOW.c
+@@ -83,6 +83,11 @@
+ #if defined(CONFIG_NF_NAT_NEEDED) && LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)
+ # include <net/netfilter/nf_conntrack_timestamp.h>
+ #endif
++#ifdef ENABLE_PHYSDEV_OVER
++# ifndef CONFIG_BRIDGE_NETFILTER
++#  undef ENABLE_PHYSDEV_OVER
++# endif
++#endif
+ 
+ #define IPT_NETFLOW_VERSION "2.4"   /* Note that if you are using git, you
+ 				       will see version in other format. */

diff --git a/net-firewall/ipt_netflow/ipt_netflow-2.4.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.4.ebuild
index 8db277d79e5..c3bec366b46 100644
--- a/net-firewall/ipt_netflow/ipt_netflow-2.4.ebuild
+++ b/net-firewall/ipt_netflow/ipt_netflow-2.4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -28,6 +28,7 @@ DEPEND="${RDEPEND}
 PATCHES=(
 	"${FILESDIR}/${PN}-2.0-configure.patch" # bug #455984
 	"${FILESDIR}/${PN}-2.3-flags.patch"
+	"${FILESDIR}/${P}-bridge_netfilter.patch"
 )
 
 pkg_setup() {


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-firewall/ipt_netflow/, net-firewall/ipt_netflow/files/
@ 2019-12-27 19:20 Jeroen Roovers
  0 siblings, 0 replies; 13+ messages in thread
From: Jeroen Roovers @ 2019-12-27 19:20 UTC (permalink / raw
  To: gentoo-commits

commit:     d689f34b6a0bd248867c5e0f43df76f4326daaf3
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 27 19:17:42 2019 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Fri Dec 27 19:20:03 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d689f34b

net-firewall/ipt_netflow: Update live ebuild

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

 .../ipt_netflow/files/ipt_netflow-9999-flags.patch | 57 ++++++++++++++++++++++
 net-firewall/ipt_netflow/ipt_netflow-9999.ebuild   | 10 ++--
 2 files changed, 64 insertions(+), 3 deletions(-)

diff --git a/net-firewall/ipt_netflow/files/ipt_netflow-9999-flags.patch b/net-firewall/ipt_netflow/files/ipt_netflow-9999-flags.patch
new file mode 100644
index 00000000000..675e8b16f72
--- /dev/null
+++ b/net-firewall/ipt_netflow/files/ipt_netflow-9999-flags.patch
@@ -0,0 +1,57 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -11,7 +11,7 @@ CARGS = @CARGS@
+ 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 @@ 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 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,7 +66,7 @@ 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
+ 
+ %.so: %_sh.o
+ 	$(CC) -shared -o $@ $<

diff --git a/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild b/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild
index 7414800f8c3..06411e1ae6d 100644
--- a/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild
+++ b/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild
@@ -27,7 +27,7 @@ DEPEND="${RDEPEND}
 "
 PATCHES=(
 	"${FILESDIR}/${PN}-2.0-configure.patch" # bug #455984
-	"${FILESDIR}/${PN}-2.3-flags.patch"
+	"${FILESDIR}/${PN}-9999-flags.patch"
 )
 
 pkg_setup() {
@@ -55,10 +55,14 @@ src_prepare() {
 	default
 
 	# Fix incorrect module version in sources
-	sed -i -e "/IPT_NETFLOW_VERSION/s/2.2/${PV}/" ipt_NETFLOW.c || die
+	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
+	sed -i \
+		-e 's:-s /etc/snmp/snmpd.conf:-d /etc/snmp:' \
+		configure || die
 }
 
 do_conf() {


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-firewall/ipt_netflow/, net-firewall/ipt_netflow/files/
@ 2018-06-15 16:01 Sergey Popov
  0 siblings, 0 replies; 13+ messages in thread
From: Sergey Popov @ 2018-06-15 16:01 UTC (permalink / raw
  To: gentoo-commits

commit:     c660433b8bc48e33d10235252f8e28f3ca835db2
Author:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 15 15:59:17 2018 +0000
Commit:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
CommitDate: Fri Jun 15 16:01:21 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c660433b

net-firewall/ipt_netflow: drop old

Package-Manager: Portage-2.3.31, Repoman-2.3.9

 net-firewall/ipt_netflow/Manifest                  |   1 -
 .../files/ipt_netflow-2.2-linux-4.10.patch         | 137 ---------------------
 .../files/ipt_netflow-2.2-linux-4.13.patch         |  63 ----------
 .../files/ipt_netflow-2.2-linux-4.15.patch         |  26 ----
 .../files/ipt_netflow-2.2-linux-4.6.patch          |  61 ---------
 net-firewall/ipt_netflow/ipt_netflow-2.2-r2.ebuild | 105 ----------------
 net-firewall/ipt_netflow/ipt_netflow-2.2-r3.ebuild | 105 ----------------
 7 files changed, 498 deletions(-)

diff --git a/net-firewall/ipt_netflow/Manifest b/net-firewall/ipt_netflow/Manifest
index b87114ce096..804ced3b34f 100644
--- a/net-firewall/ipt_netflow/Manifest
+++ b/net-firewall/ipt_netflow/Manifest
@@ -1,2 +1 @@
-DIST ipt-netflow-2.2.tgz 96697 BLAKE2B 996ad539b6a6a5198a1e4a4a1a51f0610d97fb45740ad9c92e19854f2928eb697ca8fe14625054a05b106eebc345dfe6c235cdf375d1360ef44ff6cf0b03f34a SHA512 a406ab9bd18616414d8c99f427382a075bdb8000d8c40959f5b6d6e577d7eb4dfc7f8b773664a516ec2228d15590f21c3fbd6aa3d4302f6cdf03810e1702af74
 DIST ipt_netflow-2.3.tar.gz 90987 BLAKE2B fbe46583e58e75e3cfe5cc5ad4e8b40d5040d6642f850c560c3e8aa831effa43cba8f25907d32b3b66721f4d5d5bb8579bafa82e4b8d1c9a2225a5c748d08dd9 SHA512 e5ba66da9cae6fb9652e5532383233d433dd30dd16634734860f7e6910e46080e562e2d72c74584a86ead31156cffd4c5c44b438f617a9e5b3e5fdc1470045fc

diff --git a/net-firewall/ipt_netflow/files/ipt_netflow-2.2-linux-4.10.patch b/net-firewall/ipt_netflow/files/ipt_netflow-2.2-linux-4.10.patch
deleted file mode 100644
index 7e8f62840a9..00000000000
--- a/net-firewall/ipt_netflow/files/ipt_netflow-2.2-linux-4.10.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-commit 5d71c94c400d91633f6d3c3be9e785bb23d4ca1a
-Author: ABC <abc@telekom.ru>
-Date:   Sun Mar 5 11:27:39 2017 +0300
-
-    Compilation compatibility with kernel 4.10.
-    
-    Fixes #70.
-    Resolves incompatibilities introduced by
-     2456e855354415bfaeb7badaa14e11b3e02c8466 and
-     613dbd95723aee7abd16860745691b6c7bda20dc for kernel 4.10.
-
-diff --git a/compat.h b/compat.h
-index 3f27977..47176ef 100644
---- a/compat.h
-+++ b/compat.h
-@@ -600,4 +600,29 @@ out:
- # define __GNUC_PREREQ(maj, min) 0
- #endif
- 
-+/* ktime is not union anymore, since 2456e855354415bfaeb7badaa14e11b3e02c8466 */
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
-+# define first_tv64	first.tv64
-+# define last_tv64	last.tv64
-+#else
-+# define first_tv64	first
-+# define last_tv64	last
-+#endif
-+
-+/* Offset changes made in 613dbd95723aee7abd16860745691b6c7bda20dc */
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28) && LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
-+static inline u_int8_t xt_family(const struct xt_action_param *par)
-+{
-+	return par->family;
-+}
-+static inline const struct net_device *xt_in(const struct xt_action_param *par)
-+{
-+	return par->in;
-+}
-+static inline const struct net_device *xt_out(const struct xt_action_param *par)
-+{
-+	return par->out;
-+}
-+#endif
-+
- #endif /* COMPAT_NETFLOW_H */
-diff --git a/ipt_NETFLOW.c b/ipt_NETFLOW.c
-index 781b284..0d1ac55 100644
---- a/ipt_NETFLOW.c
-+++ b/ipt_NETFLOW.c
-@@ -3863,10 +3863,10 @@ static void netflow_export_stats(void)
- 		t.pkts_selected	+= st->pkts_selected;
- 		t.pkts_observed	+= st->pkts_observed;
- #endif
--		t.drop.first.tv64 = min_not_zero(t.drop.first.tv64, st->drop.first.tv64);
--		t.drop.last.tv64  = max(t.drop.last.tv64, st->drop.last.tv64);
--		t.lost.first.tv64 = min_not_zero(t.lost.first.tv64, st->lost.first.tv64);
--		t.lost.last.tv64  = max(t.lost.last.tv64, st->lost.last.tv64);
-+		t.drop.first_tv64 = min_not_zero(t.drop.first_tv64, st->drop.first_tv64);
-+		t.drop.last_tv64  = max(t.drop.last_tv64, st->drop.last_tv64);
-+		t.lost.first_tv64 = min_not_zero(t.lost.first_tv64, st->lost.first_tv64);
-+		t.lost.last_tv64  = max(t.lost.last_tv64, st->lost.last_tv64);
- 	}
- 
- 	export_stat_st(OTPL_MPSTAT, &t);
-@@ -4781,8 +4781,8 @@ static unsigned int netflow_target(
- 			   const void *targinfo
- # endif
- #else /* since 2.6.28 */
--# define if_in  par->in
--# define if_out par->out
-+# define if_in  xt_in(par)
-+# define if_out xt_out(par)
- # if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)
- 			   const struct xt_target_param *par
- # else
-@@ -4809,7 +4809,7 @@ static unsigned int netflow_target(
- #ifdef ENABLE_DIRECTION
- 	const int hooknum = par->hooknum;
- #endif
--	const int family = par->family;
-+	const int family = xt_family(par);
- #endif
- 	struct ipt_netflow_tuple tuple;
- 	struct ipt_netflow *nf;
-diff --git a/ipt_NETFLOW.h b/ipt_NETFLOW.h
-index eb00e94..3ee44a8 100644
---- a/ipt_NETFLOW.h
-+++ b/ipt_NETFLOW.h
-@@ -414,7 +414,7 @@ struct netflow_aggr_p {
- #define NETFLOW_STAT_TS(count)							 \
- 	do {									 \
- 		ktime_t kts = ktime_get_real();					 \
--		if (!(__get_cpu_var(ipt_netflow_stat)).count.first.tv64)	 \
-+		if (!(__get_cpu_var(ipt_netflow_stat)).count.first_tv64)	 \
- 			__get_cpu_var(ipt_netflow_stat).count.first = kts;	 \
- 		__get_cpu_var(ipt_netflow_stat).count.last = kts;		 \
- 	} while (0);
-commit 5dec6355f151a5c9fa4393c43388b22d9c720fae
-Author: ABC <abc@telekom.ru>
-Date:   Tue Mar 14 21:55:29 2017 +0300
-
-    More compatibility with kernel 4.10.
-    
-    Thanks to cREoz @ gitnub. Resolves #70 once more.
-
-diff --git a/compat.h b/compat.h
-index 47176ef..867e7f2 100644
---- a/compat.h
-+++ b/compat.h
-@@ -623,6 +623,10 @@ static inline const struct net_device *xt_out(const struct xt_action_param *par)
- {
- 	return par->out;
- }
-+static inline unsigned int xt_hooknum(const struct xt_action_param *par)
-+{
-+	return par->hooknum;
-+}
- #endif
- 
- #endif /* COMPAT_NETFLOW_H */
-diff --git a/ipt_NETFLOW.c b/ipt_NETFLOW.c
-index 0d1ac55..6d3122e 100644
---- a/ipt_NETFLOW.c
-+++ b/ipt_NETFLOW.c
-@@ -4806,9 +4806,9 @@ static unsigned int netflow_target(
- #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
- 	const int family = target->family;
- #else
--#ifdef ENABLE_DIRECTION
--	const int hooknum = par->hooknum;
--#endif
-+# ifdef ENABLE_DIRECTION
-+	const int hooknum = xt_hooknum(par);
-+# endif
- 	const int family = xt_family(par);
- #endif
- 	struct ipt_netflow_tuple tuple;

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
deleted file mode 100644
index 10e8b552afb..00000000000
--- a/net-firewall/ipt_netflow/files/ipt_netflow-2.2-linux-4.13.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-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/files/ipt_netflow-2.2-linux-4.15.patch b/net-firewall/ipt_netflow/files/ipt_netflow-2.2-linux-4.15.patch
deleted file mode 100644
index aa5feef3279..00000000000
--- a/net-firewall/ipt_netflow/files/ipt_netflow-2.2-linux-4.15.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- a/ipt_NETFLOW.c
-+++ b/ipt_NETFLOW.c
-@@ -4357,7 +4357,11 @@
- #define CALC_RATE(ewma, cur, minutes) ewma += _A(cur - ewma, minutes)
- 
- // calculate EWMA throughput rate for whole module
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
-+static void rate_timer_calc(struct timer_list *t)
-+#else
- static void rate_timer_calc(unsigned long dummy)
-+#endif
- {
-	static u64 old_pkt_total = 0;
-	static u64 old_traf_total = 0;
-@@ -5525,7 +5525,11 @@
- 
- 	netflow_switch_version(protocol);
- 	_schedule_scan_worker(0);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
-+	timer_setup(&rate_timer, rate_timer_calc, 0);
-+#else
- 	setup_timer(&rate_timer, rate_timer_calc, 0);
-+#endif
- 	mod_timer(&rate_timer, jiffies + (HZ * SAMPLERATE));
- 
- 	peakflows_at = jiffies;

diff --git a/net-firewall/ipt_netflow/files/ipt_netflow-2.2-linux-4.6.patch b/net-firewall/ipt_netflow/files/ipt_netflow-2.2-linux-4.6.patch
deleted file mode 100644
index bd9bedd3d99..00000000000
--- a/net-firewall/ipt_netflow/files/ipt_netflow-2.2-linux-4.6.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-commit c16ffc6cb679b3377a0d4a30a6bbcf5e2f3d0214
-Author: ABC <abc@telekom.ru>
-Date:   Sun May 22 22:07:14 2016 +0300
-
-    Support ETHTOOL_xLINKSETTINGS API (new in linux 4.6).
-    
-    Thus, making support for 4.6 kernels.
-    Reference to linux commit:
-      https://github.com/torvalds/linux/commit/3f1ac7a700d
-    
-    Fixes #56, thanks karel-un.
-
-diff --git a/ipt_NETFLOW.c b/ipt_NETFLOW.c
-index 067fd50..d27eea2 100644
---- a/ipt_NETFLOW.c
-+++ b/ipt_NETFLOW.c
-@@ -3904,7 +3904,13 @@ static int ethtool_drvinfo(unsigned char *ptr, size_t size, struct net_device *d
- {
- 	struct ethtool_drvinfo info = { 0 };
- 	const struct ethtool_ops *ops = dev->ethtool_ops;
-+#ifndef ETHTOOL_GLINKSETTINGS
- 	struct ethtool_cmd ecmd;
-+#define _KSETTINGS(x, y) (x)
-+#else
-+	struct ethtool_link_ksettings ekmd;
-+#define _KSETTINGS(x, y) (y)
-+#endif
- 	int len = size;
- 	int n;
- 
-@@ -3933,11 +3939,11 @@ static int ethtool_drvinfo(unsigned char *ptr, size_t size, struct net_device *d
- 	/* only get_settings for running devices to not trigger link negotiation */
- 	if (dev->flags & IFF_UP &&
- 	    dev->flags & IFF_RUNNING &&
--	    !__ethtool_get_settings(dev, &ecmd)) {
-+	    !_KSETTINGS(__ethtool_get_settings(dev, &ecmd), __ethtool_get_link_ksettings(dev, &ekmd))) {
- 		char *s, *p;
- 
- 		/* append basic parameters: speed and port */
--		switch (ethtool_cmd_speed(&ecmd)) {
-+		switch (_KSETTINGS(ethtool_cmd_speed(&ecmd), ekmd.base.speed)) {
- 		case SPEED_10000: s = "10Gb"; break;
- 		case SPEED_2500:  s = "2.5Gb"; break;
- 		case SPEED_1000:  s = "1Gb"; break;
-@@ -3945,7 +3951,7 @@ static int ethtool_drvinfo(unsigned char *ptr, size_t size, struct net_device *d
- 		case SPEED_10:    s = "10Mb"; break;
- 		default:          s = "";
- 		}
--		switch (ecmd.port) {
-+		switch (_KSETTINGS(ecmd.port, ekmd.base.port)) {
- 		case PORT_TP:     p = "tp"; break;
- 		case PORT_AUI:    p = "aui"; break;
- 		case PORT_MII:    p = "mii"; break;
-@@ -3964,6 +3970,7 @@ ret:
- 		ops->complete(dev);
- 	return size - len;
- }
-+#undef _KSETTINGS
- 
- static const unsigned short netdev_type[] =
- {ARPHRD_NETROM, ARPHRD_ETHER, ARPHRD_AX25,

diff --git a/net-firewall/ipt_netflow/ipt_netflow-2.2-r2.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.2-r2.ebuild
deleted file mode 100644
index 256b146cb88..00000000000
--- a/net-firewall/ipt_netflow/ipt_netflow-2.2-r2.ebuild
+++ /dev/null
@@ -1,105 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-MY_PN="${PN/_/-}"
-MY_P="${MY_PN}-${PV}"
-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="mirror://sourceforge/${MY_PN}/${MY_P}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 x86"
-
-IUSE="debug natevents 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"
-	use natevents && CONFIG_CHECK+=" NF_CONNTRACK_EVENTS NF_NAT_NEEDED"
-	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"
-
-	# Compatibility with kernel 4.6
-	eapply "${FILESDIR}/${P}-linux-4.6.patch"
-
-	# 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
-}
-
-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 \
-		--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*
-}

diff --git a/net-firewall/ipt_netflow/ipt_netflow-2.2-r3.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.2-r3.ebuild
deleted file mode 100644
index eb772b4d9b2..00000000000
--- a/net-firewall/ipt_netflow/ipt_netflow-2.2-r3.ebuild
+++ /dev/null
@@ -1,105 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-MY_PN="${PN/_/-}"
-MY_P="${MY_PN}-${PV}"
-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="mirror://sourceforge/${MY_PN}/${MY_P}.tgz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-IUSE="debug natevents 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}"
-PATCHES=(
-	# bug #455984
-	"${FILESDIR}/${PN}-2.0-configure.patch"
-	# Compatibility with kernel 4.6
-	"${FILESDIR}/${P}-linux-4.6.patch"
-	# Compatibility with kernel 4.10, bug #617484
-	"${FILESDIR}/${P}-linux-4.10.patch"
-	# Compatibility with kernel 4.13, bug #630446
-	"${FILESDIR}/${P}-linux-4.13.patch"
-	# Compatibility with kernel 4.15, bug #646798
-	"${FILESDIR}/${P}-linux-4.15.patch"
-)
-
-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"
-	use natevents && CONFIG_CHECK+=" NF_CONNTRACK_EVENTS NF_NAT_NEEDED"
-	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
-
-	default
-}
-
-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 \
-		--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] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-firewall/ipt_netflow/, net-firewall/ipt_netflow/files/
@ 2018-02-10 11:22 Jeroen Roovers
  0 siblings, 0 replies; 13+ messages in thread
From: Jeroen Roovers @ 2018-02-10 11:22 UTC (permalink / raw
  To: gentoo-commits

commit:     e67466e42c6fc3c2775258cad58e1803b352e3bf
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 10 11:21:57 2018 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sat Feb 10 11:22:08 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e67466e4

net-firewall/ipt_netflow: Fix kernel 4.15 compatibility (bug #646798).

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 .../files/ipt_netflow-2.2-linux-4.15.patch         |  26 ++++++
 net-firewall/ipt_netflow/ipt_netflow-2.2-r3.ebuild | 102 +++++++++++++++++++++
 2 files changed, 128 insertions(+)

diff --git a/net-firewall/ipt_netflow/files/ipt_netflow-2.2-linux-4.15.patch b/net-firewall/ipt_netflow/files/ipt_netflow-2.2-linux-4.15.patch
new file mode 100644
index 00000000000..aa5feef3279
--- /dev/null
+++ b/net-firewall/ipt_netflow/files/ipt_netflow-2.2-linux-4.15.patch
@@ -0,0 +1,26 @@
+--- a/ipt_NETFLOW.c
++++ b/ipt_NETFLOW.c
+@@ -4357,7 +4357,11 @@
+ #define CALC_RATE(ewma, cur, minutes) ewma += _A(cur - ewma, minutes)
+ 
+ // calculate EWMA throughput rate for whole module
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
++static void rate_timer_calc(struct timer_list *t)
++#else
+ static void rate_timer_calc(unsigned long dummy)
++#endif
+ {
+	static u64 old_pkt_total = 0;
+	static u64 old_traf_total = 0;
+@@ -5525,7 +5525,11 @@
+ 
+ 	netflow_switch_version(protocol);
+ 	_schedule_scan_worker(0);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
++	timer_setup(&rate_timer, rate_timer_calc, 0);
++#else
+ 	setup_timer(&rate_timer, rate_timer_calc, 0);
++#endif
+ 	mod_timer(&rate_timer, jiffies + (HZ * SAMPLERATE));
+ 
+ 	peakflows_at = jiffies;

diff --git a/net-firewall/ipt_netflow/ipt_netflow-2.2-r3.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.2-r3.ebuild
new file mode 100644
index 00000000000..b2bda0e5889
--- /dev/null
+++ b/net-firewall/ipt_netflow/ipt_netflow-2.2-r3.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+MY_PN="${PN/_/-}"
+MY_P="${MY_PN}-${PV}"
+inherit linux-info linux-mod toolchain-funcs
+
+DESCRIPTION="Netflow iptables module"
+HOMEPAGE="https://sourceforge.net/projects/ipt-netflow"
+SRC_URI="mirror://sourceforge/${MY_PN}/${MY_P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="debug natevents 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}"
+PATCHES=(
+	# bug #455984
+	"${FILESDIR}/${PN}-2.0-configure.patch"
+	# Compatibility with kernel 4.6
+	"${FILESDIR}/${P}-linux-4.6.patch"
+	# Compatibility with kernel 4.10, bug #617484
+	"${FILESDIR}/${P}-linux-4.10.patch"
+	# Compatibility with kernel 4.13, bug #630446
+	"${FILESDIR}/${P}-linux-4.13.patch"
+	# Compatibility with kernel 4.15, bug #646798
+	"${FILESDIR}/${P}-linux-4.15.patch"
+)
+
+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"
+	use natevents && CONFIG_CHECK+=" NF_CONNTRACK_EVENTS NF_NAT_NEEDED"
+	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
+
+	default
+}
+
+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 \
+		--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] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-firewall/ipt_netflow/, net-firewall/ipt_netflow/files/
@ 2017-05-16 16:18 Sergey Popov
  0 siblings, 0 replies; 13+ messages in thread
From: Sergey Popov @ 2017-05-16 16:18 UTC (permalink / raw
  To: gentoo-commits

commit:     2839798db8f159e92e64a37d83b9899e1570926c
Author:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
AuthorDate: Tue May 16 16:18:31 2017 +0000
Commit:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
CommitDate: Tue May 16 16:18:31 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2839798d

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

Reported-by: Toralf Förster <toralf.foerster <AT> gmx.de>
Gentoo-Bug: 617484

Package-Manager: Portage-2.3.5, Repoman-2.3.1

 .../files/ipt_netflow-2.2-linux-4.10.patch         | 137 +++++++++++++++++++++
 net-firewall/ipt_netflow/ipt_netflow-2.2-r1.ebuild |   5 +-
 2 files changed, 141 insertions(+), 1 deletion(-)

diff --git a/net-firewall/ipt_netflow/files/ipt_netflow-2.2-linux-4.10.patch b/net-firewall/ipt_netflow/files/ipt_netflow-2.2-linux-4.10.patch
new file mode 100644
index 00000000000..7e8f62840a9
--- /dev/null
+++ b/net-firewall/ipt_netflow/files/ipt_netflow-2.2-linux-4.10.patch
@@ -0,0 +1,137 @@
+commit 5d71c94c400d91633f6d3c3be9e785bb23d4ca1a
+Author: ABC <abc@telekom.ru>
+Date:   Sun Mar 5 11:27:39 2017 +0300
+
+    Compilation compatibility with kernel 4.10.
+    
+    Fixes #70.
+    Resolves incompatibilities introduced by
+     2456e855354415bfaeb7badaa14e11b3e02c8466 and
+     613dbd95723aee7abd16860745691b6c7bda20dc for kernel 4.10.
+
+diff --git a/compat.h b/compat.h
+index 3f27977..47176ef 100644
+--- a/compat.h
++++ b/compat.h
+@@ -600,4 +600,29 @@ out:
+ # define __GNUC_PREREQ(maj, min) 0
+ #endif
+ 
++/* ktime is not union anymore, since 2456e855354415bfaeb7badaa14e11b3e02c8466 */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
++# define first_tv64	first.tv64
++# define last_tv64	last.tv64
++#else
++# define first_tv64	first
++# define last_tv64	last
++#endif
++
++/* Offset changes made in 613dbd95723aee7abd16860745691b6c7bda20dc */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28) && LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
++static inline u_int8_t xt_family(const struct xt_action_param *par)
++{
++	return par->family;
++}
++static inline const struct net_device *xt_in(const struct xt_action_param *par)
++{
++	return par->in;
++}
++static inline const struct net_device *xt_out(const struct xt_action_param *par)
++{
++	return par->out;
++}
++#endif
++
+ #endif /* COMPAT_NETFLOW_H */
+diff --git a/ipt_NETFLOW.c b/ipt_NETFLOW.c
+index 781b284..0d1ac55 100644
+--- a/ipt_NETFLOW.c
++++ b/ipt_NETFLOW.c
+@@ -3863,10 +3863,10 @@ static void netflow_export_stats(void)
+ 		t.pkts_selected	+= st->pkts_selected;
+ 		t.pkts_observed	+= st->pkts_observed;
+ #endif
+-		t.drop.first.tv64 = min_not_zero(t.drop.first.tv64, st->drop.first.tv64);
+-		t.drop.last.tv64  = max(t.drop.last.tv64, st->drop.last.tv64);
+-		t.lost.first.tv64 = min_not_zero(t.lost.first.tv64, st->lost.first.tv64);
+-		t.lost.last.tv64  = max(t.lost.last.tv64, st->lost.last.tv64);
++		t.drop.first_tv64 = min_not_zero(t.drop.first_tv64, st->drop.first_tv64);
++		t.drop.last_tv64  = max(t.drop.last_tv64, st->drop.last_tv64);
++		t.lost.first_tv64 = min_not_zero(t.lost.first_tv64, st->lost.first_tv64);
++		t.lost.last_tv64  = max(t.lost.last_tv64, st->lost.last_tv64);
+ 	}
+ 
+ 	export_stat_st(OTPL_MPSTAT, &t);
+@@ -4781,8 +4781,8 @@ static unsigned int netflow_target(
+ 			   const void *targinfo
+ # endif
+ #else /* since 2.6.28 */
+-# define if_in  par->in
+-# define if_out par->out
++# define if_in  xt_in(par)
++# define if_out xt_out(par)
+ # if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)
+ 			   const struct xt_target_param *par
+ # else
+@@ -4809,7 +4809,7 @@ static unsigned int netflow_target(
+ #ifdef ENABLE_DIRECTION
+ 	const int hooknum = par->hooknum;
+ #endif
+-	const int family = par->family;
++	const int family = xt_family(par);
+ #endif
+ 	struct ipt_netflow_tuple tuple;
+ 	struct ipt_netflow *nf;
+diff --git a/ipt_NETFLOW.h b/ipt_NETFLOW.h
+index eb00e94..3ee44a8 100644
+--- a/ipt_NETFLOW.h
++++ b/ipt_NETFLOW.h
+@@ -414,7 +414,7 @@ struct netflow_aggr_p {
+ #define NETFLOW_STAT_TS(count)							 \
+ 	do {									 \
+ 		ktime_t kts = ktime_get_real();					 \
+-		if (!(__get_cpu_var(ipt_netflow_stat)).count.first.tv64)	 \
++		if (!(__get_cpu_var(ipt_netflow_stat)).count.first_tv64)	 \
+ 			__get_cpu_var(ipt_netflow_stat).count.first = kts;	 \
+ 		__get_cpu_var(ipt_netflow_stat).count.last = kts;		 \
+ 	} while (0);
+commit 5dec6355f151a5c9fa4393c43388b22d9c720fae
+Author: ABC <abc@telekom.ru>
+Date:   Tue Mar 14 21:55:29 2017 +0300
+
+    More compatibility with kernel 4.10.
+    
+    Thanks to cREoz @ gitnub. Resolves #70 once more.
+
+diff --git a/compat.h b/compat.h
+index 47176ef..867e7f2 100644
+--- a/compat.h
++++ b/compat.h
+@@ -623,6 +623,10 @@ static inline const struct net_device *xt_out(const struct xt_action_param *par)
+ {
+ 	return par->out;
+ }
++static inline unsigned int xt_hooknum(const struct xt_action_param *par)
++{
++	return par->hooknum;
++}
+ #endif
+ 
+ #endif /* COMPAT_NETFLOW_H */
+diff --git a/ipt_NETFLOW.c b/ipt_NETFLOW.c
+index 0d1ac55..6d3122e 100644
+--- a/ipt_NETFLOW.c
++++ b/ipt_NETFLOW.c
+@@ -4806,9 +4806,9 @@ static unsigned int netflow_target(
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
+ 	const int family = target->family;
+ #else
+-#ifdef ENABLE_DIRECTION
+-	const int hooknum = par->hooknum;
+-#endif
++# ifdef ENABLE_DIRECTION
++	const int hooknum = xt_hooknum(par);
++# endif
+ 	const int family = xt_family(par);
+ #endif
+ 	struct ipt_netflow_tuple tuple;

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 74e5cbc2dae..d7f364065e3 100644
--- a/net-firewall/ipt_netflow/ipt_netflow-2.2-r1.ebuild
+++ b/net-firewall/ipt_netflow/ipt_netflow-2.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -53,6 +53,9 @@ src_prepare() {
 	# Compatibility with kernel 4.6
 	eapply "${FILESDIR}/${P}-linux-4.6.patch"
 
+	# Compatibility with kernel 4.10, bug #617484
+	eapply "${FILESDIR}/${P}-linux-4.10.patch"
+
 	eapply_user
 }
 


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-firewall/ipt_netflow/, net-firewall/ipt_netflow/files/
@ 2016-07-19  9:14 Sergey Popov
  0 siblings, 0 replies; 13+ messages in thread
From: Sergey Popov @ 2016-07-19  9:14 UTC (permalink / raw
  To: gentoo-commits

commit:     2ad5de1938d063ff68d5ea9c254cf2158bdf0c71
Author:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 19 09:13:50 2016 +0000
Commit:     Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
CommitDate: Tue Jul 19 09:13:50 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ad5de19

net-firewall/ipt_netflow: revision bump

Backport compatibility patch for Linux kernel 4.6

Package-Manager: portage-2.2.28

 .../files/ipt_netflow-2.2-linux-4.6.patch          | 61 +++++++++++++++
 net-firewall/ipt_netflow/ipt_netflow-2.2-r1.ebuild | 91 ++++++++++++++++++++++
 2 files changed, 152 insertions(+)

diff --git a/net-firewall/ipt_netflow/files/ipt_netflow-2.2-linux-4.6.patch b/net-firewall/ipt_netflow/files/ipt_netflow-2.2-linux-4.6.patch
new file mode 100644
index 0000000..bd9bedd
--- /dev/null
+++ b/net-firewall/ipt_netflow/files/ipt_netflow-2.2-linux-4.6.patch
@@ -0,0 +1,61 @@
+commit c16ffc6cb679b3377a0d4a30a6bbcf5e2f3d0214
+Author: ABC <abc@telekom.ru>
+Date:   Sun May 22 22:07:14 2016 +0300
+
+    Support ETHTOOL_xLINKSETTINGS API (new in linux 4.6).
+    
+    Thus, making support for 4.6 kernels.
+    Reference to linux commit:
+      https://github.com/torvalds/linux/commit/3f1ac7a700d
+    
+    Fixes #56, thanks karel-un.
+
+diff --git a/ipt_NETFLOW.c b/ipt_NETFLOW.c
+index 067fd50..d27eea2 100644
+--- a/ipt_NETFLOW.c
++++ b/ipt_NETFLOW.c
+@@ -3904,7 +3904,13 @@ static int ethtool_drvinfo(unsigned char *ptr, size_t size, struct net_device *d
+ {
+ 	struct ethtool_drvinfo info = { 0 };
+ 	const struct ethtool_ops *ops = dev->ethtool_ops;
++#ifndef ETHTOOL_GLINKSETTINGS
+ 	struct ethtool_cmd ecmd;
++#define _KSETTINGS(x, y) (x)
++#else
++	struct ethtool_link_ksettings ekmd;
++#define _KSETTINGS(x, y) (y)
++#endif
+ 	int len = size;
+ 	int n;
+ 
+@@ -3933,11 +3939,11 @@ static int ethtool_drvinfo(unsigned char *ptr, size_t size, struct net_device *d
+ 	/* only get_settings for running devices to not trigger link negotiation */
+ 	if (dev->flags & IFF_UP &&
+ 	    dev->flags & IFF_RUNNING &&
+-	    !__ethtool_get_settings(dev, &ecmd)) {
++	    !_KSETTINGS(__ethtool_get_settings(dev, &ecmd), __ethtool_get_link_ksettings(dev, &ekmd))) {
+ 		char *s, *p;
+ 
+ 		/* append basic parameters: speed and port */
+-		switch (ethtool_cmd_speed(&ecmd)) {
++		switch (_KSETTINGS(ethtool_cmd_speed(&ecmd), ekmd.base.speed)) {
+ 		case SPEED_10000: s = "10Gb"; break;
+ 		case SPEED_2500:  s = "2.5Gb"; break;
+ 		case SPEED_1000:  s = "1Gb"; break;
+@@ -3945,7 +3951,7 @@ static int ethtool_drvinfo(unsigned char *ptr, size_t size, struct net_device *d
+ 		case SPEED_10:    s = "10Mb"; break;
+ 		default:          s = "";
+ 		}
+-		switch (ecmd.port) {
++		switch (_KSETTINGS(ecmd.port, ekmd.base.port)) {
+ 		case PORT_TP:     p = "tp"; break;
+ 		case PORT_AUI:    p = "aui"; break;
+ 		case PORT_MII:    p = "mii"; break;
+@@ -3964,6 +3970,7 @@ ret:
+ 		ops->complete(dev);
+ 	return size - len;
+ }
++#undef _KSETTINGS
+ 
+ static const unsigned short netdev_type[] =
+ {ARPHRD_NETROM, ARPHRD_ETHER, ARPHRD_AX25,

diff --git a/net-firewall/ipt_netflow/ipt_netflow-2.2-r1.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.2-r1.ebuild
new file mode 100644
index 0000000..a141c1a
--- /dev/null
+++ b/net-firewall/ipt_netflow/ipt_netflow-2.2-r1.ebuild
@@ -0,0 +1,91 @@
+# 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="mirror://sourceforge/${MY_PN}/${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"
+
+	# Compatibility with kernel 4.6
+	eapply "${FILESDIR}/${P}-linux-4.6.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] 13+ messages in thread

end of thread, other threads:[~2024-01-19 12:23 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-15 15:29 [gentoo-commits] repo/gentoo:master commit in: net-firewall/ipt_netflow/, net-firewall/ipt_netflow/files/ Sergey Popov
  -- strict thread matches above, loose matches on Subject: below --
2024-01-19 12:23 Sergey Popov
2023-06-27  8:58 Sergey Popov
2021-07-05 14:14 Sergey Popov
2021-05-27 10:04 Sergey Popov
2020-12-02  7:19 Sergey Popov
2020-04-24  7:35 Jeroen Roovers
2020-01-28  9:22 Sergey Popov
2019-12-27 19:20 Jeroen Roovers
2018-06-15 16:01 Sergey Popov
2018-02-10 11:22 Jeroen Roovers
2017-05-16 16:18 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