diff options
Diffstat (limited to 'net-analyzer/nfdump')
-rw-r--r-- | net-analyzer/nfdump/Manifest | 6 | ||||
-rw-r--r-- | net-analyzer/nfdump/files/nfdump-1.6.23-autotools.patch | 216 | ||||
-rw-r--r-- | net-analyzer/nfdump/files/nfdump-1.6.23-m4-dir-automake.patch | 23 | ||||
-rw-r--r-- | net-analyzer/nfdump/files/nfdump-1.6.23-m4-dir.patch | 19 | ||||
-rw-r--r-- | net-analyzer/nfdump/nfdump-1.6.23-r1.ebuild | 83 | ||||
-rw-r--r-- | net-analyzer/nfdump/nfdump-1.6.23.ebuild | 3 |
6 files changed, 348 insertions, 2 deletions
diff --git a/net-analyzer/nfdump/Manifest b/net-analyzer/nfdump/Manifest index d692ea857899..9a16419ee6c4 100644 --- a/net-analyzer/nfdump/Manifest +++ b/net-analyzer/nfdump/Manifest @@ -2,6 +2,10 @@ AUX nfcapd.confd 230 BLAKE2B b4ef656a10aeedf1ee9b11b2ac3d429fcf91e2cc6a84ca220e2 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.23-autotools.patch 6579 BLAKE2B ea194c79ad584007b5c2e19a4b7b5cb94f381220e5c04120c5700b33075da831428d98af0b3fac574d61414c6285da05268660033d2411a87eaf047156af4442 SHA512 c7bcc7645542d1d3273def4a7fa5881e30763b38773ceb3fa5eef3e7f0a60fc0aaa14cf66df7f72dd154a3ccce1ab9dfaf2ef955d149136a1bb8e014ffe7574f +AUX nfdump-1.6.23-m4-dir-automake.patch 579 BLAKE2B f77f624bfcd108e048ee215d85968fdde380720de90979cca81c45c64e022c872983f0d0d370bec8c16c1111948748d959662eab494a2c660fdb8d63377bd3ab SHA512 90df4adaba5deaf79d93eb05dcf3f364837bf7b60175a325ac08bad056bb356dd23f414132e23c068579a9fa9ad46ec74ccab7178022e8fe3bbead3f8f0be07f +AUX nfdump-1.6.23-m4-dir.patch 477 BLAKE2B 1ef4634ad61efc372da5bb92657826ed45112121e98dbb8971e51df33d50ce312e841659cf01fe949f5ce9998b75bd1037be9ffe1a95a6dbb2aca73e5be6bfac SHA512 b50cb179373a6b37b4122a0b77e6d321b6e992430f4fbc5178cbf867bf4cc0740e2c7a4b01c075f3d8c4339b0690781f1df74f773993cedbe44ff041c9bb6091 DIST nfdump-1.6.23.tar.gz 568879 BLAKE2B ca844f87e02fb3761d5b470cac11beada9873b0c7e3e9ca7ccc7899d57f0cfd96329698ac84467a55d683e83ce16c2b114a571845c7cb6069addcdd5d4a43903 SHA512 e3f79af69a170985fcbd1757fab86e90840d040cf7a6214c7f9851ed59695d3844a15269904c3ba989b6b6ed2ddf29fd19a493165d3037e49aa2bb69b831f168 -EBUILD nfdump-1.6.23.ebuild 1672 BLAKE2B 4d0b88c5592b18da7579e01047b4986984627d3668b09271d5a792cedad3bb9334317026d3cbaf70449262d425c8984a1cd5be2de2b15aa2e8c57b80cb93d539 SHA512 754513ceb76ba46f7a7cf48ef6cba87f060af153c671d56d08bbcb17f4988061c3524d28deed0d32fd30a1023dc4d994e61bed5d45468b434e0d9cf349fff856 +EBUILD nfdump-1.6.23-r1.ebuild 1719 BLAKE2B bd83dea93bc0d33639a92015249f15ccebda61c0870481c30fae667516a8dc279a69eea0008e1490d4d81b123b3c7edb8189c5460774f1e44d9d7c49d2d9b2a3 SHA512 ac32eaa741fe3482056fed7481b087806ad3b2fa8cbd94ad945e982871f35bfb8031d61a73b2e54ab08bda7e30d46ea1acc9eaafda9953a9a0bf0270a79b817c +EBUILD nfdump-1.6.23.ebuild 1713 BLAKE2B b0a76ab56f3a696d1828cd8241de89238d824c13f7cdd3ab22b052732c76f9660d60ef6114e54ab7f2ccb30c0608fc33ae448df1a4fd191b9e7c74347c477804 SHA512 013079b47e1346c7b057572687cda6a1b39e5966da05674e2329cd55e14fa8ea36a894f18b18c7a4485841da54201ebe5e7d0832355e4e01447b524cc56d5f74 MISC metadata.xml 1278 BLAKE2B ad9d73532114eb0942a2b5262fe8e5f2b787993950fcd7c8bcb926f9e9e8d93ab94476265976b2e0cc41f3ea46fc6699a0bbb591d0c929208ec5e85d1b399617 SHA512 0bdbda9ccce4611ab88b746f4907dbb0c96d1e5f0dac909e2318c8bdf77de87321f65baadbb886f0c2e1b231cc30c50c70e5363cc9084285d1eaf5897c6f38cd diff --git a/net-analyzer/nfdump/files/nfdump-1.6.23-autotools.patch b/net-analyzer/nfdump/files/nfdump-1.6.23-autotools.patch new file mode 100644 index 000000000000..65558bbe7dfa --- /dev/null +++ b/net-analyzer/nfdump/files/nfdump-1.6.23-autotools.patch @@ -0,0 +1,216 @@ +https://github.com/phaag/nfdump/commit/e6261098570f69ad973a7a4ea7aaebb1663712e8 +https://github.com/phaag/nfdump/commit/67da975f20076751bce49caf57c89ed21ed92ad0 +https://github.com/phaag/nfdump/commit/4652c2014012a81438f53cb590687c8c93419140 + +From: Peter Haag <flow-dev@pyxis.ch> +Date: Tue, 22 Feb 2022 10:54:19 +0100 +Subject: [PATCH] Fix issue #304 - accept CFLAGS + +--- a/configure.ac ++++ b/configure.ac +@@ -8,8 +8,11 @@ AC_INIT(nfdump, 1.6.23, peter@people.ops-trust.net) + AC_CONFIG_HEADER([config.h]) + AM_INIT_AUTOMAKE([subdir-objects]) + ++if test "x$CFLAGS" = "x"; then ++ CFLAGS="-g -O3" ++fi ++ + # Checks for programs. +-CFLAGS="-g -O3" + AC_PROG_CC([clang gcc]) + AX_CHECK_C11 + CFLAGS="$CFLAGS -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -fno-strict-aliasing" + +From: Peter Haag <peter@people.ops-trust.net> +Date: Fri, 25 Feb 2022 09:12:27 +0100 +Subject: [PATCH] Cleanup automake files. Fixes #304. + +--- a/configure.ac ++++ b/configure.ac +@@ -1,12 +1,13 @@ + # -*- Autoconf -*- + # Process this file with autoconf to produce a configure script. + +-AC_PREREQ(2.59) ++AC_PREREQ([2.71]) + AC_REVISION($Revision: 244 $)dnl +-AC_INIT(nfdump, 1.6.23, peter@people.ops-trust.net) ++AC_INIT([nfdump],[1.6.23],[peter@people.ops-trust.net]) + +-AC_CONFIG_HEADER([config.h]) ++AC_CONFIG_HEADERS([config.h]) + AM_INIT_AUTOMAKE([subdir-objects]) ++AC_CONFIG_MACRO_DIRS([m4]) + + if test "x$CFLAGS" = "x"; then + CFLAGS="-g -O3" +@@ -15,7 +16,12 @@ fi + # Checks for programs. + AC_PROG_CC([clang gcc]) + AX_CHECK_C11 +-CFLAGS="$CFLAGS -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -fno-strict-aliasing" ++AX_APPEND_FLAG([-Wall], [CFLAGS]) ++AX_APPEND_FLAG([-Wstrict-prototypes], [CFLAGS]) ++AX_APPEND_FLAG([-Wmissing-prototypes], [CFLAGS]) ++AX_APPEND_FLAG([-Wmissing-declarations], [CFLAGS]) ++AX_APPEND_FLAG([-Wmissing-noreturn], [CFLAGS]) ++AX_APPEND_FLAG([-fno-strict-aliasing], [CFLAGS]) + + LT_INIT + +@@ -59,7 +65,7 @@ if test "${enable_fixtimebug}" = "yes" ; then + fi + + AC_PROG_YACC +-AC_PROG_LEX ++AC_PROG_LEX(yywrap) + which $LEX > /dev/null 2>&1 + if test $? = 1; then + AC_MSG_ERROR(No lex or flex found on system) +@@ -312,7 +318,11 @@ AC_LINK_IFELSE( + + # Checks for header files. + AC_HEADER_DIRENT +-AC_HEADER_STDC ++# Autoupdate added the next two lines to ensure that your configure ++# script's behavior did not change. They are probably safe to remove. ++AC_CHECK_INCLUDES_DEFAULT ++AC_PROG_EGREP ++ + AC_CHECK_HEADERS(stdio_ext.h) + AC_CHECK_HEADERS([nameser8_compat.h]) + AC_CHECK_HEADERS([features.h arpa/inet.h fcntl.h netinet/in.h fts.h stdint.h stdlib.h stddef.h string.h sys/socket.h syslog.h unistd.h iso/limits_iso.h]) +@@ -404,17 +414,14 @@ AC_CHECK_FUNCS(memcmp memcpy memmove memset) + AC_MSG_CHECKING([for union semun]) + AC_CACHE_VAL(ac_cv_struct_semun, + [ +- AC_TRY_COMPILE( +- [ ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #include <sys/types.h> + #include <sys/ipc.h> + #include <sys/sem.h>; +- ], +- [ ++ ]], [[ + union semun semdat; +- ], +- ac_cv_struct_semun=yes, ac_cv_struct_semun=no +- ) ++ ]])],[ac_cv_struct_semun=yes],[ac_cv_struct_semun=no ++ ]) + ] + ) + +@@ -424,7 +431,7 @@ if test "$ac_cv_struct_semun" = "yes"; then + fi + + AC_MSG_CHECKING(for the %z format string in printf()) +-AC_TRY_RUN([ ++AC_RUN_IFELSE([AC_LANG_SOURCE([[ + #include <stdio.h> + #include <sys/types.h> + +@@ -438,28 +445,38 @@ char string[16]; + + return i == 5 ? 0 : 1; + } +-], +-[ ++]])],[ + AC_MSG_RESULT(yes) + AC_DEFINE([HAVE_SIZE_T_Z_FORMAT], [1], + [Define to 1 if you have a printf() that supports the %z format string.]) +-], +-[ ++],[ + AC_MSG_RESULT(no) +-], +-[ ++],[ + AC_MSG_RESULT(no) +-] +-) + ++]) ++ ++AC_CONFIG_FILES([Makefile bin/Makefile man/Makefile]) ++AC_CONFIG_FILES([doc/Makefile]) + AC_PATH_PROG([DOXYGEN], [doxygen], []) + AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"]) + AM_COND_IF([HAVE_DOXYGEN], AC_CONFIG_FILES([doc/Doxyfile])) +-AC_OUTPUT(doc/Makefile) +- +-#AC_CONFIG_FILES([Makefile]) +-AC_OUTPUT(Makefile bin/Makefile man/Makefile) ++AC_OUTPUT + ++echo "" ++echo "----------------------------------" ++echo " Build Settings for ${PACKAGE_TARNAME} v${PACKAGE_VERSION}" ++echo "----------------------------------" ++echo " host type = $host_os" ++echo " install dir = $prefix" ++echo " CC = $CC" ++echo " CFLAGS = $AM_CFLAGS $CFLAGS" ++echo " CPPFLAGS = $AM_CPPFLAGS $CPPFLAGS" ++echo " LDFLAGS = $AM_LDFLAGS $LDFLAGS" ++echo " LIBS = $LIBS" ++echo "----------------------------------" ++echo "" ++echo " You can run ./make now." + echo "" + echo "* Many thanks for using nfdump tools" + echo "* Please send bug reports back to me: peter@people.ops-trust.net" + +From: Peter Haag <peter@people.ops-trust.net> +Date: Thu, 3 Mar 2022 09:25:15 +0100 +Subject: [PATCH] Make configure.ac autoconf 2.69 compatible + +--- a/configure.ac ++++ b/configure.ac +@@ -1,7 +1,7 @@ + # -*- Autoconf -*- + # Process this file with autoconf to produce a configure script. + +-AC_PREREQ([2.71]) ++AC_PREREQ([2.69]) + AC_REVISION($Revision: 244 $)dnl + AC_INIT([nfdump],[1.6.23],[peter@people.ops-trust.net]) + +@@ -47,7 +47,7 @@ if test "${enable_jnat}" = "yes" ; then + fi + + if test "${enable_nsel}" = "yes" -a "${enable_jnat}" = "yes"; then +- AC_MSG_ERROR(You can use only one of --enable-nsel or --enable-jnat. CISCO and Juniper are not compatible.) ++ AC_MSG_ERROR([You can use only one of --enable-nsel or --enable-jnat. CISCO and Juniper are not compatible.]) + fi + + AC_ARG_ENABLE(nel, +@@ -287,7 +287,6 @@ AC_SUBST(FT_INCLUDES) + AC_SUBST(FT_LDFLAGS) + AC_SUBST(LFLAGS) + +- + # Checks for libraries. + AC_CHECK_FUNCS(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname,,[AC_CHECK_LIB(socket,gethostbyname)])]) + AC_CHECK_FUNCS(setsockopt,,[AC_CHECK_LIB(socket,setsockopt)]) +@@ -447,8 +446,7 @@ char string[16]; + } + ]])],[ + AC_MSG_RESULT(yes) +- AC_DEFINE([HAVE_SIZE_T_Z_FORMAT], [1], +- [Define to 1 if you have a printf() that supports the %z format string.]) ++ AC_DEFINE([HAVE_SIZE_T_Z_FORMAT], [1], [Define to 1 if you have a printf() that supports the %z format string.]) + ],[ + AC_MSG_RESULT(no) + ],[ +--- /dev/null ++++ b/m4/extensions.m4 +@@ -0,0 +1,4 @@ ++dnl Define to empty for the benefit of Autoconf 2.69 ++dnl AC_USE_SYSTEM_EXTENSIONS (below) can be used unchanged from Autoconf 2.70+. ++m4_ifndef([AC_CHECK_INCLUDES_DEFAULT], ++ [AC_DEFUN([AC_CHECK_INCLUDES_DEFAULT], [])]) + diff --git a/net-analyzer/nfdump/files/nfdump-1.6.23-m4-dir-automake.patch b/net-analyzer/nfdump/files/nfdump-1.6.23-m4-dir-automake.patch new file mode 100644 index 000000000000..755db8b7cf5d --- /dev/null +++ b/net-analyzer/nfdump/files/nfdump-1.6.23-m4-dir-automake.patch @@ -0,0 +1,23 @@ +https://github.com/phaag/nfdump/pull/336 + +From e882722e4e006d0440fb5a37fb051d4747e4f225 Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Thu, 24 Mar 2022 22:50:13 +0000 +Subject: [PATCH] Makefile.am: add ACLOCAL_AMFLAGS + +Per autoconf docs [0], if using automake and AC_CONFIG_MACRO_DIR, +we need to include ACLOCAL_AMFLAGS in Makefile.am. + +So, let's set ACLOCAL_AMFLAGS = -I m4. + +This sorts out an automake warning. + +Signed-off-by: Sam James <sam@gentoo.org> +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,3 +1,4 @@ ++ACLOCAL_AMFLAGS = -I m4 + + SUBDIRS = . bin man doc + + diff --git a/net-analyzer/nfdump/files/nfdump-1.6.23-m4-dir.patch b/net-analyzer/nfdump/files/nfdump-1.6.23-m4-dir.patch new file mode 100644 index 000000000000..ac25ee094653 --- /dev/null +++ b/net-analyzer/nfdump/files/nfdump-1.6.23-m4-dir.patch @@ -0,0 +1,19 @@ +Variant sent upstream (configure.ac hunk irrelevant now): https://github.com/phaag/nfdump/pull/336 +https://bugs.gentoo.org/832420 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,3 +1,4 @@ ++ACLOCAL_AMFLAGS = -I m4 + + SUBDIRS = . bin man doc + +--- a/configure.ac ++++ b/configure.ac +@@ -7,6 +7,7 @@ AC_INIT(nfdump, 1.6.23, peter@people.ops-trust.net) + + AC_CONFIG_HEADER([config.h]) + AM_INIT_AUTOMAKE([subdir-objects]) ++AC_CONFIG_MACRO_DIR([m4]) + + # Checks for programs. + AX_CHECK_C11 diff --git a/net-analyzer/nfdump/nfdump-1.6.23-r1.ebuild b/net-analyzer/nfdump/nfdump-1.6.23-r1.ebuild new file mode 100644 index 000000000000..34bb2bd90adb --- /dev/null +++ b/net-analyzer/nfdump/nfdump-1.6.23-r1.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools toolchain-funcs + +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" + +REQUIRED_USE="?? ( jnat nsel )" + +RDEPEND=" + app-arch/bzip2 + sys-libs/zlib + ftconv? ( net-analyzer/flow-tools ) + nfpcapd? ( net-libs/libpcap ) + nfprofile? ( net-analyzer/rrdtool ) + nftrack? ( net-analyzer/rrdtool ) + readpcap? ( net-libs/libpcap ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + sys-devel/flex + virtual/yacc + doc? ( + app-doc/doxygen + media-gfx/graphviz + ) +" + +PATCHES=( + "${FILESDIR}"/${P}-autotools.patch + "${FILESDIR}"/${P}-m4-dir-automake.patch + "${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 + + # --without-ftconf is not handled well, bug #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) +} + +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 +} diff --git a/net-analyzer/nfdump/nfdump-1.6.23.ebuild b/net-analyzer/nfdump/nfdump-1.6.23.ebuild index 9c9c2bd847b6..dca53c21054e 100644 --- a/net-analyzer/nfdump/nfdump-1.6.23.ebuild +++ b/net-analyzer/nfdump/nfdump-1.6.23.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -38,6 +38,7 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-1.6.19-compiler.patch "${FILESDIR}"/${PN}-1.6.19-libft.patch + "${FILESDIR}"/${PN}-1.6.23-m4-dir.patch ) DOCS=( AUTHORS ChangeLog README.md ) |