mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-14 16:37:01 +02:00
net-misc/iperf: Sync with Gentoo
It's from Gentoo commit 4e66d4612d3d27b8afa4fc9480e0560901692a68.
This commit is contained in:
parent
5375e022e5
commit
fe12b11b1c
@ -1,4 +1,2 @@
|
||||
DIST iperf-2.0.13.tar.gz 326148 BLAKE2B 2a40aea9e2d7fdc935b91be5e4e586bf68dd27604375d2570570145e5db1ea5837469a4989f47586986932bef33cba05ed19ed3a9ce40c0a5531581c6d3ba982 SHA512 40fcfb8f4d27887f53a743ac07396511fb2a7ac59f4b300fe36896bd0241e191945fa253705990711772ee776d5e4227ed62760fc92abebdfebcedd11c27c0ea
|
||||
DIST iperf-3.15.tar.gz 649330 BLAKE2B f086d506d1de8e8b333a7ad46a94279aa5b42800ded7cc6724c3400e479a6523b336c74b5956d07117a178b5f89934553535824a05daafcdb2eb8d31754680e1 SHA512 988bc558f40a16c3d94df3956705712829c1c529efd577db16213783846c84bc3edbad19a4d7890b7aba08fbc4e1c6807105df29931e9b45981066b609d87aa2
|
||||
DIST iperf-3.16.tar.gz 664751 BLAKE2B 4ca930b58c54d5ae5b0c8b14aca2556224ff2c7b943d32e65486dc2a7e1abd2d26b229e9f759358c326be8754e88a203e11a3ab0f029daa982375a880c3f1cbd SHA512 9ba97e03f17f3b939343b07ed3d508fbf57489e2b984b77a3dc3ada535f981350e56495154bdd108a83b3c507ccbed599b2b7b25de0d1778912d2c01b4ad4e7c
|
||||
DIST iperf-3.17.1.tar.gz 670547 BLAKE2B 90afa47ba2de2f789b118ea42d7eabe3a7ec202116d51915b05350932231788a95ae142bdf2cff041f5504e67ae5ac1da2c66f408bc302c4e230ef4b7e496e15 SHA512 99c731e2e060d2b241d3137742bf92a975f2b7a94c6c723c9c1625f69c294fd7fe15b7dbf085a6120038fc1dd7628c83d2c7d16b059849fdbecbc88e48fb0974
|
||||
|
@ -1,109 +0,0 @@
|
||||
From 85b225cdd00b9a483a603b8b124a829ffbf92b88 Mon Sep 17 00:00:00 2001
|
||||
From: Sam James <sam@gentoo.org>
|
||||
Date: Sun, 2 Oct 2022 03:07:40 +0100
|
||||
Subject: [PATCH] Unbundle cJSON
|
||||
|
||||
Signed-off-by: Sam James <sam@gentoo.org>
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -62,6 +62,8 @@ AC_ARG_ENABLE([profiling],
|
||||
AS_HELP_STRING([--enable-profiling], [Enable iperf3 profiling binary]))
|
||||
AM_CONDITIONAL([ENABLE_PROFILING], [test x$enable_profiling = xyes])
|
||||
|
||||
+PKG_CHECK_MODULES([libcjson], [libcjson >= 1.7.15])
|
||||
+
|
||||
# Check for the math library (needed by cjson on some platforms)
|
||||
AC_SEARCH_LIBS(floor, [m], [], [
|
||||
echo "floor()"
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -10,8 +10,6 @@ include_HEADERS = iperf_api.h # Define
|
||||
|
||||
# Specify the source files and flags for the iperf library
|
||||
libiperf_la_SOURCES = \
|
||||
- cjson.c \
|
||||
- cjson.h \
|
||||
flowlabel.h \
|
||||
iperf.h \
|
||||
iperf_api.c \
|
||||
@@ -44,10 +42,13 @@ libiperf_la_SOURCES = \
|
||||
units.c \
|
||||
units.h \
|
||||
version.h
|
||||
+libiperf_la_CPPFLAGS = $(CPPFLAGS) @libcjson_CFLAGS@
|
||||
+libiperf_la_LIBADD = @libcjson_LIBS@
|
||||
|
||||
# Specify the sources and various flags for the iperf binary
|
||||
iperf3_SOURCES = main.c
|
||||
-iperf3_LDADD = libiperf.la
|
||||
+iperf3_CPPFLAGS = $(CPPFLAGS) @libcjson_CFLAGS@
|
||||
+iperf3_LDADD = libiperf.la @libcjson_LIBS@
|
||||
|
||||
if ENABLE_PROFILING
|
||||
# If the iperf-profiled-binary is enabled
|
||||
--- a/src/iperf.h
|
||||
+++ b/src/iperf.h
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
#include "timer.h"
|
||||
#include "queue.h"
|
||||
-#include "cjson.h"
|
||||
+#include <cjson/cJSON.h>
|
||||
#include "iperf_time.h"
|
||||
|
||||
#if defined(HAVE_SSL)
|
||||
--- a/src/iperf_api.c
|
||||
+++ b/src/iperf_api.c
|
||||
@@ -81,7 +81,7 @@
|
||||
#endif /* HAVE_SCTP_H */
|
||||
#include "timer.h"
|
||||
|
||||
-#include "cjson.h"
|
||||
+#include <cjson/cJSON.h>
|
||||
#include "units.h"
|
||||
#include "iperf_util.h"
|
||||
#include "iperf_locale.h"
|
||||
--- a/src/iperf_tcp.c
|
||||
+++ b/src/iperf_tcp.c
|
||||
@@ -42,7 +42,7 @@
|
||||
#include "iperf_api.h"
|
||||
#include "iperf_tcp.h"
|
||||
#include "net.h"
|
||||
-#include "cjson.h"
|
||||
+#include <cjson/cJSON.h>
|
||||
|
||||
#if defined(HAVE_FLOWLABEL)
|
||||
#include "flowlabel.h"
|
||||
--- a/src/iperf_udp.c
|
||||
+++ b/src/iperf_udp.c
|
||||
@@ -46,7 +46,7 @@
|
||||
#include "iperf_udp.h"
|
||||
#include "timer.h"
|
||||
#include "net.h"
|
||||
-#include "cjson.h"
|
||||
+#include <cjson/cJSON.h>
|
||||
#include "portable_endian.h"
|
||||
|
||||
#if defined(HAVE_INTTYPES_H)
|
||||
--- a/src/iperf_util.c
|
||||
+++ b/src/iperf_util.c
|
||||
@@ -46,7 +46,7 @@
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
-#include "cjson.h"
|
||||
+#include <cjson/cJSON.h>
|
||||
#include "iperf.h"
|
||||
#include "iperf_api.h"
|
||||
|
||||
--- a/src/iperf_util.h
|
||||
+++ b/src/iperf_util.h
|
||||
@@ -28,7 +28,7 @@
|
||||
#define __IPERF_UTIL_H
|
||||
|
||||
#include "iperf_config.h"
|
||||
-#include "cjson.h"
|
||||
+#include <cjson/cJSON.h>
|
||||
#include <sys/select.h>
|
||||
#include <stddef.h>
|
||||
|
58
sdk_container/src/third_party/portage-stable/net-misc/iperf/files/iperf-3.17.1-c23.patch
vendored
Normal file
58
sdk_container/src/third_party/portage-stable/net-misc/iperf/files/iperf-3.17.1-c23.patch
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
https://bugs.gentoo.org/944381
|
||||
https://github.com/esnet/iperf/pull/1805
|
||||
|
||||
From beadb59b90e8d3339d31f9f15525108072fde135 Mon Sep 17 00:00:00 2001
|
||||
From: Rudi Heitbaum <rudi@heitbaum.com>
|
||||
Date: Mon, 9 Dec 2024 10:13:02 +0000
|
||||
Subject: [PATCH] fix build with gcc-15
|
||||
|
||||
--- a/src/iperf_api.c
|
||||
+++ b/src/iperf_api.c
|
||||
@@ -603,25 +603,25 @@ iperf_set_mapped_v4(struct iperf_test *ipt, const int val)
|
||||
}
|
||||
|
||||
void
|
||||
-iperf_set_on_new_stream_callback(struct iperf_test* ipt, void (*callback)())
|
||||
+iperf_set_on_new_stream_callback(struct iperf_test* ipt, void (*callback)(struct iperf_stream *))
|
||||
{
|
||||
ipt->on_new_stream = callback;
|
||||
}
|
||||
|
||||
void
|
||||
-iperf_set_on_test_start_callback(struct iperf_test* ipt, void (*callback)())
|
||||
+iperf_set_on_test_start_callback(struct iperf_test* ipt, void (*callback)(struct iperf_test *))
|
||||
{
|
||||
ipt->on_test_start = callback;
|
||||
}
|
||||
|
||||
void
|
||||
-iperf_set_on_test_connect_callback(struct iperf_test* ipt, void (*callback)())
|
||||
+iperf_set_on_test_connect_callback(struct iperf_test* ipt, void (*callback)(struct iperf_test *))
|
||||
{
|
||||
ipt->on_connect = callback;
|
||||
}
|
||||
|
||||
void
|
||||
-iperf_set_on_test_finish_callback(struct iperf_test* ipt, void (*callback)())
|
||||
+iperf_set_on_test_finish_callback(struct iperf_test* ipt, void (*callback)(struct iperf_test *))
|
||||
{
|
||||
ipt->on_test_finish = callback;
|
||||
}
|
||||
--- a/src/iperf_api.h
|
||||
+++ b/src/iperf_api.h
|
||||
@@ -213,10 +213,10 @@ void iperf_set_dont_fragment( struct iperf_test* ipt, int dont_fragment );
|
||||
void iperf_set_test_congestion_control(struct iperf_test* ipt, char* cc);
|
||||
void iperf_set_test_mss(struct iperf_test* ipt, int mss);
|
||||
void iperf_set_mapped_v4(struct iperf_test* ipt, const int val);
|
||||
-void iperf_set_on_new_stream_callback(struct iperf_test* ipt, void (*callback)());
|
||||
-void iperf_set_on_test_start_callback(struct iperf_test* ipt, void (*callback)());
|
||||
-void iperf_set_on_test_connect_callback(struct iperf_test* ipt, void (*callback)());
|
||||
-void iperf_set_on_test_finish_callback(struct iperf_test* ipt, void (*callback)());
|
||||
+void iperf_set_on_new_stream_callback(struct iperf_test* ipt, void (*callback)(struct iperf_stream *));
|
||||
+void iperf_set_on_test_start_callback(struct iperf_test* ipt, void (*callback)(struct iperf_test *));
|
||||
+void iperf_set_on_test_connect_callback(struct iperf_test* ipt, void (*callback)(struct iperf_test *));
|
||||
+void iperf_set_on_test_finish_callback(struct iperf_test* ipt, void (*callback)(struct iperf_test *));
|
||||
|
||||
#if defined(HAVE_SSL)
|
||||
void iperf_set_test_client_username(struct iperf_test *ipt, const char *client_username);
|
||||
|
@ -1,54 +0,0 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit autotools systemd
|
||||
|
||||
DESCRIPTION="A TCP, UDP, and SCTP network bandwidth measurement tool"
|
||||
HOMEPAGE="https://github.com/esnet/iperf"
|
||||
SRC_URI="https://github.com/esnet/iperf/releases/download/${PV}/${P}.tar.gz"
|
||||
S="${WORKDIR}"/${P/_/}
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="3"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
|
||||
IUSE="sctp"
|
||||
|
||||
DEPEND="
|
||||
>=dev-libs/cJSON-1.7.15
|
||||
dev-libs/openssl:=
|
||||
sctp? ( net-misc/lksctp-tools )
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
DOCS=( README.md RELNOTES.md )
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-3.10.1-drop-forced-debugging-symbols.patch
|
||||
"${FILESDIR}"/${PN}-3.12-Unbundle-cJSON.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Drop bundled cjson
|
||||
rm src/cjson.{c,h} || die
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf $(use_with sctp)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
newconfd "${FILESDIR}"/iperf.confd iperf3
|
||||
newinitd "${FILESDIR}"/iperf3.initd iperf3
|
||||
systemd_dounit contrib/iperf3.service
|
||||
|
||||
find "${ED}" -name '*.la' -delete || die
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit autotools systemd
|
||||
|
||||
DESCRIPTION="A TCP, UDP, and SCTP network bandwidth measurement tool"
|
||||
HOMEPAGE="https://github.com/esnet/iperf"
|
||||
SRC_URI="https://github.com/esnet/iperf/releases/download/${PV}/${P}.tar.gz"
|
||||
S="${WORKDIR}"/${P/_/}
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="3"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
|
||||
IUSE="sctp"
|
||||
|
||||
DEPEND="
|
||||
>=dev-libs/cJSON-1.7.15
|
||||
dev-libs/openssl:=
|
||||
sctp? ( net-misc/lksctp-tools )
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
DOCS=( README.md RELNOTES.md )
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-3.10.1-drop-forced-debugging-symbols.patch
|
||||
"${FILESDIR}"/${PN}-3.12-Unbundle-cJSON.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Drop bundled cjson
|
||||
rm src/cjson.{c,h} || die
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf $(use_with sctp)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
newconfd "${FILESDIR}"/iperf.confd iperf3
|
||||
newinitd "${FILESDIR}"/iperf3.initd iperf3
|
||||
systemd_dounit contrib/iperf3.service
|
||||
|
||||
find "${ED}" -name '*.la' -delete || die
|
||||
}
|
@ -11,7 +11,7 @@ SRC_URI="https://github.com/esnet/iperf/releases/download/${PV}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="3"
|
||||
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
|
||||
IUSE="sctp"
|
||||
|
||||
DEPEND="
|
||||
@ -27,6 +27,7 @@ DOCS=( README.md RELNOTES.md )
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-3.10.1-drop-forced-debugging-symbols.patch
|
||||
"${FILESDIR}"/${PN}-3.17.1-Unbundle-cJSON.patch
|
||||
"${FILESDIR}"/${PN}-3.17.1-c23.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
|
Loading…
Reference in New Issue
Block a user