public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/tcpdump/files/, net-analyzer/tcpdump/
@ 2019-08-27 19:39 Jeroen Roovers
  0 siblings, 0 replies; 5+ messages in thread
From: Jeroen Roovers @ 2019-08-27 19:39 UTC (permalink / raw
  To: gentoo-commits

commit:     f061abdd02c8cf63129bb71d677114892386e5eb
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 27 19:39:33 2019 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Tue Aug 27 19:39:55 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f061abdd

net-analyzer/tcpdump: Remove automatically added include directories

Package-Manager: Portage-2.3.73, Repoman-2.3.17
Bug: https://bugs.gentoo.org/692772
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 .../tcpdump/files/tcpdump-4.9.2-includedir.patch   | 65 ++++++++++++++++++++++
 ...tcpdump-9999.ebuild => tcpdump-4.9.2-r1.ebuild} | 27 +++++----
 net-analyzer/tcpdump/tcpdump-9999.ebuild           |  4 +-
 3 files changed, 82 insertions(+), 14 deletions(-)

diff --git a/net-analyzer/tcpdump/files/tcpdump-4.9.2-includedir.patch b/net-analyzer/tcpdump/files/tcpdump-4.9.2-includedir.patch
new file mode 100644
index 00000000000..0f74fa9a8a3
--- /dev/null
+++ b/net-analyzer/tcpdump/files/tcpdump-4.9.2-includedir.patch
@@ -0,0 +1,65 @@
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -534,40 +534,6 @@
+ 		if test $libpcap = FAIL ; then
+ 		    AC_MSG_ERROR(see the INSTALL doc for more info)
+ 		fi
+-		dnl
+-		dnl Some versions of Red Hat Linux put "pcap.h" in
+-		dnl "/usr/include/pcap"; had the LBL folks done so,
+-		dnl that would have been a good idea, but for
+-		dnl the Red Hat folks to do so just breaks source
+-		dnl compatibility with other systems.
+-		dnl
+-		dnl We work around this by assuming that, as we didn't
+-		dnl find a local libpcap, libpcap is in /usr/lib or
+-		dnl /usr/local/lib and that the corresponding header
+-		dnl file is under one of those directories; if we don't
+-		dnl find it in either of those directories, we check to
+-		dnl see if it's in a "pcap" subdirectory of them and,
+-		dnl if so, add that subdirectory to the "-I" list.
+-		dnl
+-		dnl (We now also put pcap.h in /usr/include/pcap, but we
+-		dnl leave behind a /usr/include/pcap.h that includes it,
+-		dnl so you can still just include <pcap.h>.)
+-		dnl
+-		AC_MSG_CHECKING(for extraneous pcap header directories)
+-		if test \( ! -r /usr/local/include/pcap.h \) -a \
+-			\( ! -r /usr/include/pcap.h \); then
+-		    if test -r /usr/local/include/pcap/pcap.h; then
+-			d="/usr/local/include/pcap"
+-		    elif test -r /usr/include/pcap/pcap.h; then
+-			d="/usr/include/pcap"
+-		    fi
+-		fi
+-		if test -z "$d" ; then
+-		    AC_MSG_RESULT(not found)
+-		else
+-		    $2="-I$d $$2"
+-		    AC_MSG_RESULT(found -- -I$d added)
+-		fi
+ 	    fi
+     else
+ 	    $1=$libpcap
+@@ -1351,11 +1351,4 @@
+ 			  	    -f "$1/$tmplib/libcrypto.dylib" \); then
+ 		ac_cv_ssleay_path="$1"
+ 	fi
+-
+-	#
+-	# Make sure we have the headers as well.
+-	#
+-	if test -d "$1/include/openssl" -a -f "$1/include/openssl/des.h"; then
+-		incdir="-I$1/include"
+-	fi
+ ])
+--- a/configure.in
++++ b/configure.in
+@@ -908,7 +908,6 @@
+ 		# Put the subdirectories of the libcrypto root directory
+ 		# at the front of the header and library search path.
+ 		#
+-		CFLAGS="-I$withval/include $CFLAGS"
+ 		LIBS="-L$withval/lib $LIBS"
+ 	fi
+ ],[

diff --git a/net-analyzer/tcpdump/tcpdump-9999.ebuild b/net-analyzer/tcpdump/tcpdump-4.9.2-r1.ebuild
similarity index 80%
copy from net-analyzer/tcpdump/tcpdump-9999.ebuild
copy to net-analyzer/tcpdump/tcpdump-4.9.2-r1.ebuild
index 5386a5f79ce..7e89e1714aa 100644
--- a/net-analyzer/tcpdump/tcpdump-9999.ebuild
+++ b/net-analyzer/tcpdump/tcpdump-4.9.2-r1.ebuild
@@ -1,26 +1,22 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
-inherit flag-o-matic toolchain-funcs user
+EAPI=7
+inherit autotools flag-o-matic toolchain-funcs user
 
 DESCRIPTION="A Tool for network monitoring and data acquisition"
-EGIT_REPO_URI="https://github.com/the-tcpdump-group/tcpdump"
 HOMEPAGE="
 	http://www.tcpdump.org/
-	${EGIT_REPO_URI}
+	https://github.com/the-tcpdump-group/tcpdump
+"
+SRC_URI="
+	http://www.tcpdump.org/release/${P}.tar.gz
 "
 
 LICENSE="BSD"
 SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
 IUSE="+drop-root libressl smi ssl samba suid test"
-if [[ ${PV} == "9999" ]] ; then
-	inherit git-r3
-	KEYWORDS=""
-else
-	SRC_URI="https://github.com/the-${PN}-group/${PN}/archive/${P}.tar.gz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
-fi
 
 RDEPEND="
 	drop-root? ( sys-libs/libcap-ng )
@@ -39,6 +35,9 @@ DEPEND="
 		dev-lang/perl
 	)
 "
+PATCHES=(
+	"${FILESDIR}"/${PN}-4.9.2-includedir.patch
+)
 
 pkg_setup() {
 	if use drop-root || use suid; then
@@ -50,6 +49,10 @@ pkg_setup() {
 src_prepare() {
 	default
 
+	mv aclocal.m4 acinclude.m4 || die
+
+	eautoreconf
+
 	sed -i -e '/^eapon1/d;' tests/TESTLIST || die
 
 	# bug 630394

diff --git a/net-analyzer/tcpdump/tcpdump-9999.ebuild b/net-analyzer/tcpdump/tcpdump-9999.ebuild
index 5386a5f79ce..c4fe962e812 100644
--- a/net-analyzer/tcpdump/tcpdump-9999.ebuild
+++ b/net-analyzer/tcpdump/tcpdump-9999.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 inherit flag-o-matic toolchain-funcs user
 
 DESCRIPTION="A Tool for network monitoring and data acquisition"


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/tcpdump/files/, net-analyzer/tcpdump/
@ 2020-01-09 13:39 Jeroen Roovers
  0 siblings, 0 replies; 5+ messages in thread
From: Jeroen Roovers @ 2020-01-09 13:39 UTC (permalink / raw
  To: gentoo-commits

commit:     516ec63aca5466fc1d9d1a444f51128dc17a0852
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Thu Jan  9 13:38:41 2020 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Thu Jan  9 13:39:04 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=516ec63a

net-analyzer/tcpdump: Prevent more -L/usr/lib injections

Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 net-analyzer/tcpdump/files/tcpdump-9999-libdir.patch | 19 +++++++++++++++++++
 net-analyzer/tcpdump/tcpdump-9999.ebuild             |  8 ++++++--
 2 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/net-analyzer/tcpdump/files/tcpdump-9999-libdir.patch b/net-analyzer/tcpdump/files/tcpdump-9999-libdir.patch
new file mode 100644
index 00000000000..852ea6b6c13
--- /dev/null
+++ b/net-analyzer/tcpdump/files/tcpdump-9999-libdir.patch
@@ -0,0 +1,19 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -371,7 +371,7 @@
+ 
+ if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
+ 	if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
+-		LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
++		LIBS="-l$ipv6lib $LIBS"
+ 		echo "You have $ipv6lib library, using it"
+ 	else
+ 		if test "$ipv6trylibc" = "yes"; then
+@@ -891,7 +891,6 @@
+ 		# at the front of the header and library search path.
+ 		#
+ 		CFLAGS="-I$withval/include $CFLAGS"
+-		LIBS="-L$withval/lib $LIBS"
+ 	fi
+ ],[
+ 	#

diff --git a/net-analyzer/tcpdump/tcpdump-9999.ebuild b/net-analyzer/tcpdump/tcpdump-9999.ebuild
index 52faf660b30..a4285888f60 100644
--- a/net-analyzer/tcpdump/tcpdump-9999.ebuild
+++ b/net-analyzer/tcpdump/tcpdump-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
@@ -36,10 +36,14 @@ DEPEND="
 	${RDEPEND}
 	drop-root? ( virtual/pkgconfig )
 	test? (
-		|| ( app-arch/sharutils sys-freebsd/freebsd-ubin )
+		>=net-libs/libpcap-1.9.1
 		dev-lang/perl
+		|| ( app-arch/sharutils sys-freebsd/freebsd-ubin )
 	)
 "
+PATCHES=(
+	"${FILESDIR}"/${PN}-9999-libdir.patch
+)
 
 pkg_setup() {
 	if use drop-root || use suid; then


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/tcpdump/files/, net-analyzer/tcpdump/
@ 2020-11-07  1:45 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2020-11-07  1:45 UTC (permalink / raw
  To: gentoo-commits

commit:     5ffa42e571f5f14a5a3400a8993a4b7745a852ef
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Nov  7 01:44:47 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Nov  7 01:44:47 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ffa42e5

net-analyzer/tcpdump: patch CVE-2020-8037

Note that CVE-2020-8036 is already fixed in the version
of 4.10.x packaged in Gentoo and 4.9.x is unaffected
(the relevant functionality simply did not exist).

Bug: https://bugs.gentoo.org/753146
Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/tcpdump-4.9.3-CVE-2020-8037.patch        | 63 ++++++++++++++++++++++
 net-analyzer/tcpdump/tcpdump-4.10.0_rc1-r1.ebuild  | 22 +++-----
 ....10.0_rc1-r1.ebuild => tcpdump-4.9.3-r4.ebuild} | 24 +++------
 3 files changed, 79 insertions(+), 30 deletions(-)

diff --git a/net-analyzer/tcpdump/files/tcpdump-4.9.3-CVE-2020-8037.patch b/net-analyzer/tcpdump/files/tcpdump-4.9.3-CVE-2020-8037.patch
new file mode 100644
index 00000000000..2852845eb74
--- /dev/null
+++ b/net-analyzer/tcpdump/files/tcpdump-4.9.3-CVE-2020-8037.patch
@@ -0,0 +1,63 @@
+From 32027e199368dad9508965aae8cd8de5b6ab5231 Mon Sep 17 00:00:00 2001
+From: Guy Harris <guy@alum.mit.edu>
+Date: Sat, 18 Apr 2020 14:04:59 -0700
+Subject: [PATCH] PPP: When un-escaping, don't allocate a too-large buffer.
+
+The buffer should be big enough to hold the captured data, but it
+doesn't need to be big enough to hold the entire on-the-network packet,
+if we haven't captured all of it.
+
+(backported from commit e4add0b010ed6f2180dcb05a13026242ed935334)
+---
+ print-ppp.c | 18 ++++++++++++++----
+ 1 file changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/print-ppp.c b/print-ppp.c
+index 891761728..33fb03412 100644
+--- a/print-ppp.c
++++ b/print-ppp.c
+@@ -1367,19 +1367,29 @@ print_bacp_config_options(netdissect_options *ndo,
+ 	return 0;
+ }
+ 
++/*
++ * Un-escape RFC 1662 PPP in HDLC-like framing, with octet escapes.
++ * The length argument is the on-the-wire length, not the captured
++ * length; we can only un-escape the captured part.
++ */
+ static void
+ ppp_hdlc(netdissect_options *ndo,
+          const u_char *p, int length)
+ {
++	u_int caplen = ndo->ndo_snapend - p;
+ 	u_char *b, *t, c;
+ 	const u_char *s;
+-	int i, proto;
++	u_int i;
++	int proto;
+ 	const void *se;
+ 
++	if (caplen == 0)
++		return;
++
+         if (length <= 0)
+                 return;
+ 
+-	b = (u_char *)malloc(length);
++	b = (u_char *)malloc(caplen);
+ 	if (b == NULL)
+ 		return;
+ 
+@@ -1388,10 +1398,10 @@ ppp_hdlc(netdissect_options *ndo,
+ 	 * Do this so that we dont overwrite the original packet
+ 	 * contents.
+ 	 */
+-	for (s = p, t = b, i = length; i > 0 && ND_TTEST(*s); i--) {
++	for (s = p, t = b, i = caplen; i != 0; i--) {
+ 		c = *s++;
+ 		if (c == 0x7d) {
+-			if (i <= 1 || !ND_TTEST(*s))
++			if (i <= 1)
+ 				break;
+ 			i--;
+ 			c = *s++ ^ 0x20;

diff --git a/net-analyzer/tcpdump/tcpdump-4.10.0_rc1-r1.ebuild b/net-analyzer/tcpdump/tcpdump-4.10.0_rc1-r1.ebuild
index aa6aa458165..3133cb51eca 100644
--- a/net-analyzer/tcpdump/tcpdump-4.10.0_rc1-r1.ebuild
+++ b/net-analyzer/tcpdump/tcpdump-4.10.0_rc1-r1.ebuild
@@ -5,21 +5,20 @@ EAPI=7
 inherit autotools
 
 DESCRIPTION="A Tool for network monitoring and data acquisition"
-HOMEPAGE="
-	https://www.tcpdump.org/
-	https://github.com/the-tcpdump-group/tcpdump
-"
-LICENSE="BSD"
-SRC_URI="
-	https://github.com/the-tcpdump-group/${PN}/archive/${P/_}.tar.gz
-"
+HOMEPAGE="https://www.tcpdump.org/ https://github.com/the-tcpdump-group/tcpdump"
+SRC_URI="https://github.com/the-tcpdump-group/${PN}/archive/${P/_}.tar.gz"
+S="${WORKDIR}/${PN}-${P/_}"
 
+LICENSE="BSD"
 SLOT="0"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
 IUSE="+drop-root libressl +smi +ssl +samba suid test"
 RESTRICT="!test? ( test )"
 REQUIRED_USE="test? ( samba )"
 
+BDEPEND="
+	drop-root? ( virtual/pkgconfig )
+"
 RDEPEND="
 	net-libs/libpcap
 	drop-root? (
@@ -37,9 +36,6 @@ RDEPEND="
 		acct-user/pcap
 	)
 "
-BDEPEND="
-	drop-root? ( virtual/pkgconfig )
-"
 DEPEND="
 	${RDEPEND}
 	test? (
@@ -50,11 +46,9 @@ DEPEND="
 PATCHES=(
 	"${FILESDIR}"/${PN}-9999-libdir.patch
 )
-S=${WORKDIR}/${PN}-${P/_}
 
 src_prepare() {
 	default
-
 	eautoreconf
 }
 
@@ -90,5 +84,5 @@ src_install() {
 }
 
 pkg_postinst() {
-	use suid && elog "To let normal users run tcpdump add them to the pcap group."
+	use suid && elog "To let normal users run tcpdump, add them to the pcap group."
 }

diff --git a/net-analyzer/tcpdump/tcpdump-4.10.0_rc1-r1.ebuild b/net-analyzer/tcpdump/tcpdump-4.9.3-r4.ebuild
similarity index 78%
copy from net-analyzer/tcpdump/tcpdump-4.10.0_rc1-r1.ebuild
copy to net-analyzer/tcpdump/tcpdump-4.9.3-r4.ebuild
index aa6aa458165..bfd5bf49212 100644
--- a/net-analyzer/tcpdump/tcpdump-4.10.0_rc1-r1.ebuild
+++ b/net-analyzer/tcpdump/tcpdump-4.9.3-r4.ebuild
@@ -2,23 +2,18 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
+
 inherit autotools
 
 DESCRIPTION="A Tool for network monitoring and data acquisition"
-HOMEPAGE="
-	https://www.tcpdump.org/
-	https://github.com/the-tcpdump-group/tcpdump
-"
-LICENSE="BSD"
-SRC_URI="
-	https://github.com/the-tcpdump-group/${PN}/archive/${P/_}.tar.gz
-"
+HOMEPAGE="https://www.tcpdump.org/ https://github.com/the-tcpdump-group/tcpdump"
+SRC_URI="https://www.tcpdump.org/release/${P}.tar.gz"
 
+LICENSE="BSD"
 SLOT="0"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
-IUSE="+drop-root libressl +smi +ssl +samba suid test"
+IUSE="+drop-root libressl smi ssl samba suid test"
 RESTRICT="!test? ( test )"
-REQUIRED_USE="test? ( samba )"
 
 RDEPEND="
 	net-libs/libpcap
@@ -37,9 +32,6 @@ RDEPEND="
 		acct-user/pcap
 	)
 "
-BDEPEND="
-	drop-root? ( virtual/pkgconfig )
-"
 DEPEND="
 	${RDEPEND}
 	test? (
@@ -47,14 +39,14 @@ DEPEND="
 		dev-lang/perl
 	)
 "
+
 PATCHES=(
 	"${FILESDIR}"/${PN}-9999-libdir.patch
+	"${FILESDIR}"/${PN}-4.9.3-CVE-2020-8037.patch
 )
-S=${WORKDIR}/${PN}-${P/_}
 
 src_prepare() {
 	default
-
 	eautoreconf
 }
 
@@ -90,5 +82,5 @@ src_install() {
 }
 
 pkg_postinst() {
-	use suid && elog "To let normal users run tcpdump add them to the pcap group."
+	use suid && elog "To let normal users run tcpdump, add them to the pcap group."
 }


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/tcpdump/files/, net-analyzer/tcpdump/
@ 2022-09-12 16:51 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2022-09-12 16:51 UTC (permalink / raw
  To: gentoo-commits

commit:     4ca5410ef9f7e96556900cc9e2240d856f913e7a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 12 16:36:24 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Sep 12 16:36:24 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ca5410e

net-analyzer/tcpdump: fix configure tests with Clang 15

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/tcpdump-4.99.1-clang15-configure.patch   | 57 ++++++++++++++++++++++
 ...cpdump-9999.ebuild => tcpdump-4.99.1-r1.ebuild} | 14 ++++--
 net-analyzer/tcpdump/tcpdump-9999.ebuild           |  2 +-
 3 files changed, 67 insertions(+), 6 deletions(-)

diff --git a/net-analyzer/tcpdump/files/tcpdump-4.99.1-clang15-configure.patch b/net-analyzer/tcpdump/files/tcpdump-4.99.1-clang15-configure.patch
new file mode 100644
index 000000000000..ed8a353d8c98
--- /dev/null
+++ b/net-analyzer/tcpdump/files/tcpdump-4.99.1-clang15-configure.patch
@@ -0,0 +1,57 @@
+https://github.com/the-tcpdump-group/tcpdump/pull/1007
+
+From 4fa4e8db882b6298f5504d866665441ba7594df3 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Mon, 12 Sep 2022 17:28:58 +0100
+Subject: [PATCH] configure.ac: fix configure tests broken with Clang 15
+ (implicit function declarations)
+
+Clang 15 makes implicit function declarations fatal by default which
+leads to some of tcpdump's configure tests silently failing/returning
+the wrong result.
+
+This adds the needed #includes to various tests for the functions used,
+resolving the following errors:
+```
+net-analyzer/tcpdump-4.99.1/clang15.log:47:error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
+net-analyzer/tcpdump-4.99.1/clang15.log:51:error: call to undeclared library function 'strcmp' with type 'int (const char *, const char *)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
+net-analyzer/tcpdump-4.99.1/clang15.log:55:error: call to undeclared library function 'sscanf' with type 'int (const char *restrict, const char *restrict, ...)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
+net-analyzer/tcpdump-4.99.1/clang15.log:68:error: call to undeclared library function 'memset' with type 'void *(void *, int, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
+net-analyzer/tcpdump-4.99.1/clang15.log:112:error: call to undeclared function 'ether_ntohost'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
+net-analyzer/tcpdump-4.99.1/clang15.log:115:error: call to undeclared library function 'exit' with type 'void (int) __attribute__((noreturn))'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
+```
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/configure.ac
++++ b/configure.ac
+@@ -87,8 +87,11 @@ if test "x$with_smi" != "xno" ; then
+ 			AC_TRY_RUN(
+ 				[
+ /* libsmi available check */
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
+ #include <smi.h>
+-main()
++int main()
+ {
+   int current, revision, age, n;
+   const int required = 2;
+@@ -264,6 +267,7 @@ AC_COMPILE_IFELSE(
+     [
+       AC_LANG_SOURCE(
+ 	[[
++#include <string.h>
+ /* AF_INET6 available check */
+ #include <sys/types.h>
+ #ifdef _WIN32
+@@ -473,6 +477,8 @@ AC_CHECK_FUNCS(ether_ntohost, [
+     AC_CACHE_CHECK(for buggy ether_ntohost, ac_cv_buggy_ether_ntohost, [
+ 	AC_TRY_RUN([
+ 		#include <netdb.h>
++		#include <netinet/ether.h>
++		#include <stdlib.h>
+ 		#include <sys/types.h>
+ 		#include <sys/param.h>
+ 		#include <sys/socket.h>
+

diff --git a/net-analyzer/tcpdump/tcpdump-9999.ebuild b/net-analyzer/tcpdump/tcpdump-4.99.1-r1.ebuild
similarity index 80%
copy from net-analyzer/tcpdump/tcpdump-9999.ebuild
copy to net-analyzer/tcpdump/tcpdump-4.99.1-r1.ebuild
index ac9b01e80aa8..9f6735a93cdc 100644
--- a/net-analyzer/tcpdump/tcpdump-9999.ebuild
+++ b/net-analyzer/tcpdump/tcpdump-4.99.1-r1.ebuild
@@ -1,7 +1,7 @@
 # Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 inherit autotools
 
@@ -16,10 +16,12 @@ else
 	VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/tcpdump.asc
 	inherit verify-sig
 
-	SRC_URI="https://www.tcpdump.org/release/${P}.tar.gz"
-	SRC_URI+=" verify-sig? ( https://www.tcpdump.org/release/${P}.tar.gz.sig )"
+	# Note: drop -upstream on bump, this is just because we switched to the official
+	# distfiles for verify-sig
+	SRC_URI="https://www.tcpdump.org/release/${P}.tar.gz -> ${P}-upstream.tar.gz"
+	SRC_URI+=" verify-sig? ( https://www.tcpdump.org/release/${P}.tar.gz.sig -> ${P}-upstream.tar.gz.sig )"
 
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
 fi
 
 LICENSE="BSD"
@@ -27,8 +29,9 @@ SLOT="0"
 IUSE="+drop-root +smi +ssl +samba suid test"
 REQUIRED_USE="test? ( samba )"
 
+RESTRICT="!test? ( test )"
 # Assorted failures: bug #768498
-RESTRICT="test"
+#RESTRICT="test"
 
 RDEPEND="
 	>=net-libs/libpcap-1.10.1
@@ -60,6 +63,7 @@ fi
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-9999-libdir.patch
+	"${FILESDIR}"/${PN}-4.99.1-clang15-configure.patch
 )
 
 src_prepare() {

diff --git a/net-analyzer/tcpdump/tcpdump-9999.ebuild b/net-analyzer/tcpdump/tcpdump-9999.ebuild
index ac9b01e80aa8..63bf6ed96b92 100644
--- a/net-analyzer/tcpdump/tcpdump-9999.ebuild
+++ b/net-analyzer/tcpdump/tcpdump-9999.ebuild
@@ -1,7 +1,7 @@
 # Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 inherit autotools
 


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/tcpdump/files/, net-analyzer/tcpdump/
@ 2024-09-01 10:10 Sam James
  0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2024-09-01 10:10 UTC (permalink / raw
  To: gentoo-commits

commit:     310916be3a791d088abbd8bded0053180d118b6b
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Sep  1 10:03:29 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Sep  1 10:10:18 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=310916be

net-analyzer/tcpdump: add 4.99.5

Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-analyzer/tcpdump/Manifest                      |  2 ++
 .../tcpdump/files/tcpdump-4.99.5-lfs.patch         | 22 ++++++++++++++++
 .../tcpdump/files/tcpdump-4.99.5-libdir.patch      | 29 ++++++++++++++++++++++
 .../{tcpdump-9999.ebuild => tcpdump-4.99.5.ebuild} | 23 ++++++++---------
 net-analyzer/tcpdump/tcpdump-9999.ebuild           | 24 +++++++-----------
 5 files changed, 73 insertions(+), 27 deletions(-)

diff --git a/net-analyzer/tcpdump/Manifest b/net-analyzer/tcpdump/Manifest
index a9f92479362d..d6e49e27faef 100644
--- a/net-analyzer/tcpdump/Manifest
+++ b/net-analyzer/tcpdump/Manifest
@@ -1,2 +1,4 @@
 DIST tcpdump-4.99.4.tar.gz 1903612 BLAKE2B f100e10774574ef04a770bc30d4e2d06fd0f1f16a7b2c88848be6e8290cc4838666ff378d9f78fdc418f4ffab9716a11214edc3588c292cb5ff39636cd7cfd2d SHA512 cb51e19574707d07c0de90dd4c301955897f2c9f2a69beb7162c08f59189f55625346d1602c8d66ab2b4c626ea4b0df1f08ed8734d2d7f536d0a7840c2d6d8df
 DIST tcpdump-4.99.4.tar.gz.sig 442 BLAKE2B 2ee35036d86f643b378591c0eb93d8a0f08cb2f0e3638bde25515d550b40fef1bf0eb6c876d4d6512fa795041b0703954ca884c646c4af8771b4bc4049e7609a SHA512 bec395f0f595a37121bc144bac133f3fb31c6c1007cdadf061e4437d6fe2406c0cb0d5b68b5c63e03b932c783bfb58f0af0b7e8a58bb81beb9de6a0d681620e8
+DIST tcpdump-4.99.5.tar.gz 2045086 BLAKE2B 754c25eafe84754465356042faa1369678655aa93d1b736c259ca9a6bd1e18c44784ae136dc6a3e64af9903c05c29e1379aafd7badc0e129c5a29ae908db13ff SHA512 69bc52ef7af7fd562370adf2e95cb592aad6193df9ab1708de52ac86a4c1cff72e8b256a739b435c324ee2df61051abde7d2659bc40f061d7c4fbcab1dcaa2e2
+DIST tcpdump-4.99.5.tar.gz.sig 442 BLAKE2B 8742616147e2965ea6879b471662669f1942cdb8892834ac3ebfd4a6f610bde1a091bb85dc8c0836b26d1db7036d072608d7242ee4ddfbf590a07beb584a67cc SHA512 e36d2023973335cb95e91cb13414f6c0e6386175ed88fdeb2c0afabf7c39ad43f138d13b18ff2e88b142aad5147d37ddc03c3111e9d4d22bf3697e0acc30905c

diff --git a/net-analyzer/tcpdump/files/tcpdump-4.99.5-lfs.patch b/net-analyzer/tcpdump/files/tcpdump-4.99.5-lfs.patch
new file mode 100644
index 000000000000..0be1d7a75aaf
--- /dev/null
+++ b/net-analyzer/tcpdump/files/tcpdump-4.99.5-lfs.patch
@@ -0,0 +1,22 @@
+https://github.com/the-tcpdump-group/tcpdump/pull/1068
+
+From 54278acb038f0d16ed75cdddb35fd2813a7cdcef Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Thu, 27 Jul 2023 08:31:53 +0100
+Subject: [PATCH] configure.ac: use AC_SYS_LARGEFILE
+
+This enables 64-bit off_t where it's opt-in (e.g. glibc) on 32-bit platforms.
+
+Bug: https://bugs.gentoo.org/911176
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/configure.ac
++++ b/configure.ac
+@@ -31,6 +31,8 @@ fi
+ AC_LBL_C_INIT(V_CCOPT, V_INCLS)
+ AC_LBL_C_INLINE
+ 
++AC_SYS_LARGEFILE
++
+ AC_CHECK_HEADERS(rpc/rpc.h rpc/rpcent.h net/if.h)
+ #
+ # Get the size of a void *, to know whether this is a 32-bit or 64-bit build.

diff --git a/net-analyzer/tcpdump/files/tcpdump-4.99.5-libdir.patch b/net-analyzer/tcpdump/files/tcpdump-4.99.5-libdir.patch
new file mode 100644
index 000000000000..c7448fb311c1
--- /dev/null
+++ b/net-analyzer/tcpdump/files/tcpdump-4.99.5-libdir.patch
@@ -0,0 +1,29 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -427,7 +427,7 @@ fi
+ 
+ if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
+ 	if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
+-		LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
++		LIBS="-l$ipv6lib $LIBS"
+ 		echo "You have $ipv6lib library, using it"
+ 	else
+ 		if test "$ipv6trylibc" = "yes"; then
+@@ -1168,7 +1168,7 @@ return 0;
+ 		#
+ 		AC_LBL_SAVE_CHECK_STATE
+ 		CFLAGS="$CFLAGS -I$libcrypto_root/include"
+-		LIBS="$LIBS -L$libcrypto_root/lib -lcrypto"
++		LIBS="$LIBS -lcrypto"
+ 		AC_MSG_CHECKING(whether we have a system OpenSSL/libressl that we can use)
+ 		AC_LINK_IFELSE([AC_LANG_PROGRAM(
+ 		    [[
+@@ -1182,7 +1182,7 @@ return 0;
+ 			AC_MSG_RESULT(yes)
+ 			HAVE_LIBCRYPTO=yes
+ 			LIBCRYPTO_CFLAGS="-I$libcrypto_root/include"
+-			LIBCRYPTO_LIBS="-L$libcrypto_root/lib -lcrypto"
++			LIBCRYPTO_LIBS="-lcrypto"
+ 		    ],
+ 		    AC_MSG_RESULT(no))
+ 		AC_LBL_RESTORE_CHECK_STATE

diff --git a/net-analyzer/tcpdump/tcpdump-9999.ebuild b/net-analyzer/tcpdump/tcpdump-4.99.5.ebuild
similarity index 77%
copy from net-analyzer/tcpdump/tcpdump-9999.ebuild
copy to net-analyzer/tcpdump/tcpdump-4.99.5.ebuild
index 6d223129b9ed..00d989c63d4a 100644
--- a/net-analyzer/tcpdump/tcpdump-9999.ebuild
+++ b/net-analyzer/tcpdump/tcpdump-4.99.5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -24,13 +24,13 @@ fi
 
 LICENSE="BSD"
 SLOT="0"
-IUSE="+drop-root +smi +ssl +samba suid test"
+IUSE="+caps +smi +ssl +samba suid test"
 REQUIRED_USE="test? ( samba )"
 RESTRICT="!test? ( test )"
 
 RDEPEND="
 	>=net-libs/libpcap-1.10.1
-	drop-root? (
+	caps? (
 		acct-group/pcap
 		acct-user/pcap
 		sys-libs/libcap-ng
@@ -50,15 +50,15 @@ DEPEND="
 		dev-lang/perl
 	)
 "
-BDEPEND="drop-root? ( virtual/pkgconfig )"
+BDEPEND="caps? ( virtual/pkgconfig )"
 
 if [[ ${PV} != *9999* ]] ; then
-	BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-tcpdump )"
+	BDEPEND+=" verify-sig? ( >=sec-keys/openpgp-keys-tcpdump-20240901 )"
 fi
 
 PATCHES=(
-	"${FILESDIR}"/${PN}-9999-libdir.patch
-	"${FILESDIR}"/${PN}-9999-lfs.patch
+	"${FILESDIR}"/${PN}-4.99.5-libdir.patch
+	"${FILESDIR}"/${PN}-4.99.5-lfs.patch
 )
 
 src_prepare() {
@@ -69,19 +69,18 @@ src_prepare() {
 src_configure() {
 	econf \
 		$(use_enable samba smb) \
-		$(use_with drop-root cap-ng) \
-		$(use_with drop-root chroot '') \
+		$(use_with caps cap-ng) \
 		$(use_with smi) \
 		$(use_with ssl crypto "${ESYSROOT}/usr") \
-		$(usex drop-root "--with-user=pcap" "")
+		$(usex caps "--with-user=pcap" "")
 }
 
 src_test() {
-	if [[ ${EUID} -ne 0 ]] || ! use drop-root ; then
+	if [[ ${EUID} -ne 0 ]] || ! use caps ; then
 		emake check
 	else
 		ewarn "If you want to run the test suite, make sure you either"
-		ewarn "set FEATURES=userpriv or set USE=-drop-root"
+		ewarn "set FEATURES=userpriv or set USE=-caps"
 	fi
 }
 

diff --git a/net-analyzer/tcpdump/tcpdump-9999.ebuild b/net-analyzer/tcpdump/tcpdump-9999.ebuild
index 6d223129b9ed..fc0d793f2a15 100644
--- a/net-analyzer/tcpdump/tcpdump-9999.ebuild
+++ b/net-analyzer/tcpdump/tcpdump-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -24,13 +24,13 @@ fi
 
 LICENSE="BSD"
 SLOT="0"
-IUSE="+drop-root +smi +ssl +samba suid test"
+IUSE="+caps +smi +ssl +samba suid test"
 REQUIRED_USE="test? ( samba )"
 RESTRICT="!test? ( test )"
 
 RDEPEND="
 	>=net-libs/libpcap-1.10.1
-	drop-root? (
+	caps? (
 		acct-group/pcap
 		acct-user/pcap
 		sys-libs/libcap-ng
@@ -50,17 +50,12 @@ DEPEND="
 		dev-lang/perl
 	)
 "
-BDEPEND="drop-root? ( virtual/pkgconfig )"
+BDEPEND="caps? ( virtual/pkgconfig )"
 
 if [[ ${PV} != *9999* ]] ; then
-	BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-tcpdump )"
+	BDEPEND+=" verify-sig? ( >=sec-keys/openpgp-keys-tcpdump-20240901 )"
 fi
 
-PATCHES=(
-	"${FILESDIR}"/${PN}-9999-libdir.patch
-	"${FILESDIR}"/${PN}-9999-lfs.patch
-)
-
 src_prepare() {
 	default
 	eautoreconf
@@ -69,19 +64,18 @@ src_prepare() {
 src_configure() {
 	econf \
 		$(use_enable samba smb) \
-		$(use_with drop-root cap-ng) \
-		$(use_with drop-root chroot '') \
+		$(use_with caps cap-ng) \
 		$(use_with smi) \
 		$(use_with ssl crypto "${ESYSROOT}/usr") \
-		$(usex drop-root "--with-user=pcap" "")
+		$(usex caps "--with-user=pcap" "")
 }
 
 src_test() {
-	if [[ ${EUID} -ne 0 ]] || ! use drop-root ; then
+	if [[ ${EUID} -ne 0 ]] || ! use caps ; then
 		emake check
 	else
 		ewarn "If you want to run the test suite, make sure you either"
-		ewarn "set FEATURES=userpriv or set USE=-drop-root"
+		ewarn "set FEATURES=userpriv or set USE=-caps"
 	fi
 }
 


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-09-01 10:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-01 10:10 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/tcpdump/files/, net-analyzer/tcpdump/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2022-09-12 16:51 Sam James
2020-11-07  1:45 Sam James
2020-01-09 13:39 Jeroen Roovers
2019-08-27 19:39 Jeroen Roovers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox