summaryrefslogtreecommitdiff
path: root/net-firewall/ipt_netflow
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-01-15 15:51:32 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-01-15 15:51:32 +0000
commit21435953e16cda318a82334ddbadb3b5c36d9ea7 (patch)
treee1810a4b135afce04b34862ef0fab2bfaeb8aeca /net-firewall/ipt_netflow
parent7bc9c63c9da678a7e6fceb095d56c634afd22c56 (diff)
gentoo resync : 15.01.2020
Diffstat (limited to 'net-firewall/ipt_netflow')
-rw-r--r--net-firewall/ipt_netflow/Manifest7
-rw-r--r--net-firewall/ipt_netflow/files/ipt_netflow-9999-flags.patch57
-rw-r--r--net-firewall/ipt_netflow/ipt_netflow-2.3.ebuild100
-rw-r--r--net-firewall/ipt_netflow/ipt_netflow-2.4.ebuild19
-rw-r--r--net-firewall/ipt_netflow/ipt_netflow-9999.ebuild27
5 files changed, 96 insertions, 114 deletions
diff --git a/net-firewall/ipt_netflow/Manifest b/net-firewall/ipt_netflow/Manifest
index 8ac1121d14ac..f0fe326bd7db 100644
--- a/net-firewall/ipt_netflow/Manifest
+++ b/net-firewall/ipt_netflow/Manifest
@@ -1,8 +1,7 @@
AUX ipt_netflow-2.0-configure.patch 276 BLAKE2B a7c4d51d9c0f5d6d60200cebc74dc022cbc117fb2916792661166d04e456e6f23e8f285c0ab6b713ccfd764ccac0a3a8b41ad2d159c9270ea0480d5f2b1b2482 SHA512 cb7b1a690a69eb68ce57d1b216324de3114c01a6bc2ca7e29fece702be62a0f903e6946426c49a8fcd08295466524eb464127655a8742507f999a318319cd3d0
AUX ipt_netflow-2.3-flags.patch 1743 BLAKE2B 5c2cf2b603aae5017e685fbfcb76bf0a5be29b0e3f1299d2e72a516d80cd5479b92c463d4bb4ab192b9cd7b59ef59eeef673c12696a79d6517ec7346dbbe3b5c SHA512 b8a74b0f9daf0e532a8015b576b59e13948684bee8d22a2a62cd8d2a11e4d8d5a2d4b257842dab4df379c3549bdb39d9814bebe24573714e3bff2d2d765021ad
-DIST ipt_netflow-2.3.tar.gz 90987 BLAKE2B fbe46583e58e75e3cfe5cc5ad4e8b40d5040d6642f850c560c3e8aa831effa43cba8f25907d32b3b66721f4d5d5bb8579bafa82e4b8d1c9a2225a5c748d08dd9 SHA512 e5ba66da9cae6fb9652e5532383233d433dd30dd16634734860f7e6910e46080e562e2d72c74584a86ead31156cffd4c5c44b438f617a9e5b3e5fdc1470045fc
+AUX ipt_netflow-9999-flags.patch 1956 BLAKE2B 4595118518958c379a33e0fd7b6e3769fe764a633876cb46b76517ccec9fe6430fd4441b5509019699003b07966e1b09b257d302d3a1f29c4b437f90bce1c211 SHA512 bf8a723d0cf5a57b49231d444d6e0926b2aa667a5ac8aebdedd92b8271be30e5cbfd330e03ed63969d37a5fb694038378468ae1d4b2483b087785734214d00bd
DIST ipt_netflow-2.4.tar.gz 92580 BLAKE2B 0197e7e5cdd9c94c7b80b38cb4e2879343139592421922bf73aeaac70ac3af54ea25934bb1474ff455a9f58eab2368995591542f46be48b5c8491a3b6a192f56 SHA512 3c80d02cfda996fbde8d258875df8795000fd8390b5a6f8296771a992067e153eca48f7f4602421529948beaf3030e164adfc2ffe5b528042fbdc15ffb56aa74
-EBUILD ipt_netflow-2.3.ebuild 2434 BLAKE2B 8b179099f7f4aec0468d98beb3dfb8493bf28d51f54341aa513acaf1f8e56c290ae408e1f58f8a28014ee0e7de24855c1398ce083bc38e12c07c0b714ea9cd51 SHA512 f7a9e554e6c31391714ebef1e71c76314992f37d1a8a4a590e4a3e755735a1dc5cc65df6da4c9749d283cdb1aa9ec4dd357eb98ba4133df5ac9da5933674993f
-EBUILD ipt_netflow-2.4.ebuild 2218 BLAKE2B f75562f6e3f2e850eceda97757489f5c242e4aec46b535a06226ea00b23e9e18ca2e6d133d1ea7b2989e0b43958f58f1a44b6cc76a948aee129674c127df69cd SHA512 b9252e3108c1a4541eee41d22cfcf73aeafc035616d2b2e6d2defed2e804adecbbbc279754813ae6ed62c824cf9188ade2c3ea35f65ca4146ac362337b31f27a
-EBUILD ipt_netflow-9999.ebuild 2213 BLAKE2B 86d31675a1eaaf8784877c9ab79fa145ecd8b0b642538c6c55f948bbc363e80b40f9246e83f9c72ccb2714f2d54204fdfe0678191ebbe7dbe6950574f1ea5c10 SHA512 b32559221c6fb4daa34785bec8993aebf376ae071c071279d95e507835d3cc5b31e515fcfc5ec047f49f93b247531a8c87f8409c688df0b8898d306a9b6b4e10
+EBUILD ipt_netflow-2.4.ebuild 2340 BLAKE2B 7abc0b0e4577043dd7f83ef2ece5ceb211f0e0420ab0fc303403683825a4d415fd810050368c0e59dbfcf8ab082806e83d5cf12cbc26fe2642e63a1ae79e65bc SHA512 ef541ed5900c75b531f33e97bb5b5c24877807a7154f94e9c13b9af288fc0002e6afe9fb3de79d3a6278168867e81e49a5a26036dc3f55a9b32f844471fee66b
+EBUILD ipt_netflow-9999.ebuild 2364 BLAKE2B a88838239348fe309a4fd6efe1d6133af629e884a35429f9a7c7577ab840fa5c219dc582169d48a010970e31e78e3fd47676642fa2e4eceaadb0836ac96964e9 SHA512 02f9f6ff65516e90a7143db1b7a91225589d91e1d41d10ede3e16986f0eeba1dc948a9f415fe1239950359a9389f5f7f522fd1408122a15f43cfd024dddb13ab
MISC metadata.xml 561 BLAKE2B 8b2d48273d5c27a1996089236e3981c7eff8546e73671136baa8a9ed0c18fb26a56be261b3162e4563878bf54487a0b26e389861a9dbc80af35783491564c7d3 SHA512 6cd4feab99315acfcf34f34fccd9ecb6b00b23efecef622cc638902a4ec62240f3d9f87d1f349a84ec7c4985a90f8632ffcfa9f403b42c26ce9d923ca9e01bc5
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 000000000000..675e8b16f725
--- /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-2.3.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.3.ebuild
deleted file mode 100644
index 04f6abd77690..000000000000
--- a/net-firewall/ipt_netflow/ipt_netflow-2.3.ebuild
+++ /dev/null
@@ -1,100 +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="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
-"
-
-# set S before MODULE_NAMES
-S="${WORKDIR}/${MY_P}"
-PATCHES=(
- # bug #455984
- "${FILESDIR}/${PN}-2.0-configure.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
-
- # 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() {
- 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.4.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.4.ebuild
index 88d6cef84f3f..8db277d79e5a 100644
--- a/net-firewall/ipt_netflow/ipt_netflow-2.4.ebuild
+++ b/net-firewall/ipt_netflow/ipt_netflow-2.4.ebuild
@@ -13,7 +13,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"
@@ -31,12 +31,23 @@ PATCHES=(
)
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"
- local CONFIG_CHECK="~IP_NF_IPTABLES VLAN_8021Q"
- use debug && CONFIG_CHECK+=" ~DEBUG_FS"
- use natevents && CONFIG_CHECK+=" NF_CONNTRACK_EVENTS NF_NAT_NEEDED"
+
linux-mod_pkg_setup
}
diff --git a/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild b/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild
index 71ba1b74afbf..06411e1ae6d9 100644
--- a/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild
+++ b/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild
@@ -27,16 +27,27 @@ DEPEND="${RDEPEND}
"
PATCHES=(
"${FILESDIR}/${PN}-2.0-configure.patch" # bug #455984
- "${FILESDIR}/${PN}-2.3-flags.patch"
+ "${FILESDIR}/${PN}-9999-flags.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"
- local CONFIG_CHECK="~IP_NF_IPTABLES VLAN_8021Q"
- use debug && CONFIG_CHECK+=" ~DEBUG_FS"
- use natevents && CONFIG_CHECK+=" NF_CONNTRACK_EVENTS NF_NAT_NEEDED"
+
linux-mod_pkg_setup
}
@@ -44,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() {