nixos-install: fix SSL certificate error#15579
Conversation
|
By analyzing the blame information on this pull request, we identified @aszlig, @edolstra and @lethalman to be potential reviewers |
| fi | ||
| cp -Lf "@cacert@" "$mountPoint/tmp/ca-cert.crt" | ||
| export SSL_CERT_FILE=/tmp/ca-cert.crt | ||
| # For Nix 1.7 |
There was a problem hiding this comment.
is this still relevant or can we remove it while at it?
There was a problem hiding this comment.
I'm not sure about this -- anyone?
|
We should also set |
|
@domenkozar I think there's no need to with this patch (the test uses |
|
I just did a 16.03 installation which succeeded fine without this, so I don't understand why this is necessary. What error message do you get exactly? |
Interesting. FWIW I was trying to install unstable release. I'll reproduce with screenshots when I get to the machine again.Nikolay. |
|
Gettting this: https://i.imgur.com/qZmyU0z.png |
|
Also see #14874 (comment) |
|
So... should we merge this? Given that this fixes an installation problem for several people, I'll do it in several days if there are no objections. |
|
Backport to 16.03? |
|
Hm, I'm not sure this problem exists in 16.03. If the patch applies it probably is though -- I'll do it. |
|
You might be right, I was mislead by @edolstra comment it says it works there. |
|
Well, this change seems harmless even if there's no problem with 16.03 so let's just backport -- fcd0923 |
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandboxinnix.confon non-NixOS)
nix-shell -p nox --run "nox-review wip"./result/bin/)When trying to run
nixos-installfrom the latest unstable ISO I gotcould not download https://cache.nixos.org/nix-cache-infowith an SSL error.curling this URL worked fine. The problem, IIUC, is because we don't haveSSL_CERT_FILEset in the ISO environment, so this (patched now) code hasn't copied the CA bundle. I don't see any reason why not just use CA bundle from nixpkgs, so this patch does just that. My theory appears to be correct because exporting this variable and runningnixos-installfrom an unpatched ISO also fixes this problem.cc @aszlig as the author of cf7f15c