summaryrefslogtreecommitdiff
path: root/net-analyzer/tcpreplay
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/tcpreplay')
-rw-r--r--net-analyzer/tcpreplay/Manifest5
-rw-r--r--net-analyzer/tcpreplay/files/tcpreplay-4.4.1-fix-bashism-configure.patch34
-rw-r--r--net-analyzer/tcpreplay/tcpreplay-4.4.1.ebuild85
-rw-r--r--net-analyzer/tcpreplay/tcpreplay-9999.ebuild (renamed from net-analyzer/tcpreplay/tcpreplay-999999.ebuild)2
4 files changed, 124 insertions, 2 deletions
diff --git a/net-analyzer/tcpreplay/Manifest b/net-analyzer/tcpreplay/Manifest
index 615d72e505d5..8951dbf9d6e2 100644
--- a/net-analyzer/tcpreplay/Manifest
+++ b/net-analyzer/tcpreplay/Manifest
@@ -1,5 +1,8 @@
AUX tcpreplay-4.3.0-enable-pcap_findalldevs.patch 333 BLAKE2B 1beb39a7263bf8491998760e4a62ac8908300e28c43500812d37d2512f9d63fcd175b93c1b384e03e9570e741dd95dea09ead017a014a4b62b3449833fe9b248 SHA512 3d035736c0656f6ace85b45af595866e06c8464641023e9d1606c288e598cde18eb96b1be8300514f6f31bc83756ae76b436402666036456571201ca38fe5026
+AUX tcpreplay-4.4.1-fix-bashism-configure.patch 988 BLAKE2B 847d6f241a84b456f96c2ea58a0e15df98f41befcda0a46fcb0a6e1f46b8ac3f6fb5fd8454ec91eb7696601bc015b821dd2fb3452a1dd7c79260e518ca0d2d2d SHA512 e711bb603eb490c34439557c663c31aa267cccaa47db5b40b74497771b5c7daff2e1211a19773d9b0ed2826a578f373261db2456b9747330b17e7ac3f9c3e4a9
DIST tcpreplay-4.3.4.tar.xz 739280 BLAKE2B 8b680363ee182fc7581f99cc4587d50e36285446d07a5be370e2439b31582ad88c786c11d662e28dadc5b69aee376889b1c0f6a86d61c106426ab6ab2c085012 SHA512 6d19cf492114c68a9fafcf7790c08f31607d2c0112e02fa41eed8747255bbbef85f281f74348e1d51f1d476b88f07d64715224618ec15268688baefaf7cc7124
+DIST tcpreplay-4.4.1.tar.xz 751036 BLAKE2B cf6a4e23f68fd0d6f23392c3ded14ea6486d275eeb8e278ce02d6b34e8b426e69841858cac49cc5ea952e0398f2960049789d16180b0896e38d665511237b352 SHA512 25a4a94b7c0c416b8ef57aba5640803dcd6e271fe8789f3f6e281529e336e326b35738d7673fd44ac4ded0faf577dc4c6255b926bd67b8ba5104a8bad81a98f1
EBUILD tcpreplay-4.3.4.ebuild 1925 BLAKE2B 00949edc8ccb707a26dd93ace9d298eeb1cf9167870d130f3b335e12ec88ae7842f13b560ea1e6005cc3892b94e1d7a7aff6ea958b82efa43e25a63c19951dec SHA512 2c64a85b0e9c6b6da59264d235c8c4025e2ffa58e0efa5f4b8325937a94fd3874bea8920043f28faae7eb408bf84140f1744e8fad58ed19eb9c6478bc0f83b7c
-EBUILD tcpreplay-999999.ebuild 1875 BLAKE2B acf0bc3fb3e2d84f598d8ed6e13c42bfc642da1aedf8036362e52ab0bc7709beb81d9e57517d26b2b9507ec1cf89c577b0c40993f8faa63babcfaa2d11dbdc6e SHA512 be4c895b20ee5898dc182fdf8f45de64bb9c28fb4b581c07ad29a1f03d3ed953f6bc2e6b596fac66a6290a83dcdfdab17fb01de0042b82cdae86deefcf6be062
+EBUILD tcpreplay-4.4.1.ebuild 2092 BLAKE2B 3d915076248fbe81ee43ae7221d3646caa73b47a05abe3b9821ef538b6fa5461d847bb4b0d706c0d8aa1c1a8f3c4d7ae69be287a6fb1316c3d32a9761aac51ca SHA512 e19ed257c2dfec8ecbb248635093fb2af1599e289f4be5c61a3b0cfb66e6b0f806835ef1b09a74a18c3fe3af1476463de80038d5af1afaa2697d287632a5b3de
+EBUILD tcpreplay-9999.ebuild 1875 BLAKE2B 8244388ce37dce3dc063c1238d9302b702fb63a6d3972c37691e61f5ebe1c16312c00105862f41ffefcc520735392bd801ce8b9a626f20c32db8cebf354ea7fc SHA512 5694f8d1263a34d1dfd189a42b630f33fdec017cde7980eab1d530f3ffd00fa5fdadd050a46d42f1b56de53aeb4b6878dcb4d602724a6f59f35272d5fae00180
MISC metadata.xml 1117 BLAKE2B f269c4d3da94e3fb52ad80b840c6d5b8d4acb0181dd1c370bedd88bcf75e6933f21f304f3ed5435dc601978acbef6396410d9beb96e4ec1ba1a7a53458b540c9 SHA512 bff9425e1ae71f5d106a5b2c844591db726192f356f54c6347fb9a6c10fef6b7b11cc59695b4f712d87f0359112b98ec514ce481fd824d6e343975631b105ea5
diff --git a/net-analyzer/tcpreplay/files/tcpreplay-4.4.1-fix-bashism-configure.patch b/net-analyzer/tcpreplay/files/tcpreplay-4.4.1-fix-bashism-configure.patch
new file mode 100644
index 000000000000..f1d424274333
--- /dev/null
+++ b/net-analyzer/tcpreplay/files/tcpreplay-4.4.1-fix-bashism-configure.patch
@@ -0,0 +1,34 @@
+https://github.com/appneta/tcpreplay/pull/714
+
+From bd93776c50ec1d0574c72f253095afe22eb6bf73 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sun, 13 Feb 2022 16:09:23 +0000
+Subject: [PATCH] build: fix bashism in configure
+
+configure scripts are run with /bin/sh which is supposed
+to be a POSIX-compliant shell, so if /bin/sh is provided
+by e.g. dash (like on Debian) rather than bash, we hit
+errors.
+
+This has no effect on functionality for bash &
+retains compatibility.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 11a1e4ea..4c577c42 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1808,7 +1808,7 @@ fi
+ dnl No 'make test' when cross compile
+
+ AC_MSG_CHECKING(for 'make test' profile)
+-if test "$host" == "$build" ; then
++if test "$host" = "$build" ; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_WARN(Unable to do tests when cross-compiling)
+
diff --git a/net-analyzer/tcpreplay/tcpreplay-4.4.1.ebuild b/net-analyzer/tcpreplay/tcpreplay-4.4.1.ebuild
new file mode 100644
index 000000000000..f3f9e2d4d05c
--- /dev/null
+++ b/net-analyzer/tcpreplay/tcpreplay-4.4.1.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="Utilities for editing and replaying previously captured network traffic"
+HOMEPAGE="http://tcpreplay.appneta.com/ https://github.com/appneta/tcpreplay"
+if [[ ${PV} == *9999* ]] ; then
+ EGIT_REPO_URI="https://github.com/appneta/tcpreplay"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/appneta/${PN}/releases/download/v${PV}/${P}.tar.xz"
+ KEYWORDS="amd64 ~arm ~sparc x86"
+fi
+
+S="${WORKDIR}"/${P/_/-}
+
+LICENSE="BSD GPL-3"
+SLOT="0"
+IUSE="debug pcapnav +tcpdump"
+
+# libpcapnav for pcapnav-config
+BDEPEND="
+ net-libs/libpcapnav
+ >=sys-devel/autogen-5.18.4[libopts]
+"
+DEPEND="
+ dev-libs/libdnet
+ >=net-libs/libpcap-0.9
+ pcapnav? ( net-libs/libpcapnav )
+ tcpdump? ( net-analyzer/tcpdump )
+"
+RDEPEND="${DEPEND}"
+
+DOCS=( docs/{CHANGELOG,CREDIT,HACKING,TODO} )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-4.3.0-enable-pcap_findalldevs.patch
+ "${FILESDIR}"/${PN}-4.4.1-fix-bashism-configure.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e 's|#include <dnet.h>|#include <dnet/eth.h>|g' \
+ src/common/sendpacket.c || die
+ sed -i \
+ -e 's|@\([A-Z_]*\)@|$(\1)|g' \
+ -e '/tcpliveplay_CFLAGS/s|$| $(LDNETINC)|g' \
+ -e '/tcpliveplay_LDADD/s|$| $(LDNETLIB)|g' \
+ src/Makefile.am || die
+
+ eautoreconf
+}
+
+src_configure() {
+ # By default it uses static linking. Avoid that, bug #252940
+ econf \
+ $(use_enable debug) \
+ $(use_with pcapnav pcapnav-config "${BROOT}"/usr/bin/pcapnav-config) \
+ $(use_with tcpdump tcpdump "${ESYSROOT}"/usr/sbin/tcpdump) \
+ --enable-dynamic-link \
+ --enable-local-libopts \
+ --enable-shared \
+ --with-libdnet \
+ --with-testnic2=lo \
+ --with-testnic=lo
+}
+
+src_test() {
+ if [[ ! ${EUID} -eq 0 ]] ; then
+ ewarn "Some tests were disabled due to FEATURES=userpriv"
+ ewarn "To run all tests issue the following command as root:"
+ ewarn " # make -C ${S}/test"
+ emake -j1 -C test tcpprep
+ else
+ emake -j1 test || {
+ ewarn "Note that some tests require eth0 iface to be up."
+ die "self test failed - see ${S}/test/test.log"
+ }
+ fi
+}
diff --git a/net-analyzer/tcpreplay/tcpreplay-999999.ebuild b/net-analyzer/tcpreplay/tcpreplay-9999.ebuild
index 52407c59ac72..ab3477f795b6 100644
--- a/net-analyzer/tcpreplay/tcpreplay-999999.ebuild
+++ b/net-analyzer/tcpreplay/tcpreplay-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7