From dd5b60f05e7aa6ec7082f3ec463e9efd87ed177425a749bc0a2a1f53c5e169ab Mon Sep 17 00:00:00 2001 From: Andreas Stieger Date: Wed, 26 Mar 2014 19:14:24 +0000 Subject: [PATCH] Accepting request 227482 from home:aeneas_jaissle:branches:network:utilities Upstream changed, update to 3.0.2 OBS-URL: https://build.opensuse.org/request/show/227482 OBS-URL: https://build.opensuse.org/package/show/network:utilities/iperf?expand=0&rev=11 --- _service | 13 --- iperf-2.0.5.tar.gz | 3 - iperf-3.0.2.tar.gz | 3 + iperf-3.0.2_disable-profiling.patch | 13 +++ iperf-3.0.2_strncat_bufferoverflow.patch | 18 ++++ iperf.changes | 109 +++++++++++++++++++++++ iperf.spec | 98 ++++++++++++++++---- 7 files changed, 223 insertions(+), 34 deletions(-) delete mode 100644 _service delete mode 100644 iperf-2.0.5.tar.gz create mode 100644 iperf-3.0.2.tar.gz create mode 100644 iperf-3.0.2_disable-profiling.patch create mode 100644 iperf-3.0.2_strncat_bufferoverflow.patch diff --git a/_service b/_service deleted file mode 100644 index 509cc9a..0000000 --- a/_service +++ /dev/null @@ -1,13 +0,0 @@ - - - - https - downloads.sourceforge.net - /project/iperf/iperf-2.0.5.tar.gz - - - iperf-2.0.5.tar.gz - sha256 - 636b4eff0431cea80667ea85a67ce4c68698760a9837e1e9d13096d20362265b - - diff --git a/iperf-2.0.5.tar.gz b/iperf-2.0.5.tar.gz deleted file mode 100644 index c1ae513..0000000 --- a/iperf-2.0.5.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:636b4eff0431cea80667ea85a67ce4c68698760a9837e1e9d13096d20362265b -size 248583 diff --git a/iperf-3.0.2.tar.gz b/iperf-3.0.2.tar.gz new file mode 100644 index 0000000..94d3c79 --- /dev/null +++ b/iperf-3.0.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12d250e4c45f9c5fd4429c0ce74fe6be31fe57fda6897f8eb070ab45ad387c02 +size 350972 diff --git a/iperf-3.0.2_disable-profiling.patch b/iperf-3.0.2_disable-profiling.patch new file mode 100644 index 0000000..aabf29d --- /dev/null +++ b/iperf-3.0.2_disable-profiling.patch @@ -0,0 +1,13 @@ +diff -Ppru iperf-3.0.2.orig/src/Makefile.in iperf-3.0.2.profiling/src/Makefile.in +--- iperf-3.0.2.orig/src/Makefile.in 2014-03-10 17:58:44.000000000 +0100 ++++ iperf-3.0.2.profiling/src/Makefile.in 2014-03-25 15:48:06.839472983 +0100 +@@ -37,8 +37,7 @@ POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ + bin_PROGRAMS = iperf3$(EXEEXT) +-noinst_PROGRAMS = t_timer$(EXEEXT) t_units$(EXEEXT) t_uuid$(EXEEXT) \ +- iperf3_profile$(EXEEXT) ++noinst_PROGRAMS = t_timer$(EXEEXT) t_units$(EXEEXT) t_uuid$(EXEEXT) + TESTS = t_timer$(EXEEXT) t_units$(EXEEXT) t_uuid$(EXEEXT) + subdir = src + DIST_COMMON = $(dist_man_MANS) $(include_HEADERS) \ diff --git a/iperf-3.0.2_strncat_bufferoverflow.patch b/iperf-3.0.2_strncat_bufferoverflow.patch new file mode 100644 index 0000000..2ac2b36 --- /dev/null +++ b/iperf-3.0.2_strncat_bufferoverflow.patch @@ -0,0 +1,18 @@ +diff -Ppru iperf-3.0.2.orig/src/iperf_error.c iperf-3.0.2/src/iperf_error.c +--- iperf-3.0.2.orig/src/iperf_error.c 2014-03-10 17:58:44.000000000 +0100 ++++ iperf-3.0.2/src/iperf_error.c 2014-03-25 13:22:31.034732298 +0100 +@@ -301,11 +301,11 @@ iperf_strerror(int i_errno) + } + + if (herr || perr) +- strncat(errstr, ": ", len); ++ strncat(errstr, ": ", sizeof(errstr)-strlen(errstr)-1); + if (h_errno && herr) { +- strncat(errstr, hstrerror(h_errno), len); ++ strncat(errstr, hstrerror(h_errno), sizeof(errstr)-strlen(errstr)-1); + } else if (errno && perr) { +- strncat(errstr, strerror(errno), len); ++ strncat(errstr, strerror(errno), sizeof(errstr)-strlen(errstr)-1); + } + + return errstr; diff --git a/iperf.changes b/iperf.changes index 2d59e12..1bd5c39 100644 --- a/iperf.changes +++ b/iperf.changes @@ -1,3 +1,112 @@ +------------------------------------------------------------------- +Tue Mar 25 11:24:38 UTC 2014 - aj@ajaissle.de + +- iperf project moved from SourceForge to Google Code and now to GitHub. + License changed from NCSA to BDS-3-Clause + +- Update to 3.0.2 +This version, sometimes referred to as iperf3, is a redesign of an original +version developed at NLANR/DAST. iperf3 is a new implementation from scratch, +with the goal of a smaller, simpler code base, and a library version of the +functionality that can be used in other programs. iperf3 also a number of +features found in other tools such as nuttcp and netperf, but were missing +from the original iperf. These include, for example, a zero-copy mode and +optional JSON output. + +Note that iperf3 is NOT backwards compatible with the original iperf. + +- Added iperf-3.0.2_strncat_bufferoverflow.patch: + * Prevent buffer overflow in strncat + +- Added iperf-3.0.2_disable-profiling.patch: + * Disable profiling on x86 (option '-pg' is incompatible with invoked + option '-fomit-frame-pointer') + +- Changes in 3.0.2 + * iperf3 now builds on Linux systems that do not support + TCP_CONGESTION. Most notably this allows iperf3 to work on CentOS + 5. + * An abort on MacOS 10.9 has been fixed (issue #135). + * Added -I flag for the server to write a PID file, mostly useful for + daemon mode (issue #120). + * A bug that could break some TCP tests on FreeBSD has been fixed. + * TCP snd_cwnd output is now printed by default on Linux (issue #99). + * In JSON output, the --title string no longer has a colon and two + spaces appended (issue #139). + * A buffer for holding formatted numeric values is now + properly-sized so that output is not truncated (issue #142). + * Some memory leaks have been fixed. + * A -d flag enables debugging output. + * libtoolize is now invoked correctly from the bootstrap.sh script. + * The test unit format can now be set from the API (issue #144). + * libiperf is now built as both shared and static libraries. + +- Changes in 3.0.1 + * Added the following new flags + -D, --daemon run server as a daemon + -L, --flowlabel set IPv6 flow label (Linux only) + -C, --linux-congestion set congestion control algorithm (Linux only) + -k, --blockcount #[KMG] number of blocks (packets) to transmit + (instead of -t or -n) + * Bug fixes + +- Changes in 3.0-RC5 + * Added the following new flags + -F, --file name xmit/recv the specified file + -A, --affinity n/n,m set CPU affinity (Linux only) + -J, --json output in JSON format + -Z, --zerocopy use a 'zero copy' method of sending data + -O, --omit N omit the first n seconds + -T, --title str prefix every output line with this string + * more useful information in 'verbose' mode + * Many bug fixes + +- Changes in 3.0b4 + * Added support for binding to a specific interface (-B) + * Added support for IPv6 mode (-6) + * Setting TCP window size (-w) is now supported + * Updates to iperf_error + * Added new errors + * Should generate more relavent messages + * Stream list now managed by queue.h macros + * Test structures are now kept intact after a test is run (for API users) + * Improved interval timer granularity + * Support for decimal values + * Many bug fixes + +- Changes in 3.0b3 + * Better error handling + * All errors now handled with iperf_error() + * All functions that can return errors return NULL or -1 on error and set i_errno appropriately + * Iperf API intruduced + * Support for adding new protocols + * Added support for callback functions + * on_connect - executes after a connection is made to the server + * on_new_stream - executes after a new stream is created + * on_test_start - executes right before the test begins + * on_test_finish - executes after the test is finished + * Added early support for verbose mode (-V) + +- Changes in 3.0b2 + * UDP mode now supported + * Support for setting bandwidth (-b) + * Parallel UDP stream support + * Reverse mode UDP support + * Support for setting TCP_NODELAY (-N), disabling Nagle's Algorithm + * Support for setting TCP MSS (-M) + * Note: This feature is still in development. It is still very buggy. + +- Changes in 3.0b1 + * TCP control socket now manages messages between client and server + * Dynamic server (gets test parameters from client) + * Server can now set test options dynamically without having to restart. + * Currently supported options: -l, -t, -n, -P, -R + * Future options: -u, -b, -w, -M, -N, -I, -T, -Z, -6 + * Results exchange + * Client can now see server results (and vice versa) + * Reverse mode (-R) + * Server sends, client receives + ------------------------------------------------------------------- Fri Jun 22 13:59:52 UTC 2012 - coolo@suse.com diff --git a/iperf.spec b/iperf.spec index 86e6c3b..ca3af35 100644 --- a/iperf.spec +++ b/iperf.spec @@ -1,7 +1,7 @@ # # spec file for package iperf # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,38 +17,100 @@ Name: iperf -Version: 2.0.5 +Version: 3.0.2 Release: 0 -Summary: A Tool To Measure Network Performance -License: NCSA -Group: Productivity/Networking/Other -Url: http://sourceforge.net/projects/iperf/ +%define soname 0 +Summary: A tool to measure network performance +License: BSD-3-Clause +Group: Productivity/Networking/Diagnostic +Url: https://github.com/esnet/iperf +# DL from https://github.com/esnet/iperf/archive/%%{version}.tar.gz Source: %{name}-%{version}.tar.gz -BuildRequires: gcc-c++ +# PATCH-FIX-UPSTREAM -- Prevent a possible buffer overflow in strcat +Patch0: iperf-3.0.2_strncat_bufferoverflow.patch +# PATCH-FIX-OPENSUSE -- Disable profiling on i586, as option -pg conflicts with -fomit-frame-pointer +Patch1: iperf-3.0.2_disable-profiling.patch +BuildRequires: libuuid-devel BuildRoot: %{_tmppath}/%{name}-%{version}-build %description -Iperf was developed by NLANR/DAST as a modern alternative for -measuring maximum TCP and UDP bandwidth performance. -Iperf allows the tuning of various parameters and UDP characteristics. -Iperf reports bandwidth, delay jitter, datagram loss. +%{name} is a tool for active measurements of the maximum achievable bandwidth +on IP networks. It supports tuning of various parameters related to timing, +protocols, and buffers. For each test it reports the bandwidth, loss, and +other parameters. + +This version, sometimes referred to as iperf3, is a redesign of an original +version developed at NLANR/DAST. iperf3 is a new implementation from scratch, +with the goal of a smaller, simpler code base, and a library version of the +functionality that can be used in other programs. iperf3 also a number of +features found in other tools such as nuttcp and netperf, but were missing +from the original iperf. These include, for example, a zero-copy mode and +optional JSON output. + +Note that iperf3 is NOT backwards compatible with the original iperf. + +%package -n lib%{name}%{soname} +Summary: A library to measure network performance +Group: Development/Libraries/C and C++ + +%description -n lib%{name}%{soname} +lib%{name} gives you access to all the functionality of the iperf3 +network testing tool. +You can build it directly into your own program, instead of having +to run it as a shell command. + +%package devel +Summary: A tool to measure network performance +Group: Development/Libraries/C and C++ +Requires: lib%{name}%{soname} = %{version} +Requires: libuuid-devel + +%description devel +%{name} is a tool for active measurements of the maximum achievable bandwidth +on IP networks. It supports tuning of various parameters related to timing, +protocols, and buffers. For each test it reports the bandwidth, loss, and +other parameters. + +This package contains development files. %prep %setup -q +%patch0 -p 1 +%ifarch i386 i486 i586 i686 +%patch1 -p 1 +%endif %build %configure -make %{?_smp_mflags} +%{__make} %{?_smp_mflags} %install -%makeinstall +%{__make} %{?_smp_mflags} install DESTDIR=%{buildroot} -%clean -rm -rf %{buildroot} +# cleanup empty libtool .la file +%{__rm} %{buildroot}%{_libdir}/lib%{name}.la + +%post -n lib%{name}%{soname} -p /sbin/ldconfig + +%postun -n lib%{name}%{soname} -p /sbin/ldconfig %files -%defattr(0644,root,root,0755) -%attr(0755,root,root) %{_bindir}/%{name} -%doc %{_mandir}/man1/%{name}.1%{ext_man} +%defattr(-, root, root) +%doc AUTHORS LICENSE README.md RELEASE_NOTES TODO +%{_bindir}/%{name}3 +%doc %{_mandir}/man1/%{name}3.1%{ext_man} + +%files -n lib%{name}%{soname} +%defattr(-, root, root) +%doc LICENSE +%{_libdir}/lib%{name}.so.* + +%files devel +%defattr(-, root, root) +%doc LICENSE +%{_includedir}/%{name}_api.h +%{_libdir}/lib%{name}.a +%{_libdir}/lib%{name}.so +%doc %{_mandir}/man3/lib%{name}.3%{ext_man} %changelog