Repository navigation
tracecompass: generate the bundled JustJ JRE's cacerts from cacert - #577599
Merged
Merged
Conversation
Assisted-by: Claude Code (Claude Fable 5.1) Assisted-by: Claude Code (Claude Opus 5.5)
28 of 37 tasks
Contributor
|
I had issue with the software but it wasn't related to the PR. So should be fine to merge. I'll make another that fixes the issue. |
lvanasse
approved these changes
Oct 23, 2026
irgolic
force-pushed
the
cacert/tracecompass
branch
from
October 23, 2026 14:10
62ddcd7 to
512e124
Compare
Member
Author
|
FYI just rewrote the change with diff --git a/pkgs/by-name/tr/tracecompass/package.nix b/pkgs/by-name/tr/tracecompass/package.nix
index 309d102fb..fdb6b183e 100644
--- a/pkgs/by-name/tr/tracecompass/package.nix
+++ b/pkgs/by-name/tr/tracecompass/package.nix
@@ -80,13 +80,14 @@ stdenv.mkDerivation (finalAttrs: rec {
patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" $out/trace-compass/tracecompass
# regenerate the bundled JustJ JRE's CA keystore from cacert, as openjdk does
- pushd $out/trace-compass/plugins/org.eclipse.justj.openjdk.*/jre/lib/security
- rm cacerts
- JAVA_TOOL_OPTIONS="-Dkeystore.pkcs12.certProtectionAlgorithm=NONE -Dkeystore.pkcs12.macAlgorithm=NONE" \
- ${jre-generate-cacerts} ${jdk21}/bin/keytool ${cacert}/etc/ssl/certs/ca-bundle.crt
- popd
+ (
+ cd $out/trace-compass/plugins/org.eclipse.justj.openjdk.*/jre/lib/security
+ rm cacerts
+ JAVA_TOOL_OPTIONS="-Dkeystore.pkcs12.certProtectionAlgorithm=NONE -Dkeystore.pkcs12.macAlgorithm=NONE" \
+ ${jre-generate-cacerts} ${jdk21}/bin/keytool ${cacert}/etc/ssl/certs/ca-bundle.crt
+ )
mkdir -p $out/bin
makeWrapper $out/trace-compass/tracecompass $out/bin/tracecompass \
--prefix PATH : ${lib.makeBinPath [ jdk21 ]} \ |
7 of 13 tasks
lvanasse
added a commit
to lvanasse/nixpkgs
that referenced
this pull request
Oct 25, 2026
Create the shell launcher during installation, then add the GApps environment in preFixup. This preserves the installPhase insertion point used by NixOS#577599 while keeping the GSettings smoke check working. Assisted-by: OpenAI Codex (GPT-6)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #576543.
Trace Compass,
tracecompass, has a bundled JustJ JRE intrace-compass/plugins/org.eclipse.justj.openjdk.*/jre. The Java trust store of this JRE,lib/security/cacerts, has 146 certificates, and 23 of them are not incacert. This change makes a newcacertsfor this JRE from thecacertbundle withjre-generate-cacertsand thekeytoolofjdk21. Trace Compass usesjdk21and not this JRE, because the package adds a-vmline forjdk21totracecompass.ini. Thus, this change has an effect only when a different tool starts the bundled JRE.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
strictmode.Test
nix-cacert-harness examines the package before and after this change. A local copy of nixpkgs is not necessary.
Harness output: tracecompass
The harness tests the package with the 14 certificate chains of the eMudhra incident, from https://emudhra.we-have-a-problem.com/ (only the certificates, not the keys). Before this change, the trust store of the bundled JustJ JRE accepts 7 of the 14 chains (
accepted 7/14). Thus, it accepts the eMudhra intermediate certificates throughemSign ECC Root CA - G3. After this change, the trust store accepts no chain (accepted 0/14). In the second part of the output, a small Java test starts the bundled JustJ JRE. The test sends one request to each of four test servers withHttpsURLConnectionand the default trust store. The package does not patch this JRE, thus the test starts itsbin/javathrough the dynamic loader of nixpkgs. Before this change, the test connects to the two servers with the G3 chain. After this change, the test connects to no server. The harness compares the certificates by their SHA-256 fingerprints, becausejre-generate-cacertsdoes not keep the usual aliases.Things done
./result/bin/.nixpkgs-reviewon this PR. See nixpkgs-review usage.passthru.tests.