summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-misc/iperf
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-misc/iperf')
-rw-r--r--net-misc/iperf/Manifest3
-rw-r--r--net-misc/iperf/files/iperf-3.0.5-flags.patch31
-rw-r--r--net-misc/iperf/files/iperf-bidirectional-tcp-server.patch23
-rw-r--r--net-misc/iperf/files/iperf-cast-to-max_size_t-instead-of-int.patch20
-rw-r--r--net-misc/iperf/files/iperf-die-on-bind-fail.patch19
-rw-r--r--net-misc/iperf/files/iperf-fix-bandwidth-limit.patch21
-rw-r--r--net-misc/iperf/files/iperf-fix-format-security-ftbfs.patch96
-rw-r--r--net-misc/iperf/files/iperf-ipv6_mcast_check.patch22
-rw-r--r--net-misc/iperf/files/iperf.confd6
-rw-r--r--net-misc/iperf/files/iperf.initd-r115
-rw-r--r--net-misc/iperf/iperf-2.0.5-r2.ebuild39
-rw-r--r--net-misc/iperf/iperf-3.0.11.ebuild28
-rw-r--r--net-misc/iperf/iperf-3.1_beta3.ebuild30
-rw-r--r--net-misc/iperf/metadata.xml8
14 files changed, 361 insertions, 0 deletions
diff --git a/net-misc/iperf/Manifest b/net-misc/iperf/Manifest
new file mode 100644
index 000000000000..fd6545614734
--- /dev/null
+++ b/net-misc/iperf/Manifest
@@ -0,0 +1,3 @@
+DIST iperf-2.0.5.tar.gz 248583 SHA256 636b4eff0431cea80667ea85a67ce4c68698760a9837e1e9d13096d20362265b SHA512 da9a0c01dea2a9dd33aa130b11d938d5f44dd6c3ab27526b0a43df5bf2550fede04238a00b7d54037426afe90ac6d8c4f4ae6861aa170ca7835b6664c9d6537f WHIRLPOOL d66b007fad372516c7f7377872b69ea450fa9ff6d1492f2a224a73f2fb3f7616bd2d57a34a815d4d95683d81fd02d76472d4727323e920410034ba725f6476ce
+DIST iperf-3.0.11.tar.gz 426434 SHA256 c774b807ea4db20e07558c47951df186b6fb1dd0cdef4282c078853ad87cc712 SHA512 292b826099a1fc813f2fbe4506f8bd8b3b2e4dde04e33a097cce966d7502b3c521a29b9ba74e55fe38406fdb85090695f59febbf4ca31bb1ffc801b3b7615d19 WHIRLPOOL e16799997d7e3c0abe2e2a93bd559a69c0d3c96aab954cd9fb4be93cc8ce4f38c7a2ced034b1b03b2dc257bd5c82d202b4da528ee11f86ed99890fb02cad4b04
+DIST iperf-3.1_beta3.tar.gz 542912 SHA256 ed96fd8dcc7150f3bb93536e3f1858121210e7f90cd637d76400e26cb1426679 SHA512 eab26b54a14e86fbe1503979b5924abdb3438710c7baf782fef97e7170f4d81eb9946b000fadd89d123daecb03b6a09fc429615c076fb0a444d30929983e3be8 WHIRLPOOL a627a88fe7c863af354a7e00bfe066bd06daee7e1fc72de385d4294b7304bd7ce1af7c35a0bf257305b5851db8a1b376d58f39e2053c8aa801b7a16bae0c9531
diff --git a/net-misc/iperf/files/iperf-3.0.5-flags.patch b/net-misc/iperf/files/iperf-3.0.5-flags.patch
new file mode 100644
index 000000000000..9c11c282c339
--- /dev/null
+++ b/net-misc/iperf/files/iperf-3.0.5-flags.patch
@@ -0,0 +1,31 @@
+* Do not inject -g
+* Do not make a profiled build
+
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -1,6 +1,6 @@
+ lib_LTLIBRARIES = libiperf.la # Build and install an iperf library
+ bin_PROGRAMS = iperf3 # Build and install an iperf binary
+-noinst_PROGRAMS = t_timer t_units t_uuid iperf3_profile # Build, but don't install the test programs and a profiled version of iperf3
++noinst_PROGRAMS = t_timer t_units t_uuid # Build, but don't install the test programs and a profiled version of iperf3
+ include_HEADERS = iperf_api.h # Defines the headers that get installed with the program
+
+
+@@ -37,14 +37,13 @@
+
+ # Specify the sources and various flags for the iperf binary
+ iperf3_SOURCES = main.c
+-iperf3_CFLAGS = -g
++iperf3_CFLAGS =
+ iperf3_LDADD = libiperf.la
+-iperf3_LDFLAGS = -g
++iperf3_LDFLAGS =
+
+ # Specify the sources and various flags for the profiled iperf binary. This
+ # binary recompiles all the source files to make sure they are all profiled.
+-iperf3_profile_SOURCES = main.c \
+- $(libiperf_la_SOURCES)
++iperf3_profile_SOURCES = main.c
+
+ iperf3_profile_CFLAGS = -pg -g
+ iperf3_profile_LDADD = libiperf.la
diff --git a/net-misc/iperf/files/iperf-bidirectional-tcp-server.patch b/net-misc/iperf/files/iperf-bidirectional-tcp-server.patch
new file mode 100644
index 000000000000..88a1a4f00c4c
--- /dev/null
+++ b/net-misc/iperf/files/iperf-bidirectional-tcp-server.patch
@@ -0,0 +1,23 @@
+Description: Fix bidirectional TCP server exiting after the test
+ iperf bidirectional test using parameter -r or -d doesn't work as
+ expected, the server exits after the test, but it should continue listening
+ for new connections.
+Author: Roberto Lumbreras <rover@debian.org>
+Bug-Redhat: https://bugzilla.redhat.com/show_bug.cgi?id=449796
+Forwarded: http://sourceforge.net/tracker/?func=detail&aid=1983829&group_id=128336&atid=711371
+
+--- a/src/Client.cpp
++++ b/src/Client.cpp
+@@ -212,10 +212,12 @@ void Client::Run( void ) {
+ char* readAt = mBuf;
+
+ #if HAVE_THREAD
++ /*
+ if ( !isUDP( mSettings ) ) {
+ RunTCP();
+ return;
+ }
++ */
+ #endif
+
+ // Indicates if the stream is readable
diff --git a/net-misc/iperf/files/iperf-cast-to-max_size_t-instead-of-int.patch b/net-misc/iperf/files/iperf-cast-to-max_size_t-instead-of-int.patch
new file mode 100644
index 000000000000..34d37eef671d
--- /dev/null
+++ b/net-misc/iperf/files/iperf-cast-to-max_size_t-instead-of-int.patch
@@ -0,0 +1,20 @@
+Description: iperf does not handle right large time values
+ Reported by Eugene Butan <eugene@mikrotik.com>
+ When I invoke 'iperf' with '-t 100000000' argument from an ordinary shell
+ prompt it immediately exits displaying incorrect bandwidth. If I supply
+ smaller time value, iperf works as expected.
+Author: Roberto Lumbreras <rover@debian.org>
+Bug-Debian: http://bugs.debian.org/346099
+Forwarded: https://sourceforge.net/tracker/index.php?func=detail&aid=3140391&group_id=128336&atid=711371
+
+--- a/src/Settings.cpp
++++ b/src/Settings.cpp
+@@ -458,7 +458,7 @@
+ case 't': // seconds to write for
+ // time mode (instead of amount mode)
+ setModeTime( mExtSettings );
+- mExtSettings->mAmount = (int) (atof( optarg ) * 100.0);
++ mExtSettings->mAmount = (max_size_t) (atof( optarg ) * 100.0);
+ break;
+
+ case 'u': // UDP instead of TCP
diff --git a/net-misc/iperf/files/iperf-die-on-bind-fail.patch b/net-misc/iperf/files/iperf-die-on-bind-fail.patch
new file mode 100644
index 000000000000..1f54cf556d29
--- /dev/null
+++ b/net-misc/iperf/files/iperf-die-on-bind-fail.patch
@@ -0,0 +1,19 @@
+Description: iperf die on bind fail
+ When iperf encounters a fatal error when binding to a port, such as
+ the port being already in use or lacking permission, it fails to give
+ fatal error, but instead pretends to continue to listen on the port.
+Author: Deny IP Any Any <denyipanyany@gmail.com>
+Bug-Debian: http://bugs.debian.org/517239
+Forwarded: https://sourceforge.net/tracker/?func=detail&aid=3140400&group_id=128336&atid=711371
+
+--- a/src/Listener.cpp
++++ b/src/Listener.cpp
+@@ -333,7 +333,7 @@
+ #endif
+ {
+ rc = bind( mSettings->mSock, (sockaddr*) &mSettings->local, mSettings->size_local );
+- WARN_errno( rc == SOCKET_ERROR, "bind" );
++ FAIL_errno( rc == SOCKET_ERROR, "bind", mSettings );
+ }
+ // listen for connections (TCP only).
+ // default backlog traditionally 5
diff --git a/net-misc/iperf/files/iperf-fix-bandwidth-limit.patch b/net-misc/iperf/files/iperf-fix-bandwidth-limit.patch
new file mode 100644
index 000000000000..eb9df8cd31b3
--- /dev/null
+++ b/net-misc/iperf/files/iperf-fix-bandwidth-limit.patch
@@ -0,0 +1,21 @@
+
+2011-10-14 Israel G. Lugo <israel.lugo@lugosys.com>
+
+* Fix delay_loop() for delays of 1s and greater. Was causing breakage when a
+low bandwidth limit was specified.
+
+
+--- a/compat/delay.cpp
++++ b/compat/delay.cpp
+@@ -63,8 +63,9 @@ void delay_loop(unsigned long usec)
+ {
+ struct timespec requested, remaining;
+
+- requested.tv_sec = 0;
+- requested.tv_nsec = usec * 1000L;
++ /* convert to seconds; nanosleep requires 0 <= tv_nsec <= 999999999 */
++ requested.tv_sec = usec / 1000000UL;
++ requested.tv_nsec = (usec % 1000000UL) * 1000UL;
+
+ while (nanosleep(&requested, &remaining) == -1)
+ if (errno == EINTR)
diff --git a/net-misc/iperf/files/iperf-fix-format-security-ftbfs.patch b/net-misc/iperf/files/iperf-fix-format-security-ftbfs.patch
new file mode 100644
index 000000000000..2f5b03277209
--- /dev/null
+++ b/net-misc/iperf/files/iperf-fix-format-security-ftbfs.patch
@@ -0,0 +1,96 @@
+Description: iperf format string FTBFS with -Werror=format-security
+ Reported by Didier Raboud <odyx@debian.org>
+Author: Simon Paillard <spaillard@debian.org>
+Bug-Debian: http://bugs.debian.org/643408
+
+--- a/compat/Thread.c
++++ b/compat/Thread.c
+@@ -381,7 +381,7 @@
+ Condition_Lock( thread_sNum_cond );
+ thread_sNum -= nonterminating_num;
+ if ( thread_sNum > 1 && nonterminating_num > 0 && interrupt != 0 ) {
+- fprintf( stderr, wait_server_threads );
++ fprintf( stderr, "%s", wait_server_threads );
+ }
+ nonterminating_num = 0;
+ Condition_Signal( &thread_sNum_cond );
+--- a/src/ReportDefault.c
++++ b/src/ReportDefault.c
+@@ -78,7 +78,7 @@
+ if ( stats->mUDP != (char)kMode_Server ) {
+ // TCP Reporting
+ if( !header_printed ) {
+- printf( report_bw_header);
++ printf( "%s", report_bw_header);
+ header_printed = 1;
+ }
+ printf( report_bw_format, stats->transferID,
+@@ -87,7 +87,7 @@
+ } else {
+ // UDP Reporting
+ if( !header_printed ) {
+- printf( report_bw_jitter_loss_header);
++ printf( "%s", report_bw_jitter_loss_header);
+ header_printed = 1;
+ }
+ printf( report_bw_jitter_loss_format, stats->transferID,
+@@ -159,7 +159,7 @@
+ (data->mThreadMode == kMode_Listener ? 0 : 1) );
+ win_requested = data->mTCPWin;
+
+- printf( separator_line );
++ printf( "%s", separator_line );
+ if ( data->mThreadMode == kMode_Listener ) {
+ printf( server_port,
+ (isUDP( data ) ? "UDP" : "TCP"),
+@@ -198,7 +198,7 @@
+ printf( warn_window_requested, buffer );
+ }
+ printf( "\n" );
+- printf( separator_line );
++ printf( "%s", separator_line );
+ }
+
+ /*
+@@ -286,7 +286,7 @@
+ } else if ( checkMSS_MTU( inMSS, 576 ) ) {
+ net = "minimum";
+ mtu = 576;
+- printf( warn_no_pathmtu );
++ printf( "%s", warn_no_pathmtu );
+ } else {
+ mtu = inMSS + 40;
+ net = "unknown interface";
+--- a/src/Reporter.c
++++ b/src/Reporter.c
+@@ -896,7 +896,7 @@
+ } else if ( checkMSS_MTU( inMSS, 576 ) ) {
+ net = "minimum";
+ mtu = 576;
+- printf( warn_no_pathmtu );
++ printf( "%s", warn_no_pathmtu );
+ } else {
+ mtu = inMSS + 40;
+ net = "unknown interface";
+--- a/src/Settings.cpp
++++ b/src/Settings.cpp
+@@ -375,8 +375,8 @@
+ break;
+
+ case 'h': // print help and exit
+- fprintf(stderr, usage_long1);
+- fprintf(stderr, usage_long2);
++ fprintf(stderr, "%s", usage_long1);
++ fprintf(stderr, "%s", usage_long2);
+ exit(1);
+ break;
+
+@@ -482,7 +482,7 @@
+ break;
+
+ case 'v': // print version and exit
+- fprintf( stderr, version );
++ fprintf( stderr, "%s", version );
+ exit(1);
+ break;
+
diff --git a/net-misc/iperf/files/iperf-ipv6_mcast_check.patch b/net-misc/iperf/files/iperf-ipv6_mcast_check.patch
new file mode 100644
index 000000000000..bef05259a4d8
--- /dev/null
+++ b/net-misc/iperf/files/iperf-ipv6_mcast_check.patch
@@ -0,0 +1,22 @@
+Description: Fix improper check for IPv6 family when sending multicast
+ This patch fixes the proper behavior of -T (hop-limit setting) when
+ sending IPv6 multicast packets. Due to this bug, it was always fixed to 1.
+ .
+ SetSocketOptions() is called before socket connection, thus sa_family is
+ still set to 0. This is causing the if-branch in the multicast check
+ to always assume a non-IPv6 socket.
+ Checking the remote-peer family works reliably, instead.
+Author: Luca Bruno <lucab@debian.org>
+Last-Update: 2012-05-24
+
+--- a/src/PerfSocket.cpp
++++ b/src/PerfSocket.cpp
+@@ -109,7 +109,7 @@ void SetSocketOptions( thread_Settings *
+ if ( isMulticast( inSettings ) && ( inSettings->mTTL > 0 ) ) {
+ int val = inSettings->mTTL;
+ #ifdef HAVE_MULTICAST
+- if ( !SockAddr_isIPv6( &inSettings->local ) ) {
++ if ( !SockAddr_isIPv6( &inSettings->peer ) ) {
+ int rc = setsockopt( inSettings->mSock, IPPROTO_IP, IP_MULTICAST_TTL,
+ (const void*) &val, (Socklen_t) sizeof(val));
+
diff --git a/net-misc/iperf/files/iperf.confd b/net-misc/iperf/files/iperf.confd
new file mode 100644
index 000000000000..01bd473328e3
--- /dev/null
+++ b/net-misc/iperf/files/iperf.confd
@@ -0,0 +1,6 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# extra options (run iperf -h for a list of supported options)
+IPERF_OPTS="--format Mbytes"
diff --git a/net-misc/iperf/files/iperf.initd-r1 b/net-misc/iperf/files/iperf.initd-r1
new file mode 100644
index 000000000000..dae8cf04ab49
--- /dev/null
+++ b/net-misc/iperf/files/iperf.initd-r1
@@ -0,0 +1,15 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="IP bandwidth measurement server"
+command="/usr/bin/iperf"
+
+command_background="yes"
+pidfile="/run/${SVCNAME}.pid"
+command_args="-s ${IPERF_OPTS}"
+
+# note: iperf has a -D/--daemon flag but we seem to hit a bug
+# where it starts to eat all CPU after client disconnect,
+# see bug #344875
diff --git a/net-misc/iperf/iperf-2.0.5-r2.ebuild b/net-misc/iperf/iperf-2.0.5-r2.ebuild
new file mode 100644
index 000000000000..3e2238c03f75
--- /dev/null
+++ b/net-misc/iperf/iperf-2.0.5-r2.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit base
+
+DESCRIPTION="Tool to measure IP bandwidth using UDP or TCP"
+HOMEPAGE="http://iperf.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="HPND"
+SLOT="2"
+KEYWORDS="amd64 ~arm hppa ppc ppc64 sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~m68k-mint"
+IUSE="ipv6 threads debug"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-fix-bandwidth-limit.patch
+ "${FILESDIR}"/${PN}-cast-to-max_size_t-instead-of-int.patch
+ "${FILESDIR}"/${PN}-die-on-bind-fail.patch
+ "${FILESDIR}"/${PN}-bidirectional-tcp-server.patch
+ "${FILESDIR}"/${PN}-fix-format-security-ftbfs.patch
+ "${FILESDIR}"/${PN}-ipv6_mcast_check.patch
+ )
+DOCS="INSTALL README"
+
+src_configure() {
+ econf \
+ $(use_enable ipv6) \
+ $(use_enable threads) \
+ $(use_enable debug debuginfo)
+}
+
+src_install() {
+ default
+ dohtml doc/*
+ newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+}
diff --git a/net-misc/iperf/iperf-3.0.11.ebuild b/net-misc/iperf/iperf-3.0.11.ebuild
new file mode 100644
index 000000000000..4291b3a31d1b
--- /dev/null
+++ b/net-misc/iperf/iperf-3.0.11.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="A TCP, UDP, and SCTP network bandwidth measurement tool"
+LICENSE="BSD"
+SLOT="3"
+HOMEPAGE="https://github.com/esnet/iperf/"
+SRC_URI="https://codeload.github.com/esnet/${PN}/tar.gz/${PV} -> ${P}.tar.gz"
+KEYWORDS="amd64 ~arm hppa ~mips ppc ppc64 sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~m68k-mint"
+IUSE="static-libs"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.0.5-flags.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/net-misc/iperf/iperf-3.1_beta3.ebuild b/net-misc/iperf/iperf-3.1_beta3.ebuild
new file mode 100644
index 000000000000..4b4687a92d36
--- /dev/null
+++ b/net-misc/iperf/iperf-3.1_beta3.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="A TCP, UDP, and SCTP network bandwidth measurement tool"
+LICENSE="BSD"
+SLOT="3"
+HOMEPAGE="https://github.com/esnet/iperf/"
+SRC_URI="https://codeload.github.com/esnet/${PN}/tar.gz/${PV/_beta/b} -> ${P}.tar.gz"
+KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~m68k-mint"
+IUSE="static-libs"
+
+S=${WORKDIR}/${P/_beta/b}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.0.5-flags.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ prune_libtool_files
+}
diff --git a/net-misc/iperf/metadata.xml b/net-misc/iperf/metadata.xml
new file mode 100644
index 000000000000..9371ad630434
--- /dev/null
+++ b/net-misc/iperf/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>netmon</herd>
+ <upstream>
+ <remote-id type="github">esnet/iperf</remote-id>
+ </upstream>
+</pkgmetadata>