Skip to content

installers, tests: remove --preserve=mode from cp invocations#13427

Merged
edolstra merged 1 commit intoNixOS:masterfrom
jsoo1:remove-p
Jul 8, 2025
Merged

installers, tests: remove --preserve=mode from cp invocations#13427
edolstra merged 1 commit intoNixOS:masterfrom
jsoo1:remove-p

Conversation

@jsoo1
Copy link
Contributor

@jsoo1 jsoo1 commented Jul 7, 2025

-p preserves xattrs and acls which can be incompatible between filesystems

Note that --preserve=ownership can also be problematic on NFS because of the root-squashing mechanism.

Fixes #13426

@jsoo1 jsoo1 requested a review from edolstra as a code owner July 7, 2025 17:32
@jsoo1 jsoo1 force-pushed the remove-p branch 2 times, most recently from efaedcd to bd0f1a5 Compare July 7, 2025 18:35
-p preserves xattrs and acls which can be incompatible between
filesystems

Unfortunately keep -p on darwin because the bsd coreutils do not
support --preserve.

Fixes NixOS#13426
@edolstra edolstra added the backport 2.30-maintenance Automatically creates a PR against the branch label Jul 8, 2025
@edolstra edolstra merged commit 98a883b into NixOS:master Jul 8, 2025
12 checks passed
edolstra added a commit that referenced this pull request Jul 8, 2025
…3427

installers, tests: remove --preserve=mode from cp invocations (backport #13427)
@cole-h
Copy link
Member

cole-h commented Jul 16, 2025

Looks like this broke installations on Linux distros that use busybox as their cp: #13480

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 2.30-maintenance Automatically creates a PR against the branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

install.in: cp -p fails when installing on NFS

3 participants