-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
fixed-output derivations: fix incorrect responses for getpwuid #5006
Conversation
Passing nscd socket into the build environment causes unexpected behavior in programs that make getpwuid and other related calls. relevant threads: - NixOS#4991 - https://discourse.nixos.org/t/haunted-nix-build-breaks-isolation/13869
No, we need the nscd socket to do DNS lookups etc. (see b6b142b). |
Yes, b6b142b was mentioned in the issue associated with this PR ( #4991 ). This was necessary back when you made this change because of Line 2340 in b6b142b
DNS resolution was failing because your machine's This was changed to nix/src/libstore/build/local-derivation-goal.cc Line 1752 in 7bc17a9
As mentioned in #4991, the absence of this socket no longer breaks fixed output derivations (verified with nix master), and its presence breaks any program that makes getpwuid() calls, like git and maven. |
Thanks, makes sense! |
This should also receive a backport to --- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -2841,8 +2841,6 @@ void DerivationGoal::runChild()
ss.push_back("/etc/services");
ss.push_back("/etc/hosts");
- if (pathExists("/var/run/nscd/socket"))
- ss.push_back("/var/run/nscd/socket");
}
for (auto & i : ss) dirsInChroot.emplace(i, i); |
I was trying to do this, but nixStable is failing to build on nixpkgs master when I give it the repo as src. Tarball works. The contents of the repo and tarball release are not the same.
Anyone know what's going on here? |
I can't tell you exactly “what's going on here”, but for 2.3 you have to build the source tarball using
This essentially just runs |
Passing nscd socket into the build environment causes unexpected behavior in programs that make getpwuid and other related calls.
relevant threads: