DEV Community

Bruno Haible
Bruno Haible

Posted on

Ubuntu / Kubuntu 26.04 — Prefer GNU coreutils

GNU coreutils or uutils coreutils? Ubuntu 26.04 ships with both. I prefer to use the GNU coreutils, for several reasons:

  • The uutils are written in Rust and therefore make use of the Rust/Cargo modules. This is an ecosystem of small modules, each written by a different author and sometimes maintained, but more often unmaintained over longer time. This ecosystem is vulnerable to the same kinds of supply chain attacks as we have seen in the npm world, where packages are occasionally taken over by malicious people (either because the maintainer behaves in an irresponsible way, or by takeover via stolen credentials, or by domain name squatting, etc.). I cannot trust a package that relies on 100 or more such modules.
  • The uutils people are fighting the GPL, by putting their code under the MIT license and thereby inviting corporations to add proprietary features. And guess what? The corporations have already started doing so: Microsoft is shipping a modified version of the uutils coreutils as the "Microsoft coreutils", without publishing its source code.
  • The uutils currently don't pass 100% of the GNU coreutils test suite. In other words, while the "main" use-cases of the programs work fine, "fringe" use-cases exhibit bugs. But I don't want to be a beta-tester for unfinished software when I install a Linux distro on my work machine.

Now, how to do it?
1.

# apt remove --allow-remove-essential coreutils-from-uutils
Enter fullscreen mode Exit fullscreen mode
  1. Create a file /etc/apt/preferences.d/uutils with contents:
Package: coreutils-from-uutils
Pin: release a=*
Pin-Priority: -10
Enter fullscreen mode Exit fullscreen mode

That's it, mostly. You will notice that you cannot install a few packages that depend on a package named build-essential:

$ apt-cache rdepends build-essential
...
    cuda-crt-13-1
    cuda-nvcc-13-1
    cuda-crt-13-1
    python3-virtualenv
    python3-torch-rocm
    python3-torch
    python3-pip
    pyenv
    opam
    nim
...
Enter fullscreen mode Exit fullscreen mode

Ubuntu maintainers: Get your ass together and remove build-essential from the dependency list of these packages! There is no reason why I should not be able to install the OCaml package manager (opam) just because I prefer the GNU coreutils.

Credit: Collin Funk provided the apt-cache rdepends command.

Top comments (0)