Created attachment 274082 [details] GNU time port via git format-patch Hello -- We would like to propose a new port, sysutils/gtime, which is the GNU version of the time(1) utility. We do a good amount of research on FreeBSD and across operating systems. The built-in time utility in bash is unreliable on FreeBSD (it occasionally produces non-numeric garbage output). Having GNU time available eliminates as best we can a potential confounding variable in our research when comparing timed runs across operating systems. One test fails; we are happy to work with upstream to get that fixed. The test failure doesn't affect our usage of the utility. We are also happy to maintain the port; it is fairly straightforward and is rarely updated upstream. Thanks.
Hello -- We would still appreciate this port being accepted. As mentioned, because we are heavy users of it, our research lab is happy to maintain this port for the long-term future. Thanks.
Interesting observation. Do you have any insights what might be wrong with time(1) in the base system? Ideally we would fix this instead of resorting to external tools. I will take care of you patch!
(In reply to Michael Osipov from comment #2) time(1) in the base system is fine :) But it's not readily available across FreeBSD, OpenBSD, NetBSD, Linux, macOS, and Illumos. GNU time is, so it's what we use everywhere. Our original approach was to use the built-in time in bash, since bash is also readily available across operating systems. However, it is unreliable on FreeBSD; quick (~1s) timing collections in a 1000+ iteration loop occasionally produces - characters where there should be numbers. Thanks.
(In reply to Brian Callahan from comment #3) OK, I see. Have you reported with upstream? I did several patches for bash years ago for HP-UX and the author was very receptive to those. Might be worth looking into.
(In reply to Michael Osipov from comment #4) We haven't reported anything to bash yet but it is on our (long) todo list...
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=21f9947ab9bb13e4c7d1b252d5c25347c19979ff commit 21f9947ab9bb13e4c7d1b252d5c25347c19979ff Author: Brian Callahan <bcallaha@monmouth.edu> AuthorDate: 2026-08-23 23:44:26 +0000 Commit: Michael Osipov <michaelo@FreeBSD.org> CommitDate: 2026-09-26 22:54:25 +0000 sysutils/gtime: new port GNU time runs another program, then displays information about the resources used by that program. Co-authored-by: Michael Osipov <michaelo@FreeBSD.org> PR: 297851 sysutils/Makefile | 1 + sysutils/gtime/Makefile (new) | 22 ++++++++++++++++++++++ sysutils/gtime/distinfo (new) | 3 +++ sysutils/gtime/pkg-descr (new) | 2 ++ 4 files changed, 28 insertions(+)