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.' -- source: https://linuxiac.com/ubuntu-reverts-rust-cp-after-it-breaks-live-image-build... Cheers, Peter
On Tue, 18 Aug 2026 11:01:42 +1200, Peter Reutemann quoted:
'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.'
That’s how cp is documented to work, according to the man page <https://manpages.debian.org/cp(1)>. If the Rust version doesn’t follow that behaviour, but is supposed to be a drop-in replacement, then that’s a bug.
participants (2)
-
Lawrence D'Oliveiro -
Peter Reutemann