Skip to content

New package: uutils-coreutils-0.9.0#60787

Open
mnabid wants to merge 1 commit into
void-linux:masterfrom
mnabid:uutils
Open

New package: uutils-coreutils-0.9.0#60787
mnabid wants to merge 1 commit into
void-linux:masterfrom
mnabid:uutils

Conversation

@mnabid
Copy link
Copy Markdown
Contributor

@mnabid mnabid commented May 27, 2026

uutils/coreutils is a cross-platform reimplementation of the GNU coreutils in Rust.

Closes: #47445

Testing the changes

  • I tested the changes in this PR: YES

New package

Local build testing

  • I built this PR locally for my native architecture, x86_64-glibc
  • I built this PR locally for these architectures:
    • x86_64-musl (native)
    • i686 (native)
    • armv6l-musl (crossbuild)

@rayfadh
Copy link
Copy Markdown
Contributor

rayfadh commented May 27, 2026

Is this safe to package regarding on the bug happening last time? I think the case of this package is similar to XLibre which isn't yet a good fit to be included in Void. Just an opinion though.

@classabbyamp classabbyamp added the new-package This PR adds a new package label May 27, 2026
@classabbyamp
Copy link
Copy Markdown
Member

we package busybox and toybox, no reason we can't package this. though i'm not sure it should replaces coreutils...

what bug are your referring to?

@rayfadh
Copy link
Copy Markdown
Contributor

rayfadh commented May 28, 2026

I recall some maturity concerns from a few months ago (this is one of the discussion), but I haven’t verified if those are fixed.

Of course the final decision belongs to the core member of Void though.

@mnabid
Copy link
Copy Markdown
Contributor Author

mnabid commented May 28, 2026

I recall some maturity concerns from a few months ago (this is one of the discussion), but I haven’t verified if those are fixed.

Those issues reported by Canonical seem to have already been fixed. Since Ubuntu is aiming for 100% "rustification" and the project is getting good attention, further issues should be resolved much faster.

though i'm not sure it should replaces coreutils...

@classabbyamp Do you mean prefixing the commands for using alongside GNU coreutils? I don't really see the point in doing so, but a build option can be added for PROG_PREFIX=uu- if you want.

@classabbyamp
Copy link
Copy Markdown
Member

classabbyamp commented May 28, 2026

more like prefix + alternatives, but that's a big project that would involve gnu coreutils and maybe busybox/toybox

@mnabid
Copy link
Copy Markdown
Contributor Author

mnabid commented May 28, 2026

Shouldn't be hard I guess, but that'll be one hell of a list of alternatives. (overkill?)

Expand (209 items)
$ xls uutils-coreutils | grep -P "(bin|man)"
/usr/bin/[
/usr/bin/arch
/usr/bin/b2sum
/usr/bin/base32
/usr/bin/base64
/usr/bin/basename
/usr/bin/basenc
/usr/bin/cat
/usr/bin/chgrp
/usr/bin/chmod
/usr/bin/chown
/usr/bin/chroot
/usr/bin/cksum
/usr/bin/comm
/usr/bin/coreutils
/usr/bin/cp
/usr/bin/csplit
/usr/bin/cut
/usr/bin/date
/usr/bin/dd
/usr/bin/df
/usr/bin/dir
/usr/bin/dircolors
/usr/bin/dirname
/usr/bin/du
/usr/bin/echo
/usr/bin/env
/usr/bin/expand
/usr/bin/expr
/usr/bin/factor
/usr/bin/false
/usr/bin/fmt
/usr/bin/fold
/usr/bin/groups
/usr/bin/head
/usr/bin/hostid
/usr/bin/hostname-coreutils
/usr/bin/id
/usr/bin/install
/usr/bin/join
/usr/bin/link
/usr/bin/ln
/usr/bin/logname
/usr/bin/ls
/usr/bin/md5sum
/usr/bin/mkdir
/usr/bin/mkfifo
/usr/bin/mknod
/usr/bin/mktemp
/usr/bin/mv
/usr/bin/nice
/usr/bin/nl
/usr/bin/nohup
/usr/bin/nproc
/usr/bin/numfmt
/usr/bin/od
/usr/bin/paste
/usr/bin/pathchk
/usr/bin/pinky
/usr/bin/pr
/usr/bin/printenv
/usr/bin/printf
/usr/bin/ptx
/usr/bin/pwd
/usr/bin/readlink
/usr/bin/realpath
/usr/bin/rm
/usr/bin/rmdir
/usr/bin/seq
/usr/bin/sha1sum
/usr/bin/sha224sum
/usr/bin/sha256sum
/usr/bin/sha384sum
/usr/bin/sha512sum
/usr/bin/shred
/usr/bin/shuf
/usr/bin/sleep
/usr/bin/sort
/usr/bin/split
/usr/bin/stat
/usr/bin/stdbuf
/usr/bin/stty
/usr/bin/sum
/usr/bin/sync
/usr/bin/tac
/usr/bin/tail
/usr/bin/tee
/usr/bin/test
/usr/bin/timeout
/usr/bin/touch
/usr/bin/tr
/usr/bin/true
/usr/bin/truncate
/usr/bin/tsort
/usr/bin/tty
/usr/bin/uname
/usr/bin/unexpand
/usr/bin/uniq
/usr/bin/unlink
/usr/bin/users
/usr/bin/vdir
/usr/bin/wc
/usr/bin/who
/usr/bin/whoami
/usr/bin/yes
/usr/share/man/man1/arch.1
/usr/share/man/man1/b2sum.1
/usr/share/man/man1/base32.1
/usr/share/man/man1/base64.1
/usr/share/man/man1/basename.1
/usr/share/man/man1/basenc.1
/usr/share/man/man1/cat.1
/usr/share/man/man1/chgrp.1
/usr/share/man/man1/chmod.1
/usr/share/man/man1/chown.1
/usr/share/man/man1/chroot.1
/usr/share/man/man1/cksum.1
/usr/share/man/man1/comm.1
/usr/share/man/man1/coreutils.1
/usr/share/man/man1/cp.1
/usr/share/man/man1/csplit.1
/usr/share/man/man1/cut.1
/usr/share/man/man1/date.1
/usr/share/man/man1/dd.1
/usr/share/man/man1/df.1
/usr/share/man/man1/dir.1
/usr/share/man/man1/dircolors.1
/usr/share/man/man1/dirname.1
/usr/share/man/man1/du.1
/usr/share/man/man1/echo.1
/usr/share/man/man1/env.1
/usr/share/man/man1/expand.1
/usr/share/man/man1/expr.1
/usr/share/man/man1/factor.1
/usr/share/man/man1/false.1
/usr/share/man/man1/fmt.1
/usr/share/man/man1/fold.1
/usr/share/man/man1/groups.1
/usr/share/man/man1/head.1
/usr/share/man/man1/hostid.1
/usr/share/man/man1/hostname-coreutils.1
/usr/share/man/man1/id.1
/usr/share/man/man1/install.1
/usr/share/man/man1/join.1
/usr/share/man/man1/link.1
/usr/share/man/man1/ln.1
/usr/share/man/man1/logname.1
/usr/share/man/man1/ls.1
/usr/share/man/man1/md5sum.1
/usr/share/man/man1/mkdir.1
/usr/share/man/man1/mkfifo.1
/usr/share/man/man1/mknod.1
/usr/share/man/man1/mktemp.1
/usr/share/man/man1/mv.1
/usr/share/man/man1/nice.1
/usr/share/man/man1/nl.1
/usr/share/man/man1/nohup.1
/usr/share/man/man1/nproc.1
/usr/share/man/man1/numfmt.1
/usr/share/man/man1/od.1
/usr/share/man/man1/paste.1
/usr/share/man/man1/pathchk.1
/usr/share/man/man1/pinky.1
/usr/share/man/man1/pr.1
/usr/share/man/man1/printenv.1
/usr/share/man/man1/printf.1
/usr/share/man/man1/ptx.1
/usr/share/man/man1/pwd.1
/usr/share/man/man1/readlink.1
/usr/share/man/man1/realpath.1
/usr/share/man/man1/rm.1
/usr/share/man/man1/rmdir.1
/usr/share/man/man1/seq.1
/usr/share/man/man1/sha1sum.1
/usr/share/man/man1/sha224sum.1
/usr/share/man/man1/sha256sum.1
/usr/share/man/man1/sha384sum.1
/usr/share/man/man1/sha512sum.1
/usr/share/man/man1/shred.1
/usr/share/man/man1/shuf.1
/usr/share/man/man1/sleep.1
/usr/share/man/man1/sort.1
/usr/share/man/man1/split.1
/usr/share/man/man1/stat.1
/usr/share/man/man1/stdbuf.1
/usr/share/man/man1/stty.1
/usr/share/man/man1/sum.1
/usr/share/man/man1/sync.1
/usr/share/man/man1/tac.1
/usr/share/man/man1/tail.1
/usr/share/man/man1/tee.1
/usr/share/man/man1/test.1
/usr/share/man/man1/timeout.1
/usr/share/man/man1/touch.1
/usr/share/man/man1/tr.1
/usr/share/man/man1/true.1
/usr/share/man/man1/truncate.1
/usr/share/man/man1/tsort.1
/usr/share/man/man1/tty.1
/usr/share/man/man1/uname.1
/usr/share/man/man1/unexpand.1
/usr/share/man/man1/uniq.1
/usr/share/man/man1/unlink.1
/usr/share/man/man1/users.1
/usr/share/man/man1/vdir.1
/usr/share/man/man1/wc.1
/usr/share/man/man1/who.1
/usr/share/man/man1/whoami.1
/usr/share/man/man1/yes.1

@mnabid mnabid force-pushed the uutils branch 2 times, most recently from 53ee411 to 14a9448 Compare May 29, 2026 03:11
@mnabid
Copy link
Copy Markdown
Contributor Author

mnabid commented May 29, 2026

I've added alternatives to both coreutils packages. They can be installed side-by-side, and the default can be set with xbps-alternatives -s $pkgname.

I also have uutils/findutils and uutils/diffutils in my local branch, but I'm not sure if I'd want them in Void's repository this soon, there are some missing utilities and zero documentation.

@mnabid
Copy link
Copy Markdown
Contributor Author

mnabid commented May 29, 2026

failures:
    test_logname::test_normal
    test_logname::test_output_format
    test_sort::test_tmp_files_deleted_on_sigint

test result: FAILED. 4490 passed; 3 failed; 77 ignored; 0 measured; 535 filtered out; finished in 56.07s

error: test failed, to rerun pass `--test tests`
make: *** [GNUmakefile:152: test] Error 101

Huh.. these tests runs ok for x86_64-glibc chroot in my machine. What's the issue? 😕
EDIT: More funky errors. I'm disabling check altogether.

Comment thread srcpkgs/coreutils/template Outdated
@mnabid mnabid force-pushed the uutils branch 3 times, most recently from d15e79c to 0f04396 Compare May 29, 2026 08:04
@rayfadh
Copy link
Copy Markdown
Contributor

rayfadh commented May 29, 2026

Tried your template but I omit the make_check=no

# Template file for 'uutils-coreutils'
pkgname=uutils-coreutils
version=0.8.0
revision=1
build_style=gnu-makefile
build_helper="rust"
make_build_args="PROFILE=release PROG_PREFIX=u"
make_install_args="PROFILE=release PROG_PREFIX=u"
hostmakedepends="cargo pkg-config"
makedepends="oniguruma-devel rust-std"
short_desc="Cross-platform Rust rewrite of the GNU coreutils"
maintainer="Nafis <mnabid.25@outlook.com>"
license="MIT"
homepage="https://github.com/uutils/coreutils"
distfiles="https://github.com/uutils/coreutils/archive/refs/tags/${version}.tar.gz"
checksum=03f765fd23e9cc66f8789edc6928644d8eae5e5a7962d83795739d0a8a85eaef

if [ "$CROSS_BUILD" ]; then
	hostmakedepends+=" oniguruma-devel"
fi

_utils="[ 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 link ln logname ls md5sum mkdir mkfifo mknod mktemp 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 users vdir wc who whoami yes"

for _u in $_utils; do
	alternatives+=" ${_u}:${_u}:/usr/bin/u${_u} ${_u}:${_u}.1:/usr/share/man/man1/u${_u}.1"
done

# Avoid conflicts with util-linux and procps-ng
export SKIP_UTILS="more kill uptime"

pre_build() {
	# Remove cargo config target overrides
	rm .cargo/config.toml
	# Prevent cross-sysroot poisoning when building host tools for documentation
	vsed -i 's/@unset CARGO_BUILD_TARGET/& \&\& unset RUSTFLAGS CFLAGS CXXFLAGS LDFLAGS CPPFLAGS/' GNUmakefile
}

post_install() {
	ln -s utest.1 "${DESTDIR}/usr/share/man/man1/u[.1"
	vlicense LICENSE
}

xbps-src pkg uutils-coreutils passes on my machine x64-glibc.

@mnabid
Copy link
Copy Markdown
Contributor Author

mnabid commented May 29, 2026

Tried your template but I omit the make_check=no
xbps-src pkg uutils-coreutils passes on my machine x64-glibc.

do_check() is disabled by default, so this template should build fine. Try uncommenting XBPS_CHECK_PKGS=full and it will fail on check.
Although even after skipping all the failed tests in my previous template, do_check() failed in CI. I've tried building in clean masterdir for x86_64 (glibc/musl), i686 (glibc) and armv6l-musl (cross), and the build completed every time without any hiccups.

@Duncaen
Copy link
Copy Markdown
Member

Duncaen commented May 29, 2026

I don't think its worth having alternatives for this, that is more trouble than its necessary. Don't think there is a use case for having both installed at once.

@mnabid
Copy link
Copy Markdown
Contributor Author

mnabid commented May 30, 2026

It might be useful in case of compatibility or security issues where you'd want to keep the old tools lying around, like what Ubuntu does for now (cp, mv, rm). But ideally, this should have (or will have) 1:1 feature parity with gnu-coreutils, so yeah... this huge list of alternatives seem kind of redundant.

@Duncaen should I revert back to conflicts/replaces then?
Reverted, package updated to 0.9.0.

@mnabid mnabid changed the title New package: uutils-coreutils-0.8.0 New package: uutils-coreutils-0.9.0 May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-package This PR adds a new package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Package request: uutils

4 participants