-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stdenv: don't preserve ownership information in defaultUnpack
hook
#359873
Conversation
-p preserves permission,mode,timestamps. When trying to copy with permission on NFS, it can fail; The closest documentation I found on this was: https://access.redhat.com/solutions/725513 One suggestion is to change the netapp configuration, but another that should work for everyone is to use the cp command presented in this patch. With this, builds on nfs work for me. I however cannot say that I'm certain that removing the permission preservation won't cause any other troubles elsewhere, e.g. by perhaps introducing some sort of non-determinism.
One request: can you add an example error message to the PR description or commit message, please? |
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain your use-case for this change? Are you actually creating build sandboxes on NFS or do you need this for manually running unpackPhase
while working on certain packages?
doesn't seem to actually work, I'll close this until i figure out something that does :( |
My entire nix store is on nfs. So whenever I run nix build and something doesn't hit the cache, defaultUnpack might be called which results in this. Usually it's due to running home-manager with overrides or extra derivations of my own |
As a distributed filesystems engineer, the root cause for this failure you're experiencing almost certainly resides somewhere between your NFS server and its configuration and the mount options on your NFS client. An NFS server, properly mounted, should absolutely be able to hold all the permissions that In particular, you're likely experiencing a problem caused by attempting to set ownership (chown/chgrp) without having the permissions to do so. |
Maybe your source has some acls that cannot be set at the destination? Does this SO answer match your problem: https://serverfault.com/a/281292? |
I have the same problem with Ceph storage (both CephFS and RBD), so it's not only NFS I think. |
btw @rski tried the commands you proposed in this PR and it seems to be working in my environment (OpenShift containers with SELinux enabled and high constraints on security wtih Ceph volumes mounted, CephFS in this case):
I'm going to try to reproduce in a Nix flake. |
From the GNU coreutils manual:
Thus, what this patch drops is Since the contents in the Nix store do not need ownership (they are owned by |
defaultUnpack
hook
I plan on merging this sometime today unless there are big objections. |
-p preserves permission,mode,timestamps.
When trying to copy with permission on NFS, it can fail;
The closest documentation I found on this was:
https://access.redhat.com/solutions/725513
One suggestion is to change the netapp configuration, but another that should work for everyone is to use the cp command presented in this patch.
With this, builds on nfs work for me. I however cannot say that I'm certain that removing the permission preservation won't cause any other troubles elsewhere, e.g. by perhaps introducing some sort of non-determinism.
See #244331
Example errors include:
and
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.