mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-07 21:16:57 +02:00
Merge pull request #2027 from flatcar/ader1990/netperf_upstream_mit_license
netperf: use the MIT licensed version
This commit is contained in:
commit
7e1045bb1a
@ -403,6 +403,7 @@ licenses
|
||||
|
||||
media-libs/libpng
|
||||
|
||||
net-analyzer/netperf
|
||||
net-analyzer/nmap
|
||||
net-analyzer/traceroute
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 <raj.khem@gmail.com>
|
||||
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 <raj.khem@gmail.com>
|
||||
--- 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
sdk_container/src/third_party/portage-stable/net-analyzer/netperf/files/netperf-log-dir.patch
vendored
Normal file
12
sdk_container/src/third_party/portage-stable/net-analyzer/netperf/files/netperf-log-dir.patch
vendored
Normal file
@ -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
|
@ -21,5 +21,6 @@ netperf include:
|
||||
</use>
|
||||
<upstream>
|
||||
<remote-id type="cpe">cpe:/a:netperf:netperf</remote-id>
|
||||
<remote-id type="github">HewlettPackard/netperf</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
|
@ -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 \
|
79
sdk_container/src/third_party/portage-stable/net-analyzer/netperf/netperf-2.7.0_p20210121.ebuild
vendored
Normal file
79
sdk_container/src/third_party/portage-stable/net-analyzer/netperf/netperf-2.7.0_p20210121.ebuild
vendored
Normal file
@ -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
|
||||
}
|
Loading…
Reference in New Issue
Block a user