stdenv/setup.sh: make sure $sourceRoot has +x before cd-ing #117357
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change is prompted by the following, admittedly cursed tarball:
The minimal reproducer for the issue is the following derivation trying
to work around the uid 0 issue with
dontMakeSourcesWritable = true
:This currently fails in the following way:
As you can see, the issue is that
$sourceRoot
isn't executable,prohibiting the call to
cd
. This can be fixed by runningchmod +x "${sourceRoot}"
beforecd
regardless ofdontMakeSourcesWritable
inunpackPhase
since ifchmod
fails,cd
would fail as well and we are out of options.
Verified that the workaround works locally.
Another thing to investigate is investigating if we should use
--no-same-owner
fortar
and if it helps in this case as well.See also Profpatsch/yarn2nix#56.
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)