Ubuntu Reverts Rust cp After It Breaks Live Image Builds

Ubuntu Reverts Rust cp After It Breaks Live Image Builds

Ubuntu’s transition to Rust Coreutils has encountered another compatibility issue, this time affecting the essential Unix cp command.

In the latest Ubuntu Foundations team update, Canonical engineer Benjamin Drung reported that the team validated fixes from Zellic’s Rust Coreutils audit against version 0.8 on Ubuntu 26.04 LTS. However, Ubuntu has reverted cp to GNU Coreutils and submitted an upstream PR for the underlying fix.

The issue is tracked in Launchpad as bug #2158691 and involves Ubuntu’s coreutils-from package, which determines whether a command uses GNU Coreutils or the Rust-based uutils implementation.

According to the bug report, Ubuntu briefly reinstated the Rust Coreutils version of cp in coreutils-from 0.0.0~ubuntu26. This change caused failures in livecd-rootfs, one of the packages responsible for building Ubuntu live images. The bug was labeled Critical, and the immediate solution was to restore GNU cp.

The technical issue involved how uutils cp handled combinations of archive and symlink-related options, particularly cases like cp -afL. In GNU cp, the -a option is equivalent to -dR --preserve=all, which includes recursive copying and attribute preservation.

The Rust implementation, however, handled some mutually exclusive flags too aggressively. When options like -a and -L were combined, the recursive behavior implied by -a could be lost, resulting in errors such as “-r not specified; omitting directory,” even though archive mode should include recursive copying.

It is important to understand that this is not a dramatic failure of Rust Coreutils as a whole. It is just the kind of small, painful compatibility difference that only shows up when decades of scripts, build tools, and distro infrastructure meet a reimplementation of very old command-line behavior.

So, for end users, there is no panic here. Ubuntu is not shipping a broken cp in a stable release, and the fallback to GNU cp is precisely the kind of conservative move expected during development.

By admin

Leave a Reply

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