summaryrefslogtreecommitdiff
path: root/net-firewall/ipt_netflow
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-04-25 11:37:10 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-04-25 11:37:10 +0100
commit38423c67c8a23f6a1bc42038193182e2da3116eb (patch)
tree04e2cf4bd43601b77daa79fe654e409187093c5e /net-firewall/ipt_netflow
parent623ee73d661e5ed8475cb264511f683407d87365 (diff)
gentoo resync : 25.04.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-2.5-gentoo.patch61
-rw-r--r--net-firewall/ipt_netflow/files/ipt_netflow-9999-gentoo.patch (renamed from net-firewall/ipt_netflow/files/ipt_netflow-9999-flags.patch)0
-rw-r--r--net-firewall/ipt_netflow/ipt_netflow-2.5.ebuild104
-rw-r--r--net-firewall/ipt_netflow/ipt_netflow-9999.ebuild6
5 files changed, 173 insertions, 5 deletions
diff --git a/net-firewall/ipt_netflow/Manifest b/net-firewall/ipt_netflow/Manifest
index baf3ee243e22..d6738f8ab1a3 100644
--- a/net-firewall/ipt_netflow/Manifest
+++ b/net-firewall/ipt_netflow/Manifest
@@ -1,8 +1,11 @@
AUX ipt_netflow-2.0-configure.patch 276 BLAKE2B a7c4d51d9c0f5d6d60200cebc74dc022cbc117fb2916792661166d04e456e6f23e8f285c0ab6b713ccfd764ccac0a3a8b41ad2d159c9270ea0480d5f2b1b2482 SHA512 cb7b1a690a69eb68ce57d1b216324de3114c01a6bc2ca7e29fece702be62a0f903e6946426c49a8fcd08295466524eb464127655a8742507f999a318319cd3d0
AUX ipt_netflow-2.3-flags.patch 1743 BLAKE2B 5c2cf2b603aae5017e685fbfcb76bf0a5be29b0e3f1299d2e72a516d80cd5479b92c463d4bb4ab192b9cd7b59ef59eeef673c12696a79d6517ec7346dbbe3b5c SHA512 b8a74b0f9daf0e532a8015b576b59e13948684bee8d22a2a62cd8d2a11e4d8d5a2d4b257842dab4df379c3549bdb39d9814bebe24573714e3bff2d2d765021ad
AUX ipt_netflow-2.4-bridge_netfilter.patch 1785 BLAKE2B 45b3e9124bbf17a3e38da1777951db2516abf18988426920f40d56b8c5083c369f52c36f605849590fef06884a566e1573bd6612b62da8e1333be40a7e913734 SHA512 bae60dd8fe7e50eb8e1061e007f2e603b23e04ca45ce60530b85ed626acaa4eeb44d061d48d2e90cc5409c3d7976030ec0a0683a6bd4723379315c4bf0e09730
-AUX ipt_netflow-9999-flags.patch 1956 BLAKE2B 4595118518958c379a33e0fd7b6e3769fe764a633876cb46b76517ccec9fe6430fd4441b5509019699003b07966e1b09b257d302d3a1f29c4b437f90bce1c211 SHA512 bf8a723d0cf5a57b49231d444d6e0926b2aa667a5ac8aebdedd92b8271be30e5cbfd330e03ed63969d37a5fb694038378468ae1d4b2483b087785734214d00bd
+AUX ipt_netflow-2.5-gentoo.patch 1944 BLAKE2B 0acb66305cd7f337a271b356f65c2984b445fc245d4de5668ccdff54ef7bb5095fc27148be978f13bc84dfc92be58abda897dacf053a31b10b44caffb5cbabb7 SHA512 781c4286889b2e39f2276de02970306b76f859c87565dff5235cfb1fedd0e7f6cc2a5f1263899f7505317ce22fd73c724a4a1273114adcc6ad2c3cc84069d47d
+AUX ipt_netflow-9999-gentoo.patch 1956 BLAKE2B 4595118518958c379a33e0fd7b6e3769fe764a633876cb46b76517ccec9fe6430fd4441b5509019699003b07966e1b09b257d302d3a1f29c4b437f90bce1c211 SHA512 bf8a723d0cf5a57b49231d444d6e0926b2aa667a5ac8aebdedd92b8271be30e5cbfd330e03ed63969d37a5fb694038378468ae1d4b2483b087785734214d00bd
DIST ipt_netflow-2.4.tar.gz 92580 BLAKE2B 0197e7e5cdd9c94c7b80b38cb4e2879343139592421922bf73aeaac70ac3af54ea25934bb1474ff455a9f58eab2368995591542f46be48b5c8491a3b6a192f56 SHA512 3c80d02cfda996fbde8d258875df8795000fd8390b5a6f8296771a992067e153eca48f7f4602421529948beaf3030e164adfc2ffe5b528042fbdc15ffb56aa74
+DIST ipt_netflow-2.5.tar.gz 94097 BLAKE2B 5ca8d686e08f6fb0cdb1d502572afc71f146e2633ccf5fc7cb9ad21420fb62e88a2cb393e83ee4f5646200fa964d46a16ef58831958799449a4a59e2da6c9337 SHA512 8cd1bc46ef6e975964e5ddc290ed999f7076b63a9363f1a1f31b5d8db875d4e564ed5f0d5185c29dcf8a86793fe4badf63325b79ba1abbc264088b1ca94a9dad
EBUILD ipt_netflow-2.4.ebuild 2383 BLAKE2B 961e4ef35da8c6bc4111bb9a9ed8e4be4e05c24e9262e6fb6b7b55fc0ea8ce084e7830b3d8ec8b317a4afc89d242cd2f3ecd5a6dd8e9463f2a574aa80bf22b8e SHA512 6da791363ee57e08680722864203134a0fb89bf3079ab12e34ed02bfa2178606f1a65356ec727c615ce105c5ce0fd6fd91ad7c26554792f64abec8b765c2a6ec
-EBUILD ipt_netflow-9999.ebuild 2364 BLAKE2B a88838239348fe309a4fd6efe1d6133af629e884a35429f9a7c7577ab840fa5c219dc582169d48a010970e31e78e3fd47676642fa2e4eceaadb0836ac96964e9 SHA512 02f9f6ff65516e90a7143db1b7a91225589d91e1d41d10ede3e16986f0eeba1dc948a9f415fe1239950359a9389f5f7f522fd1408122a15f43cfd024dddb13ab
+EBUILD ipt_netflow-2.5.ebuild 2360 BLAKE2B 2309e1fd12f41326ba0071909ceabd6ccab1f8ae6e70520fdfdc5d239b46b424390b3dae2f34dc6d055d38b7209a77666841e0df73e6530b0100a7ba9eb417fc SHA512 39d13df5d3b49e0dcd941f3429589b8213b998c3edc639f47f579d9f4c639a851fcdab09b61ef57b3b05cffa487d32d36950e9081063decddb66aebb5e269bd9
+EBUILD ipt_netflow-9999.ebuild 2382 BLAKE2B b0c857afbd04830708f101843fa8e318b53ee42bcc0a4ecfb0c5a91b566767929d7170d110ffdf56b798590da79223107318f1dc831051b035b3b912f9509aa7 SHA512 a40299b33498bb40e85661f6a72814e6d6e282c92dbd4b707f212f7a2edc3a2e3a0b17cdeb1a774db35327a7a5e97b3a797a4f8c6e93a99abeaa12d94b5ad840
MISC metadata.xml 561 BLAKE2B 8b2d48273d5c27a1996089236e3981c7eff8546e73671136baa8a9ed0c18fb26a56be261b3162e4563878bf54487a0b26e389861a9dbc80af35783491564c7d3 SHA512 6cd4feab99315acfcf34f34fccd9ecb6b00b23efecef622cc638902a4ec62240f3d9f87d1f349a84ec7c4985a90f8632ffcfa9f403b42c26ce9d923ca9e01bc5
diff --git a/net-firewall/ipt_netflow/files/ipt_netflow-2.5-gentoo.patch b/net-firewall/ipt_netflow/files/ipt_netflow-2.5-gentoo.patch
new file mode 100644
index 000000000000..508be107795e
--- /dev/null
+++ b/net-firewall/ipt_netflow/files/ipt_netflow-2.5-gentoo.patch
@@ -0,0 +1,61 @@
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -11,7 +11,7 @@
+ SNMPTGSO = /usr/lib/snmp/dlmod/snmp_NETFLOW.so
+ SNMPCONF = /etc/snmp/snmpd.conf
+ SNMPLINE = dlmod netflow $(SNMPTGSO)
+-CC = gcc
++CC ?= gcc
+
+ # https://www.kernel.org/doc/Documentation/kbuild/modules.txt
+ # https://www.kernel.org/doc/Documentation/kbuild/makefiles.txt
+@@ -22,31 +22,31 @@
+
+ ipt_NETFLOW.ko: version.h ipt_NETFLOW.c ipt_NETFLOW.h compat_def.h compat.h Makefile
+ @echo Compiling for kernel $(KVERSION)
+- make -C $(KDIR) M=$(CURDIR) modules CONFIG_DEBUG_INFO=y
++ $(MAKE) -C $(KDIR) M=$(CURDIR) modules CONFIG_DEBUG_INFO=y
+ @touch $@
+ compat_def.h: gen_compat_def
+ ./gen_compat_def > $@
+ sparse: | version.h ipt_NETFLOW.c ipt_NETFLOW.h compat.h Makefile
+ @rm -f ipt_NETFLOW.ko ipt_NETFLOW.o
+ @echo Compiling for kernel $(KVERSION)
+- make -C $(KDIR) M=$(CURDIR) modules C=1
++ $(MAKE) -C $(KDIR) M=$(CURDIR) modules C=1
+ @touch ipt_NETFLOW.ko
+ coverity:
+ coverity-submit -v
+
+ minstall: | ipt_NETFLOW.ko
+ @echo " *"
+- make -C $(KDIR) M=$(CURDIR) modules_install INSTALL_MOD_PATH=$(DESTDIR)
++ $(MAKE) -C $(KDIR) M=$(CURDIR) modules_install INSTALL_MOD_PATH=$(DESTDIR)
+ $(DEPMOD)
+ mclean:
+- make -C $(KDIR) M=$(CURDIR) clean
++ $(MAKE) -C $(KDIR) M=$(CURDIR) clean
+ lclean:
+ -rm -f *.so *_sh.o
+ clean: mclean lclean
+ -rm -f *.so *.o modules.order version.h compat_def.h
+
+ snmp_NETFLOW.so: snmp_NETFLOW.c
+- $(CC) -fPIC -shared -o $@ $< -lnetsnmp
++ $(CC) $(CFLAGS) $(LDFLAGS) -fPIC -shared -o $@ $< -lnetsnmp
+
+ sinstall: | snmp_NETFLOW.so IPT-NETFLOW-MIB.my
+ @echo " *"
+@@ -66,10 +66,10 @@
+ fi
+
+ %_sh.o: libipt_NETFLOW.c
+- $(CC) $(CFLAGS) -O2 -Wall -Wunused $(IPTABLES_CFLAGS) -fPIC -o $@ -c libipt_NETFLOW.c
++ $(CC) $(CFLAGS) -Wall -Wunused $(IPTABLES_CFLAGS) -fPIC -o $@ -c libipt_NETFLOW.c
+
+ %.so: %_sh.o
+- $(CC) -shared -o $@ $<
++ $(CC) $(LDFLAGS) -shared -o $@ $<
+
+ version.h: ipt_NETFLOW.c ipt_NETFLOW.h compat.h Makefile
+ @./version.sh --define > version.h
diff --git a/net-firewall/ipt_netflow/files/ipt_netflow-9999-flags.patch b/net-firewall/ipt_netflow/files/ipt_netflow-9999-gentoo.patch
index 675e8b16f725..675e8b16f725 100644
--- a/net-firewall/ipt_netflow/files/ipt_netflow-9999-flags.patch
+++ b/net-firewall/ipt_netflow/files/ipt_netflow-9999-gentoo.patch
diff --git a/net-firewall/ipt_netflow/ipt_netflow-2.5.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.5.ebuild
new file mode 100644
index 000000000000..2c7d537f291b
--- /dev/null
+++ b/net-firewall/ipt_netflow/ipt_netflow-2.5.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit linux-info linux-mod toolchain-funcs
+
+DESCRIPTION="Netflow iptables module"
+HOMEPAGE="
+ https://sourceforge.net/projects/ipt-netflow
+ https://github.com/aabc/ipt-netflow
+"
+SRC_URI="https://github.com/aabc/ipt-netflow/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="debug natevents snmp"
+
+RDEPEND="
+ net-firewall/iptables:0=
+ snmp? ( net-analyzer/net-snmp )
+"
+DEPEND="${RDEPEND}
+ virtual/linux-sources
+ virtual/pkgconfig
+"
+PATCHES=(
+ "${FILESDIR}/${PN}-2.0-configure.patch" # bug #455984
+ "${FILESDIR}/${PN}-2.5-gentoo.patch"
+)
+
+pkg_setup() {
+ linux-info_pkg_setup
+
+ local CONFIG_CHECK="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)" 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-9999.ebuild b/net-firewall/ipt_netflow/ipt_netflow-9999.ebuild
index 06411e1ae6d9..d24c48cebca3 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,13 +27,13 @@ DEPEND="${RDEPEND}
"
PATCHES=(
"${FILESDIR}/${PN}-2.0-configure.patch" # bug #455984
- "${FILESDIR}/${PN}-9999-flags.patch"
+ "${FILESDIR}/${PN}-9999-gentoo.patch"
)
pkg_setup() {
linux-info_pkg_setup
- local CONFIG_CHECK="~IP_NF_IPTABLES VLAN_8021Q"
+ 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"