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-analyzer/netperf
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-analyzer/netperf')
-rw-r--r--net-analyzer/netperf/Manifest2
-rw-r--r--net-analyzer/netperf/files/netperf-2.2-conf4
-rw-r--r--net-analyzer/netperf/files/netperf-2.2-init21
-rw-r--r--net-analyzer/netperf/files/netperf-2.6.0-log-dir.patch11
-rw-r--r--net-analyzer/netperf/files/netperf-2.7.0-includes.patch22
-rw-r--r--net-analyzer/netperf/files/netperf-fix-scripts.patch34
-rw-r--r--net-analyzer/netperf/metadata.xml9
-rw-r--r--net-analyzer/netperf/netperf-2.6.0-r1.ebuild63
-rw-r--r--net-analyzer/netperf/netperf-2.7.0.ebuild64
9 files changed, 230 insertions, 0 deletions
diff --git a/net-analyzer/netperf/Manifest b/net-analyzer/netperf/Manifest
new file mode 100644
index 000000000000..510c44ed70f1
--- /dev/null
+++ b/net-analyzer/netperf/Manifest
@@ -0,0 +1,2 @@
+DIST netperf-2.6.0.tar.bz2 1032953 SHA256 cd8dac710d4273d29f70e8dbd09353a6362ac58a11926e0822233c0cb230323a SHA512 b3921d2e887088b14a8bbe5ace9b1cc0c8b29951eeaa7857ce3f324933397c8ff6b56eeacfe755181ce1a56c982fe431955f6db55bd20f2343324e22ee23c9b3 WHIRLPOOL b602c8660bae59648cbbe9eed47ee9d86b0ae714bc0c2906e80a14d0ce18951f125f3331f90acd776850b04506e37030545084677f6be512477ea37f76d972e7
+DIST netperf-2.7.0.tar.bz2 1024430 SHA256 842af17655835c8be7203808c3393e6cb327a8067f3ed1f1053eb78b4e40375a SHA512 5fb37945bead831247de9c8ba86b33f134ba39e753b483df72de97f536d0846538dadf61acc2dee57f04ab5d16a92afab4890e79a5d7ffa863afd526267fffad WHIRLPOOL 66c81e418750d67bfa15d6f1e3cd7a3a65f1168ebb080263cf70e0f3fe023a8128bfc559249268ec8e597ef3db5acdf5509861f12f8f49c6b2586e679014e34a
diff --git a/net-analyzer/netperf/files/netperf-2.2-conf b/net-analyzer/netperf/files/netperf-2.2-conf
new file mode 100644
index 000000000000..f61f483a83ea
--- /dev/null
+++ b/net-analyzer/netperf/files/netperf-2.2-conf
@@ -0,0 +1,4 @@
+# Config file for /etc/init.d/netperf
+
+# Add your preferred netserver args here
+#NETSERVER_ARGS="-n 4"
diff --git a/net-analyzer/netperf/files/netperf-2.2-init b/net-analyzer/netperf/files/netperf-2.2-init
new file mode 100644
index 000000000000..a6816a592135
--- /dev/null
+++ b/net-analyzer/netperf/files/netperf-2.2-init
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+#
+# init.d script for net-analyzer/netperf's netserver
+#
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin 'Starting netperf server (netserver)'
+ start-stop-daemon --start --quiet --user nobody \
+ --exec /usr/sbin/netserver -- ${NETSERVER_ARGS} >/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin 'Stopping netperf server (netserver)'
+ start-stop-daemon --stop --quiet --exec /usr/sbin/netserver
+ eend $?
+}
diff --git a/net-analyzer/netperf/files/netperf-2.6.0-log-dir.patch b/net-analyzer/netperf/files/netperf-2.6.0-log-dir.patch
new file mode 100644
index 000000000000..00554cc0b5c2
--- /dev/null
+++ b/net-analyzer/netperf/files/netperf-2.6.0-log-dir.patch
@@ -0,0 +1,11 @@
+--- a/src/netserver.c
++++ b/src/netserver.c
+@@ -165,7 +165,7 @@
+ #elif defined(ANDROID)
+ #define DEBUG_LOG_FILE_DIR "/data/local/tmp/"
+ #else
+-#define DEBUG_LOG_FILE_DIR "/tmp/"
++#define DEBUG_LOG_FILE_DIR "/var/log/"
+ #endif
+ #endif /* DEBUG_LOG_FILE_DIR */
+
diff --git a/net-analyzer/netperf/files/netperf-2.7.0-includes.patch b/net-analyzer/netperf/files/netperf-2.7.0-includes.patch
new file mode 100644
index 000000000000..63c3cea40f4e
--- /dev/null
+++ b/net-analyzer/netperf/files/netperf-2.7.0-includes.patch
@@ -0,0 +1,22 @@
+--- a/src/net_uuid.c
++++ b/src/net_uuid.c
+@@ -28,6 +28,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <fcntl.h>
++#include <unistd.h> /* read(), close() */
+
+ #if defined(HAVE_INTTYPES_H)
+ #include <inttypes.h>
+--- a/src/netlib.c
++++ b/src/netlib.c
+@@ -81,6 +81,9 @@
+ #include <endian.h>
+ #endif
+
++#if defined(HAVE_SENDFILE)
++#include <sys/sendfile.h> /* sendfile() */
++#endif
+
+ #ifndef WIN32
+ /* at some point, I would like to get rid of all these "sys/"
diff --git a/net-analyzer/netperf/files/netperf-fix-scripts.patch b/net-analyzer/netperf/files/netperf-fix-scripts.patch
new file mode 100644
index 000000000000..27e041fd7a32
--- /dev/null
+++ b/net-analyzer/netperf/files/netperf-fix-scripts.patch
@@ -0,0 +1,34 @@
+--- a/doc/examples/arr_script
++++ b/doc/examples/arr_script
+@@ -12,8 +12,7 @@
+ TOLERANCE=15
+ MAX_RETRIES=3
+
+- NETPERF="/usr/local/netperf/netperf"
+- NETPERF="./netperf"
++ NETPERF="/usr/bin/netperf"
+
+ NPROC_LIST=""
+ RR_SIZES=""
+--- a/doc/examples/packet_byte_script
++++ b/doc/examples/packet_byte_script
+@@ -25,7 +25,7 @@
+ fi
+
+ # where is netperf
+-NETPERF_DIR=${NETPERF_DIR:=/opt/netperf2/bin}
++NETPERF_DIR=${NETPERF_DIR:=/usr/bin}
+
+
+ # at what port will netserver be waiting? If you decide to run
+--- a/doc/examples/snapshot_script
++++ b/doc/examples/snapshot_script
+@@ -37,7 +37,7 @@
+ #
+ # where is netperf installed, there are a few possible places:
+
+-NETPERF_CMD=${NETPERF_CMD:=/opt/netperf/netperf}
++NETPERF_CMD=${NETPERF_CMD:=/usr/bin/netperf}
+
+
+ # there should be no more than two parms passed
diff --git a/net-analyzer/netperf/metadata.xml b/net-analyzer/netperf/metadata.xml
new file mode 100644
index 000000000000..9f51ead35bd7
--- /dev/null
+++ b/net-analyzer/netperf/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+<use>
+<flag name='demo'>Emit interim results during the run. May affect results</flag>
+<flag name='sctp'>Include tests to measure SCTP performance</flag>
+</use>
+</pkgmetadata>
diff --git a/net-analyzer/netperf/netperf-2.6.0-r1.ebuild b/net-analyzer/netperf/netperf-2.6.0-r1.ebuild
new file mode 100644
index 000000000000..2aaa038e7274
--- /dev/null
+++ b/net-analyzer/netperf/netperf-2.6.0-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic
+
+DESCRIPTION="Network performance benchmark including tests for TCP, UDP, sockets, ATM and more"
+SRC_URI="ftp://ftp.netperf.org/${PN}/${P}.tar.bz2"
+KEYWORDS="alpha amd64 arm64 hppa ia64 ppc ppc64 sparc x86"
+
+HOMEPAGE="http://www.netperf.org/"
+LICENSE="netperf"
+SLOT="0"
+IUSE="demo sctp"
+
+DEPEND=">=sys-apps/sed-4"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-fix-scripts.patch \
+ "${FILESDIR}"/${P}-log-dir.patch
+
+ # Fixing paths in scripts
+ sed -i \
+ -e 's:^\(NETHOME=\).*:\1"/usr/bin":' \
+ doc/examples/sctp_stream_script \
+ doc/examples/tcp_range_script \
+ doc/examples/tcp_rr_script \
+ doc/examples/tcp_stream_script \
+ doc/examples/udp_rr_script \
+ doc/examples/udp_stream_script \
+ || die
+
+ # netlib.c:2292:5: warning: implicit declaration of function ‘sched_setaffinity’
+ # nettest_omni.c:2943:5: warning: implicit declaration of function ‘splice’
+ append-cppflags -D_GNU_SOURCE
+}
+
+src_configure() {
+ econf \
+ $(use_enable demo) \
+ $(use_enable sctp)
+}
+
+src_install () {
+ default
+
+ # move netserver into sbin as we had it before 2.4 was released with its
+ # autoconf goodness
+ dodir /usr/sbin
+ mv "${D}"/usr/{bin,sbin}/netserver || die
+
+ # init.d / conf.d
+ newinitd "${FILESDIR}"/${PN}-2.2-init netperf
+ newconfd "${FILESDIR}"/${PN}-2.2-conf netperf
+
+ # documentation and example scripts
+ dodoc AUTHORS ChangeLog NEWS README Release_Notes
+ dodir /usr/share/doc/${PF}/examples
+ #Scripts no longer get installed by einstall
+ cp doc/examples/*_script "${D}"/usr/share/doc/${PF}/examples || die
+}
diff --git a/net-analyzer/netperf/netperf-2.7.0.ebuild b/net-analyzer/netperf/netperf-2.7.0.ebuild
new file mode 100644
index 000000000000..3a312bbb16f8
--- /dev/null
+++ b/net-analyzer/netperf/netperf-2.7.0.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils flag-o-matic
+
+DESCRIPTION="Network performance benchmark including tests for TCP, UDP, sockets, ATM and more"
+SRC_URI="ftp://ftp.netperf.org/${PN}/${P}.tar.bz2"
+KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+
+HOMEPAGE="http://www.netperf.org/"
+LICENSE="netperf"
+SLOT="0"
+IUSE="demo sctp"
+
+DEPEND=">=sys-apps/sed-4"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-fix-scripts.patch \
+ "${FILESDIR}"/${PN}-2.6.0-log-dir.patch \
+ "${FILESDIR}"/${PN}-2.7.0-includes.patch
+
+ # Fixing paths in scripts
+ sed -i \
+ -e 's:^\(NETHOME=\).*:\1"/usr/bin":' \
+ doc/examples/sctp_stream_script \
+ doc/examples/tcp_range_script \
+ doc/examples/tcp_rr_script \
+ doc/examples/tcp_stream_script \
+ doc/examples/udp_rr_script \
+ doc/examples/udp_stream_script \
+ || die
+
+ # netlib.c:2292:5: warning: implicit declaration of function ‘sched_setaffinity’
+ # nettest_omni.c:2943:5: warning: implicit declaration of function ‘splice’
+ append-cppflags -D_GNU_SOURCE
+}
+
+src_configure() {
+ econf \
+ $(use_enable demo) \
+ $(use_enable sctp)
+}
+
+src_install () {
+ default
+
+ # move netserver into sbin as we had it before 2.4 was released with its
+ # autoconf goodness
+ dodir /usr/sbin
+ mv "${D}"/usr/{bin,sbin}/netserver || die
+
+ # init.d / conf.d
+ newinitd "${FILESDIR}"/${PN}-2.2-init netperf
+ newconfd "${FILESDIR}"/${PN}-2.2-conf netperf
+
+ # documentation and example scripts
+ dodoc AUTHORS ChangeLog NEWS README Release_Notes
+ dodir /usr/share/doc/${PF}/examples
+ #Scripts no longer get installed by einstall
+ cp doc/examples/*_script "${D}"/usr/share/doc/${PF}/examples || die
+}