Ubuntu Livecd-rootfs Build Fails with Rust Cp Utility

In a recent update, Ubuntu developers have addressed an issue with the cp utility in the GNU Coreutils set. The problem was identified when the script for building Live images started failing with an error (livecd-rootfs). To solve the incompatibility, a variant of the cp utility was returned from the GNU Coreutils set after issues were found in the cp implementation from Rust Coreutils. This was documented in a post on the Ubuntu forums.

Following the release of Ubuntu 24.04, the cp, mv, and rm utilities from GNU Coreutils were temporarily reinstated due to identified vulnerabilities. However, in an update to the coreutils-from-uutils 0.0.0~ubuntu26 package, the use of utilities from the Rust Coreutils set was resumed. The issue stemmed from a call in the build script of the cp utility with certain options that were processed differently between the two Coreutils sets.

The error was caused by conflicting options “-L” and “-a”, with different behaviors in GNU Coreutils and Rust Coreutils. While the “-L” option dereferences symlinks, the compound “-a” option in GNU Coreutils was replaced by “-dR –preserve=all” to maintain original attributes. However, in Rust Coreutils, the compound “-a” option was discarded without replacing the conflicting “-d” flag. This omission led to the absence of the “-R” flag for recursive directory copying and the “–preserve=all” flag for attribute preservation in the copy operation, triggering the error.

/Reports, release notes, official announcements.