-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2027 from flatcar/ader1990/netperf_upstream_mit_l…
…icense netperf: use the MIT licensed version
- Loading branch information
Showing
8 changed files
with
158 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -403,6 +403,7 @@ licenses | |
|
||
media-libs/libpng | ||
|
||
net-analyzer/netperf | ||
net-analyzer/nmap | ||
net-analyzer/traceroute | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
sdk_container/src/third_party/portage-stable/net-analyzer/netperf/Manifest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
30 changes: 30 additions & 0 deletions
30
...ner/src/third_party/portage-stable/net-analyzer/netperf/files/netperf-2.7.0-fcommon.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]> | ||
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 <[email protected]> | ||
--- 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, | ||
|
12 changes: 12 additions & 0 deletions
12
...container/src/third_party/portage-stable/net-analyzer/netperf/files/netperf-log-dir.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
41 changes: 21 additions & 20 deletions
41
sdk_container/src/third_party/portage-stable/net-analyzer/netperf/metadata.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<maintainer type="project"> | ||
<email>[email protected]</email> | ||
<name>Gentoo network monitoring and analysis project</name> | ||
</maintainer> | ||
<longdescription lang="en"> | ||
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: | ||
<maintainer type="project"> | ||
<email>[email protected]</email> | ||
<name>Gentoo network monitoring and analysis project</name> | ||
</maintainer> | ||
<longdescription lang="en"> | ||
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 | ||
</longdescription> | ||
<use> | ||
<flag name="demo">Emit interim results during the run. May affect results</flag> | ||
</use> | ||
<upstream> | ||
<remote-id type="cpe">cpe:/a:netperf:netperf</remote-id> | ||
</upstream> | ||
- TCP and UDP via BSD Sockets for both IPv4 and IPv6 | ||
- DLPI | ||
- Unix Domain Sockets | ||
- SCTP for both IPv4 and IPv6 | ||
</longdescription> | ||
<use> | ||
<flag name="demo">Emit interim results during the run. May affect results</flag> | ||
</use> | ||
<upstream> | ||
<remote-id type="cpe">cpe:/a:netperf:netperf</remote-id> | ||
<remote-id type="github">HewlettPackard/netperf</remote-id> | ||
</upstream> | ||
</pkgmetadata> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
...tainer/src/third_party/portage-stable/net-analyzer/netperf/netperf-2.7.0_p20210121.ebuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |