pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/benchmarks/netio
Module Name: pkgsrc
Committed By: jdolecek
Date: Fri Mar 27 16:02:04 UTC 2020
Modified Files:
pkgsrc/benchmarks/netio: Makefile PLIST distinfo
Added Files:
pkgsrc/benchmarks/netio/patches: patch-Makefile patch-netio.c
Removed Files:
pkgsrc/benchmarks/netio/patches: patch-aa
Log Message:
Update to netio 1.33
Change list since 1.26 not available, but at least the ancient patch
fixing compilation with GCC seems to no longer be available.
Bring over also patch from FreeBSD ports to compile a variant
with rudimentary IPv6 support.
To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 pkgsrc/benchmarks/netio/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/benchmarks/netio/PLIST
cvs rdiff -u -r1.11 -r1.12 pkgsrc/benchmarks/netio/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/benchmarks/netio/patches/patch-Makefile \
pkgsrc/benchmarks/netio/patches/patch-netio.c
cvs rdiff -u -r1.6 -r0 pkgsrc/benchmarks/netio/patches/patch-aa
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/benchmarks/netio/Makefile
diff -u pkgsrc/benchmarks/netio/Makefile:1.21 pkgsrc/benchmarks/netio/Makefile:1.22
--- pkgsrc/benchmarks/netio/Makefile:1.21 Sun Oct 11 10:56:43 2015
+++ pkgsrc/benchmarks/netio/Makefile Fri Mar 27 16:02:04 2020
@@ -1,18 +1,19 @@
-# $NetBSD: Makefile,v 1.21 2015/10/11 10:56:43 tron Exp $
+# $NetBSD: Makefile,v 1.22 2020/03/27 16:02:04 jdolecek Exp $
-DISTNAME= netio126
-PKGNAME= netio-1.26
+DISTNAME= netio133
+PKGNAME= netio-1.33
CATEGORIES= benchmarks net
-MASTER_SITES= http://www.ars.de/ars/ars.nsf/f24a6a0b94c22d82862566960071bf5a/aa577bc4be573b05c125706d004c75b5/\$$FILE/
+MASTER_SITES= http://www.ars.de/
EXTRACT_SUFX= .zip
-HOMEPAGE= http://www.ars.de/ars/ars.nsf/docs/netio
+HOMEPAGE= https://web.ars.de/netio/
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
COMMENT= Network benchmark for OS/2 2.x, Windows NT/2000 and Unix
LICENSE= no-commercial-use
WRKSRC= ${WRKDIR}
-MAKE_FLAGS+= CC=${CC:Q} CFLAGS="-DUNIX ${PTHREAD_CFLAGS} ${CFLAGS}" \
+NETIO_CFLAGS+= -DUNIX ${PTHREAD_CFLAGS} ${CFLAGS}
+MAKE_FLAGS+= CC=${CC:Q} CFLAGS="${NETIO_CFLAGS}" \
LFLAGS="${PTHREAD_LDFLAGS} ${LDFLAGS}" \
LIBS="${PTHREAD_LIBS} ${LIBS}" O=.o OUT=-o X=
@@ -22,8 +23,14 @@ LIBS.SunOS+= -lsocket -lnsl
INSTALLATION_DIRS= bin
+post-build:
+ ${RUN}cd ${WRKSRC} && \
+ ${BUILD_MAKE_CMD} O=.6o X=6 CFLAGS="${NETIO_CFLAGS} -DUSE_IPV6" \
+ ${BUILD_TARGET}
+
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/netio ${DESTDIR}${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKSRC}/netio6 ${DESTDIR}${PREFIX}/bin
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/doc/netio
${INSTALL_DATA} ${WRKSRC}/netio.doc \
${DESTDIR}${PREFIX}/share/doc/netio/netio.txt
Index: pkgsrc/benchmarks/netio/PLIST
diff -u pkgsrc/benchmarks/netio/PLIST:1.3 pkgsrc/benchmarks/netio/PLIST:1.4
--- pkgsrc/benchmarks/netio/PLIST:1.3 Sun Jun 14 17:33:12 2009
+++ pkgsrc/benchmarks/netio/PLIST Fri Mar 27 16:02:04 2020
@@ -1,3 +1,4 @@
-@comment $NetBSD: PLIST,v 1.3 2009/06/14 17:33:12 joerg Exp $
+@comment $NetBSD: PLIST,v 1.4 2020/03/27 16:02:04 jdolecek Exp $
bin/netio
+bin/netio6
share/doc/netio/netio.txt
Index: pkgsrc/benchmarks/netio/distinfo
diff -u pkgsrc/benchmarks/netio/distinfo:1.11 pkgsrc/benchmarks/netio/distinfo:1.12
--- pkgsrc/benchmarks/netio/distinfo:1.11 Tue Nov 3 00:25:51 2015
+++ pkgsrc/benchmarks/netio/distinfo Fri Mar 27 16:02:04 2020
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.11 2015/11/03 00:25:51 agc Exp $
+$NetBSD: distinfo,v 1.12 2020/03/27 16:02:04 jdolecek Exp $
-SHA1 (netio126.zip) = ef63e9b0564445a1831b53be98a5472dbceaa922
-RMD160 (netio126.zip) = bff92f25df1df87c7075432b1da3e0f7defe1e30
-SHA512 (netio126.zip) = ff3d704621d6dcee11c88a79cc8037b3d3c8afb7fb508256c4045e119e65b754749355d12262d8f1039779cf45cb2e9f116a186f0c9ec822b66251d984e7025a
-Size (netio126.zip) = 140402 bytes
-SHA1 (patch-aa) = 194bb630fd09f2cc5c8a6842212eb01adb676584
+SHA1 (netio133.zip) = ffc562dfe45127e58fcfb7dcf325317e29809baf
+RMD160 (netio133.zip) = 544a3bcc53db6363c7d2601d63430e102237f75e
+SHA512 (netio133.zip) = 79a4d8ad5a5d9750a19bf7f8f4cc762e6d1a866a63138bfc1cf8614057eb8ade147817e489f93210990ce9d82be03a5053821663212fbee71c4cd46c2f9c9232
+Size (netio133.zip) = 235931 bytes
+SHA1 (patch-Makefile) = 79bff1eb7b526a0f41fbb89e646c66a16b78c23e
+SHA1 (patch-netio.c) = bdd658e03101fa820e614c0a1113a8688e485a7f
Added files:
Index: pkgsrc/benchmarks/netio/patches/patch-Makefile
diff -u /dev/null pkgsrc/benchmarks/netio/patches/patch-Makefile:1.1
--- /dev/null Fri Mar 27 16:02:04 2020
+++ pkgsrc/benchmarks/netio/patches/patch-Makefile Fri Mar 27 16:02:04 2020
@@ -0,0 +1,16 @@
+$NetBSD: patch-Makefile,v 1.1 2020/03/27 16:02:04 jdolecek Exp $
+
+Patch to add way to compile with IPv6 support. Patch taken from:
+https://svnweb.freebsd.org/ports/head/benchmarks/netio/files/patch-Makefile
+
+--- Makefile.orig 2012-12-11 20:54:30.000000000 +0000
++++ Makefile
+@@ -111,7 +111,7 @@ netio$X: netio$O getopt$O
+
+ .SUFFIXES: .c $O
+ .c$O:
+- $(CC) $(CFLAGS) $(INC) -c $*.c
++ $(CC) $(OUT) $@ $(CFLAGS) $(INC) -c $*.c
+
+ netio$O: netio.c getopt.h
+ getopt$O: getopt.c getopt.h
Index: pkgsrc/benchmarks/netio/patches/patch-netio.c
diff -u /dev/null pkgsrc/benchmarks/netio/patches/patch-netio.c:1.1
--- /dev/null Fri Mar 27 16:02:04 2020
+++ pkgsrc/benchmarks/netio/patches/patch-netio.c Fri Mar 27 16:02:04 2020
@@ -0,0 +1,335 @@
+$NetBSD: patch-netio.c,v 1.1 2020/03/27 16:02:04 jdolecek Exp $
+
+Add support for compiling with IPv6 support. Patch taken from:
+https://svnweb.freebsd.org/ports/head/benchmarks/netio/files/patch-netio.c
+
+--- netio.c.orig 2018-12-16 23:44:34.000000000 +0100
++++ netio.c 2020-03-27 16:37:07.000000000 +0100
+@@ -142,6 +142,7 @@
+ #include <signal.h>
+ #include <time.h>
+ #if defined(UNIX) || defined(DJGPP)
++#include <arpa/inet.h>
+ #include <sys/time.h>
+ #include <unistd.h>
+ #include <errno.h>
+@@ -559,7 +560,7 @@
+
+ int recv_data(int socket, void *buffer, size_t size, int flags)
+ {
+- size_t rc = recv(socket, buffer, size, flags);
++ ssize_t rc = recv(socket, buffer, size, flags);
+
+ if (rc < 0)
+ {
+@@ -576,8 +577,13 @@
+ const int sobufsize = 131072;
+ int nPort = DEFAULTPORT;
+ int nAuxPort = DEFAULTPORT + 1;
++#ifdef USE_IPV6
++struct in6_addr addr_server;
++struct in6_addr addr_local;
++#else
+ struct in_addr addr_server;
+ struct in_addr addr_local;
++#endif
+
+ int udpsocket, udpd;
+ unsigned long nUDPCount;
+@@ -590,7 +596,11 @@
+ TIMER nTimer;
+ long nTime;
+ long long nData;
++#ifdef USE_IPV6
++ struct sockaddr_in6 sa_server, sa_client;
++#else
+ struct sockaddr_in sa_server, sa_client;
++#endif
+ int server, client;
+ socklen_type length;
+ struct timeval tv;
+@@ -605,7 +615,11 @@
+ return THREADRESULT;
+ }
+
++#ifdef USE_IPV6
++ if ((server = socket(PF_INET6, SOCK_STREAM, 0)) < 0)
++#else
+ if ((server = socket(PF_INET, SOCK_STREAM, 0)) < 0)
++#endif
+ {
+ psock_errno("socket()");
+ free(cBuffer);
+@@ -616,9 +630,15 @@
+ setsockopt(server, SOL_SOCKET, SO_SNDBUF, (char *) &sobufsize, sizeof(sobufsize));
+ setsockopt(server, IPPROTO_TCP, TCP_NODELAY, (char *) &flag, sizeof(int));
+
++#ifdef USE_IPV6
++ sa_server.sin6_family = AF_INET6;
++ sa_server.sin6_port = htons(nPort);
++ sa_server.sin6_addr = addr_local;
++#else
+ sa_server.sin_family = AF_INET;
+ sa_server.sin_port = htons(nPort);
+ sa_server.sin_addr = addr_local;
++#endif
+
+ if (bind(server, (struct sockaddr *) &sa_server, sizeof(sa_server)) < 0)
+ {
+@@ -768,7 +788,11 @@
+ long nTime;
+ long long nData;
+ int i;
++#ifdef USE_IPV6
++ struct sockaddr_in6 sa_server, sa_client;
++#else
+ struct sockaddr_in sa_server, sa_client;
++#endif
+ int server;
+ int rc;
+ int nByte;
+@@ -780,7 +804,11 @@
+ return;
+ }
+
++#ifdef USE_IPV6
++ if ((server = socket(PF_INET6, SOCK_STREAM, 0)) < 0)
++#else
+ if ((server = socket(PF_INET, SOCK_STREAM, 0)) < 0)
++#endif
+ {
+ psock_errno("socket()");
+ free(cBuffer);
+@@ -791,9 +819,15 @@
+ setsockopt(server, SOL_SOCKET, SO_SNDBUF, (char *) &sobufsize, sizeof(sobufsize));
+ setsockopt(server, IPPROTO_TCP, TCP_NODELAY, (char *) &flag, sizeof(int));
+
++#ifdef USE_IPV6
++ sa_client.sin6_family = AF_INET6;
++ sa_client.sin6_port = htons(0);
++ sa_client.sin6_addr = addr_local;
++#else
+ sa_client.sin_family = AF_INET;
+ sa_client.sin_port = htons(0);
+ sa_client.sin_addr = addr_local;
++#endif
+
+ if (bind(server, (struct sockaddr *) &sa_client, sizeof(sa_client)) < 0)
+ {
+@@ -803,9 +837,15 @@
+ return;
+ }
+
++#ifdef USE_IPV6
++ sa_server.sin6_family = AF_INET6;
++ sa_server.sin6_port = htons(nPort);
++ sa_server.sin6_addr = addr_server;
++#else
+ sa_server.sin_family = AF_INET;
+ sa_server.sin_port = htons(nPort);
+ sa_server.sin_addr = addr_server;
++#endif
+
+ if (connect(server, (struct sockaddr *) &sa_server, sizeof(sa_server)) < 0)
+ {
+@@ -928,7 +968,11 @@
+ THREAD UDP_Receiver(void *arg)
+ {
+ char *cBuffer;
++#ifdef USE_IPV6
++ struct sockaddr_in6 sa_server, sa_client;
++#else
+ struct sockaddr_in sa_server, sa_client;
++#endif
+ int rc;
+ socklen_type nBytes;
+
+@@ -938,7 +982,11 @@
+ return THREADRESULT;
+ }
+
++#ifdef USE_IPV6
++ if ((udpsocket = socket(PF_INET6, SOCK_DGRAM, 0)) < 0)
++#else
+ if ((udpsocket = socket(PF_INET, SOCK_DGRAM, 0)) < 0)
++#endif
+ {
+ psock_errno("socket(DGRAM)");
+ free(cBuffer);
+@@ -948,9 +996,15 @@
+ setsockopt(udpsocket, SOL_SOCKET, SO_RCVBUF, (char *) &sobufsize, sizeof(sobufsize));
+ setsockopt(udpsocket, SOL_SOCKET, SO_SNDBUF, (char *) &sobufsize, sizeof(sobufsize));
+
++#ifdef USE_IPV6
++ sa_server.sin6_family = AF_INET6;
++ sa_server.sin6_port = htons(nAuxPort);
++ sa_server.sin6_addr = addr_local;
++#else
+ sa_server.sin_family = AF_INET;
+ sa_server.sin_port = htons(nAuxPort);
+ sa_server.sin_addr = addr_local;
++#endif
+
+ if (bind(udpsocket, (struct sockaddr *) &sa_server, sizeof(sa_server)) < 0)
+ {
+@@ -990,7 +1044,11 @@
+ TIMER nTimer;
+ long nTime;
+ long long nData;
++#ifdef USE_IPV6
++ struct sockaddr_in6 sa_server, sa_client;
++#else
+ struct sockaddr_in sa_server, sa_client;
++#endif
+ int server, client;
+ struct timeval tv;
+ fd_set fds;
+@@ -1003,7 +1061,11 @@
+ return THREADRESULT;
+ }
+
++#ifdef USE_IPV6
++ if ((server = socket(PF_INET6, SOCK_STREAM, 0)) < 0)
++#else
+ if ((server = socket(PF_INET, SOCK_STREAM, 0)) < 0)
++#endif
+ {
+ psock_errno("socket(STREAM)");
+ free(cBuffer);
+@@ -1013,9 +1075,15 @@
+ setsockopt(server, SOL_SOCKET, SO_RCVBUF, (char *) &sobufsize, sizeof(sobufsize));
+ setsockopt(server, SOL_SOCKET, SO_SNDBUF, (char *) &sobufsize, sizeof(sobufsize));
+
++#ifdef USE_IPV6
++ sa_server.sin6_family = AF_INET6;
++ sa_server.sin6_port = htons(nAuxPort);
++ sa_server.sin6_addr = addr_local;
++#else
+ sa_server.sin_family = AF_INET;
+ sa_server.sin_port = htons(nAuxPort);
+ sa_server.sin_addr = addr_local;
++#endif
+
+ if (bind(server, (struct sockaddr *) &sa_server, sizeof(sa_server)) < 0)
+ {
+@@ -1061,7 +1129,11 @@
+ printf("UDP connection established ... ");
+ fflush(stdout);
+
++#ifdef USE_IPV6
++ sa_client.sin6_port = htons(nAuxPort);
++#else
+ sa_client.sin_port = htons(nAuxPort);
++#endif
+
+ for (;;)
+ {
+@@ -1177,7 +1249,11 @@
+ long nResult;
+ long long nData;
+ int i;
++#ifdef USE_IPV6
++ struct sockaddr_in6 sa_server, sa_client;
++#else
+ struct sockaddr_in sa_server, sa_client;
++#endif
+ int server;
+ int rc, nByte;
+
+@@ -1187,7 +1263,11 @@
+ return;
+ }
+
++#ifdef USE_IPV6
++ if ((server = socket(PF_INET6, SOCK_STREAM, 0)) < 0)
++#else
+ if ((server = socket(PF_INET, SOCK_STREAM, 0)) < 0)
++#endif
+ {
+ psock_errno("socket()");
+ free(cBuffer);
+@@ -1197,9 +1277,15 @@
+ setsockopt(server, SOL_SOCKET, SO_RCVBUF, (char *) &sobufsize, sizeof(sobufsize));
+ setsockopt(server, SOL_SOCKET, SO_SNDBUF, (char *) &sobufsize, sizeof(sobufsize));
+
++#ifdef USE_IPV6
++ sa_client.sin6_family = AF_INET6;
++ sa_client.sin6_port = htons(0);
++ sa_client.sin6_addr = addr_local;
++#else
+ sa_client.sin_family = AF_INET;
+- sa_client.sin_port = htons(0);
++ sa_client.sin_port = htons(0);
+ sa_client.sin_addr = addr_local;
++#endif
+
+ if (bind(server, (struct sockaddr *) &sa_client, sizeof(sa_client)) < 0)
+ {
+@@ -1209,9 +1295,15 @@
+ return;
+ }
+
++#ifdef USE_IPV6
++ sa_server.sin6_family = AF_INET6;
++ sa_server.sin6_port = htons(nAuxPort);
++ sa_server.sin6_addr = addr_server;
++#else
+ sa_server.sin_family = AF_INET;
+ sa_server.sin_port = htons(nAuxPort);
+ sa_server.sin_addr = addr_server;
++#endif
+
+ if (connect(server, (struct sockaddr *) &sa_server, sizeof(sa_server)) < 0)
+ {
+@@ -1442,17 +1534,29 @@
+ return psock_errno("sock_init()"), 1;
+
+ if (szLocal == 0)
++#ifdef USE_IPV6
++ addr_local = in6addr_any;
++#else
+ addr_local.s_addr = INADDR_ANY;
++#endif
+ else
+ {
+ if (isdigit(*szLocal))
++#ifdef USE_IPV6
++ inet_pton(AF_INET6, szLocal, &addr_local);
++#else
+ addr_local.s_addr = inet_addr(szLocal);
++#endif
+ else
+ {
+ if ((host = gethostbyname(szLocal)) == NULL)
+ return psock_errno("gethostbyname()"), 1;
+
++#ifdef USE_IPV6
++ addr_local = * (struct in6_addr *) (host->h_addr);
++#else
+ addr_local = * (struct in_addr *) (host->h_addr);
++#endif
+ }
+ }
+
+@@ -1462,13 +1566,21 @@
+ usage();
+
+ if (isdigit(*argv[optind]))
++#ifdef USE_IPV6
++ inet_pton(AF_INET6, argv[optind], &addr_server);
++#else
+ addr_server.s_addr = inet_addr(argv[optind]);
++#endif
+ else
+ {
+ if ((host = gethostbyname(argv[optind])) == NULL)
+ return psock_errno("gethostbyname()"), 1;
+
++#ifdef USE_IPV6
++ addr_server = * (struct in6_addr *) (host->h_addr);
++#else
+ addr_server = * (struct in_addr *) (host->h_addr);
++#endif
+ }
+ }
+ }
Home |
Main Index |
Thread Index |
Old Index