From nobody Fri Sep 15 19:11:36 2023 X-Original-To: ports-bugs@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 4RnP1h5PPfz4sZSR for ; Fri, 15 Sep 2023 19:11:36 +0000 (UTC) (envelope-from bugzilla-noreply@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 4RnP1h2SsTz3XNd for ; Fri, 15 Sep 2023 19:11:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694805096; a=rsa-sha256; cv=none; b=UWv9UWDTFTOqGd7ktyEtYQcY0AI/IkJqTT8ItMU98KZ3BYbNykspHJWvXvGN8J+liIoSLr XVt4PyTNEm6fJgGgKogVGhaHLc/Fs9Kka6gKeD9OPkegyXlxbmqiIjJ2O2zUT/Hhs6WSB6 VGsyOOSSpi6OkZV+Xk/wd0OOfcbZof3AkcVaGwdksgX23+720df+8QdbW5l849mb13zZzV g/CQIitUcYeshvkaFBHw7G3npwJzn1+ZSTHFw1yRJtuV6PgPHutgDglNHz/vhcfFB8eKFI Hdo1HtjhwsCIrV8u7xPgC1pd5YUNKZvspfOB6LmSjnlYYizjiccnr95yRxlGeg== 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=1694805096; 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: in-reply-to:in-reply-to:references:references; bh=VWAQ3Mn+n1Ya8MhhkOLDGsZk9IB2z/gnwdVplC90ipM=; b=hP3QEMxgkfDEtwSSyRgkWbwFiLXvehihnmupPyVhCndvS1Ac6YnRWK79YrV0xY51AqQ/ee 5erQguqlCGJICyBPU7022gANxsMvEU9rNE4weabNgRQ+C+/a2sX1IH1PTZHhsPVopThc6v r+AVT43UZ9M8jMcN9Jj82xl1t+5YJ7Fr3PNgvx9FGeSNlrIdc/rBbg4W2WRn0v0anFToXi mD8jrRcANf3F1UlIDi5T2eFltcyciyvciiWG7ajhMMNEDEinuKhohcw8Pcnu3IHur9xGJu 22sw1xmyNtDtZ+wOM0gNeR1c8u6aZaov6+hMLwU4dEHOoyZdV25XaKFB9thjKQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4RnP1h1Zd1zbtH for ; Fri, 15 Sep 2023 19:11:36 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 38FJBa5d068870 for ; Fri, 15 Sep 2023 19:11:36 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 38FJBaGm068869 for ports-bugs@FreeBSD.org; Fri, 15 Sep 2023 19:11:36 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 273641] [new port] misc/gtime: GNU version of 'time' utility Date: Fri, 15 Sep 2023 19:11:36 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: ivalentine@arizona.edu X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ports-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273641 --- Comment #4 from Ian Valentine --- Comment on attachment 244860 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D244860 misc/gtime: Changes per request >From 5353f3c8e0dd1533a5549f2d49fa324dac7965d2 Mon Sep 17 00:00:00 2001 >From: Ian Valentine >Date: Fri, 15 Sep 2023 10:44:00 -0700 >Subject: [PATCH] misc/gtime: Add MAKEINFO, reformat Makefile > >--- > misc/gtime/Makefile | 51 ++++++++++++++++++++ > misc/gtime/distinfo | 3 ++ > misc/gtime/files/patch-tests_time-max-rss.sh | 38 +++++++++++++++ > misc/gtime/pkg-descr | 2 + > 4 files changed, 94 insertions(+) > create mode 100644 misc/gtime/Makefile > create mode 100644 misc/gtime/distinfo > create mode 100644 misc/gtime/files/patch-tests_time-max-rss.sh > create mode 100644 misc/gtime/pkg-descr > >diff --git a/misc/gtime/Makefile b/misc/gtime/Makefile >new file mode 100644 >index 0000000000..10d9038543 >--- /dev/null >+++ b/misc/gtime/Makefile >@@ -0,0 +1,51 @@ >+PORTNAME=3D time >+DISTVERSION=3D 1.9 >+CATEGORIES=3D misc >+MASTER_SITES=3D GNU/time >+PKGNAMEPREFIX=3D g >+ >+MAINTAINER=3D ivalentine@arizona.edu >+COMMENT=3D GNU version of 'time' utility >+WWW=3D https://www.gnu.org/software/time/ >+ >+LICENSE=3D GPLv3 >+LICENSE_FILE=3D ${WRKSRC}/COPYING >+ >+BUILD_DEPENDS=3D help2man:misc/help2man >+ >+USES=3D cpe gmake makeinfo >+CPE_VENDOR=3D gnu >+ >+GNU_CONFIGURE=3D yes >+CONFIGURE_ARGS=3D --program-prefix=3Dg >+CONFIGURE_ENV+=3D MAKEINFO=3D"${MAKEINFO} --no-split" >+INSTALL_TARGET=3D install-strip >+TEST_TARGET=3D check >+ >+DATADIR=3D ${PREFIX}/share/${PKGBASE} >+DOCSDIR=3D ${PREFIX}/share/doc/${PKGBASE} >+INFO=3D time >+PLIST_FILES=3D bin/gtime \ >+ man/man1/gtime.1.gz >+PORTDOCS=3D AUTHORS ChangeLog NEWS README >+ >+OPTIONS_DEFINE=3D DOCS >+OPTIONS_SUB=3D yes >+ >+post-build: >+ ${MKDIR} ${WRKDIR}/man1 >+ help2man -Nn "run programs and summarize system resource usage" ${WRKSRC= }/time -o ${WRKDIR}/man1/${PKGBASE}.1 >+ >+post-install: >+ ${INSTALL_MAN} ${WRKDIR}/man1/${PKGBASE}.1 ${STAGEDIR}${MAN1PREFIX}/man/= man1/ >+ >+post-install-DOCS-on: >+ @${MKDIR} ${STAGEDIR}${DOCSDIR} >+ ${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR} >+ >+pre-test: >+.for f in help-version.sh time-exit-codes.sh time-max-rss.sh time-posix-q= uiet.sh >+ @${REINPLACE_CMD} -e 's|env time|env ${WRKSRC}/time|g' ${WRKSRC}/tests/$= {f} >+.endfor >+ >+.include >diff --git a/misc/gtime/distinfo b/misc/gtime/distinfo >new file mode 100644 >index 0000000000..1fe0e48d5b >--- /dev/null >+++ b/misc/gtime/distinfo >@@ -0,0 +1,3 @@ >+TIMESTAMP =3D 1694798374 >+SHA256 (time-1.9.tar.gz) =3D fbacf0c81e62429df3e33bda4cee38756604f18e01d9= 77338e23306a3e3b521e >+SIZE (time-1.9.tar.gz) =3D 596779 >diff --git a/misc/gtime/files/patch-tests_time-max-rss.sh b/misc/gtime/fil= es/patch-tests_time-max-rss.sh >new file mode 100644 >index 0000000000..7f5d8f9157 >--- /dev/null >+++ b/misc/gtime/files/patch-tests_time-max-rss.sh >@@ -0,0 +1,38 @@ >+--- tests/time-max-rss.sh.orig 2023-09-14 02:47:32 UTC >++++ tests/time-max-rss.sh >+@@ -32,13 +32,13 @@ time-aux || framework_failure_ "time-aux is missing/no >+ env time -o mem-baseline -f "%M" time-aux \ >+ || framework_failure_ "failed to run time/time-aux (baseline max-rss)" >+=20 >+-# Allocate 5MB of RAM >+-env time -o mem-5MB -f "%M" time-aux -m 5M \ >+- || framework_failure_ "failed to run time/time-aux (5M max-rss)" >++# Allocate 400MB of RAM >++env time -o mem-400MB -f "%M" time-aux -m 400M \ >++ || framework_failure_ "failed to run time/time-aux (400M max-rss)" >+=20 >+ # Calculate the difference >+ b=3D$(cat mem-baseline) || framework_failure_ "failed to read mem-baseli= ne" >+-c=3D$(cat mem-5MB) || framework_failure_ "failed to read mem-5MB" >++c=3D$(cat mem-400MB) || framework_failure_ "failed to read mem-400MB" >+ d=3D$(( c - b )) >+=20 >+ # On some systems (e.g. OpenSolaris) getrusage(2) returns zero in ru_max= rss. >+@@ -48,13 +48,13 @@ test "$b" -eq "0" && test "$c" -eq 0 \ >+=20 >+ # There could be alot of variation between each invocation, >+ # accept a reasonable range >+-if test "$d" -ge 5000 && test "$d" -le 6000 ; then >+- : # acceptable values: 5000-6000 KB >++if test "$d" -ge 400000 && test "$d" -le 500000 ; then >++ : # acceptable values: 400000-500000 KB >+ else >+ cat<&2 >+-time(1) failed to detect 5MB allcoation. >++time(1) failed to detect 400MB allcoation. >+ mem-baseline(kb): $b >+- mem-5MB(kb): $c >++ mem-400MB(kb): $c >+ delta(kb): $d >+ EOF >+ fail=3D1 >diff --git a/misc/gtime/pkg-descr b/misc/gtime/pkg-descr >new file mode 100644 >index 0000000000..57ab9872c9 >--- /dev/null >+++ b/misc/gtime/pkg-descr >@@ -0,0 +1,2 @@ >+GNU time runs another program, then displays information about the >+resources used by that program. >--=20 >2.42.0 > > --=20 You are receiving this mail because: You are the assignee for the bug.=