Skip to content

cacert: avoid using unreadable inherited certificate bundle - #401942

Merged
TomaSajt merged 1 commit into
NixOS:stagingfrom
timbertson:overwrite-unreadable-cert-bundle
May 15, 2025
Merged

TomaSajt merged 1 commit into
NixOS:stagingfrom
timbertson:overwrite-unreadable-cert-bundle

Conversation

@timbertson

Copy link
Copy Markdown
Contributor

Simpler alternative to #345322

Related:

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@nix-owners
nix-owners Bot requested review from ajs124, lukegb and mweinelt April 26, 2025 04:34
@github-actions github-actions Bot added 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. labels Apr 26, 2025
Comment thread pkgs/by-name/ca/cacert/setup-hook.sh Resolved
@nixpkgs-ci

nixpkgs-ci Bot commented May 22, 2025

Copy link
Copy Markdown
Contributor

Successfully created backport PR for staging-25.05:

@flokli

flokli commented Jun 17, 2025

Copy link
Copy Markdown
Member

Is there a place where we can document the current state of NIX_SSL_CERT_FILE and friends, used to impurely pass cacerts (and proxy settings) around? I feel like this keeps changing, which makes it hard to understand and refactor certain things.

@TomaSajt

Copy link
Copy Markdown
Contributor

The current state is not ideal, as NIX_SSL_CERT_FILE was not originally meant to be an impure env var, but it became one in timbertson's original PR.
We didn't revert it because we don't really want to break people's setup without providing an easier alternative.
So this PR is just a band-aid fix. It just makes custom certs not work in the sandbox instead of erroring out.

Please look at the issue I opened in NixOS/nix for further details.
NixOS/nix#12698 (comment)

@timbertson

Copy link
Copy Markdown
Contributor Author

I did add some docs in doc/build-helpers/fetchers.chapter.md as part of the original PR, happy to add more docs if you can think of more placed they would make sense.

@flokli flokli mentioned this pull request May 14, 2026
2 of 13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: port to stable This PR already has a backport to the stable release. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 5001+ This PR causes many rebuilds on Darwin and must target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 5001+ This PR causes many rebuilds on Linux and must target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants