git: 725341500a09 - main - net-mgmt/ipgen: Add new port
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 08 Nov 2024 00:14:26 UTC
The branch main has been updated by hrs: URL: https://cgit.FreeBSD.org/ports/commit/?id=725341500a0943938b6da328244e02970895e11a commit 725341500a0943938b6da328244e02970895e11a Author: Hiroki Sato <hrs@FreeBSD.org> AuthorDate: 2024-11-08 00:09:07 +0000 Commit: Hiroki Sato <hrs@FreeBSD.org> CommitDate: 2024-11-08 00:13:56 +0000 net-mgmt/ipgen: Add new port The ipgen utility is a high-performance L2/L3 packet traffic generator based on netmap with RFC 2544 benchmarking methodology and an interactive user interface to show throughput and frame loss rate. --- net-mgmt/Makefile | 1 + net-mgmt/ipgen/Makefile | 32 ++++++++++++++++++++++ net-mgmt/ipgen/distinfo | 3 ++ net-mgmt/ipgen/files/patch-Makefile.inc | 13 +++++++++ net-mgmt/ipgen/files/patch-gen-GNUmakefile | 15 ++++++++++ net-mgmt/ipgen/files/patch-htdocs-GNUmakefile | 10 +++++++ net-mgmt/ipgen/files/patch-libaddrlist-GNUmakefile | 10 +++++++ net-mgmt/ipgen/files/patch-libpkt-GNUmakefile | 10 +++++++ net-mgmt/ipgen/files/patch-script-GNUmakefile | 12 ++++++++ net-mgmt/ipgen/pkg-descr | 3 ++ net-mgmt/ipgen/pkg-plist | 27 ++++++++++++++++++ 11 files changed, 136 insertions(+) diff --git a/net-mgmt/Makefile b/net-mgmt/Makefile index 3e98aebbf3f3..469fd6856a06 100644 --- a/net-mgmt/Makefile +++ b/net-mgmt/Makefile @@ -117,6 +117,7 @@ SUBDIR += ipcad SUBDIR += ipcalc SUBDIR += ipfixcol2 + SUBDIR += ipgen SUBDIR += iprange SUBDIR += ipv6calc SUBDIR += ipv6gen diff --git a/net-mgmt/ipgen/Makefile b/net-mgmt/ipgen/Makefile new file mode 100644 index 000000000000..25d324f9d3b0 --- /dev/null +++ b/net-mgmt/ipgen/Makefile @@ -0,0 +1,32 @@ +PORTNAME= ipgen +PORTVERSION= 1.30.20240527 +CATEGORIES= net-mgmt + +MAINTAINER= hrs@FreeBSD.org +COMMENT= Interactive Packet Generator and Benchmarking Utility +WWW= https://github.com/iij/ipgen + +LICENSE= BSD2CLAUSE + +LIB_DEPENDS= libevent.so:devel/libevent + +USES= gmake perl5 shebangfix +USE_GITHUB= yes +GH_ACCOUNT= iij +GH_TAGNAME= 9e649f4 + +SHEBANG_FILES= gen/layout_generator +MAKEFILE= GNUmakefile +PORTDOCS= README.md + +OPTIONS_DEFINE= DOCS +OPTIONS_DEFAULT=DOCS + +pre-build: + cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} -f ${MAKEFILE} depend +pre-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} +post-install-DOCS-on: + cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} + +.include <bsd.port.mk> diff --git a/net-mgmt/ipgen/distinfo b/net-mgmt/ipgen/distinfo new file mode 100644 index 000000000000..a53baadb7b0d --- /dev/null +++ b/net-mgmt/ipgen/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1731024085 +SHA256 (iij-ipgen-1.30.20240527-9e649f4_GH0.tar.gz) = 03303932fca65a9073b6372c0133e9958f26c0a44fa192846fea2019076e5aa6 +SIZE (iij-ipgen-1.30.20240527-9e649f4_GH0.tar.gz) = 267985 diff --git a/net-mgmt/ipgen/files/patch-Makefile.inc b/net-mgmt/ipgen/files/patch-Makefile.inc new file mode 100644 index 000000000000..b6942a9ff93f --- /dev/null +++ b/net-mgmt/ipgen/files/patch-Makefile.inc @@ -0,0 +1,13 @@ +--- Makefile.inc.orig 2024-05-27 06:59:46 UTC ++++ Makefile.inc +@@ -1,3 +1,10 @@ MANDIR?= ${PREFIX}/share/man + PREFIX?= /usr/local + LOCALBASE?= ${PREFIX} + MANDIR?= ${PREFIX}/share/man ++ ++BSD_INSTALL_CMD?= install -o root -g wheel ++BSD_INSTALL_PROGRAM?= ${BSD_INSTALL_CMD} -m 555 ++BSD_INSTALL_MAN?= ${BSD_INSTALL_CMD} -m 444 ++BSD_INSTALL_SCRIPT?= ${BSD_INSTALL_CMD} -m 444 ++BSD_INSTALL_DATA?= ${BSD_INSTALL_CMD} -m 444 ++BSD_INSTALL_DIR?= ${BSD_INSTALL_CMD} -d -m 755 diff --git a/net-mgmt/ipgen/files/patch-gen-GNUmakefile b/net-mgmt/ipgen/files/patch-gen-GNUmakefile new file mode 100644 index 000000000000..8d4fac3c53e6 --- /dev/null +++ b/net-mgmt/ipgen/files/patch-gen-GNUmakefile @@ -0,0 +1,15 @@ +--- gen/GNUmakefile.orig 2024-05-27 06:59:46 UTC ++++ gen/GNUmakefile +@@ -46,9 +46,9 @@ install: + rm -f .depend GPATH GRTAGS GSYMS GTAGS + + install: +- install -o root -g wheel -m 550 ipgen ${DESTDIR}${PREFIX}/bin/ +- install -o root -g wheel -m 755 -d ${DESTDIR}${MANDIR}/man1 +- install -o root -g wheel -m 444 ipgen.1 ${DESTDIR}${MANDIR}/man1 ++ ${BSD_INSTALL_PROGRAM} ipgen ${DESTDIR}${PREFIX}/bin/ ++ ${BSD_INSTALL_DIR} -d ${DESTDIR}${MANDIR}/man1 ++ ${BSD_INSTALL_MAN} ipgen.1 ${DESTDIR}${MANDIR}/man1 + + sequencecheck: sequencecheck.c seqcheck_test.c + $(CC) -o $@ sequencecheck.c $(CFLAGS) -DTEST diff --git a/net-mgmt/ipgen/files/patch-htdocs-GNUmakefile b/net-mgmt/ipgen/files/patch-htdocs-GNUmakefile new file mode 100644 index 000000000000..6d0071b1769d --- /dev/null +++ b/net-mgmt/ipgen/files/patch-htdocs-GNUmakefile @@ -0,0 +1,10 @@ +--- htdocs/GNUmakefile.orig 2024-05-27 06:59:46 UTC ++++ htdocs/GNUmakefile +@@ -12,5 +12,5 @@ install: + depend: + + install: +- install -o root -g wheel -m 755 -d ${DESTDIR}${PREFIX}/share/ipgen/htdocs +- install -o root -g wheel -m 444 ${FILES} ${DESTDIR}${PREFIX}/share/ipgen/htdocs ++ ${BSD_INSTALL_DIR} ${DESTDIR}${PREFIX}/share/ipgen/htdocs ++ ${BSD_INSTALL_DATA} ${FILES} ${DESTDIR}${PREFIX}/share/ipgen/htdocs diff --git a/net-mgmt/ipgen/files/patch-libaddrlist-GNUmakefile b/net-mgmt/ipgen/files/patch-libaddrlist-GNUmakefile new file mode 100644 index 000000000000..2824fe1e2944 --- /dev/null +++ b/net-mgmt/ipgen/files/patch-libaddrlist-GNUmakefile @@ -0,0 +1,10 @@ +--- libaddrlist/GNUmakefile.orig 2024-02-29 01:39:01 UTC ++++ libaddrlist/GNUmakefile +@@ -3,7 +3,6 @@ SRCS+= addresses.c + + SRCS+= addresses.c + +-CFLAGS+= -O2 + CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith + CFLAGS+= -Wreturn-type -Wswitch -Wshadow + CFLAGS+= -Wcast-qual -Wwrite-strings diff --git a/net-mgmt/ipgen/files/patch-libpkt-GNUmakefile b/net-mgmt/ipgen/files/patch-libpkt-GNUmakefile new file mode 100644 index 000000000000..7c76074a0089 --- /dev/null +++ b/net-mgmt/ipgen/files/patch-libpkt-GNUmakefile @@ -0,0 +1,10 @@ +--- libpkt/GNUmakefile.orig 2024-02-29 01:38:00 UTC ++++ libpkt/GNUmakefile +@@ -8,7 +8,6 @@ SRCS+= utils.c + SRCS+= ip6pkt.c + SRCS+= utils.c + +-CFLAGS+= -O2 + CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith + CFLAGS+= -Wreturn-type -Wswitch -Wshadow + CFLAGS+= -Wcast-qual -Wwrite-strings diff --git a/net-mgmt/ipgen/files/patch-script-GNUmakefile b/net-mgmt/ipgen/files/patch-script-GNUmakefile new file mode 100644 index 000000000000..4040df97081c --- /dev/null +++ b/net-mgmt/ipgen/files/patch-script-GNUmakefile @@ -0,0 +1,12 @@ +--- script/GNUmakefile.orig 2024-05-27 06:59:46 UTC ++++ script/GNUmakefile +@@ -26,6 +26,6 @@ install: + depend: + + install: +- install -o root -g wheel -m 555 log2graph ${DESTDIR}${PREFIX}/bin/ipgen_log2graph +- install -o root -g wheel -m 755 -d ${DESTDIR}${PREFIX}/share/ipgen/script +- install -o root -g wheel -m 444 ${FILES} ${DESTDIR}${PREFIX}/share/ipgen/script ++ ${BSD_INSTALL_SCRIPT} log2graph ${DESTDIR}${PREFIX}/bin/ipgen_log2graph ++ ${BSD_INSTALL_DIR} ${DESTDIR}${PREFIX}/share/ipgen/script ++ ${BSD_INSTALL_SCRIPT} ${FILES} ${DESTDIR}${PREFIX}/share/ipgen/script diff --git a/net-mgmt/ipgen/pkg-descr b/net-mgmt/ipgen/pkg-descr new file mode 100644 index 000000000000..ac976934c4db --- /dev/null +++ b/net-mgmt/ipgen/pkg-descr @@ -0,0 +1,3 @@ +ipgen is a high-performance packet traffic generator based on netmap +that can interactively output packets of various sizes/rates to measure +the throughput and frame loss rate. diff --git a/net-mgmt/ipgen/pkg-plist b/net-mgmt/ipgen/pkg-plist new file mode 100644 index 000000000000..d6d59aa2154f --- /dev/null +++ b/net-mgmt/ipgen/pkg-plist @@ -0,0 +1,27 @@ +bin/ipgen +bin/ipgen_log2graph +share/man/man1/ipgen.1.gz +%%DATADIR%%/htdocs/default.css +%%DATADIR%%/htdocs/dygraph-combined.js +%%DATADIR%%/htdocs/index.html +%%DATADIR%%/htdocs/jquery-1.11.1.min.js +%%DATADIR%%/htdocs/pktgen.js +%%DATADIR%%/script/pktsize46.script +%%DATADIR%%/script/pktsize66.script +%%DATADIR%%/script/pktsize100.script +%%DATADIR%%/script/pktsize200.script +%%DATADIR%%/script/pktsize300.script +%%DATADIR%%/script/pktsize400.script +%%DATADIR%%/script/pktsize500.script +%%DATADIR%%/script/pktsize600.script +%%DATADIR%%/script/pktsize700.script +%%DATADIR%%/script/pktsize800.script +%%DATADIR%%/script/pktsize900.script +%%DATADIR%%/script/pktsize1000.script +%%DATADIR%%/script/pktsize1100.script +%%DATADIR%%/script/pktsize1200.script +%%DATADIR%%/script/pktsize1280.script +%%DATADIR%%/script/pktsize1300.script +%%DATADIR%%/script/pktsize1400.script +%%DATADIR%%/script/pktsize1500.script +%%DATADIR%%/script/pktsizeAll.script