Skip to content

[Backport 2.35-maintenance] packaging/scripted-installer: Only chown pre-existing files when needed - #16790

Merged
internal-nix-ci[bot] merged 3 commits into
2.35-maintenancefrom
backport-16785-to-2.35-maintenance
Nov 9, 2026
Merged

internal-nix-ci[bot] merged 3 commits into
2.35-maintenancefrom
backport-16785-to-2.35-maintenance

Conversation

@internal-nix-ci

Copy link
Copy Markdown

Automatic backport to 2.35-maintenance, triggered by a label in #16785.

Partially reverts 9533d33, modulo the 0:0 vs
0:nixbld ownership. I got a bit overzealous deleting code and it did turn out
load-bearing.

So apparently not even root can chown /nix/.Trashes on macOS (╯°□°)╯︵ ┻━┻
This is quite impossible to test in CI too?

Because of #13719, we leave /nix/store/*
objects alone that have nixbld group ownership for now. Chowning them to root
might be impossible because of App Management on macOS (e.g. xcode store objects).
Also older installers messed this part up.

/nix/var/nix/builds/* is ignored entirely.

(cherry picked from commit db97f25)
The -n trick doesn't work on macOS sadly. So instead we can delete
the bootstrap closure and replace it afterwards. --load-db re-registers
existing valid paths so it should be fine.

(cherry picked from commit 2c40b63)
App Management also denies changing the mode of apps in the store.
If the user is running the installer over an existing install this might (and will)
blow up if they have apps in the store.

(cherry picked from commit 57d11f7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant