head	1.2;
access;
symbols;
locks; strict;
comment	@# @;


1.2
date	2026.06.04.21.15.10;	author pin;	state Exp;
branches;
next	1.1;
commitid	i83eSJGY8lyKDwIG;

1.1
date	2026.04.07.18.42.23;	author pin;	state Exp;
branches;
next	;
commitid	2a7vLdg6ouAVE3BG;


desc
@@


1.2
log
@sysutils/uutils-coreutils: update to 0.9.0

Rust Coreutils 0.9.0 Release:

We are excited to announce the release of Rust Coreutils 0.9.0 - a release focused on safety and security.
This cycle was shaped by a third-party security audit, driving extensive TOCTOU hardening and a sustained,
project-wide effort to shrink the amount of unsafe code by removing it outright and migrating low-level
syscalls from nix/libc to rustix.
On top of that, we landed major zero-copy I/O performance work (splice/tee/pipe), broadened WebAssembly,
Cygwin and Windows support, and continued contributing tests and bug reports upstream to GNU coreutils.

Highlights:

    GNU Compatibility & Upstream Contributions
        629 passing tests (+7 from 0.6.0), with 19 new tests added from the GNU 9.10 update
        Updated GNU test reference from 9.9 to 9.10
        Contributed numerous patches upstream to GNU coreutils, benefiting both projects
        New GNU compatibility fixes across date, fmt, kill, ptx, numfmt, cksum, and more
        Took over maintenance of num-prime, the primality testing library used by factor

    Performance Overhaul
        Faster hash maps: rustc-hash in ls, du, tsort, shuf, mv; foldhash in sort
        unexpand/expand: ASCII fast-path, buffered reads — 14%+ gain in unexpand
        shuf, split, sort, du: Reduced malloc allocations (+3–6% in du, +4% in shuf)
        nl: Optimized with itoa and direct writing
        true/false: Removed clap dependency, smaller binary, faster startup
        uucore: Disabled signal setup in simple utilities for binary size and startup speed

    Robustness: Eliminated /dev/full Panics
        Fixed panics when stderr is /dev/full across 20+ utilities (echo, date, sort, expr, hostname, id, comm, pr, dircolors, and more)
        Generic fix ensuring unrecognized options with 2>/dev/full do not abort

    Safety & Code Quality
        Replaced unsafe libc calls with safe nix crate wrappers in uucore (umask, mkdirat, and more) and mknod
        Eliminated TOCTOU races in ln, tac, and install -D
        rm: --preserve-root now works correctly on symlinks
        MSRV updated to 1.88

    Notable Bug Fixes
        date: Extensive fixes — -u/-s/-d flags, timezone abbreviation lookup and DST, RFC-822 format, %+/%_ modifiers, --debug, locale date_fmt
        cp: Readonly directories, -a/-z flags, special files, non-UTF-8 directory names
        mv: Preserve symlinks during cross-device moves, handle FIFOs in directories
        ls: Hyperlink OSC 8 format, dired reports, fd leak on deep recursion, invalid UTF-8 hidden files
        sort: Collator panic in worker threads, scientific notation parsing
        paste: Multi-byte delimiters, GNU escape sequences, bounded buffering
        printf: %q shell quoting with control chars and quotes
        ptx: -t/--typeset-mode, multibyte Unicode panic, GNU default behavior
        numfmt: --debug flag, empty delimiter, null byte handling, error message formatting
        cksum: SHAKE algorithms, --binary/--text/--tag errors
        cut, tac, tail, tr, uniq, od, chroot, stat, mktemp, pr, readlink, ln, kill, nproc, rm, env, sync, fmt, factor, wc: Various GNU compatibility and correctness fixes

    Platform Support
        NetBSD and PowerPC build fixes
        Windows: tac stdin piping, test -r/-w/-x, publish static *.exe binaries
        WebAssembly: Publish *.wasm artifacts
        stdbuf: Support libstdbuf in same directory as binary
        NixOS test compatibility fix; added security audit workflow

What's Changed
cat

    cat: strip errno by @@oech3 in #10885

cksum

    *sum: Fix locales fetching from checksum_common after installation by @@RenjiSann in #10575
    *sum: Fix read_byte_lines discarding read errors by @@RenjiSann in #10671
    test/cksum: implement test_signed_checksums by @@0xMillyByte in #10714
    cksum: Accept SHAKE algorithms by @@RenjiSann in #10772
    cksum family: Backport new errors for --binary, --text and --tag by @@oech3 in #10618
    cksum family: Fix clippy::unnecessary_wraps by @@oech3 in #11110

chroot

    chroot: fix gid being set by uid with --userspec #10307 by @@cerdelen in #10465
    chroot: use var_os by @@xtqqczze in #11070

comm

    comm /etc/pacman.conf /dev/null 2>/dev/full does not abort by @@oech3 in #10746
    date, comm, tty: Fixing handling output to dev/null by @@ChrisDryden in #10888

coreutils

    tests/misc/coreutils.sh: Fail with invalid binary name by @@oech3 in #10258
    coreutils: output expected error for unrecognized options by @@ChrisDryden in #9869
    coreutils: Let the name *utils valid by @@oech3 in #10729
    coreutils: Fix 2>/dev/full aborts & drop a sed for GnuTests by @@oech3 in #10740
    all: --typo 2>/dev/full does not abort by @@oech3 in #10764
    Add regression test for coreutils --list by @@oech3 in #10858

cp

    cp: fix recursive copy of readonly directories by @@nikolalukovic in #10529
    cp: improve code clarity and remove redundant filesystem checks by @@sylvestre in #10790
    cp: fixing cp -a functionality to match gnu implementation for -z flag handling and for folders by @@ChrisDryden in #10207
    cp: Fix panic when recursively copying a directory with a non-UTF8 name by @@aweinstock314 in #11148
    cp: handle special files by @@victor-prokhorov in #11163

csplit

    refactor(csplit): use &str slices for patterns by @@xtqqczze in #11013
    csplit: add benchmarks for line number and regex pattern splitting by @@sylvestre in #10927

cut

    cut: fix -s flag for newline delimiter and optimize memory allocation by @@akervald in #11143
    cut: two simple refactorings by @@cakebaker in #11194

date

    date: fix -u flag to match GNU behavior for input parsing by @@ChrisDryden in #10715
    date: Fix format optional argument to capture all following parameters by @@cerdelen in #10914
    date: fix -s UTC conversion losing timezone offset by @@yachi in #10828
    date: fix RFC-822 format to always use English names by @@sylvestre in #10932
    date: bump parse_datetime & add test for leap-1 GNU test by @@sylvestre in #10933
    date: add tests to match GNU's by @@sylvestre in #10939
    date: fix double periods in Hungarian month abbreviations by @@naoNao89 in #10945
    date: fix subfmt-up1, fill-1, pct-pct, and invalid-high-bit-set tests / implement --debug by @@sylvestre in #10940
    date: use locale date_fmt instead of D_T_FMT for default format by @@ChrisDryden in #10935
    date: Fix Error message missing '+' for format string after valid d flag by @@cerdelen in #10982
    date: fix -d with relative dates and timezone abbreviations by @@yachi in #10956
    date: fix timezone abbreviations using wrong offset outside their DST season by @@aguimaraes in #11045
    date: fix %+ and %_ modifier edge cases by @@naoNao89 i...
@
text
@# $NetBSD: Makefile,v 1.1 2026/04/07 18:42:23 pin Exp $

DISTNAME=	coreutils-0.9.0
PKGNAME=	uutils-${DISTNAME}
CATEGORIES=	sysutils
MASTER_SITES=	${MASTER_SITE_GITHUB:=uutils/}
GITHUB_PROJECT=	coreutils

MAINTAINER=	pin@@NetBSD.org
HOMEPAGE=	https://uutils.github.io/coreutils/
COMMENT=	Cross-platform Rust rewrite of the GNU coreutils
LICENSE=	mit

RUST_REQ=	1.88.0

PROGS+=		arch b2sum base32 base64 basename basenc cat chgrp chmod chown chroot cksum \
		comm cp csplit cut date dd df dir dircolors dirname du echo env expand expr \
		factor false fmt fold groups head hostid hostname id install join kill link ln \
		logname ls md5sum mkdir mkfifo mknod mktemp more mv nice nl nohup nproc numfmt \
		od paste pathchk pinky pr printenv printf ptx pwd readlink realpath rm rmdir \
		seq sha1sum sha224sum sha256sum sha384sum sha512sum shred shuf sleep sort \
		split stat stdbuf stty sum sync tac tail tee test timeout touch tr true \
		truncate tsort tty uname unexpand uniq unlink uptime users vdir wc who whoami \
		yes

INSTALLATION_DIRS+=	uutils-coreutils/bin

CARGO_NO_DEFAULT_FEATURES=	YES
CARGO_FEATURES+=		feat_os_unix

post-install:
.for program in ${PROGS}
	cd ${DESTDIR}${PREFIX}/bin && ${LN} coreutils uu-${program}
	cd ${DESTDIR}${PREFIX}/bin && ${LN} coreutils ../uutils-coreutils/bin/${program}
.endfor

.include "cargo-depends.mk"

.include "../../lang/rust/cargo.mk"
.include "../../mk/bsd.pkg.mk"
@


1.1
log
@sysutils/uutils-coreutils: import package

uutils coreutils is a cross-platform reimplementation of the GNU coreutils in
Rust. While all programs have been implemented, some options might be missing
or different behavior might be experienced.

This project aims to be a drop-in replacement for the GNU utils. Differences
with GNU are treated as bugs.

uutils aims to work on as many platforms as possible, to be able to use the
same utils on Linux, Mac, Windows and other platforms. This ensures, for
example, that scripts can be easily transferred between platforms.
@
text
@d1 1
a1 1
# $NetBSD$
d3 1
a3 1
DISTNAME=	coreutils-0.8.0
d9 1
a9 1
MAINTAINER=	pkgsrc-users@@NetBSD.org
@

