From 422860e8f2834c4f57a153c2b4bf808d2b40eaaa Mon Sep 17 00:00:00 2001 From: davidkaroly <92124087+davidkaroly@users.noreply.github.com> Date: Wed, 26 Apr 2023 21:10:11 +0200 Subject: [PATCH] iperf3: update to 3.13 (#8532) --- ...{iperf3-3.12.recipe => iperf3-3.13.recipe} | 7 +++- ...cc2.patchset => iperf3-3.13.gcc2.patchset} | 36 ++++++++----------- ...rf3-3.12.patchset => iperf3-3.13.patchset} | 12 +++---- 3 files changed, 26 insertions(+), 29 deletions(-) rename net-analyzer/iperf/{iperf3-3.12.recipe => iperf3-3.13.recipe} (90%) rename net-analyzer/iperf/patches/{iperf3-3.12.gcc2.patchset => iperf3-3.13.gcc2.patchset} (89%) rename net-analyzer/iperf/patches/{iperf3-3.12.patchset => iperf3-3.13.patchset} (94%) diff --git a/net-analyzer/iperf/iperf3-3.12.recipe b/net-analyzer/iperf/iperf3-3.13.recipe similarity index 90% rename from net-analyzer/iperf/iperf3-3.12.recipe rename to net-analyzer/iperf/iperf3-3.13.recipe index b69579984..139379a74 100644 --- a/net-analyzer/iperf/iperf3-3.12.recipe +++ b/net-analyzer/iperf/iperf3-3.13.recipe @@ -7,7 +7,7 @@ through Lawrence Berkeley National Laboratory" LICENSE="BSD (3-clause)" REVISION="1" SOURCE_URI="https://downloads.es.net/pub/iperf/iperf-$portVersion.tar.gz" -CHECKSUM_SHA256="72034ecfb6a7d6d67e384e19fb6efff3236ca4f7ed4c518d7db649c447e1ffd6" +CHECKSUM_SHA256="bee427aeb13d6a2ee22073f23261f63712d82befaa83ac8cb4db5da4c2bdc865" SOURCE_DIR="iperf-$portVersion" PATCHES="iperf3-$portVersion.patchset" @@ -53,3 +53,8 @@ INSTALL() make install rm $libDir/libiperf.a $libDir/libiperf.la } + +TEST() +{ + make check +} diff --git a/net-analyzer/iperf/patches/iperf3-3.12.gcc2.patchset b/net-analyzer/iperf/patches/iperf3-3.13.gcc2.patchset similarity index 89% rename from net-analyzer/iperf/patches/iperf3-3.12.gcc2.patchset rename to net-analyzer/iperf/patches/iperf3-3.13.gcc2.patchset index cf125b3e3..17e2d78e6 100644 --- a/net-analyzer/iperf/patches/iperf3-3.12.gcc2.patchset +++ b/net-analyzer/iperf/patches/iperf3-3.13.gcc2.patchset @@ -1,14 +1,14 @@ -From df494f4c930677160743252015ea35022db84480 Mon Sep 17 00:00:00 2001 +From 5307854dae34c990b5ee2ab85848e392acd285d2 Mon Sep 17 00:00:00 2001 From: David Karoly Date: Sun, 2 Oct 2022 19:42:19 +0000 Subject: gcc2 patch diff --git a/src/iperf_api.c b/src/iperf_api.c -index 16f93dc..e70d34c 100644 +index efd3082..ce6f3d8 100644 --- a/src/iperf_api.c +++ b/src/iperf_api.c -@@ -2343,6 +2343,8 @@ send_results(struct iperf_test *test) +@@ -2369,6 +2369,8 @@ send_results(struct iperf_test *test) cJSON_AddItemReferenceToObject(j, "server_output_json", test->json_top); } else { @@ -17,7 +17,7 @@ index 16f93dc..e70d34c 100644 /* Add textual output */ size_t buflen = 0; -@@ -2353,7 +2355,7 @@ send_results(struct iperf_test *test) +@@ -2379,7 +2381,7 @@ send_results(struct iperf_test *test) } /* Allocate and build it up from the component lines */ @@ -26,7 +26,7 @@ index 16f93dc..e70d34c 100644 TAILQ_FOREACH(t, &(test->server_output_list), textlineentries) { strncat(output, t->line, buflen); buflen -= strlen(t->line); -@@ -2883,6 +2885,7 @@ iperf_free_test(struct iperf_test *test) +@@ -2909,6 +2911,7 @@ iperf_free_test(struct iperf_test *test) { struct protocol *prot; struct iperf_stream *sp; @@ -34,7 +34,7 @@ index 16f93dc..e70d34c 100644 /* Free streams */ while (!SLIST_EMPTY(&test->streams)) { -@@ -2977,7 +2980,6 @@ iperf_free_test(struct iperf_test *test) +@@ -3003,7 +3006,6 @@ iperf_free_test(struct iperf_test *test) } /* Free output line buffers, if any (on the server only) */ @@ -42,15 +42,15 @@ index 16f93dc..e70d34c 100644 while (!TAILQ_EMPTY(&test->server_output_list)) { t = TAILQ_FIRST(&test->server_output_list); TAILQ_REMOVE(&test->server_output_list, t, textlineentries); -@@ -3013,6 +3015,7 @@ void +@@ -3039,6 +3041,7 @@ void iperf_reset_test(struct iperf_test *test) { struct iperf_stream *sp; + struct iperf_textline *t; int i; - /* Free streams */ -@@ -3124,7 +3127,6 @@ iperf_reset_test(struct iperf_test *test) + iperf_close_logfile(test); +@@ -3152,7 +3155,6 @@ iperf_reset_test(struct iperf_test *test) } /* Free output line buffers, if any (on the server only) */ @@ -58,7 +58,7 @@ index 16f93dc..e70d34c 100644 while (!TAILQ_EMPTY(&test->server_output_list)) { t = TAILQ_FIRST(&test->server_output_list); TAILQ_REMOVE(&test->server_output_list, t, textlineentries); -@@ -3295,8 +3297,9 @@ iperf_print_intermediate(struct iperf_test *test) +@@ -3323,8 +3325,9 @@ iperf_print_intermediate(struct iperf_test *test) SLIST_FOREACH(sp, &test->streams, streams) { irp = TAILQ_LAST(&sp->result->interval_results, irlisthead); if (irp) { @@ -69,7 +69,7 @@ index 16f93dc..e70d34c 100644 if (test->debug) { printf("interval_len %f bytes_transferred %" PRIu64 "\n", interval_len, irp->bytes_transferred); } -@@ -4625,6 +4628,7 @@ iperf_json_start(struct iperf_test *test) +@@ -4671,6 +4674,7 @@ iperf_json_start(struct iperf_test *test) int iperf_json_finish(struct iperf_test *test) { @@ -77,7 +77,7 @@ index 16f93dc..e70d34c 100644 if (test->title) cJSON_AddStringToObject(test->json_top, "title", test->title); if (test->extra_data) -@@ -4639,7 +4643,7 @@ iperf_json_finish(struct iperf_test *test) +@@ -4685,7 +4689,7 @@ iperf_json_finish(struct iperf_test *test) // Get ASCII rendering of JSON structure. Then make our // own copy of it and return the storage that cJSON allocated // on our behalf. We keep our own copy around. @@ -188,7 +188,7 @@ index fbe1a61..c505f6a 100644 /* Close all stream sockets */ SLIST_FOREACH(sp, &test->streams, streams) { diff --git a/src/iperf_server_api.c b/src/iperf_server_api.c -index d3551b0..eed846e 100644 +index 919bedd..fdb3e10 100644 --- a/src/iperf_server_api.c +++ b/src/iperf_server_api.c @@ -121,10 +121,11 @@ iperf_accept(struct iperf_test *test) @@ -229,15 +229,7 @@ index d3551b0..eed846e 100644 // Check if average transfer rate was exceeded (condition set in the callback routines) if (test->bitrate_limit_exceeded) { -@@ -610,7 +613,6 @@ iperf_run_server(struct iperf_test *test) - } - - if (!is_closed(s)) { -- - #if defined(HAVE_TCP_USER_TIMEOUT) - if (test->protocol->id == Ptcp) { - int opt; -@@ -753,7 +755,7 @@ iperf_run_server(struct iperf_test *test) +@@ -760,7 +763,7 @@ iperf_run_server(struct iperf_test *test) test->prot_listener = -1; /* Ensure that total requested data rate is not above limit */ diff --git a/net-analyzer/iperf/patches/iperf3-3.12.patchset b/net-analyzer/iperf/patches/iperf3-3.13.patchset similarity index 94% rename from net-analyzer/iperf/patches/iperf3-3.12.patchset rename to net-analyzer/iperf/patches/iperf3-3.13.patchset index 0fa52b141..f403721b8 100644 --- a/net-analyzer/iperf/patches/iperf3-3.12.patchset +++ b/net-analyzer/iperf/patches/iperf3-3.13.patchset @@ -1,14 +1,14 @@ -From b54e733f0eaedaacf4095f34560dafd9c512c794 Mon Sep 17 00:00:00 2001 +From 3872a82ad75bd16c48f659a17c3cdc823600cf6f Mon Sep 17 00:00:00 2001 From: David Karoly Date: Sat, 27 Nov 2021 21:24:06 +0000 Subject: fix build on Haiku diff --git a/src/iperf_api.c b/src/iperf_api.c -index 85939be..16f93dc 100644 +index c104be1..efd3082 100644 --- a/src/iperf_api.c +++ b/src/iperf_api.c -@@ -1157,7 +1157,7 @@ iperf_parse_arguments(struct iperf_test *test, int argc, char **argv) +@@ -1183,7 +1183,7 @@ iperf_parse_arguments(struct iperf_test *test, int argc, char **argv) test->json_output = 1; break; case 'v': @@ -36,7 +36,7 @@ index 5833068..fbe1a61 100644 } diff --git a/src/iperf_server_api.c b/src/iperf_server_api.c -index b19cd72..d3551b0 100644 +index 18f105d..919bedd 100644 --- a/src/iperf_server_api.c +++ b/src/iperf_server_api.c @@ -470,11 +470,11 @@ iperf_run_server(struct iperf_test *test) @@ -83,7 +83,7 @@ index b109af2..251e740 100644 2.37.3 -From 4dc5f3f923d3fdd9ae95304abeafa89d6623a263 Mon Sep 17 00:00:00 2001 +From 3d99b89c22e77421fe03e814d61ca559f70337b5 Mon Sep 17 00:00:00 2001 From: David Karoly Date: Sat, 27 Nov 2021 21:58:25 +0000 Subject: set default to IPv4 @@ -108,7 +108,7 @@ index 1040832..7cfb061 100644 hints.ai_family = test->settings->domain; } diff --git a/src/iperf_tcp.c b/src/iperf_tcp.c -index 9620de5..f9d2828 100644 +index 2a8222d..b4d8aae 100644 --- a/src/iperf_tcp.c +++ b/src/iperf_tcp.c @@ -178,11 +178,11 @@ iperf_tcp_listen(struct iperf_test *test)