Skip to content
Home » Ubuntu Reverts to GNU cp After Rust Version Briefly Breaks Live Image Builds

Ubuntu Reverts to GNU cp After Rust Version Briefly Breaks Live Image Builds

Canonical quickly reverts cp to GNU Coreutils after a Rust implementation incompatibility breaks live image builds.

Canonical’s push to replace parts of Ubuntu’s core utilities with Rust implementations hit a familiar snag this week. The team had to quickly switch the cp command back to the classic GNU version after a short test with the Rust rewrite caused critical failures in the infrastructure that builds Ubuntu live images.

This isn’t a disaster for everyday users, but it’s a clear reminder that rewriting 40-year-old Unix tools is harder than it looks – even when the goal is memory safety.

Background: The slow move to Rust coreutils

Ubuntu has been gradually adopting uutils/coreutils (the Rust reimplementation of GNU coreutils) to reduce memory-safety issues that have long affected C-based tools. The coreutils-from package was introduced to let the system (and power users) choose between the GNU and Rust versions of commands.

Many utilities moved over in Ubuntu 25.10 for broader testing. For the 26.04 LTS release, however, Canonical kept cp, mv, and rm on the GNU side due to remaining compatibility and security concerns. The plan has been to aim for a fuller Rust transition in 26.10 once those issues are resolved.

In a recent development update to the coreutils-from package (version 0.0.0~ubuntu26), the team briefly reinstated the Rust version of cp. That change triggered immediate problems.

What broke

The failure showed up in livecd-rootfs, the package responsible for constructing Ubuntu live ISOs and images. The bug was marked Critical.

The technical root cause was subtle but impactful. Certain build scripts use combinations like cp -afL.

In GNU cp, -a (archive mode) expands to -dR --preserve=all – it recursively copies directories, preserves attributes, and handles symlinks in a well-defined way. When -L (dereference/follow symlinks) is added, GNU correctly manages the interaction.

The Rust implementation handled the mutual-exclusion logic for symlink-related flags (-a/-d/-L/-H/-P) too aggressively. When -L appeared alongside -a, the parser stripped key parts of the archive behavior (including the recursive -R component). This produced errors such as “-r not specified; omitting directory,” even though -a should have implied recursion.

The result: live image builds failed.

Canonical didn’t wait. They reverted cp to the GNU implementation in the next coreutils-from update and opened an upstream pull request in the uutils project to fix the argument-handling logic.

A suggested workaround (changing the specific cp -afL call in livecd-rootfs to an explicit cp -RL --preserve=all) was tested and worked, but the cleaner, lower-risk move was simply restoring GNU cp for now.

This follows the same conservative pattern seen with earlier Rust coreutils issues in 25.10 — performance regressions, Makeself archive problems, and upgrade hiccups. The fallback mechanism in coreutils-from proved its value here.

For regular Ubuntu users on 26.04, there’s no immediate impact. The affected builds are part of Canonical’s internal image-creation process, and the revert happened before any stable release impact.

What we’re seeing is the expected friction when decades of scripts, build systems, and edge-case behaviors meet a reimplementation that aims for compatibility but isn’t 100% bit-for-bit identical yet. These aren’t flaws in Rust itself – they’re the inevitable growing pains of replacing foundational tools that power entire distributions.

The good news is that Ubuntu’s approach remains measured. They’re not forcing a full switch on LTS users while sharp edges remain. The upstream fix should help everyone using uutils, and the long-term goal of memory-safe core utilities is still worth pursuing.

Via bug report

Recent articles from DebugPoint.com

Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted