diff --git a/.github/workflows/portage-stable-packages-list b/.github/workflows/portage-stable-packages-list index d4c0635dda..8f1f8a281e 100644 --- a/.github/workflows/portage-stable-packages-list +++ b/.github/workflows/portage-stable-packages-list @@ -403,6 +403,7 @@ licenses media-libs/libpng +net-analyzer/netperf net-analyzer/nmap net-analyzer/traceroute diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.accept_keywords b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.accept_keywords index dd272378ff..a27fec2248 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.accept_keywords +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.accept_keywords @@ -65,6 +65,9 @@ =dev-python/lxml-5.2.1 ~arm64 =dev-util/pahole-1.26 ~arm64 +# Needed for the MIT License +=net-analyzer/netperf-2.7.0_p20210121 ~amd64 ~arm64 + # Needed for addressing CVE-2024-25629 =net-dns/c-ares-1.27.0 ~amd64 ~arm64 diff --git a/sdk_container/src/third_party/portage-stable/net-analyzer/netperf/Manifest b/sdk_container/src/third_party/portage-stable/net-analyzer/netperf/Manifest index f378f80376..96ec2d5772 100644 --- a/sdk_container/src/third_party/portage-stable/net-analyzer/netperf/Manifest +++ b/sdk_container/src/third_party/portage-stable/net-analyzer/netperf/Manifest @@ -1 +1,2 @@ DIST netperf-2.7.0.tar.bz2 1024430 BLAKE2B 1263a2b3cee0790e4526245e522d29f8692a5a3e9d3b41468d1010bbee4d606a06904d9e0c4ac0af457bde562a476434be4c62a41e3c0dbf0e5c3aeb2ae5652a SHA512 5fb37945bead831247de9c8ba86b33f134ba39e753b483df72de97f536d0846538dadf61acc2dee57f04ab5d16a92afab4890e79a5d7ffa863afd526267fffad +DIST netperf-2.7.0_p20210121.tar.gz 1914186 BLAKE2B 14d3a769a049443d8bf62b58c93c2b9563a16b69bb151d35926aa8831167b8a31bdd7d820c80a0c0511a78e519742005bdfa2079d403a514e2ec17f41a1b8e7c SHA512 8d9908fe2cd778eae719265b67938ab44e18de960c845f976e80d6b419c08b11ae47d8b4b906c6ccaf280f9f66bcdcb0be2ab379b0dca8d62d86671d57057e20 diff --git a/sdk_container/src/third_party/portage-stable/net-analyzer/netperf/files/netperf-2.7.0-fcommon.patch b/sdk_container/src/third_party/portage-stable/net-analyzer/netperf/files/netperf-2.7.0-fcommon.patch new file mode 100644 index 0000000000..0682c76cd8 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-analyzer/netperf/files/netperf-2.7.0-fcommon.patch @@ -0,0 +1,30 @@ +https://github.com/HewlettPackard/netperf/pull/46 +https://bugs.gentoo.org/706694 + +From c6a2e17fe35f0e68823451fedfdf5b1dbecddbe3 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 12 Aug 2020 09:57:23 -0700 +Subject: [PATCH] nettest_omni: Remove duplicate variable definitions + +These defines are already defined in nettest_bsd.c and exported by +nettest_bsd.h this should fix build with -fno-common + +Signed-off-by: Khem Raj +--- a/src/nettest_omni.c ++++ b/src/nettest_omni.c +@@ -458,14 +458,6 @@ static int client_port_max = 65535; + + /* different options for the sockets */ + +-int +- loc_nodelay, /* don't/do use NODELAY locally */ +- rem_nodelay, /* don't/do use NODELAY remotely */ +- loc_sndavoid, /* avoid send copies locally */ +- loc_rcvavoid, /* avoid recv copies locally */ +- rem_sndavoid, /* avoid send copies remotely */ +- rem_rcvavoid; /* avoid recv_copies remotely */ +- + extern int + loc_tcpcork, + rem_tcpcork, + diff --git a/sdk_container/src/third_party/portage-stable/net-analyzer/netperf/files/netperf-log-dir.patch b/sdk_container/src/third_party/portage-stable/net-analyzer/netperf/files/netperf-log-dir.patch new file mode 100644 index 0000000000..f1d11e7163 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-analyzer/netperf/files/netperf-log-dir.patch @@ -0,0 +1,12 @@ +diff -Naur a/src/netserver.c b/src/netserver.c +--- a/src/netserver.c 2021-01-21 16:02:24.000000000 +0000 ++++ b/src/netserver.c 2024-05-31 12:48:38.770331476 +0100 +@@ -153,7 +153,7 @@ + #define FILE_SEP "/" + #else + /* comply with FHS: http://www.pathname.com/fhs/pub/fhs-2.3.html */ +-#define DEBUG_LOG_FILE_DIR "/var/log/" ++#define DEBUG_LOG_FILE_DIR "/var/log/netperf/" + #define NETPERF_NULL "/dev/null" + #define FILE_SEP "/" + #endif diff --git a/sdk_container/src/third_party/portage-stable/net-analyzer/netperf/metadata.xml b/sdk_container/src/third_party/portage-stable/net-analyzer/netperf/metadata.xml index 3e35e2cbd3..38f0fed983 100644 --- a/sdk_container/src/third_party/portage-stable/net-analyzer/netperf/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/net-analyzer/netperf/metadata.xml @@ -1,25 +1,26 @@ - -netmon@gentoo.org -Gentoo network monitoring and analysis project - - -Netperf is a benchmark that can be used to measure the performance of many -different types of networking. It provides tests for both unidirectional -throughput, and end-to-end latency. The environments currently measureable by -netperf include: + + netmon@gentoo.org + Gentoo network monitoring and analysis project + + + Netperf is a benchmark that can be used to measure the performance of many + different types of networking. It provides tests for both unidirectional + throughput, and end-to-end latency. The environments currently measureable by + netperf include: - - TCP and UDP via BSD Sockets for both IPv4 and IPv6 - - DLPI - - Unix Domain Sockets - - SCTP for both IPv4 and IPv6 - - -Emit interim results during the run. May affect results - - -cpe:/a:netperf:netperf - + - TCP and UDP via BSD Sockets for both IPv4 and IPv6 + - DLPI + - Unix Domain Sockets + - SCTP for both IPv4 and IPv6 + + + Emit interim results during the run. May affect results + + + cpe:/a:netperf:netperf + HewlettPackard/netperf + diff --git a/sdk_container/src/third_party/portage-stable/net-analyzer/netperf/netperf-2.7.0-r3.ebuild b/sdk_container/src/third_party/portage-stable/net-analyzer/netperf/netperf-2.7.0-r5.ebuild similarity index 85% rename from sdk_container/src/third_party/portage-stable/net-analyzer/netperf/netperf-2.7.0-r3.ebuild rename to sdk_container/src/third_party/portage-stable/net-analyzer/netperf/netperf-2.7.0-r5.ebuild index 93441fc7cb..c96a45cdd7 100644 --- a/sdk_container/src/third_party/portage-stable/net-analyzer/netperf/netperf-2.7.0-r3.ebuild +++ b/sdk_container/src/third_party/portage-stable/net-analyzer/netperf/netperf-2.7.0-r5.ebuild @@ -1,24 +1,27 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 inherit flag-o-matic DESCRIPTION="Network performance benchmark" -SRC_URI="ftp://ftp.netperf.org/${PN}/${P}.tar.bz2" -KEYWORDS="~alpha amd64 arm64 ~hppa ~ia64 ppc ppc64 sparc x86" - HOMEPAGE="http://www.netperf.org/" +SRC_URI="ftp://ftp.netperf.org/${PN}/${P}.tar.bz2" + LICENSE="netperf" SLOT="0" +KEYWORDS="~alpha amd64 arm64 ~hppa ~ia64 ppc ppc64 ~riscv sparc x86" IUSE="demo sctp" -DEPEND=" +RDEPEND=" acct-group/netperf acct-user/netperf " -RDEPEND="${DEPEND}" +BDEPEND=" + ${RDEPEND} + sys-devel/gnuconfig +" PATCHES=( "${FILESDIR}"/${PN}-fix-scripts.patch @@ -26,6 +29,7 @@ PATCHES=( "${FILESDIR}"/${PN}-2.7.0-includes.patch "${FILESDIR}"/${PN}-2.7.0-space.patch "${FILESDIR}"/${PN}-2.7.0-inline.patch + "${FILESDIR}"/${PN}-2.7.0-fcommon.patch ) src_prepare() { @@ -44,10 +48,9 @@ src_prepare() { } src_configure() { - append-cflags -fcommon - # netlib.c:2292:5: warning: implicit declaration of function ‘sched_setaffinity’ # nettest_omni.c:2943:5: warning: implicit declaration of function ‘splice’ + # TODO: drop once https://github.com/HewlettPackard/netperf/pull/73 merged append-cppflags -D_GNU_SOURCE econf \ diff --git a/sdk_container/src/third_party/portage-stable/net-analyzer/netperf/netperf-2.7.0_p20210121.ebuild b/sdk_container/src/third_party/portage-stable/net-analyzer/netperf/netperf-2.7.0_p20210121.ebuild new file mode 100644 index 0000000000..26f455ffda --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-analyzer/netperf/netperf-2.7.0_p20210121.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools flag-o-matic + +COMMIT="3bc455b23f901dae377ca0a558e1e32aa56b31c4" +DESCRIPTION="Network performance benchmark" +HOMEPAGE="https://github.com/HewlettPackard/netperf" +SRC_URI="https://github.com/HewlettPackard/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${PN}-${COMMIT}" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="demo sctp" + +RDEPEND=" + acct-group/netperf + acct-user/netperf +" +BDEPEND=" + ${RDEPEND} + sys-devel/gnuconfig +" + +PATCHES=( + "${FILESDIR}"/${PN}-fix-scripts.patch + "${FILESDIR}"/${PN}-log-dir.patch + "${FILESDIR}"/${PN}-2.7.0-includes.patch + "${FILESDIR}"/${PN}-2.7.0-fcommon.patch +) + +src_prepare() { + # Fixing paths in scripts + sed -i \ + -e "s:^\(NETHOME=\).*:\1\"${EPREFIX}/usr/bin\":" \ + doc/examples/sctp_stream_script \ + doc/examples/tcp_range_script \ + doc/examples/tcp_rr_script \ + doc/examples/tcp_stream_script \ + doc/examples/udp_rr_script \ + doc/examples/udp_stream_script \ + || die + + default + AT_M4DIR=src/missing/m4 eautoreconf +} + +src_configure() { + # netlib.c:2292:5: warning: implicit declaration of function ‘sched_setaffinity’ + # nettest_omni.c:2943:5: warning: implicit declaration of function ‘splice’ + # TODO: drop once https://github.com/HewlettPackard/netperf/pull/73 merged + append-cppflags -D_GNU_SOURCE + + econf \ + $(use_enable demo) \ + $(use_enable sctp) +} + +src_install() { + default + + # init.d / conf.d + newinitd "${FILESDIR}"/${PN}-2.7.0-init netperf + newconfd "${FILESDIR}"/${PN}-2.2-conf netperf + + keepdir /var/log/${PN} + fowners netperf:netperf /var/log/${PN} + fperms 0755 /var/log/${PN} + + # documentation and example scripts + dodoc AUTHORS ChangeLog NEWS README Release_Notes doc/${PN}.txt + docinto html + dodoc doc/${PN}.html + exeinto /usr/share/${PN}/examples + doexe doc/examples/*_script +}