diff options
author | 2024-07-30 22:23:16 +0300 | |
---|---|---|
committer | 2024-07-30 22:30:56 +0300 | |
commit | f1bad49b20c2eca95793c711f72a093a686adfdd (patch) | |
tree | 1fef9bb859c5ee31cf33196f287da0bfa3107ba4 /net-analyzer | |
parent | net-im/toxic: Fix dependencies (diff) | |
download | gentoo-f1bad49b20c2eca95793c711f72a093a686adfdd.tar.gz gentoo-f1bad49b20c2eca95793c711f72a093a686adfdd.tar.bz2 gentoo-f1bad49b20c2eca95793c711f72a093a686adfdd.zip |
net-analyzer/nfdump: add 1.7.4, added systemd service
While the bug for adding systemd services requested more files,
after more checking what they do, I see no reason for the
complicated way that debian decided to do it. So What I recommend to
do is:
1. systemctl edit nfdump@somename
[Service]
Environment=options="-l /var/cache/nfdump_somename -p 2052"
2. systemctl enable --now nfdump@somename
Closes: https://bugs.gentoo.org/904952
Closes: https://bugs.gentoo.org/925033
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/nfdump/Manifest | 1 | ||||
-rw-r--r-- | net-analyzer/nfdump/files/nfdump.service | 16 | ||||
-rw-r--r-- | net-analyzer/nfdump/nfdump-1.7.4.ebuild | 96 |
3 files changed, 113 insertions, 0 deletions
diff --git a/net-analyzer/nfdump/Manifest b/net-analyzer/nfdump/Manifest index 3a86012a4c87..c29eee945827 100644 --- a/net-analyzer/nfdump/Manifest +++ b/net-analyzer/nfdump/Manifest @@ -1 +1,2 @@ DIST nfdump-1.7.2.tar.gz 697405 BLAKE2B cf52f2cca5d80070bc00c7a7a87cc4820f04904ddeeebd4fc93cf3a2433bcf5798191daa86f0bfc7ee1f2f92e5d8bb087114d2c17e32b641a224189aeb54f822 SHA512 858d0aaae24f2e38f3708db9fd5cd40e99a6a50d5da5738c8ce4bf898fb153ce439c504d5fe8fb3c296d0069511a6f229ebdfc117f849a482e5ffdf457f06003 +DIST nfdump-1.7.4.tar.gz 756319 BLAKE2B 441fb5d3fcb4b83bfc42861eac67bf96ac7c7d6a44afd47c4e16615b22261e1628a1bffc645071817eb9085857ca3a3b632fd265dc897cf9af8fce2999f86787 SHA512 be65aeee9b982b30633102b3ca0f84eab280ca4fda4544be458a2387d051e62517127a2625bbc4329a844550a613df67f5015cc5a90a8e4b6a8c65d045650ee2 diff --git a/net-analyzer/nfdump/files/nfdump.service b/net-analyzer/nfdump/files/nfdump.service new file mode 100644 index 000000000000..03e8443077ae --- /dev/null +++ b/net-analyzer/nfdump/files/nfdump.service @@ -0,0 +1,16 @@ +[Unit] +Description=netflow capture daemon, %I instance +Documentation=man:nfcapd(1) +After=network.target auditd.service +PartOf=nfdump.service + +[Service] +Type=forking +Environment=options="-l /var/cache/nfdump -p 2055" +ExecStart=/usr/bin/nfcapd -D -P %t/nfcapd.%I.pid $options +PIDFile=%t/nfcapd.%I.pid +KillMode=process +Restart=no + +[Install] +WantedBy=multi-user.target diff --git a/net-analyzer/nfdump/nfdump-1.7.4.ebuild b/net-analyzer/nfdump/nfdump-1.7.4.ebuild new file mode 100644 index 000000000000..5bb38c317ad6 --- /dev/null +++ b/net-analyzer/nfdump/nfdump-1.7.4.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic toolchain-funcs systemd + +DESCRIPTION="A set of tools to collect and process netflow data" +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/${PV}" +KEYWORDS="~amd64 ~x86" +IUSE="debug doc jnat ftconv nfpcapd nfprofile nftrack nsel readpcap sflow zstd" + +REQUIRED_USE="?? ( jnat nsel )" + +RDEPEND=" + app-arch/bzip2 + app-arch/lz4:= + sys-libs/zlib + elibc_musl? ( sys-libs/fts-standalone ) + ftconv? ( net-analyzer/flow-tools ) + nfpcapd? ( net-libs/libpcap ) + nfprofile? ( net-analyzer/rrdtool ) + nftrack? ( net-analyzer/rrdtool ) + readpcap? ( net-libs/libpcap ) + zstd? ( app-arch/zstd:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + app-alternatives/lex + app-alternatives/yacc + doc? ( + app-text/doxygen + media-gfx/graphviz + ) +" + +QA_CONFIG_IMPL_DECL_SKIP=( + # Not available on Linux, with fallback at src/libnffile/util.h, bug #904952 + htonll +) + +PATCHES=( + "${FILESDIR}"/${PN}-1.6.19-libft.patch +) + +DOCS=( AUTHORS ChangeLog README.md ) + +src_prepare() { + default + + eautoreconf + + if use doc; then + doxygen -u doc/Doxyfile.in || die + fi +} + +src_configure() { + tc-export CC + + # bug #853763 + use elibc_musl && append-libs "-lfts" + + # --without-ftconf is not handled well, bug #322201 + local myeconfargs=( + $(usex ftconv "--enable-ftconv --with-ftpath=/usr") + $(usex nfpcapd --enable-nfpcapd) + $(usex nfprofile --enable-nfprofile) + $(usex nftrack --enable-nftrack) + $(use_enable debug devel) + $(use_enable jnat) + $(use_enable nsel) + $(use_enable readpcap) + $(use_enable sflow) + $(use_with zstd zstdpath) + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + + find "${ED}" -name '*.la' -type f -delete || die + + newinitd "${FILESDIR}"/nfcapd.initd nfcapd + newconfd "${FILESDIR}"/nfcapd.confd nfcapd + systemd_newunit "${FILESDIR}/nfdump.service" nfdump@.service + + if use doc; then + dodoc -r doc/html + fi +} |