From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 533DE1382C5 for ; Sat, 17 Feb 2018 17:58:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 640A3E0A62; Sat, 17 Feb 2018 17:58:01 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2F8BEE0A62 for ; Sat, 17 Feb 2018 17:58:00 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E2C0D335C2A for ; Sat, 17 Feb 2018 17:57:58 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5CF1F1C5 for ; Sat, 17 Feb 2018 17:57:53 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1518890143.c6246077d8e40fee76c66083663b03b4d76b039f.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/nuttcp/, net-analyzer/nuttcp/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-analyzer/nuttcp/Manifest net-analyzer/nuttcp/files/nuttcp-8.1.4-makefile.patch net-analyzer/nuttcp/files/nuttcp.confd net-analyzer/nuttcp/files/nuttcp.initd net-analyzer/nuttcp/metadata.xml net-analyzer/nuttcp/nuttcp-8.1.4.ebuild X-VCS-Directories: net-analyzer/nuttcp/files/ net-analyzer/nuttcp/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: c6246077d8e40fee76c66083663b03b4d76b039f X-VCS-Branch: master Date: Sat, 17 Feb 2018 17:57:53 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 1e358108-a7cb-42d1-bbe0-a4497d19fba0 X-Archives-Hash: 735b171560c756cbe0f4ac0c854ba27c commit: c6246077d8e40fee76c66083663b03b4d76b039f Author: Vladimir Pavljuchenkov (SpiderX) spiderx dp ua> AuthorDate: Sun Oct 29 13:14:01 2017 +0000 Commit: Michał Górny gentoo org> CommitDate: Sat Feb 17 17:55:43 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6246077 net-analyzer/nuttcp: new ebuild nuttcp is a network performance measurement tool intended for use by network and system managers. Its most basic usage is to determine the raw TCP (or UDP) network layer throughput by transferring memory buffers from a source system across an interconnecting network to a destination system, either transferring data for a specified time interval, or alternatively transferring a specified number of bytes. Closes: https://bugs.gentoo.org/486788 Closes: https://github.com/gentoo/gentoo/pull/6068 Package-Manager: Portage-2.3.8, Repoman-2.3.2 net-analyzer/nuttcp/Manifest | 1 + .../nuttcp/files/nuttcp-8.1.4-makefile.patch | 21 ++++++++ net-analyzer/nuttcp/files/nuttcp.confd | 5 ++ net-analyzer/nuttcp/files/nuttcp.initd | 16 ++++++ net-analyzer/nuttcp/metadata.xml | 23 ++++++++ net-analyzer/nuttcp/nuttcp-8.1.4.ebuild | 62 ++++++++++++++++++++++ 6 files changed, 128 insertions(+) diff --git a/net-analyzer/nuttcp/Manifest b/net-analyzer/nuttcp/Manifest new file mode 100644 index 00000000000..c7bb1cf75d8 --- /dev/null +++ b/net-analyzer/nuttcp/Manifest @@ -0,0 +1 @@ +DIST nuttcp-8.1.4.tar.bz2 13063356 BLAKE2B 374b76bed06615bf5966df5864c8987d5e8336eedd7450ccfef164e575f58ce2a22dbc1e0327e7740799560c30a03f9423d3fd50579fa01cd638059485c7f61b SHA512 ba6ff33bc1790c92f47d760d4588b128f60f0ca09ed43d95fd10b0edfb636a493b0d26b195e688a13b5b79fafc1cc52a0c73455263f921ff8ad0cf087f1d937b diff --git a/net-analyzer/nuttcp/files/nuttcp-8.1.4-makefile.patch b/net-analyzer/nuttcp/files/nuttcp-8.1.4-makefile.patch new file mode 100644 index 00000000000..02de62a80e7 --- /dev/null +++ b/net-analyzer/nuttcp/files/nuttcp-8.1.4-makefile.patch @@ -0,0 +1,21 @@ +--- a/Makefile 2017-10-29 08:39:34.209474792 +0200 ++++ b/Makefile 2017-10-29 15:11:02.082490459 +0200 +@@ -2,8 +2,7 @@ + #EXTRAVERSION=-pre1 + CC = gcc -Wall + #OPT = -g -O0 +-OPT = -O3 +-CFLAGS = $(OPT) $(NOIPV6) ++CFLAGS += $(OPT) $(NOIPV6) + LIBS = + ifneq ($(NOIPV6),) + APPEXTV6=-noipv6 +@@ -53,7 +52,7 @@ + # $(MAKE) CC=icc OPT="-w -O3 -parallel -unroll -align -xM -vec_report -par_report2" + + $(APP)$(EXTRAVERSION)$(APPEXT): $(APP)$(EXTRAVERSION).c $(LIBS) +- $(CC) $(CFLAGS) -o $@ $< $(LIBS) ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) + inet_ntop.o: missing/inet_ntop.c missing/config.h + $(CC) $(CFLAGS.MISSING) -o $@ -c $< + inet_pton.o: missing/inet_pton.c missing/config.h diff --git a/net-analyzer/nuttcp/files/nuttcp.confd b/net-analyzer/nuttcp/files/nuttcp.confd new file mode 100644 index 00000000000..a41d858550a --- /dev/null +++ b/net-analyzer/nuttcp/files/nuttcp.confd @@ -0,0 +1,5 @@ +# Config file for /etc/init.d/nuttcp + +# extra options (run nuttcp -h for a list of supported options) +# Parameter -S indicates that nuttcp acts as a server. +NUTTCP_OPTS="-S" diff --git a/net-analyzer/nuttcp/files/nuttcp.initd b/net-analyzer/nuttcp/files/nuttcp.initd new file mode 100644 index 00000000000..3ba80fab8f6 --- /dev/null +++ b/net-analyzer/nuttcp/files/nuttcp.initd @@ -0,0 +1,16 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/bin/nuttcp" +command_background="yes" +command_args="${NUTTCP_OPTS}" +pidfile="/run/${RC_SVCNAME}.pid" + +depend() { + need net +} + +start_post() { + pgrep -n "${RC_SVCNAME%%.*}" > "${pidfile}" +} diff --git a/net-analyzer/nuttcp/metadata.xml b/net-analyzer/nuttcp/metadata.xml new file mode 100644 index 00000000000..66e11db82cf --- /dev/null +++ b/net-analyzer/nuttcp/metadata.xml @@ -0,0 +1,23 @@ + + + + + spiderx@spiderx.dp.ua + Vladimir Pavljuchenkov + + + proxy-maint@gentoo.org + Proxy Maintainers + + + nuttcp is a network performance measurement tool intended for use + by network and system managers. Its most basic usage is to determine + the raw TCP (or UDP) network layer throughput by transferring memory + buffers from a source system across an interconnecting network to + a destination system, either transferring data for a specified time + interval, or alternatively transferring a specified number of bytes. + + + mailto:nuttcp@lcp.nrl.navy.mil + + diff --git a/net-analyzer/nuttcp/nuttcp-8.1.4.ebuild b/net-analyzer/nuttcp/nuttcp-8.1.4.ebuild new file mode 100644 index 00000000000..97c01c07adc --- /dev/null +++ b/net-analyzer/nuttcp/nuttcp-8.1.4.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit readme.gentoo-r1 systemd toolchain-funcs + +DESCRIPTION="Network performance measurement tool" +HOMEPAGE="http://www.nuttcp.net/" +SRC_URI="http://nuttcp.net/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ipv6 xinetd" + +RDEPEND="xinetd? ( sys-apps/xinetd )" + +DOCS=( examples.txt README ) +# Honor CC, LDFLAGS, CFLAGS, CPPFLAGS +PATCHES=( "${FILESDIR}"/"${P}"-makefile.patch ) + +DOC_CONTENTS="Usage of nuttpc by its service name in xinetd service, +iptables rules, etc. will require adding these lines to /etc/services:\\n +nuttcp\\t\\t5000/tcp\\n +nuttcp-data\\t\\t5001/tcp\\n +nuttcp6\\t\\t5000/tcp\\n +nuttcp6-data\\t\\t5001/tcp\\n\\n +To run ${PN} in server mode, run:\\n/etc/init.d/${PN} start" + +src_prepare() { + default + + # Fix path to binary + sed -i '/server/s|/local||' xinetd.d/nuttcp || die "sed failed" +} + +src_compile() { + emake "$(usex ipv6 APPEXT='' NOIPV6=-DNO_IPV6)" CC="$(tc-getCC)" +} + +src_install() { + einstalldocs + doman "${PN}".8 + newbin "${P}$(usex ipv6 '' -noipv6)" "${PN}" + + newinitd "${FILESDIR}"/"${PN}".initd "${PN}" + newconfd "${FILESDIR}"/"${PN}".confd "${PN}" + systemd_dounit systemd/"${PN}"@.service + systemd_dounit systemd/"${PN}".socket + + if use xinetd ; then + insinto /etc/xinetd.d + doins xinetd.d/"${PN}" + fi + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog +}