Skip to content

julia-bin: use cacert bundle instead of vendored CA bundle - #577130

Merged
NickCao merged 1 commit into
NixOS:masterfrom
irgolic:cacert/julia-bin
Oct 22, 2026
Merged

NickCao merged 1 commit into
NixOS:masterfrom
irgolic:cacert/julia-bin

Conversation

@irgolic

@irgolic irgolic commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Part of #576541.

The Julia binary packages have a bundled CA file, share/julia/cert.pem. NetworkOptions.jl uses this file when JULIA_SSL_CA_ROOTS_PATH and SSL_CERT_FILE are not set and the system has no CA bundle, for example in build sandboxes and containers. On NixOS, Julia uses /etc/ssl/certs/ca-certificates.crt. This change replaces cert.pem with a symlink to the ca-bundle.crt file of cacert in installPhase. The change applies to julia_110-bin through julia_113-bin.

Warning

AI Disclosure: Claude Code made the code change, the commit message and the first version of this pull request description. Claude Code used Claude Fable 5.1 and Claude Opus 5.5. I examined all of this work. Claude Code also wrote all of nix-cacert-harness. This pull request description is written in ASD-STE100 (Simplified Technical English), examined with memelint in strict mode.

Test

nix-cacert-harness examines the package before and after this change. A local copy of nixpkgs is not necessary.

nix run github:irgolic/nix-cacert-harness -- julia-bin --pr <this PR>
nix run github:irgolic/nix-cacert-harness -- julia_110-bin --pr <this PR>
Harness output: julia-bin
$ nix run github:irgolic/nix-cacert-harness -- julia-bin --base 8915027df75d0403ef013dd0cbf09ff3c602fd03 --after github:irgolic/nixpkgs/96a7df638f9701a4cdf92eea4e7453809b315982 --after-overlay fixes/julia-bin-skip-installcheck.nix
base (before) = 8915027df75d0403ef013dd0cbf09ff3c602fd03
reference: fprs4zi8r6227x12qbsd1grvfrpz6201-nss-cacert-3.131.1 TLS roots=118 all=169
==================================================================
ATTR julia-bin
before: 8915027df75d0403ef013dd0cbf09ff3c602fd03   after: github:irgolic/nixpkgs/96a7df638f9701a4cdf92eea4e7453809b315982 + overlay julia-bin-skip-installcheck.nix
before ok (0 built, 0s)
        drv /nix/store/…-julia-bin-1.13.2.drv
after  ok (0 built, 1s)
        drv /nix/store/…-julia-bin-1.13.2.drv

| output:path | before | after |
|---|---|---|
| out:/share/julia/cert.pem | pem 121 certs: 3 not in cacert, 0 in cacert but not for TLS, 0 cacert TLS roots missing; scanner: ECC G3 | symlink->cacert:ca-bundle.crt pem 169 certs (118 TLS roots + 51 non-TLS, i.e. cacert's own trust-rules bundle) |

cacert in runtime closure (before): no
cacert in runtime closure (after): yes
CAs trusted before but not trusted for TLS by cacert (3 total), e.g.:
  - C=IN, OU=emSign PKI, O=eMudhra Technologies Limited, CN=emSign ECC Root CA - G3
  - C=US, OU=emSign PKI, O=eMudhra Inc, CN=emSign ECC Root CA - C3
  - C=US, OU=emSign PKI, O=eMudhra Inc, CN=emSign Root CA - C1
VERDICT julia-bin: FIXED: before trusted CAs outside cacert; after: 1 store(s) == cacert, none with extra CAs

base=8915027df75d0403ef013dd0cbf09ff3c602fd03 shim=shims/julia-bin.nix
  package derivations to build for the matrix: 1 julia-bin-1.13.2.drv
  before-stock: REFUSED -> /nix/store/…-ca-behave-julia-bin-stock
  before-test: REFUSED -> /nix/store/…-ca-behave-julia-bin-test
  after-stock: REFUSED -> /nix/store/…-ca-behave-julia-bin-stock
  after-test: CONNECTED -> /nix/store/…-ca-behave-julia-bin-test

julia-bin  (before 8915027df75d0403ef013dd0cbf09ff3c602fd03, after github:irgolic/nixpkgs/96a7df638f9701a4cdf92eea4e7453809b315982 + julia-bin-skip-installcheck.nix)
         | stock cacert | + test root  | override with test-root cacert
before   | REFUSED      | REFUSED      | NO-OP (package does not take cacert)
after    | REFUSED      | CONNECTED    | yes (rebuilt with cacert + test root)
control (before cells): curl --cacert test-root: CONNECTED, curl --cacert stock: REFUSED
VERDICT julia-bin: PASS: after-fix trust follows cacert; before-fix ignores it
Harness output: julia_110-bin
$ nix run github:irgolic/nix-cacert-harness -- julia_110-bin --base 8915027df75d0403ef013dd0cbf09ff3c602fd03 --after github:irgolic/nixpkgs/96a7df638f9701a4cdf92eea4e7453809b315982 --after-overlay fixes/julia-bin-skip-installcheck.nix
base (before) = 8915027df75d0403ef013dd0cbf09ff3c602fd03
reference: fprs4zi8r6227x12qbsd1grvfrpz6201-nss-cacert-3.131.1 TLS roots=118 all=169
==================================================================
ATTR julia_110-bin
before: 8915027df75d0403ef013dd0cbf09ff3c602fd03   after: github:irgolic/nixpkgs/96a7df638f9701a4cdf92eea4e7453809b315982 + overlay julia-bin-skip-installcheck.nix
before ok (0 built, 1s)
        drv /nix/store/…-julia-bin-1.10.12.drv
after  ok (0 built, 0s)
        drv /nix/store/…-julia-bin-1.10.12.drv

| output:path | before | after |
|---|---|---|
| out:/share/julia/cert.pem | pem 144 certs: 19 not in cacert, 12 in cacert but not for TLS, 5 cacert TLS roots missing; scanner: ECC G3 | symlink->cacert:ca-bundle.crt pem 169 certs (118 TLS roots + 51 non-TLS, i.e. cacert's own trust-rules bundle) |

cacert in runtime closure (before): no
cacert in runtime closure (after): yes
CAs trusted before but not trusted for TLS by cacert (31 total), e.g.:
  - C=IN, OU=emSign PKI, O=eMudhra Technologies Limited, CN=emSign ECC Root CA - G3
  - C=US, OU=emSign PKI, O=eMudhra Inc, CN=emSign ECC Root CA - C3
  - C=US, OU=emSign PKI, O=eMudhra Inc, CN=emSign Root CA - C1
  - C=AT, O=e-commerce monitoring GmbH, CN=GLOBALTRUST 2020
  - C=BM, O=QuoVadis Limited, CN=QuoVadis Root CA 2
  - C=BM, O=QuoVadis Limited, CN=QuoVadis Root CA 3
  - C=CH, O=SwissSign AG, CN=SwissSign Gold CA - G2
  - C=ES, O=Firmaprofesional SA, CN=FIRMAPROFESIONAL CA ROOT-A WEB
  - C=FR, O=Dhimyotis, CN=Certigna
VERDICT julia_110-bin: FIXED: before trusted CAs outside cacert; after: 1 store(s) == cacert, none with extra CAs

base=8915027df75d0403ef013dd0cbf09ff3c602fd03 shim=shims/julia-bin.nix
  package derivations to build for the matrix: 1 julia-bin-1.10.12.drv
  before-stock: REFUSED -> /nix/store/…-ca-behave-julia_110-bin-stock
  before-test: REFUSED -> /nix/store/…-ca-behave-julia_110-bin-test
  after-stock: REFUSED -> /nix/store/…-ca-behave-julia_110-bin-stock
  after-test: CONNECTED -> /nix/store/…-ca-behave-julia_110-bin-test

julia_110-bin  (before 8915027df75d0403ef013dd0cbf09ff3c602fd03, after github:irgolic/nixpkgs/96a7df638f9701a4cdf92eea4e7453809b315982 + julia-bin-skip-installcheck.nix)
         | stock cacert | + test root  | override with test-root cacert
before   | REFUSED      | REFUSED      | NO-OP (package does not take cacert)
after    | REFUSED      | CONNECTED    | yes (rebuilt with cacert + test root)
control (before cells): curl --cacert test-root: CONNECTED, curl --cacert stock: REFUSED
VERDICT julia_110-bin: PASS: after-fix trust follows cacert; before-fix ignores it

In the second part of the output, the harness adds a temporary test root to cacert and builds the package again. Then Julia sends a request to a local openssl s_server with Downloads.request. The certificate of this server chains to the test root. Before this change, cacert has no effect on the result. After this change, it has an effect. For the harness output above, the "after" side used doInstallCheck = false, because the install check of the derivation includes all of the Julia tests. Thus, this output does not show the result of the Julia tests.

Things done

Assisted-by: Claude Code (Claude Fable 5.1)
Assisted-by: Claude Code (Claude Opus 5.5)
@zimbatm zimbatm mentioned this pull request Oct 22, 2026
66 of 95 tasks
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. llm-assisted Contributions that include code generation with LLMs 6.topic: julia Julia is a high-level, high-performance dynamic language for technical computing. labels Oct 22, 2026
@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Oct 22, 2026
@NickCao
NickCao added this pull request to the merge queue Oct 22, 2026
Merged via the queue into NixOS:master with commit 1b5013e Oct 22, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: julia Julia is a high-level, high-performance dynamic language for technical computing. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. llm-assisted Contributions that include code generation with LLMs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants