From nobody Sat Feb 24 08:47:23 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ThgVh2X6Cz5CLr7; Sat, 24 Feb 2024 08:47:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ThgVh1xxSz4PBv; Sat, 24 Feb 2024 08:47:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708764444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FMpTco8Vn37lHkhvMZpsERPdPW37zkMD9zQyop+9Ooo=; b=DO+4cjyoBKykkOWO80RMJfbAAJVYQvv304UcUOeHfxz4BLYNlgvPooe4lDwz6I33x4t7RG CQW8/CR1+cEQ3dFXYbtHnVCYjbN9jcvF+GQYBcPTLKV7iiWuv4IEr52EPwg/pUtYORXDWn UvBE5+9YrK6+ZesQUhB0f1SbmmNOJCEf5qXya/Xkpq2mcLYWWllg2S/eNLgSSkTlq0ZQgi N5yfDdiAH9a/SGulJ8dWwrRgipIbqG+2G1XQA4te6c8WOMgag6pyed114La1K4QtvP0ma2 DVBDvXsHL5YKyRLpPgYosG2eKMFZpnTWOQc4HGsX7UEkeZYH9jfXW7FmXw98Gg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708764444; a=rsa-sha256; cv=none; b=edZjIwgdcc1S01dOm7p/LnYt5Eogn5I+51dEdBgQ8cD/bemDu16PlzVDbSt+1FyKsiWN/b qJ9xXLYqUcYXbLt3MSNZ+lx8BxPSvYbAU8Nlnu52RgbbjJ1StFEfMDf0U889cd9anUYoeA s8LgfhJd5vxrgBS0b0/NV93qMYm7OXPrhXaKHJee6wuG6/hKKMW4txISor0ClOR5+v/hJ4 jIQkai4dkw2Mzhv/bLIxptOs7yUhzlNKC4DXlnhPuIpkQyPkvv5fGjMigcywK6FMJ6oKXh QIFU/QxHI+84p3/Fh1o9usapS/rEuHUbXGIIL3MxUAuOkKUMsccxTz8mvILrow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708764444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FMpTco8Vn37lHkhvMZpsERPdPW37zkMD9zQyop+9Ooo=; b=fjRADWbMI1xn4m8cM/YT3uyNoYK5XJ+6mA0kOAT9MCYJhOm2JKw+WtkLn82w9CG1EiiXEk ENdJjXLmPvtyFJyb5uu6y9rDo+i8bU4Q2HoX0vQgvP6HT54XlxHnIdLnDs17dLD6/zAA18 ULErKkvD78pez/ANRzVtTH4MY9j3NtPwukefIwbKWTkWdyTOqCxRmlrInR5z51bTFFqsm1 u9b+OEAuGMidPBYUFJWZqFiKwKWynmSSofRvoY7vC0uXGDuZGEX7xfekxedDLHCEUKbrfG YYO2kmV4czAdjha673lOxfKN32awtGJ5QKOKVGcEDRU6reO2Iy9QL8OMNcCBGg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ThgVh0tbgzsLZ; Sat, 24 Feb 2024 08:47:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41O8lNud026754; Sat, 24 Feb 2024 08:47:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41O8lN0C026751; Sat, 24 Feb 2024 08:47:23 GMT (envelope-from git) Date: Sat, 24 Feb 2024 08:47:23 GMT Message-Id: <202402240847.41O8lN0C026751@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Gleb Popov Subject: git: 36c21f98ff44 - main - benchmarks/ttcp: Update to 1.13 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arrowd X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 36c21f98ff445e373ab61726ee8b64e02f8984f7 Auto-Submitted: auto-generated The branch main has been updated by arrowd: URL: https://cgit.FreeBSD.org/ports/commit/?id=36c21f98ff445e373ab61726ee8b64e02f8984f7 commit 36c21f98ff445e373ab61726ee8b64e02f8984f7 Author: Chris Hutchinson AuthorDate: 2024-02-24 08:43:41 +0000 Commit: Gleb Popov CommitDate: 2024-02-24 08:46:30 +0000 benchmarks/ttcp: Update to 1.13 PR: 276759 --- benchmarks/ttcp/Makefile | 29 ++--- benchmarks/ttcp/distinfo | 9 +- benchmarks/ttcp/files/patch-ttcp.c | 257 ------------------------------------- benchmarks/ttcp/pkg-plist | 3 - 4 files changed, 15 insertions(+), 283 deletions(-) diff --git a/benchmarks/ttcp/Makefile b/benchmarks/ttcp/Makefile index 364903c075df..32a074aa304f 100644 --- a/benchmarks/ttcp/Makefile +++ b/benchmarks/ttcp/Makefile @@ -1,29 +1,24 @@ PORTNAME= ttcp -PORTVERSION= 1.12 -PORTREVISION= 3 +PORTVERSION= 1.13 CATEGORIES= benchmarks net -MASTER_SITES= https://BSDforge.com/projects/source/benchmarks/ttcp/ -DISTFILES= ttcp.c ttcp.1 README -DIST_SUBDIR= ${PORTNAME} -EXTRACT_ONLY= # none +MASTER_SITES= https://codeberg.org/BSDforge/${PORTNAME}/archive/ MAINTAINER= portmaster@BSDforge.com COMMENT= Benchmarking tool for analysing TCP and UDP performance -WWW= https://ftp.arl.army.mil/~mike/ttcp.html +WWW= https://codeberg.org/BSDforge/ttcp/ -LICENSE= PD +LICENSE= BSD0CLAUSE -DEPRECATED= Abandonware, no release in over 20 years. Consider using benchmarks/iperf3 or benchmarks/nttcp -EXPIRATION_DATE=2024-02-29 - -NO_WRKSUBDIR= yes +CFLAGS+= -Wno-strict-prototypes +PLIST_FILES= bin/ttcp share/man/man1/ttcp.1.gz +PORTDOCS_PLIST_FILES= share/doc/ttcp/README share/doc/ttcp/CHANGES \ + share/doc/ttcp/LICENSE +PORTDOCS= README CHANGES LICENSE OPTIONS_DEFINE= DOCS - +# because the ports framework doesn't cope well with bare ${PORTNAME} ${WRKSRC} post-extract: - ${CP} ${DISTDIR}/${DIST_SUBDIR}/ttcp.c ${WRKSRC} - ${CP} ${DISTDIR}/${DIST_SUBDIR}/ttcp.1 ${WRKSRC} - ${CP} ${DISTDIR}/${DIST_SUBDIR}/README ${WRKSRC} + ${MV} ${WRKDIR}/${PORTNAME} ${WRKDIR}/${PORTNAME}-${PORTVERSION} do-build: ${CC} ${CFLAGS} -o ${WRKSRC}/ttcp ${WRKSRC}/ttcp.c @@ -34,6 +29,6 @@ do-install: do-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR} .include diff --git a/benchmarks/ttcp/distinfo b/benchmarks/ttcp/distinfo index 3415da392dd6..20f0333e9396 100644 --- a/benchmarks/ttcp/distinfo +++ b/benchmarks/ttcp/distinfo @@ -1,6 +1,3 @@ -SHA256 (ttcp/ttcp.c) = e630a95788efacfee226dff3550e58ed908987ef96817efc8ad4862657a60c3b -SIZE (ttcp/ttcp.c) = 19170 -SHA256 (ttcp/ttcp.1) = edb5dbc156c06584d7a73b6ffdb0049dca1b819f0c79aa2289005d60acaddbc9 -SIZE (ttcp/ttcp.1) = 3885 -SHA256 (ttcp/README) = a5c033bcfdcbca3cfe82c36b8c82d8b25d7bc1968a5a664f61052bfe31a1a531 -SIZE (ttcp/README) = 781 +TIMESTAMP = 1706864630 +SHA256 (ttcp-1.13.tar.gz) = 809214c535175139897afba784e2e6d1eff02efc3d7b90a67f1bb52fb5082027 +SIZE (ttcp-1.13.tar.gz) = 10959 diff --git a/benchmarks/ttcp/files/patch-ttcp.c b/benchmarks/ttcp/files/patch-ttcp.c deleted file mode 100644 index a055bfeef7ee..000000000000 --- a/benchmarks/ttcp/files/patch-ttcp.c +++ /dev/null @@ -1,257 +0,0 @@ ---- ttcp.c.orig 2016-07-27 15:06:14 UTC -+++ ttcp.c -@@ -55,6 +55,9 @@ static char RCSid[] = "ttcp.c $Revision: - #include - #include - #include /* struct timeval */ -+#include -+#include -+#include - - #if defined(SYSV) - #include -@@ -133,7 +136,7 @@ double cput, realt; /* user, real time - - void err(); - void mes(); --int pattern(); -+void pattern(); - void prep_timer(); - double read_timer(); - int Nread(); -@@ -147,6 +150,7 @@ sigpipe() - { - } - -+int - main(argc,argv) - int argc; - char **argv; -@@ -249,6 +253,7 @@ char **argv; - #endif /* cray */ - } - sinhim.sin_port = htons(port); -+ sinme.sin_family = AF_INET; /* Solaris needs this */ - sinme.sin_port = 0; /* free choice */ - } else { - /* rcvr */ -@@ -263,29 +268,31 @@ char **argv; - if ( (buf = (char *)malloc(buflen+bufalign)) == (char *)NULL) - err("malloc"); - if (bufalign != 0) -- buf +=(bufalign - ((int)buf % bufalign) + bufoffset) % bufalign; -+ buf += (bufalign -+ -((unsigned long)buf % bufalign) -+ + bufoffset) % bufalign; - - if (trans) { -- fprintf(stdout, -+ fprintf(stderr, - "ttcp-t: buflen=%d, nbuf=%d, align=%d/%d, port=%d", - buflen, nbuf, bufalign, bufoffset, port); - if (sockbufsize) -- fprintf(stdout, ", sockbufsize=%d", sockbufsize); -- fprintf(stdout, " %s -> %s\n", udp?"udp":"tcp", host); -+ fprintf(stderr, ", sockbufsize=%d", sockbufsize); -+ fprintf(stderr, " %s -> %s\n", udp?"udp":"tcp", host); - } else { -- fprintf(stdout, -+ fprintf(stderr, - "ttcp-r: buflen=%d, nbuf=%d, align=%d/%d, port=%d", - buflen, nbuf, bufalign, bufoffset, port); - if (sockbufsize) -- fprintf(stdout, ", sockbufsize=%d", sockbufsize); -- fprintf(stdout, " %s\n", udp?"udp":"tcp"); -+ fprintf(stderr, ", sockbufsize=%d", sockbufsize); -+ fprintf(stderr, " %s\n", udp?"udp":"tcp"); - } - - if ((fd = socket(AF_INET, udp?SOCK_DGRAM:SOCK_STREAM, 0)) < 0) - err("socket"); - mes("socket"); - -- if (bind(fd, &sinme, sizeof(sinme)) < 0) -+ if (bind(fd, (struct sockaddr *) &sinme, sizeof(sinme)) < 0) - err("bind"); - - #if defined(SO_SNDBUF) || defined(SO_RCVBUF) -@@ -326,7 +333,7 @@ char **argv; - mes("nodelay"); - } - #endif -- if(connect(fd, &sinhim, sizeof(sinhim) ) < 0) -+ if(connect(fd, (struct sockaddr*)&sinhim, sizeof(sinhim) ) < 0) - err("connect"); - mes("connect"); - } else { -@@ -348,11 +355,11 @@ char **argv; - } - fromlen = sizeof(frominet); - domain = AF_INET; -- if((fd=accept(fd, &frominet, &fromlen) ) < 0) -+ if((fd=accept(fd, (struct sockaddr*)&frominet, &fromlen) ) < 0) - err("accept"); - { struct sockaddr_in peer; - int peerlen = sizeof(peer); -- if (getpeername(fd, (struct sockaddr_in *) &peer, -+ if (getpeername(fd, (struct sockaddr*) &peer, - &peerlen) < 0) { - err("getpeername"); - } -@@ -412,25 +419,25 @@ char **argv; - } - if( cput <= 0.0 ) cput = 0.001; - if( realt <= 0.0 ) realt = 0.001; -- fprintf(stdout, -+ fprintf(stderr, - "ttcp%s: %.0f bytes in %.2f real seconds = %s/sec +++\n", - trans?"-t":"-r", - nbytes, realt, outfmt(nbytes/realt)); - if (verbose) { -- fprintf(stdout, -+ fprintf(stderr, - "ttcp%s: %.0f bytes in %.2f CPU seconds = %s/cpu sec\n", - trans?"-t":"-r", - nbytes, cput, outfmt(nbytes/cput)); - } -- fprintf(stdout, -+ fprintf(stderr, - "ttcp%s: %d I/O calls, msec/call = %.2f, calls/sec = %.2f\n", - trans?"-t":"-r", - numCalls, - 1024.0 * realt/((double)numCalls), - ((double)numCalls)/realt); -- fprintf(stdout,"ttcp%s: %s\n", trans?"-t":"-r", stats); -+ fprintf(stderr,"ttcp%s: %s\n", trans?"-t":"-r", stats); - if (verbose) { -- fprintf(stdout, -+ fprintf(stderr, - "ttcp%s: buffer address %#x\n", - trans?"-t":"-r", - buf); -@@ -459,6 +466,7 @@ char *s; - fprintf(stderr,"ttcp%s: %s\n", trans?"-t":"-r", s); - } - -+void - pattern( cp, cnt ) - register char *cp; - register int cnt; -@@ -614,13 +622,13 @@ prusage(r0, r1, e, b, outp) - - case 'U': - tvsub(&tdiff, &r1->ru_utime, &r0->ru_utime); -- sprintf(outp,"%d.%01d", tdiff.tv_sec, tdiff.tv_usec/100000); -+ sprintf(outp,"%ld.%01ld", tdiff.tv_sec, tdiff.tv_usec/100000); - END(outp); - break; - - case 'S': - tvsub(&tdiff, &r1->ru_stime, &r0->ru_stime); -- sprintf(outp,"%d.%01d", tdiff.tv_sec, tdiff.tv_usec/100000); -+ sprintf(outp,"%ld.%01ld", tdiff.tv_sec, tdiff.tv_usec/100000); - END(outp); - break; - -@@ -642,49 +650,49 @@ prusage(r0, r1, e, b, outp) - break; - - case 'X': -- sprintf(outp,"%d", t == 0 ? 0 : (r1->ru_ixrss-r0->ru_ixrss)/t); -+ sprintf(outp,"%ld", t == 0 ? 0 : (r1->ru_ixrss-r0->ru_ixrss)/t); - END(outp); - break; - - case 'D': -- sprintf(outp,"%d", t == 0 ? 0 : -+ sprintf(outp,"%ld", t == 0 ? 0 : - (r1->ru_idrss+r1->ru_isrss-(r0->ru_idrss+r0->ru_isrss))/t); - END(outp); - break; - - case 'K': -- sprintf(outp,"%d", t == 0 ? 0 : -+ sprintf(outp,"%ld", t == 0 ? 0 : - ((r1->ru_ixrss+r1->ru_isrss+r1->ru_idrss) - - (r0->ru_ixrss+r0->ru_idrss+r0->ru_isrss))/t); - END(outp); - break; - - case 'M': -- sprintf(outp,"%d", r1->ru_maxrss/2); -+ sprintf(outp,"%ld", r1->ru_maxrss/2); - END(outp); - break; - - case 'F': -- sprintf(outp,"%d", r1->ru_majflt-r0->ru_majflt); -+ sprintf(outp,"%ld", r1->ru_majflt-r0->ru_majflt); - END(outp); - break; - - case 'R': -- sprintf(outp,"%d", r1->ru_minflt-r0->ru_minflt); -+ sprintf(outp,"%ld", r1->ru_minflt-r0->ru_minflt); - END(outp); - break; - - case 'I': -- sprintf(outp,"%d", r1->ru_inblock-r0->ru_inblock); -+ sprintf(outp,"%ld", r1->ru_inblock-r0->ru_inblock); - END(outp); - break; - - case 'O': -- sprintf(outp,"%d", r1->ru_oublock-r0->ru_oublock); -+ sprintf(outp,"%ld", r1->ru_oublock-r0->ru_oublock); - END(outp); - break; - case 'C': -- sprintf(outp,"%d+%d", r1->ru_nvcsw-r0->ru_nvcsw, -+ sprintf(outp,"%ld+%ld", r1->ru_nvcsw-r0->ru_nvcsw, - r1->ru_nivcsw-r0->ru_nivcsw ); - END(outp); - break; -@@ -743,6 +751,7 @@ register char *cp; - /* - * N R E A D - */ -+int - Nread( fd, buf, count ) - int fd; - void *buf; -@@ -752,7 +761,7 @@ int count; - int len = sizeof(from); - register int cnt; - if( udp ) { -- cnt = recvfrom( fd, buf, count, 0, &from, &len ); -+ cnt = recvfrom( fd, buf, count, 0, (struct sockaddr *)&from, &len ); - numCalls++; - } else { - if( b_flag ) -@@ -774,6 +783,7 @@ int count; - /* - * N W R I T E - */ -+int - Nwrite( fd, buf, count ) - int fd; - void *buf; -@@ -782,7 +792,7 @@ int count; - register int cnt; - if( udp ) { - again: -- cnt = sendto( fd, buf, count, 0, &sinhim, sizeof(sinhim) ); -+ cnt = sendto( fd, buf, count, 0, (struct sockaddr *)&sinhim, sizeof(sinhim) ); - numCalls++; - if( cnt<0 && errno == ENOBUFS ) { - delay(18000); -@@ -803,7 +813,7 @@ delay(us) - - tv.tv_sec = 0; - tv.tv_usec = us; -- (void)select( 1, (char *)0, (char *)0, (char *)0, &tv ); -+ (void)select( 1, NULL, NULL, NULL, &tv ); - } - - /* diff --git a/benchmarks/ttcp/pkg-plist b/benchmarks/ttcp/pkg-plist deleted file mode 100644 index 9e771280ae35..000000000000 --- a/benchmarks/ttcp/pkg-plist +++ /dev/null @@ -1,3 +0,0 @@ -bin/ttcp -man/man1/ttcp.1.gz -%%PORTDOCS%%%%DOCSDIR%%/README