From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BF7AA15808B for ; Thu, 24 Mar 2022 23:03:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 11000E086C; Thu, 24 Mar 2022 23:03:21 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D0D1CE086C for ; Thu, 24 Mar 2022 23:03:20 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 995E5343152 for ; Thu, 24 Mar 2022 23:03:19 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3599C335 for ; Thu, 24 Mar 2022 23:03:18 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1648162951.295836b2ebe44f18f8c06fcb56e1e22e96da1a55.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/nfdump/, net-analyzer/nfdump/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-analyzer/nfdump/files/nfdump-1.6.23-autotools.patch net-analyzer/nfdump/files/nfdump-1.6.23-m4-dir-automake.patch net-analyzer/nfdump/nfdump-1.6.23-r1.ebuild X-VCS-Directories: net-analyzer/nfdump/ net-analyzer/nfdump/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 295836b2ebe44f18f8c06fcb56e1e22e96da1a55 X-VCS-Branch: master Date: Thu, 24 Mar 2022 23:03:18 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 23fbd6e4-6cf4-45a8-a2ad-709d4a6d7b25 X-Archives-Hash: 77069f386ebd344a5fb8bae7a96d6ce4 commit: 295836b2ebe44f18f8c06fcb56e1e22e96da1a55 Author: Sam James gentoo org> AuthorDate: Thu Mar 24 23:00:22 2022 +0000 Commit: Sam James gentoo org> CommitDate: Thu Mar 24 23:02:31 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=295836b2 net-analyzer/nfdump: add additional autoconf 2.69+ patches Let's do a new revision for the more comprehensive upstream autoconf 2.69+ patches (and throwing in the upstream-sent variant of the automake patch given the previous version added to 1.6.23 was partly done upstream already). Could affect installed files and such too of course with major build system changes. Closes: https://bugs.gentoo.org/832420 Signed-off-by: Sam James gentoo.org> .../nfdump/files/nfdump-1.6.23-autotools.patch | 216 +++++++++++++++++++++ .../files/nfdump-1.6.23-m4-dir-automake.patch | 23 +++ net-analyzer/nfdump/nfdump-1.6.23-r1.ebuild | 84 ++++++++ 3 files changed, 323 insertions(+) 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 +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 +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 + #include + #include ; +- ], +- [ ++ ]], [[ + 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 + #include + +@@ -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 +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 +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 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,3 +1,4 @@ ++ACLOCAL_AMFLAGS = -I m4 + + SUBDIRS = . bin man doc + + 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..198f7e8eb909 --- /dev/null +++ b/net-analyzer/nfdump/nfdump-1.6.23-r1.ebuild @@ -0,0 +1,84 @@ +# 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) \ + --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 +}