Release of Rust Coreutils 0.4. Discrepancy in the behavior of the du utility in uutils and GNU Coreutils.

The release of the uutils coreutils project 0.4.0 (Rust Coreutils) has been published, developing an alternative to the GNU Coreutils package, written in Rust. The coreutils package includes over a hundred utilities, including sort, cat, chmod, chown, chroot, cp, date, dd, echo, hostname, id, ln, and ls. The goal of the project is to create a cross-platform alternative implementation of Coreutils, capable of functioning on Windows, Redox, and Fuchsia platforms, among others.

Rust Coreutils is utilized by default in the Ubuntu 25.10 release and is applied in the AerynOS (Serpent OS) and Apertis (developed by Collabora) distributions. Unlike GNU Coreutils, the Rust implementation is distributed under the permissive MIT license, instead of the copyleft GPL license. Additionally, the same team of developers is working on Rust-based analogs of the util-linux, diffutils, findutils, and procps utility sets, as well as the sed and login programs.

In the new version of Rust Coreutils:

  • Compatibility with the reference test suite of GNU Coreutils has been improved, with 544 tests successfully completed, which is 12 more than in the previous version (532). 56 (68) tests failed, and 33 (33) tests were skipped. A compatibility level of 85.80% has been claimed (up from 83.91%).
  • In the data utility, compatibility with GNU date for handling time zones has been improved (the ability to specify abbreviated time zone names in the --set option has been added).
  • In the factor utility, the num_prime package has been utilized to accelerate the factorization of u64/u128 types.
  • In the tsort utility, the DFS traversal algorithm has been changed from a recursive approach to an iterative method to prevent stack overflow.
  • The cksum utility now supports sha2 and sha3 hashes. Tests have been added to track changes in the performance of cksum. The functionality of hashsum has been migrated to cksum.
  • In the mkdir utility, a stack overflow that caused crashes when creating a large number (over 200) of nested directories has been fixed.
  • Support for the OpenBSD platform has been implemented in the stdbuf and uptime utilities.
  • Building and testing on the FreeBSD platform has been improved.
  • General improvements have been made to enhance portability.
  • Capabilities have been expanded, issues fixed, and missing options added for the base64, cat, chown, chsum, date, dd, du, factor, hashsum, install, ls, mkdir, od, printenv, printf, readlink, stdbuf, timeout, truncate, tsort, uptime, uudoc utilities.

Additionally, a discrepancy in the behavior of the 'du' utility from the uutils and GNU Coreutils sets can be noted, which emerged after the transition of Ubuntu 25.10 to uutils. The developers have not yet decided whether to interpret this discrepancy as an error, since on one hand, there is logic in the behavior of uutils, and the test set of GNU Coreutils does not reveal any issues, but on the other hand, incompatibilities with GNU Coreutils are prescribed to be treated as errors, and the behavior of Busybox corresponds to GNU Coreutils.

Different behavior is observed when specifying multiple directories as arguments to the 'du' utility in a situation where some of the directories are subdirectories of others (for example, /var and /var/log). Uutils shows the actual size of each individual directory, and in the final line, it outputs the total size of all specified directories. GNU Coreutils shows the actual size that the specified directories occupy on disk in the final line, but in a separate list, it shows the sizes of each directory excluding nested directories, resulting in their size being less than the actual size. Additionally, the values output by GNU Coreutils and Busybox change depending on the order in which the directories are specified.

For example, when checking the sizes of the directories '/var/log' and '/var', whose actual sizes are 1540 and 35495 bytes respectively, GNU Coreutils outputs: du -smc /var/log /var 1540 /var/log 33955 /var # less than the actual 35495 total du -smc /var /var/log 35495 /var # only /var shown and /var/log not shown 35495 total

In uutils: du -smc /var/log /var 1540 /var/log 35495 /var 37033 total # more than actual, but matches the sum of /var and /var/log du -smc /var /var/log 35495 /var 1540 /var/log 37033 total # more than actual, but matches the sum of /var and /var/log

In Busybox: du -smc /var/log /var 1540 /var/log 33955 /var # less than actual 35495 total du -smc /var /var/log 35495 /var # only /var shown and /var/log not shown 35495 total

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster