diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-03-20 14:27:17 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-03-20 14:27:17 +0000 |
commit | 5bb9ff1ee56d2b5e75e01a7f066d8b0cec84ec02 (patch) | |
tree | 66e860a5099bcad013f1cf667255dc372a7c11b3 /net-analyzer/nfdump | |
parent | 7218e1b46bceac05841e90472501742d905fb3fc (diff) |
gentoo resync : 20.03.2021
Diffstat (limited to 'net-analyzer/nfdump')
-rw-r--r-- | net-analyzer/nfdump/Manifest | 11 | ||||
-rw-r--r-- | net-analyzer/nfdump/files/nfcapd.confd | 11 | ||||
-rw-r--r-- | net-analyzer/nfdump/files/nfcapd.initd | 60 | ||||
-rw-r--r-- | net-analyzer/nfdump/files/nfdump-1.6.21-remove-strict-rfc-7011-handling.patch | 49 | ||||
-rw-r--r-- | net-analyzer/nfdump/metadata.xml | 8 | ||||
-rw-r--r-- | net-analyzer/nfdump/nfdump-1.6.21-r1.ebuild (renamed from net-analyzer/nfdump/nfdump-1.6.21.ebuild) | 4 | ||||
-rw-r--r-- | net-analyzer/nfdump/nfdump-1.6.22-r1.ebuild (renamed from net-analyzer/nfdump/nfdump-1.6.20.ebuild) | 46 |
7 files changed, 169 insertions, 20 deletions
diff --git a/net-analyzer/nfdump/Manifest b/net-analyzer/nfdump/Manifest index e1f87d0cbe04..6cf66145f33c 100644 --- a/net-analyzer/nfdump/Manifest +++ b/net-analyzer/nfdump/Manifest @@ -1,9 +1,12 @@ +AUX nfcapd.confd 230 BLAKE2B b4ef656a10aeedf1ee9b11b2ac3d429fcf91e2cc6a84ca220e2adaa6a54536358e919065d1bd98a62b530ef698fed65be77749780320685f4f457718648bbcd3 SHA512 c9afa1d1629505e77f3a0ee282b0dec79572a9ac4dd31bb3161b36ed6036dd6a8345280c2db4a8f1fc763f88f86857d96edae997ecff8e540db448fbd9a4b101 +AUX nfcapd.initd 1261 BLAKE2B 092b65523720ab0f4790650764e758da8504234dc888aadf8e6512b73f0c934eee27b00ccd717bd0944d2d4aa9574b9d2afe0f3aa7e071ab59e168c7e0cc0cf3 SHA512 5e4fff0829b992be9b1a318da4a77bdc87922a6f5257c87eff41590e32995b52b27efc7fa4e56aedf844c509430cb46103d902017cb3fc5f4885b8117e58feab AUX nfdump-1.6.19-compiler.patch 528 BLAKE2B b289f32a18a03b2725360b84314b294ebe6843f3ecaf3eb6ddffb9ba4e85641167c705682a8fc90560e0ce5d41dfeed7a739d011569361c31107dec9c98bf213 SHA512 300e79fdf994bd6a75c9595417d4e3e12b7e4030d6b1fa685b1b352404f36cfe2f1d8f31796a62f2a465a93dfeab0ab81caaf63a4de56a7851aea255b4607dc8 AUX nfdump-1.6.19-libft.patch 815 BLAKE2B 8b82ce3c93214e016b63fa593e7e8d3c8960e1d2636a9ad0cebd75e9945c73d9d42ebfcf5afe82ec10d62ed3d4bc8334670aaf46f543782b5c86ac2f60d57db1 SHA512 884458ac127497e9c3c7b5f8ed4eca60278d052ba2749efad1d267446c6a62da4417a018aca758bac6633d09ab08e699b54163300ed176510271aabf0769d3c4 +AUX nfdump-1.6.21-remove-strict-rfc-7011-handling.patch 1726 BLAKE2B 6f2d2c0ebb336eafba60aabec9bc2eb120c61b67401704786ed105eaeba090d893004ea4c8be4e40b360cf91c2b306c4cbb9ef9f60dc6b5c3b92fe1c5c5d904f SHA512 e7ca0512b01a0838ec9a6d52710da23ce6db5021af19a354bc59cbaf7c6b246fee50e7c3ae9b71eb34e94396cffba7f1069140c0f476c8a2b61fa9a06113f425 DIST nfdump-1.6.19.tar.gz 561923 BLAKE2B 458cf0e23f433c7c1c27450712a2f9f8f75a990eeaf079bac9a74bf5abf4bc22c930294494424fd8e7f7d03ffc1e5f1e35ba50e29ba4f3528f63e1739524c9ed SHA512 577c23ca3aae8ab035c734c137d3a338e09f46b5f8551946fd84b9a03fae1ef2aa80e2ab9657eb226defcd753bb63503eeb85316ca1df18d95b85270df8f379e -DIST nfdump-1.6.20.tar.gz 561053 BLAKE2B 20c8db09386a4aa6174d3c2919c33409a4b2d9b295908ae61e8ce12107c08ba7742fb7ec80bcb7bcdb15e036e6d2320c83f0446a479185cb18717720eca87c88 SHA512 8396241fa24d532540135762a81ce035586c405d4ab1e01d6e2b8226b7cc9b6784170ca1fa4c1581fb60f324473cca5ce2d3de82282313d3877f9584e449d137 DIST nfdump-1.6.21.tar.gz 561617 BLAKE2B 61a52cb7ee724c47f93e0ce8dd0515306c16b94d8b351f9543deecc2b28c813f09f0e4ba621f2561760924af683ffd527d00936fbc5f91f83d6f727d6cf9e5d9 SHA512 c9162b7a6653267cd4d66a2d75bb2c3d65c431bb29ee549bac2a208fe7f2bc871bb91dfa6d89d6f18cd69f1d435dd25ba1c5dfe6e10b0efc4a582f2e67913a34 +DIST nfdump-1.6.22.tar.gz 563266 BLAKE2B f985a8f8bcbb7ff3ab98d4f01449b121e92914bc47ec7fa07c1a7a068f6722447228b0166d0f2e966c0bab2c93e34133743e8dff7d8dc41a1c70ffac64fbbf6e SHA512 3508e54b4c4785a79118147779300eebd9485532e157b37ed6487255dacaa49959d425c8fc489caa98ff559a4859b9e456e97a6c8a06a1029eb904aa1f9efb61 EBUILD nfdump-1.6.19.ebuild 1390 BLAKE2B ccd3bc87b5f005bd5e5767090f41b7380bfb39224c1f5d31007004e171483e18bb293f9cc157f887f30749a8f694fbc25418a883ebeace04f4a3dbf90a88c662 SHA512 e0e772dae0a2550fd14808e2132a83587508684fe57136754db314add1c55857e5b8d6787eadcb066c73f48522157c2bf414b6cfbd028977adc63c99a6f42035 -EBUILD nfdump-1.6.20.ebuild 1392 BLAKE2B f9d43b2f41c5c901255e06c391eff327bf2b56bf9af02add91e22ad8a935c682e6e332b252be90dfa9564971f59d908c37ea532b36a08ac7df09106b9ea41218 SHA512 5da3069596339dd040c1573a65b538e1cedc75d30420e84cf0864474a391e5a19a6914a2dafa8f7f4024b491c84799a926bd9b4f4d31cd7fff57788e822b2f9f -EBUILD nfdump-1.6.21.ebuild 1469 BLAKE2B 932f15a9e9c9b136868fb6365c6fb0933ca081c25787712c50d08c4b49f3d3e90990c3879f7f3883d27b8b37de4e1d1f127b44597cf458ee71c6b6c809e7efa1 SHA512 7a2e14a66f05d516fe6cbdaf2e337ca1b57afb24ea33f583ad1a744b3a6dd3136914a7b41a6dc00b2321aa791989e0024fab6c0fbc25268db5ab1f0ad1eedc47 -MISC metadata.xml 802 BLAKE2B 97d927528f0f645840ea163060c8b3a2f43cd27f6687e5dd1fa9b9fe5b5bb1e3115463b744df4ac4151bcd82e8b6ee3849c5e130e09ed66b14bc16c9aea48f26 SHA512 7549ba2155e5bcb972147b1daf0cb2c44619b4ca13455893bba269c560149c40d17d04bc66ce2c5dc94165ff65e9f97980c4eed7a7d7bb47723a03db6c144bb1 +EBUILD nfdump-1.6.21-r1.ebuild 1536 BLAKE2B 6174400853f6e976b9092b99610ef4b7795e1edad71b43b1a302390fdf94767d8616342ecd055278d329cc5f9a81ca1dca908a1720b34842bb159feff986b75c SHA512 f75118237418884d494e4c3ad3e6accef30a004c4688c2b2b303776fc0ec59459e4ca8e7918682dea7787706758481e9b1bb997a8cfdf5f2ed9c2574de874c80 +EBUILD nfdump-1.6.22-r1.ebuild 1682 BLAKE2B f55767f172e9d8dc112079f2a3aef7df3ed9f824c19438ee2c33634fd7882f3b3ca154c9de7aad3b04a922f87efcf0034c55b45a6a76c293778b50ea90591219 SHA512 fb4438500d299741164ca77004db9bb8bfed3a4a16225b8e835870b5fa8f8a76523f4b091dda393742c8e905899aad3a3e73dc27c569cb97faa98b591450b605 +MISC metadata.xml 1277 BLAKE2B 627dfd7acef2f5734027131342b29bfc3307fa8e462896b9a08870768aa3c452c41e32289cde6aa84967ae64ffafba8a0390d342e0363d30ccd0a81fb536575e SHA512 bd88e71c62abaf83eea07bf97441f9d66061d459c44785e382ea760fd4f8a706b6bd089ead6ade13a381066355c12070839ec2c9a6d6477397055e7fb3b1b089 diff --git a/net-analyzer/nfdump/files/nfcapd.confd b/net-analyzer/nfdump/files/nfcapd.confd new file mode 100644 index 000000000000..28ea35fd0741 --- /dev/null +++ b/net-analyzer/nfdump/files/nfcapd.confd @@ -0,0 +1,11 @@ +#shellcheck shell=sh +#shellcheck disable=SC2034 + +#port number to listen on +#PORT="2055" + +#maximum size of collected files +#MAX_SIZE="1G" + +#enable sending of all received packets to specified address +#REPEAT_TO="192.168.1.1/60062" diff --git a/net-analyzer/nfdump/files/nfcapd.initd b/net-analyzer/nfdump/files/nfcapd.initd new file mode 100644 index 000000000000..98d388cb710f --- /dev/null +++ b/net-analyzer/nfdump/files/nfcapd.initd @@ -0,0 +1,60 @@ +#!/sbin/openrc-run +#shellcheck shell=sh + +IDENT="${RC_SVCNAME#*.}" +PIDFILE="/run/nfcapd/${IDENT}.pid" +USER="nfcapd" +GROUP="nfcapd" + +ssd_start(){ + if [ -n "${MAX_SIZE}" ]; then + set -- "$@" -e + fi + if [ -n "${PORT}" ]; then + set -- "$@" -p "${PORT}" + fi + if [ -n "${REPEAT_TO}" ]; then + set -- "$@" -R "${REPEAT_TO}" + fi + start-stop-daemon "$@" +} + +checkconfig() { + if [ "${IDENT}" = "${RC_SVCNAME}" ]; then + eerror "You have to create an init script for each ident:" + eerror " cd /etc/init.d/; ln -s nfcapd nfcapd.ident" + return 1 + fi +} + +depend() { + need net +} + +start() { + checkconfig || return 1 + + checkpath -d -m 0750 -o nfcapd:nfcapd /run/nfcapd + checkpath -d -m 0750 -o nfcapd:nfcapd /var/tmp/nfcapd/"${IDENT}" + + if [ -n "${MAX_SIZE}" ]; then + nfexpire -u /var/tmp/nfcapd/"${IDENT}" -s "${MAX_SIZE}" \ + > /dev/null 2>&1 + chown -R ${USER}:${GROUP} /var/tmp/nfcapd/"${IDENT}" + fi + + ebegin "Starting ${RC_SVCNAME}" + ssd_start --start --quiet --exec /usr/bin/nfcapd \ + --pidfile "${PIDFILE}" -- -D -P "${PIDFILE}" -u ${USER} \ + -g ${GROUP} -I "${IDENT}" -l /var/tmp/nfcapd/"${IDENT}" + eend $? +} + +stop() { + checkconfig || return 1 + + ebegin "Stopping ${RC_SVCNAME}" + start-stop-daemon --stop --exec /usr/bin/nfcapd \ + --pidfile "${PIDFILE}" + eend $? +} diff --git a/net-analyzer/nfdump/files/nfdump-1.6.21-remove-strict-rfc-7011-handling.patch b/net-analyzer/nfdump/files/nfdump-1.6.21-remove-strict-rfc-7011-handling.patch new file mode 100644 index 000000000000..a36af2242d42 --- /dev/null +++ b/net-analyzer/nfdump/files/nfdump-1.6.21-remove-strict-rfc-7011-handling.patch @@ -0,0 +1,49 @@ +From f5ae2b821c22ebe0c96f3516d4e90f4255633828 Mon Sep 17 00:00:00 2001 +From: Peter Haag <peter@people.ops-trust.net> +Date: Sat, 8 Aug 2020 16:46:04 +0200 +Subject: [PATCH] Re-address issue #231 - remove strict rule rfc 7011 + +--- + ChangeLog | 3 +++ + bin/ipfix.c | 3 --- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index a0b2b67..8b92e58 100755 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,6 @@ ++2020-08-02 ++- Re-address issue #231 - remove strict rule rfc 7011 ++ + 2020-08-02 + - Release 1.6.21 + - Address issue #159. Implement rfc 7011 and include sender UDP port into unique template identification +diff --git a/bin/ipfix.c b/bin/ipfix.c +index a730a8b..19c9d63 100644 +--- a/bin/ipfix.c ++++ b/bin/ipfix.c +@@ -158,7 +158,6 @@ typedef struct exporterDomain_s { + + // exporter information + exporter_info_record_t info; +- in_port_t port; // follow rfc 7011 - matching src port + + uint64_t packets; // number of packets sent by this exporter + uint64_t flows; // number of flow records sent by this exporter +@@ -383,7 +382,6 @@ uint32_t ObservationDomain = ntohl(ipfix_header->ObservationDomain); + + while ( *e ) { + if ( (*e)->info.id == ObservationDomain && (*e)->info.version == 10 && +- (*e)->port == fs->port && + (*e)->info.ip.V6[0] == fs->ip.V6[0] && (*e)->info.ip.V6[1] == fs->ip.V6[1]) + return *e; + e = &((*e)->next); +@@ -412,7 +410,6 @@ uint32_t ObservationDomain = ntohl(ipfix_header->ObservationDomain); + (*e)->info.header.size = sizeof(exporter_info_record_t); + (*e)->info.id = ObservationDomain; + (*e)->info.ip = fs->ip; +- (*e)->port = fs->port; + (*e)->info.sa_family = fs->sa_family; + (*e)->info.version = 10; + (*e)->info.sysid = 0; diff --git a/net-analyzer/nfdump/metadata.xml b/net-analyzer/nfdump/metadata.xml index f785b8973856..f9f3c305c35a 100644 --- a/net-analyzer/nfdump/metadata.xml +++ b/net-analyzer/nfdump/metadata.xml @@ -6,12 +6,18 @@ <name>Gentoo network monitoring and analysis project</name> </maintainer> <use> - <flag name="readpcap">Build nfcapd collector to read from pcap file instead ofnetwork data</flag> <flag name="ftconv">Build the flow-tools to nfdump converter</flag> + <flag name="jnat">Build nfudmp to support JunOS NAT event logging</flag> + <flag name="nfpcapd">Build nfpcapd collector to create netflow data from precollected pcap traffic</flag> <flag name="nfprofile">Build nfprofile used by NfSen</flag> <flag name="nftrack">Build nfprofile used by PortTracker</flag> + <flag name="nsel">Build nfudmp to support NSEL/NEL event data</flag> + <flag name="readpcap">Build nfcapd collector to read from pcap file instead ofnetwork data</flag> <flag name="sflow">Build sflow collector sfcpad</flag> </use> + <longdescription>nfdump is a toolset to collect and process netflow and sflow + data, sent from netflow/sflow compatible devices. The toolset supports + netflow v1, v5/v7,v9,IPFIX and SFLOW.</longdescription> <upstream> <remote-id type="sourceforge">nfdump</remote-id> <remote-id type="github">phaag/nfdump</remote-id> diff --git a/net-analyzer/nfdump/nfdump-1.6.21.ebuild b/net-analyzer/nfdump/nfdump-1.6.21-r1.ebuild index 4c59fb92baec..f6000c763cbd 100644 --- a/net-analyzer/nfdump/nfdump-1.6.21.ebuild +++ b/net-analyzer/nfdump/nfdump-1.6.21-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -35,7 +35,9 @@ RDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-1.6.19-compiler.patch "${FILESDIR}"/${PN}-1.6.19-libft.patch + "${FILESDIR}"/${PN}-1.6.21-remove-strict-rfc-7011-handling.patch ) + DOCS=( AUTHORS ChangeLog README.md ) src_prepare() { diff --git a/net-analyzer/nfdump/nfdump-1.6.20.ebuild b/net-analyzer/nfdump/nfdump-1.6.22-r1.ebuild index d866f89da5b1..67db70201342 100644 --- a/net-analyzer/nfdump/nfdump-1.6.20.ebuild +++ b/net-analyzer/nfdump/nfdump-1.6.22-r1.ebuild @@ -1,7 +1,8 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 + inherit autotools DESCRIPTION="A set of tools to collect and process netflow data" @@ -9,32 +10,36 @@ HOMEPAGE="https://github.com/phaag/nfdump" SRC_URI="https://github.com/phaag/nfdump/archive/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="BSD" -SLOT="0/1.6.15" +SLOT="0/1.6.22" KEYWORDS="~amd64 ~x86" -IUSE="debug ftconv nfprofile nftrack readpcap sflow static-libs" +IUSE="debug doc jnat ftconv nfpcapd nfprofile nftrack nsel readpcap sflow + static-libs" +REQUIRED_USE="?? ( jnat nsel )" -COMMON_DEPEND=" +RDEPEND=" app-arch/bzip2 sys-libs/zlib - ftconv? ( sys-libs/zlib net-analyzer/flow-tools ) + ftconv? ( net-analyzer/flow-tools ) + nfpcapd? ( net-libs/libpcap ) nfprofile? ( net-analyzer/rrdtool ) nftrack? ( net-analyzer/rrdtool ) readpcap? ( net-libs/libpcap ) " -DEPEND=" - ${COMMON_DEPEND} - app-doc/doxygen +DEPEND="${RDEPEND}" +BDEPEND=" sys-devel/flex virtual/yacc + doc? ( + app-doc/doxygen + media-gfx/graphviz + ) " -RDEPEND=" - ${COMMON_DEPEND} - dev-lang/perl -" + PATCHES=( "${FILESDIR}"/${PN}-1.6.19-compiler.patch "${FILESDIR}"/${PN}-1.6.19-libft.patch ) + DOCS=( AUTHORS ChangeLog README.md ) src_prepare() { @@ -42,22 +47,35 @@ src_prepare() { eautoreconf - doxygen -u doc/Doxyfile.in || die + if use doc; then + doxygen -u doc/Doxyfile.in || die + fi } src_configure() { # --without-ftconf is not handled well #322201 econf \ $(use ftconv && echo "--enable-ftconv --with-ftpath=/usr") \ + $(use nfpcapd && echo --enable-nfpcapd) \ $(use nfprofile && echo --enable-nfprofile) \ $(use nftrack && echo --enable-nftrack) \ $(use_enable debug devel) \ + $(use_enable jnat) \ + $(use_enable nsel) \ $(use_enable readpcap) \ $(use_enable sflow) \ - $(use_enable static-libs static) + --disable-static } src_install() { default + find "${ED}" -name '*.la' -delete || die + + newinitd "${FILESDIR}"/nfcapd.initd nfcapd + newconfd "${FILESDIR}"/nfcapd.confd nfcapd + + if use doc; then + dodoc -r doc/html + fi } |