Converting Gentoo to utilize Rust Coreutils: An experimental study

Published results of an experiment to replace the GNU Coreutils package with uutils in the Gentoo system environment, in order to test the ability to compile and install packages in such an environment using the Portage package manager, tied to the capabilities of Coreutils. Project uutils coreutils develops a cross-platform alternative to the GNU Coreutils package, written in Rust, distributed under a permissive MIT license (instead of the GPL copyleft license) and capable of running not only on Linux.

As a result, we managed to adapt uutils to work with Portage. Prepared for those wishing to continue experiments repository, containing a version of Gentoo stage 3 with the changes necessary to use uutils, suitable for running in a chroot environment. Among the changes made, it is noted:

  • Disabling the build of utilities supplied outside the coreutils package (more, hostname, kill, uptime, groups) and conflicting with other packages (util-linux, net-tools, procps, shadow).
  • Removing commands from the “uu-” prefix.
  • Creating bindings for missing utilities (for example, md5sum and sha256sum are implemented through the call “cksum -a md5/sha256 –untagged”).
  • Installing as separate executables instead of a single executable and symlinks to it (emerge calls the install-xattr executable, which expands the symlink before running, which prevents the overall uutils executable from determining which command is running).

Thanks for reading: