Repository navigation
Conversation
14a2ed5 to
6c25f39
Compare
|
cc @leona-ya for freeze matters |
|
I believe #345322 fixes this, and I'd be pretty sad to see this reverted when there's been a fix available for 6+ months. This is necessary in order to support authenticated resources, which is pretty common in corporate environments. |
|
I would be okay with not reverting it, I mainly just wanted to start a discussion and speed things up. I'm still experimenting with the viability of the Nix-side fix. Also, @timbertson could you show us how you're configuring |
I'm not changing the daemon's permanent config, I'm using the I wrote https://github.com/timbertson/netproxrc for precisely this purpose, it sets |
|
Thank you for clarifying. This is all fine and good. However, not all people who set the AFAICT some darwin setups configure the I'm not sure why. I'm still in the process of figuring out the internals of Note: the default value of Not sure. As I said, still investigating |
|
Okay, I found something pretty interesting. https://github.com/NixOS/nix/blob/3f811c237312a91cfe9314a215ebb4b159bccb23/src/libstore/unix/build/derivation-builder.cc#L1947-L1950 This is pretty interesting. Some packages, like openssl are explicitly told to use This probably means that openssl can function without the cacert hook, and any impure env vars. I have not check if it actually does. |
|
Oh, nice find.
Yeah, I think that would work? In the sandbox on linux at least, although surely not with sandboxing disabled, and it sounds like not on OSX? I can't tell if it's possible from here, but a better solution would be if this same code path also exported NIX_SSL_CERT_FILE inside the builder environment. That way it's only activated if the path is mounted at that location, and it would then be impossible (under this code path) for If we're modifying the builder, it would also make sense to add a check that if |
|
If we're talking about darwin, the sandboxing there is completely different from the sandboxing of nix. AIUI it works using an allowlist instead of chroot. Let's say we remove Not sure what should happen if the All this would make the I don't 100% understand what the comment is saying but I'll link it here: nixpkgs/pkgs/stdenv/generic/setup.sh Lines 1007 to 1015 in 9b8ba51 I've been writing this message for too long, so I'll leave it at this for now. |
I do think this would be great, but I also don't think it's a viable short-term direction, since it requires a new nix release, and potentially there would be debate about whether a nixpkgs concept belongs in nix (I'm not sure if it is a nixpkgs or pure nix concept, but either way I'm not convinced it's a trivial change). Short-term I am still convinced that #401942 (or #345322) is a straighforward fix, and I'd like to put our efforts into getting that merged rather than waiting on nix changes. |
I agree. Let's not get nix involved just yet. |
|
Can we close this now that #401942 is merged? 🤞 |
Partial revert of #303307
Possible less-radical alternative: #345322 / #401942
CC: @timbertson
The change in question caused too many issues.
(Mostly on Darwin, though some Linux users also encountered issues with it)
Some issues:
fetchFromGitHubwithfetchSubmoduleshave issues with HTTPS when using an alternate nix store #345226NIX_SSL_CERT_FILE, e.g. FOD fetchers that use thecacertsetup hookPeople tried to solve it on the Nix side.
ssl-cert-fileconfig option is not consistent enough for a perfect Nix-side fix, but it's probably better anyways.Note: this counts as a breaking change, and we have already entered the
25.05breaking change restriction period.Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-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.