From 81b8f20732954c4508baf2f77472b5435e3f851f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 14 Sep 2022 11:10:11 +0100 Subject: gentoo auto-resync : 14:09:2022 - 11:10:10 --- net-analyzer/tcpdump/Manifest | 4 +- .../files/tcpdump-4.99.1-clang15-configure.patch | 57 +++++++++++ net-analyzer/tcpdump/tcpdump-4.99.1-r1.ebuild | 107 +++++++++++++++++++++ net-analyzer/tcpdump/tcpdump-9999.ebuild | 2 +- 4 files changed, 168 insertions(+), 2 deletions(-) create mode 100644 net-analyzer/tcpdump/files/tcpdump-4.99.1-clang15-configure.patch create mode 100644 net-analyzer/tcpdump/tcpdump-4.99.1-r1.ebuild (limited to 'net-analyzer/tcpdump') diff --git a/net-analyzer/tcpdump/Manifest b/net-analyzer/tcpdump/Manifest index 3e03a2ea2909..2dc25ceceb9d 100644 --- a/net-analyzer/tcpdump/Manifest +++ b/net-analyzer/tcpdump/Manifest @@ -1,6 +1,8 @@ +AUX tcpdump-4.99.1-clang15-configure.patch 2723 BLAKE2B 29f5b08e7c11fbc7427ac8b22856544665b1f8d5ef9d7e228d4b2077ed76bcb81d5dc3f4e75b8c6d31dbe3f2408036adec0a014967e6773f2495966cb0428ce9 SHA512 19542ac98cb3f955ac2c7c42eca887bbc3011c474bef5659ade18d7aa8886bd3fd3db805760de676f210bf3347530962bdfb7c24b3bdd79a4aeff78c4bea8675 AUX tcpdump-9999-libdir.patch 505 BLAKE2B 903bbbd4d860053168c92a3bf2ef76bf8ab32a45da05d0b47894368d39d2c8432f68ff47740d30c34868a60e6e300e08a1a1b5b8e17bb9519c945e39f81014a6 SHA512 eb12b115c8c6f0a2b7bb84712fe3dda5ddde3e6acb56d00000e97abc007b26a1411ddf6be793205bf7c76ccecc3915c417124870326745e3896ae6963bb42341 DIST tcpdump-4.99.1-upstream.tar.gz 2014324 BLAKE2B 0a10fe68afdfe80d3e7e661352fcaf1c47702df27fbed959f52fb0ec81543a1d4ce6b0de16a8b081de48dd43e09a13f5e1f0fb11d7590f92cbff29dc511bea12 SHA512 53d31355e1a6ef5a65bb3bf72454169fc80adf973a327a5768840e6ccf0550fbeb3c8a41f959635076d871df0619680321910a3a97879607f481cdaa8b7ceda7 DIST tcpdump-4.99.1-upstream.tar.gz.sig 442 BLAKE2B 9a80b1796ef777bd06d0b8953fe1ff446431d0ff1dffcd58e29a0b771f6734f70f3f0da7c36a1eaa1b6e57719d79c601872a84b7734208a7e8951cad9aca86ee SHA512 b438643701efbbb5579d9d51ed48756a47dd644e0acb10b0edff6d04f3ae4cea6528b40820a656407b73f983b2a634e0165a6c8c0fca3b557394a14e2f2384ab +EBUILD tcpdump-4.99.1-r1.ebuild 2388 BLAKE2B 6b37884fdd8c186b93233a342e4c223a8cdcb1440477be63cd69b64b08e742a6c5b983cbc09cd0cd0a46575df6f892ba27f701838202667c2cf76a8f2d7b949d SHA512 fb3fe226c2766ec3d8d4413e605c37686648e34d3b3ffb7e20f441c535d98a0aa8809d0df6ecaa6322c6564260f106ce3cd4309012e0bf54293457e153a064d6 EBUILD tcpdump-4.99.1.ebuild 2329 BLAKE2B 4dc8d991e0d6b479565d8fe7d59f9f6cf519b65a22226cf0ec25447f640ac9237b4db65cf92cb2f0462c9c6eb17d7c441b0c7649a782100ba5a983cfaf2fe182 SHA512 d4122ee6542f6555f85a6609b8ec787b3e3362c8037e234691d1039a19204f555b2e08a43e2c4f316245812d8296762dd8d8e9207e38c573cbbfc77192a2be80 -EBUILD tcpdump-9999.ebuild 2133 BLAKE2B ea2847f868a097d49e941ee3146376694b4800f7ec08081c7e3d527caa7fb9cab0ce0a498dfa56a2e930bbf280bafdefad4d9b27303f6bf5b4dbaf411ddbab63 SHA512 859f01e2a1301ea04efd0cd97fa1d9f3c2af724774c8e53f79ea6a6c2187b1d9392b0782174b0d41d59c4dac11ea909074552dc07c682cb82805e2c024df0463 +EBUILD tcpdump-9999.ebuild 2133 BLAKE2B 2a41983b9ed30850a6dfcc5a91da5faaefaf0afbd88d4a98f6d3555c30fb6cbabc28c060c7f4405bdece1617fae374a1b38c945cb6565682da5718914ea6ac81 SHA512 f20fe488b097c450be2623d3fede6aabd49f1a463753c03a61cbf361f9aa4e07ae4430ae863927ca56dc6a74204874f131584fcc0b25702a6125e2ca53d00402 MISC metadata.xml 701 BLAKE2B 0e637bc6e801996414b02cc17023641e07a7b81c4b50b6535fd4668f3fc7e3750f3cfa2e138e5c3c5d1fce8b2b89543f99cbee499c0ecf0960862e5a6f5c86bd SHA512 f891a980cb348222d83103a746354374beef485d9072cfe61eb1a6285dd5b282200490ffe8c7b953ef30958316e12a24dfe86b0c11bf7b7519c61f68d0f27737 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 +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 +--- a/configure.ac ++++ b/configure.ac +@@ -87,8 +87,11 @@ if test "x$with_smi" != "xno" ; then + AC_TRY_RUN( + [ + /* libsmi available check */ ++#include ++#include ++#include + #include +-main() ++int main() + { + int current, revision, age, n; + const int required = 2; +@@ -264,6 +267,7 @@ AC_COMPILE_IFELSE( + [ + AC_LANG_SOURCE( + [[ ++#include + /* AF_INET6 available check */ + #include + #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 ++ #include ++ #include + #include + #include + #include + diff --git a/net-analyzer/tcpdump/tcpdump-4.99.1-r1.ebuild b/net-analyzer/tcpdump/tcpdump-4.99.1-r1.ebuild new file mode 100644 index 000000000000..9f6735a93cdc --- /dev/null +++ b/net-analyzer/tcpdump/tcpdump-4.99.1-r1.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools + +DESCRIPTION="A tool for network monitoring and data acquisition" +HOMEPAGE="https://www.tcpdump.org/ https://github.com/the-tcpdump-group/tcpdump" + +if [[ ${PV} == *9999* ]] ; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/the-tcpdump-group/tcpdump" +else + VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/tcpdump.asc + inherit verify-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 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" +fi + +LICENSE="BSD" +SLOT="0" +IUSE="+drop-root +smi +ssl +samba suid test" +REQUIRED_USE="test? ( samba )" + +RESTRICT="!test? ( test )" +# Assorted failures: bug #768498 +#RESTRICT="test" + +RDEPEND=" + >=net-libs/libpcap-1.10.1 + drop-root? ( + acct-group/pcap + acct-user/pcap + sys-libs/libcap-ng + ) + smi? ( net-libs/libsmi ) + ssl? ( + >=dev-libs/openssl-0.9.6m:0= + ) + suid? ( + acct-group/pcap + acct-user/pcap + ) +" +DEPEND=" + ${RDEPEND} + test? ( + dev-lang/perl + ) +" +BDEPEND="drop-root? ( virtual/pkgconfig )" + +if [[ ${PV} != *9999* ]] ; then + BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-tcpdump )" +fi + +PATCHES=( + "${FILESDIR}"/${PN}-9999-libdir.patch + "${FILESDIR}"/${PN}-4.99.1-clang15-configure.patch +) + +src_prepare() { + default + eautoreconf +} + +src_configure() { + econf \ + $(use_enable samba smb) \ + $(use_with drop-root cap-ng) \ + $(use_with drop-root chroot '') \ + $(use_with smi) \ + $(use_with ssl crypto "${ESYSROOT}/usr") \ + $(usex drop-root "--with-user=pcap" "") +} + +src_test() { + if [[ ${EUID} -ne 0 ]] || ! use drop-root ; 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" + fi +} + +src_install() { + dosbin tcpdump + doman tcpdump.1 + dodoc *.awk + dodoc CHANGES CREDITS README.md + + if use suid ; then + fowners root:pcap /usr/sbin/tcpdump + fperms 4110 /usr/sbin/tcpdump + fi +} + +pkg_postinst() { + use suid && elog "To let normal users run tcpdump, add them to the pcap group." +} 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 -- cgit v1.2.3