They ask to adapt Debian to use the Rust implementation of coreutils

sylvestre ledru (a developer known for his work building Debian GNU / Linux using the Clang compiler) recently released the report on an experiment successful with an alternate set of utilities, coreutils, rewritten in Rust.

For those who are unfamiliar with Coreutils, you should know that it includes utilities such as sort, cat, chmod, chown, chroot, cp, date, dd, echo, hostname, id, ln and ls. sylvestre ledru mentions that for the first stage of integration into Debian of the coreutils version in Rust, the following objectives were established:

  • Create a package with alternative Rust coreutils for both Debian and Ubuntu.
  • Booting Debian with the Gnome desktop environment using rust-coreutils.
  • Install 1000 of the most popular packages from the repository.
  • Build from Firefox, LLVM / Clang, and Linux kernel sources with rust-coreutils.

And with it after creating more than 100 patches for Rust / coreutils, all the intended goals were successfully achieved. At present work in progress highlights implementation of missing utilities and options, improving code quality and consistency, developing the test suite, fixing bugs that occur when running the GNU Coreutils test suite (141 out of 613 tests are running successfully so far).

Also, mention that when creating the rust-coreutils package, it was decided not to replace the package coreutils, but allow them to run in parallel. The Rust versions of the utilities are installed in / usr / lib / cargo / bin / and activated by adding this directory to the PATH environment variable. Creating the rust-coreutils package made it difficult to download all build dependencies in the repository, including Rust and several small box packages.

I started contributing to the alternative Coreutils developed in Rust. The project aims to propose a direct replacement for C-based GNU Coreutils, and wanted to evaluate whether this could be used to run normal Debian. Similar to what I did with clang.debian.net a few years ago (rebuilding the Debian archive using clang instead of gcc).

Hope most readers know what Coreutils is. It is a set of programs that perform simple operations (copy / move file, change permissions / ownership, etc.). Even if some commands are from the 70s, they are at the core of Linux, Unix, and macOS. While different implementations can be found, they are trying to remain compatible in terms of arguments, options, etc. This implementation of Coreutils is no different!

On the other hand, it mentions that there were no particular problems creating the boot image However, adapting the packages for the rust-coreutils environment required a lot of work, since many post-installation scripts call the coreutils suite utilities, since most of the problems were caused by of necessary options, for example, it mentions that the utility "cp" lacked the options "–archive" and "–no-dereference", while for "ln" it did not support "–relative" and the option mktemp - "-t «, In sync» -fs «, in install -» –owner «and» –group «.

Other problems also arose due to differences in behaviorFor example, the installation utility did not support specifying / dev / null as an input file, in mkdir instead of "–parent" there was an option "–parents", and so on.

Packaging in Debian is not a trivial or simple task. It requires independently loading all dependencies in the file. Rust, with its new ecosystem and little boxes, makes this task that much more difficult.

When testing a build of large code bases, there were no major problems. When compiling Firefox and LLVM / Clang, python and cmake scripts are used, so replacing coreutils did not affect them. The Linux kernel build was relatively smooth, with only two issues emerging: the error output when chown is used with a symbolic link, and the lack of the "-n" option in the ln utility.

Finally if you are interested in knowing more about the note, you can check the details In the following link.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.