summaryrefslogtreecommitdiff
path: root/net-misc/iperf/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/iperf/files
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/iperf/files')
-rw-r--r--net-misc/iperf/files/iperf-3.0.5-flags.patch31
-rw-r--r--net-misc/iperf/files/iperf.confd5
-rw-r--r--net-misc/iperf/files/iperf.initd-r114
-rw-r--r--net-misc/iperf/files/iperf3.initd10
4 files changed, 60 insertions, 0 deletions
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.confd b/net-misc/iperf/files/iperf.confd
new file mode 100644
index 000000000000..7d82492a30f9
--- /dev/null
+++ b/net-misc/iperf/files/iperf.confd
@@ -0,0 +1,5 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# 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..cd17a7b47e9e
--- /dev/null
+++ b/net-misc/iperf/files/iperf.initd-r1
@@ -0,0 +1,14 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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/files/iperf3.initd b/net-misc/iperf/files/iperf3.initd
new file mode 100644
index 000000000000..281ebf5ae2d3
--- /dev/null
+++ b/net-misc/iperf/files/iperf3.initd
@@ -0,0 +1,10 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="IP bandwidth measurement server"
+command="/usr/bin/iperf3"
+
+command_background="yes"
+pidfile="/run/${SVCNAME}.pid"
+command_args="-s ${IPERF_OPTS}"