Skip to content

bootstrap pins -> gen-13: every root, ladder top and userland cycle breaker from one generation - #1242

Merged
bryan-minimal merged 87 commits into
mainfrom
bryan/gen11-flip
Nov 11, 2026
Merged

bryan-minimal merged 87 commits into
mainfrom
bryan/gen11-flip

Conversation

@bryan-minimal

@bryan-minimal bryan-minimal commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Every bootstrap pin in pkgs now comes from one generation: gen-13 of gominimal/bootstrap (gs://minimal-bootstrap/gen-13/, 118 objects, generations/gen-13/manifest.json).

This branch is five of the six draft pin PRs merged (#983 toolchain roots, #1147 go, #774 ghc, #1210 rust, #1212 ocaml) plus the tools/pkgs-flip.py commits that rewrite each pin's url and sha256 from the generation manifests (gen-11, gen-12, then gen-13). It supersedes those drafts. The sixth, #913 (jdk-21/25/27 built from source instead of Temurin), is split out after review: jdk-21, jdk-25 and jdk-27 here are main's Temurin recipes, unchanged, with the CVE-2026-111943 step and jdk-27 at 27.0.1.0.2.

Scope

Beyond the pins, this PR:

  • Deletes 39 packages: the JVM ladder (jikes through openjdk-24, except the pinned tops), the Go ladder (go-1.4 to go-1.22.6) and the Rust ladder (mrustc to rustc-1.97.1). They now live in gominimal/bootstrap; pkgs keeps only the published tops as prebuilts. Nothing left in the tree imports a deleted package.
  • Moves ghc's boot compiler from the upstream 9.8.1 bindist (ghc-bootstrap) to ghc-9.6.7, the top of the source-only GHC ladder. The Hadrian plan changes with it (9.10.3 publishes bootstrap sources only for 9.6.4 and 9.8.1). alex and happy are still built by ghc-bootstrap; moving them is a follow-up.
  • Adds a standalone test to each bootstrap prebuilt (openjdk-21/25/26, ghc-9.6.7, ocaml-5.5.2, go-1.24.9, rustc-1.98.1): a version check run from the package's own runtime closure, outside any build sandbox.
  • Declares llvm at runtime for arm64 ghc-9.6.7, whose settings name ld.lld.

Coordination with #1339: the pinned rustc-1.98.1 loads libLLVM.so.21.1 through the live llvm. Whichever of the two lands second points rustc-1.98.1 at llvm-21 and makes libLLVM findable under its prefix.

What gen-13 is

gen-11 was the full rebuild of every ladder on the rebuilt userland; gen-12 rebuilt the same packages from the polished tree with mip --no-fetch (113 of 117 byte-identical to gen-11); gen-13 repoints every gen0-* slot at gen-12 and makes the amd64 gcc seed self-contained: gcc-15.2.0-glibc is installed stripped with PT_INTERP /usr/lib/ld-linux-x86-64.so.2 and no RUNPATH, so a sandbox needs no bedrock sysroot tree to run the compiler. 113 of gen-13's 118 objects are byte-identical to gen-12; the five that moved are the amd64 gcc seed, the new amd64 stage0-patchelf, and arm64's three OpenJDKs (now built with the rebuilt gcc the slots point at). Every ladder (hex0 → C toolchain, userland, JVM, Go, GHC, Rust, OCaml, zig) built on two independent machines per arch (amd64: an AMD c4d and an Intel c3; arm64: two Axions) and every published package agreed byte for byte on both machines of its arch.

gen-14 (published since) adds only node 26.12.1; every object this PR pins is byte-identical between gen-13 and gen-14. Node's pin is a separate PR on top of #817.

Pins

75 pins in 39 packages, relative to main:

  • 57 flip (new sha): the 25 userland cycle breakers on both arches (acl, attr, bash-bootstrap, bison, bzip2, coreutils, diffutils, file, findutils, gawk-bootstrap, gmp, grep, gzip, libcap, lz4, m4, make, mpc, mpfr, pcre2, sed, tar, xz, zlib, zstd), previously bedrock prebuilts from gs://minimal-staging-archives/prebuilts/bedrock/; amd64 and arm64 gcc; arm64 ghc-9.6.7, ocaml-5.5.2, openjdk-21/25/26, rustc-1.98.1.
  • 18 relist (same sha, new url): amd64 binutils, glibc, linux_headers and their versioned aliases, amd64 ghc-9.6.7, go-1.24.9, ocaml-5.5.2, openjdk-21/25/26, rustc-1.98.1; arm64 binutils, glibc, linux_headers, go-1.24.9.

Nothing pkgs pins is in gen-13's unreproduced list. The four-line "BEDROCK ROOT" comments beside each pin become one line naming the generation.

The self-contained gcc seed retires the bedrock-loader workarounds: gcc (prebuilt) drops its glibc-bedrock-2.42-sysroot runtime dep, glibc (prebuilt) drops the bedrock_sysroot_lib output, and go-1.24.9's runtime_deps are [glibc] on both arches. glibc-bedrock-2.42-sysroot stays on amd64 for openjdk-21/25/26, ghc-9.6.7 and ghc, whose published binaries were linked against the bedrock loader (bootstrap#8 tracks moving them to the plain loader).

Cost

Every spec hash in the tree moves (the toolchain roots move). One world rebuild on both arches. Not included: #1145 (staging mirrors; gcc's libzstd runtime dep), which is orthogonal and should land on its own.

🤖 Generated with Claude Code

bryan-minimal and others added 30 commits September 28, 2026 10:51
…on amd64)

Clean re-cut of bryan/ghc-ladder onto main d0b0026: only the ladder package
directories, none of the stale pre-#667 chain that branch carried.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
microhs-0.16 -> ghc-4.08.2 -> ghc-5.04.3 -> ghc-6.6.1 -> ghc-6.10.4 -> ghc-7.0.4 -> ghc-7.6.3.
MicroHs ships its compiled form as portable C, so gcc alone yields a Haskell compiler; GHC 4.08.2's
compiler runs on it (first-party overlay: desugared modules, shims, patches, tests), compiles itself
to C, and each later GHC is booted by the one before. ghc-7.6.3 is now built from source by 7.0.4
(registerised) and keeps the install layout 7.8.4 consumes; the .hc bundle Source is gone.

All rungs use the bedrock gcc/binutils/glibc through a sysroot gcc wrapper; every Source is in
gs://minimal-staging-archives. Rehearsed on a lab VM: the lineage and the unchanged 7.8.4..9.6.7
rungs on top of it all build and pass their gates. arm64 sides remain stubs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…64 only like the other rungs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
x86_64 rungs keep the bedrock sysroot wrapper; aarch64 rungs compile with the
toolchain gcc. microhs..7.0.4 gain aarch64 configure/driver patches, the
hand-passed triple for pre-2010 config.guess, and libffi 3.5.2 where the
bundled one has no aarch64 port.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Platform tables and checkArch, libffi, gold via --with-ld.gold, unregisterised
builds through 8.10.7, the boot compiler's RTS headers first, lld for the
registerised 9.2.8 link, and genapply built against the target's registers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ghc-bootstrap leaves the closure; hadrian bootstraps from
hadrian-bootstrap-sources-9.6.4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MicroHs invokes cc; the aarch64 toolchain ships gcc only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The happy-generated parsers and Lex collect garbage constantly in the
default 50M-cell heap. 600M cells gives byte-identical .hc about 3x faster.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dagbuild.py starts a module once its imports have compiled, largest remaining
work first, instead of the overlay's retry rounds (std and lang ran one module
at a time; gen1 serialized Parser and ParseIface behind a round barrier). The
per-module commands are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…364)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…bare build root

In the sandbox the build root is /build, so grepping for it matched GHC's
foldr/build rewrite rule in sources, interfaces and docs. 4.08.2, 5.04.3,
6.6.1 and 6.10.4 now look for their own tree and bin paths.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The overlay was packed on macOS, so every member carried a
com.apple.provenance pax header and GNU tar warned once per file. v2 holds the
same tree (contents, modes, links), packed deterministically with GNU tar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…L-separated

In the sandbox the build root is /build, so selecting files by a bare build-root
grep matched far more than the tree's paths, including 5.04.3's
"ghc/InstallShield/Setup Files/...", which xargs split at the spaces. Select by
the tree, bin and boot paths with grep -F, and pass names with -Z / xargs -0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6.6.1 deletes compiler/stage1, so compiler/ghc-inplace -> stage1/ghc-inplace
dangled and the sandbox rejected the output (link outside the output dir).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he sandbox's rules

- 6.10.4 (aarch64): libffi 3.5.2 builds in a per-subdir build/ tree, so
  build/*/ expanded to several dirs and the sandbox's bash cd rejected them
  (Debian's dash took the first). Name the host dir; fail if cd fails.
- 9.6.7 (aarch64): the ghc-9.2.8 boot's settings link with ld.lld; add llvm to
  the arm build closure (the lab had lld from apt).
- ghc (aarch64): the same for its 9.6.7 boot, configured with
  --disable-ld-override so the shipped settings do not need lld, and checked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
buildbot keeps only the last ~4 KiB of stderr, and the bootstrapping.conf
failure's message matched none of the grep patterns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bootstrapping Cabal needs hsc2hs for hpc and looks it up on PATH;
the sandbox has none. Use the 6.6.1 rung's in-tree hsc2hs-inplace.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r libffi's libtool

aarch64: libffi 3.5.2 builds in build/<host>/, but rts/Makefile adds
-I../libffi/build/include; copy ffi.h and ffitarget.h there too.
x86_64: libffi 3.0.8's libtool sanity-checks a C++ preprocessor; bare
g++ -E lacks the sysroot and the sandbox has no /lib/cpp. Use the gcc
wrapper with -x c++.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
These configures probe bfd.h, libiberty and libbfd unconditionally.
The sandbox closure has binutils' bfd.h, which then breaks the debug
rts (bfd.h insists on config.h first), and the lib probes would add
-lbfd -liberty to every link. Pin the three results to no. 7.10.3+
probe only under --enable-bfd-debug.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
build.sh's error grep misses the compiler's message for ghctags, and the
sandbox returns only ~4 KiB of stderr. Wrap build.sh on x86_64 only and
print the 22 lines before make's first "] Error". aarch64's spec is
unchanged, so its built rungs stay cached.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…install

hadrian install runs the bindist's configure without our flags, and it
picked ld.lld from the build closure. Export enable_ld_override=no (the
environment form of --disable-ld-override) so both configures see it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…roduction binutils

Same fix as the jvm ladder (pkgs#775): with the amd64 bedrock roots
sealed and production glibc 2.44 in /usr/lib, the bedrock gcc (no
RUNPATH) cannot start. On x86_64 each rung starts every bedrock program
through the sysroot's ld.so with --library-path (per process; the
drivers find the wrapped cc1/collect2 via -B), and assembles and links
with production binutils 2.47 instead of the sealed 2.46.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bedrock sysroot's libm.so is a linker script naming
/usr/lib/libm.so.6, which in the sandbox is production glibc 2.44's.
-lm therefore bound 2.44 symbol versions (mhs: GLIBC_2.43 not found at
run time against the 2.42 sysroot). Rewrite it into fixlib next to
libc.so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bryan-minimal

Copy link
Copy Markdown
Member Author

The gnupg smoke-test failure here (create directory I/O error at path …/rootfs/usr/lib64: File exists → failed setup for test smoke, run 42112308631) is a latent path collision that's already on main, not a regression from the gen-13 pins.

  • Cause: gnupg's artifact ships a dangling usr/lib64 -> lib symlink. libgpg-error, libgcrypt, libassuan, libksba and npth ship usr/lib64 as a real directory. Both are leaks of the sandbox's seeded $OUTPUT_DIR/usr/lib64 through their usr/** output globs.
  • Why it fails only here: the sandbox lays packages down in spec-hash order. On main the directories go first and gnupg's symlink is only a WARN. The pins in this PR flip that order.

Fix: #1341. It drops the symlink in all nine usr/** packages, and only those nine rebuild. When it lands on main, a rebase of this PR should clear the gnupg test.

msample
msample previously requested changes Nov 5, 2026

@msample msample left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at dd19d82. Thanks for consolidating the six drafts. The pin mechanics check out (details at the bottom). There are two blockers on the JDK side, though, both security regressions, and one change fixes both.

Blockers

1. The CVE-2026-111943 mitigation (#949) is gone from jdk-21, jdk-25 and jdk-27

445288a merged main into bryan/jdk-from-source and carried over main's Temurin bumps (#1137, #1138) but not #949. Merge 98e130b then brought that branch in cleanly, and every later merge of main (dd19d82 included) kept the deletion. All three JDKs have lost the following, and so has jdk, because it points at jdk-25:

  • the import of ../jdk/cve-2026-111943.ncl and its four build inputs
  • the cve-2026-111943.sh step
  • the cve_2026_111943 test

packages/jdk/cve-2026-111943.{sh,ncl} and JdkDistrust.java are still in the tree, but nothing uses them now. AGENTS.md:447 still says the patch is "used by jdk-21, jdk-25 and jdk-27".

#949's description anticipated exactly this: "#913 (jdk-21/25/27 from source) … will ship OpenJDK's store with both roots, so it needs the same sh ./cve-2026-111943.sh step." At the three tags this PR builds (jdk-21.0.13-ga, jdk-25.0.5-ga, jdk-27-ga):

  • src/java.base/share/data/cacerts/ contains both distrusted anchors: comodoaaaca (AAA Certificate Services, which none of the Temurin builds we've shipped carried) and emsigneccrootcag3.
  • src/java.base/share/data/blockedcertsconverter/blocked.certs.pem lists 19 certificates, none of them one of the 16 compromised intermediates (0 of the 48 fingerprints in cve-2026-111943-blocked-sha256.txt).

build.sh passes no --with-cacerts-* option, so as built these JDKs ship both anchors and block none of the intermediates. That is worse than before #949.

2. jdk-27 goes back from 27.0.1.0.2 to 27 GA

dd19d82 resolved the jdk-27/build.ncl conflict by keeping version = "27". That takes jdk-27 back from 27.0.1.0.2 (#1302: the October CPU 27.0.1, plus upstream's eMudhra blocked-certs update) to 27 GA, losing both. Temurin 27.0.1.0.2, which main ships today, has neither anchor and blocks all 48 fingerprints. This branch's jdk-27 has both anchors and blocks none.

One fix for both

Upstream has already fixed both halves on all three lines. The .0.3-ga tags (jdk-21.0.13.0.3-ga, jdk-25.0.5.0.3-ga, jdk-27.0.1.0.3-ga) drop both anchors from cacerts (107 roots) and add the 16 intermediates to blocked.certs.pem. Suggested fix:

  • Move each recipe to its .0.3-ga tag. That also gives jdk-27 its CPU back.
  • Restore the import, the four build inputs, the test, and the sh ./cve-2026-111943.sh "${DST}" step after the cd "${BUILDROOT}" that follows the image copy, so the harness gates the result.

The harness already accepts a JDK that blocks the intermediates upstream (#1304, which came in with dd19d82) and anchors that are already absent. It also writes cacerts with no salt or MAC, so reproducibility is unaffected.

Longer term, AGENTS.md asks for the system store where upstream allows it, and otherwise for the denylist plus a note in build.ncl. Configure takes --with-cacerts-file / --with-cacerts-src at all three tags, so building against ca-certificates is the policy-preferred end state. As it stands, the PR does neither.

Worth addressing before merge

The description doesn't cover the full scope. It names the six drafts (#913 and #774 included), but doesn't say that this PR also:

  • deletes 39 packages (the JVM, Go and Rust ladders)
  • replaces the Temurin binaries for jdk-21/25/27 with from-source builds
  • moves ghc's boot compiler from the upstream 9.8.1 bindist (ghc-bootstrap) to ghc-9.6.7

Users will notice the JDK switch:

  • the vendor string becomes minimal
  • there are no CDS archives, so the JVM starts more slowly
  • there is no src.zip
  • the trust store is OpenJDK's rather than a Mozilla-derived one
  • there are 13 runtime deps instead of 3
  • build_cost_multiple is 12

The JDK switch would be easier to review as its own PR, and blocker 1 would have been easier to spot there. At minimum, the description should cover it.

The prebuilts have no tests. The smoke-test-coverage report marks ghc-9.6.7, ocaml-5.5.2, openjdk-21/25/26, go-1.24.9 and rustc-1.98.1 as MISSING. These are bucket prebuilts with hand-curated runtime deps. That's the same kind of package as the amd64 gcc seed, whose missing loader broke #1162's build (#1211) and nginx's cycle pass earlier in this thread.

The packages that build on them do exercise them, but only inside build sandboxes. A build sandbox holds more than the runtime closure, so a missing loader or library doesn't show up there. A one-line standalone test for each would catch it. Nothing lands on /usr/bin, so use full paths:

  • /usr/lib/openjdk-{21,25,26}/bin/java -version
  • /usr/lib/ghc-9.6.7/bin/ghc --numeric-version
  • /usr/lib/ocaml-5.5.2/bin/ocamlc.byte -version
  • /usr/lib/go-1.24.9/bin/go version
  • /usr/lib/rustc-1.98.1/bin/rustc -vV

For the JDKs, restoring the trust-store test and adding a headless AWT/font test would cover the larger runtime closure.

This needs coordinating with #1339. In both gen-13 rustc-1.98.1 tarballs, librustc_driver NEEDS libLLVM.so.21.1. Its only RUNPATH (amd64) / RPATH (arm64) is $ORIGIN/../lib, and the tarball doesn't bundle libLLVM, so today it resolves through the live llvm in /usr/lib. #1339 moves the default llvm to 23.1.5, freezes 21 under /usr/lib/llvm-21, and edits the rustc-1.91.1…1.98.1 rungs, which gives modify/delete conflicts with this PR. Whichever PR lands second has two jobs:

  • point rustc-1.98.1 at llvm-21
  • make libLLVM findable under the prefix, for example through LD_LIBRARY_PATH in rust/build.sh or a regenerated tarball

On arm64, ghc-9.6.7 needs ld.lld but doesn't declare it. In the arm64 tarball, lib/settings has -fuse-ld=lld in the C compiler link flags and ld.lld as both the ld command and the merge-objects command. Its runtime deps, though, are only [glibc, gmp, ncurses]. ghc works around this by adding all of llvm to its arm64 build deps (ghc/build.ncl:69). Please declare the dependency on ghc-9.6.7 itself, or at least note it there.

What I verified
  • All 75 gs://minimal-bootstrap pins (72 distinct URLs). Each is in the public gen-13 listing. The sha in the path, the sha256 field and gen-13's MANIFEST.txt agree. Each object's arch matches its match arm. I couldn't check the unreproduced list, because manifest.json isn't public.
  • No dangling imports. At dd19d82, which already contains main, nothing references any of the 39 removed packages.
  • JDK source mirrors.
    • jdk-21 and jdk-25 are byte-identical to the GitHub tag archives.
    • jdk-27 is byte-identical to the GitHub API tarball of jdk27u@jdk-27-ga (commit 815ff4d). The archive/refs/tags URL in the comment at jdk-27/build.ncl:58 produces different bytes, so the comment should name the tarball endpoint instead.
  • glibc's bedrock_sysroot_lib output. Nothing uses it any more, so dropping it is safe.
  • ghc. The Hadrian plan rewrite is justified: 9.10.3 only publishes bootstrap sources for 9.6.4 and 9.8.1. The checks in ghc/build.sh that fail the build if the output references the amd64 sysroot or arm64 lld are good.
Nits
  • go/build.sh:11. The comment says the old ./go and bindist paths are kept "so the script fails shut on anything but the rung". On amd64, though, the bindist branch (line 47) still builds. With go-1.24.9 always staged, both fallbacks can go.
  • Stale comments.
    • hex0/amd64-ladder.ncl still describes the go/mrustc/rustc rungs ("38 packages").
    • gcc-15.2.0-glibc still says "(the jvm ladder roots)" import it.
  • Orphaned packages.
    • Nothing imports gcc-15.2.0-glibc or fastjar now.
    • binutils-2.46-glibc's only importer is gcc-15.2.0-glibc.
    • Related question: is the stage0/hex0 chain meant to stay in pkgs now that the ladders have moved out?
  • Duplicated JDK scripts. The three jdk-*/build.sh scripts are 123 lines each and differ by about 8 lines per pair. One shared script under packages/jdk/ would mean the next fix, the CVE step included, lands in one place.
  • A way around the source-only chain. alex and happy are build deps of ghc, and they are still built by ghc-bootstrap (the upstream 9.8.1 binary). That's a side door into the "source-only chain" that ghc/build.sh:66 guards.
  • History. 81 commits, including four empty ci: commits. Squash on merge?

…or the bootstrap prebuilts

- jdk-21, jdk-25, jdk-27: back to main's recipes (Temurin with the CVE-2026-111943 step and
  test, jdk-27 at 27.0.1.0.2). The from-source builds move to their own PR.
- openjdk-21/25/26, ghc-9.6.7, ocaml-5.5.2, go-1.24.9, rustc-1.98.1: a standalone version test
  each, run from the package's own runtime closure.
- ghc-9.6.7: arm64 declares llvm at runtime; its settings name ld.lld.
- go: bootstrap only from the go-1.24.9 rung; the ./go and bindist fallbacks are gone.
- gcc-15.2.0-glibc: drop a stale reference to the JVM ladder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bryan-minimal

Copy link
Copy Markdown
Member Author

Thanks, this is a careful review. Addressed in 7db96d5:

Blockers 1 and 2: the from-source JDKs are split out of this PR, as you suggested. jdk-21, jdk-25 and jdk-27 are back to main's recipes, byte for byte: Temurin, the CVE-2026-111943 step and test, and jdk-27 at 27.0.1.0.2. The from-source work continues on bryan/jdk-from-source-v2 and will come back as its own PR on the .0.3-ga tags with the CVE step restored and one shared build script, and it will say how it differs from Temurin to users. Thanks for catching the #949 loss; that merge was mine.

Description: now covers the 39 deleted packages, the ghc boot compiler move, and the #1339 coordination.

Tests: each bootstrap prebuilt has a standalone version test with your paths. ghc-9.6.7's bin/ghc is a #!/bin/sh wrapper, so that test takes bash as its only test dep. ocamlc.byte runs through an absolute-path ocamlrun and needs nothing.

arm64 ghc-9.6.7 and lld: declared, llvm is an arm64 runtime dep now. I left ghc's own arm64 llvm build dep in place.

#1339: agreed, whichever lands second points rustc-1.98.1 at llvm-21 and makes libLLVM findable under its prefix. It's in the description.

Nits:

  • go/build.sh: the ./go and bindist fallbacks are gone; it bootstraps only from go-1.24.9 and checks the version.
  • gcc-15.2.0-glibc's stale JVM ladder comment is fixed. I left hex0/amd64-ladder.ncl alone: this PR doesn't otherwise touch it, and a comment edit there moves the hex0 spec and forces a cold rebuild of the stage0 chain. It will go with the decision below.
  • Orphans and the stage0 chain: you're right that nothing imports gcc-15.2.0-glibc, binutils-2.46-glibc or fastjar now. The ladders' home is gominimal/bootstrap, so I'd remove the stage0 chain from pkgs in a follow-up rather than grow this one.
  • The jdk-27 mirror comment and duplicated JDK scripts go with the JDK PR.
  • alex/happy still built by ghc-bootstrap: agreed it's a side door. A follow-up will build them with ghc-9.6.7 so ghc-bootstrap can go.
  • History: squash on merge, yes.

🤖 Generated with Claude Code

@bryan-minimal
bryan-minimal requested a review from msample November 6, 2026 23:36
bryan-minimal and others added 3 commits November 8, 2026 12:10
# Conflicts:
#	packages/rustc-1.91.1/README.md
#	packages/rustc-1.91.1/build.ncl
#	packages/rustc-1.91.1/build.sh
#	packages/rustc-1.92.0/README.md
#	packages/rustc-1.92.0/build.ncl
#	packages/rustc-1.92.0/build.sh
#	packages/rustc-1.93.1/README.md
#	packages/rustc-1.93.1/build.ncl
#	packages/rustc-1.93.1/build.sh
#	packages/rustc-1.94.1/README.md
#	packages/rustc-1.94.1/build.ncl
#	packages/rustc-1.94.1/build.sh
#	packages/rustc-1.95.0/README.md
#	packages/rustc-1.95.0/build.ncl
#	packages/rustc-1.95.0/build.sh
#	packages/rustc-1.96.0/README.md
#	packages/rustc-1.96.0/build.ncl
#	packages/rustc-1.96.0/build.sh
#	packages/rustc-1.97.1/README.md
#	packages/rustc-1.97.1/build.ncl
#	packages/rustc-1.97.1/build.sh
#	packages/rustc-1.98.1/README.md
#	packages/rustc-1.98.1/build.ncl
#	packages/rustc-1.98.1/build.sh
…stage0's libLLVM through LD_LIBRARY_PATH

The merge of main (llvm 23 default, LLVM 21 frozen as llvm-21) deleted this
directory with the retired ladder rungs; the prebuilt is restored. Its
librustc_driver needs libLLVM.so.21.1 with only an $ORIGIN/../lib RUNPATH on
both arches, so the stage0 depends on llvm-21 and rust's build.sh exports the
path to it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

@norrietaylor norrietaylor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve. Pin mechanics hold: all 75 pins are on gen-13, nothing left on an older generation, a bedrock prebuilt or another prebuilts URL; each URL's sha matches its sha256; all 72 objects are in gen-13's MANIFEST.txt (identical to bootstrap at 563820b); arch matches each match arm; three objects downloaded (acl x86_64, zlib aarch64, amd64 gcc seed) hash to their pins; no pinned package is in unreproduced. Full world rebuild green on both arches. The JDK/CVE blockers from the Nov 5 changes-requested review are resolved by the split (jdk-21/25/27 and packages/jdk are identical to main), and the rustc-1.98.1/llvm-21 coordination with #1339 is in.

  • Process: that Nov 5 review was at dd19d82, before 7db96d5, 9e8c168, 484e27f and 5c08f80; it needs a re-review or dismissal to unblock.
  • packages/rustc-1.98.1/build.ncl:57: the test sets LD_LIBRARY_PATH=/usr/lib/llvm-21/lib itself, which hides the missing RUNPATH to libLLVM.so.21.1, so anything other than rust/build.sh importing rustc-1.98.1 fails at exec. Document the requirement as part of the package contract now; add the RUNPATH in a later generation.
  • Provenance: pkgs records only the bucket URL and sha; manifest.json and the two-machine reproduction evidence live in the private bootstrap repo. The manifest says bootstrap_commit: a6bef0c, the description cites 563820b (the publishing commit). Worth a machine-readable generation/bootstrap-commit attr and citing a6bef0c.

Not checked: the other 69 object hashes, ELF claims about the gcc seed, ladder recipes and build logs, the ghc Hadrian plan.

@bryan-minimal
bryan-minimal dismissed msample’s stale review November 11, 2026 01:18

Addressed in 5c08f80; Norrie approved the current head.

@bryan-minimal

bryan-minimal commented Nov 11, 2026 •

Copy link
Copy Markdown
Member Author

@msample, thanks for the review. I dismissed it because the blockers are fixed at 5c08f80. Where each point went:

Blockers

Other points

  • Scope. The description now lists the 39 deleted packages and the ghc boot-compiler move. The JDK switch is no longer in this PR.
  • Prebuilt tests. openjdk-21/25/26, ghc-9.6.7, ocaml-5.5.2, go-1.24.9 and rustc-1.98.1 each have a standalone version test, run from the package's runtime closure.
  • llvm: freeze LLVM 21 as llvm-21, switch default llvm to 23.1.5 (LLVM plan steps 6+7) #1339. It merged 11-08. rustc-1.98.1 depends on llvm-21 and finds libLLVM through LD_LIBRARY_PATH=/usr/lib/llvm-21/lib, which its test exercises.
  • arm64 ghc-9.6.7 and ld.lld. llvm is now declared as a runtime dep there.
  • alex and happy still built by ghc-bootstrap. That's a follow-up, noted in the description.

Nits

  • go/build.sh fallbacks. Removed. The script now requires the go-1.24.9 rung and fails without it.
  • Orphans and stale comments. Not done here: gcc-15.2.0-glibc, fastjar and binutils-2.46-glibc (only imported by gcc-15.2.0-glibc), and hex0/amd64-ladder.ncl's "38 packages". They go in a follow-up cleanup PR so this one keeps its approval.
  • Trust store and shared JDK script. The --with-cacerts-src end state and one shared jdk-*/build.sh belong to the from-source JDK PR.

@bryan-minimal
bryan-minimal added this pull request to the merge queue Nov 11, 2026
Merged via the queue into main with commit 9a724a7 Nov 11, 2026
15 checks passed
@bryan-minimal
bryan-minimal deleted the bryan/gen11-flip branch November 11, 2026 06:00
bryan-minimal added a commit that referenced this pull request Nov 12, 2026
#1242 landed as one squashed commit, so this branch's stacked gen-11..gen-13
history conflicted with it. The tree is now main plus this PR's own
commit (1151b19). ghc-9.6.7 keeps main's arm64 llvm runtime dep and
ghc_version test, and drops only the sysroot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
evanspearman pushed a commit to evanspearman/pkgs that referenced this pull request Nov 25, 2026
…ink (gominimal#1341)

The sandbox seeds $OUTPUT_DIR/usr/lib64 -> lib so libtool/cmake installs
that target lib64 land in usr/lib. Nine packages use a catch-all `usr/**`
output glob, which picks that symlink up. Where usr/lib exists the symlink
is followed, so the artifact also carries a full duplicate of every library
as a real usr/lib64/ directory (libgpg-error, libgcrypt, libassuan, libksba,
npth, lsof, stow); where it doesn't, the artifact ships the dangling
symlink itself (gnupg, iputils).

gnupg's smoke-test sandbox holds both shapes: gnupg's usr/lib64 symlink and
the gpg libraries' usr/lib64 directories. They are laid down in spec-hash
order. On main the directories go first and the symlink is skipped with a
WARN ("Not symlinking .../usr/lib64 ... already exists"). With the gen-13
pins in gominimal#1242 the hashes flip, the symlink goes first, and creating the
directory fails: "create directory I/O error at path .../rootfs/usr/lib64:
File exists", so the test setup fails.

Remove the symlink at the end of each build.sh. The libraries, .pc files
and everything else stay in usr/lib, which is the only path any consumer
uses. `rm -f` fails the build if usr/lib64 is ever a real directory.

Rebuild blast radius (mip dump, amd64): exactly these nine leaves.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
evanspearman pushed a commit to evanspearman/pkgs that referenced this pull request Nov 25, 2026
…ladder comment (gominimal#1442)

Follow-up to gominimal#1242 (msample's review). Since gominimal#1242, nothing in pkgs
imports gcc-15.2.0-glibc or fastjar, and binutils-2.46-glibc's only
importer was gcc-15.2.0-glibc. gominimal/bootstrap builds all three
(generations/gen-13/manifest.json), and pkgs takes their gen-13 outputs
through the gcc and binutils pins, so these copies were dead.

hex0/amd64-ladder.ncl still described the old 38-package chain with the
go/mrustc/rustc rungs. It now names what is left in pkgs (hex0, stage0-*,
glibc-bedrock-2.42: 23 packages) and the one live consumer path
(glibc-bedrock-2.42-sysroot, for ghc and the openjdks).

No spec hash changes.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
evanspearman pushed a commit to evanspearman/pkgs that referenced this pull request Nov 25, 2026
…VE-2026-114938) (gominimal#1556)

* jdk-21, jdk-25, jdk-27: built from source at the Java4Shell fix tags

Revives the from-source recipes of bryan/jdk-from-source-v2
(dd19d82, green on both arches 2026-11-05), each booted by its
bootstrap JVM-ladder rung (openjdk-21, openjdk-25, openjdk-26) and
compiled by the production toolchain, at the out-of-band tags that fix
CVE-2026-114938 (Java4Shell, HotSpot x86-64 AVX-512 Base64 intrinsic):
jdk-21.0.13.1-ga (+2), jdk-25.0.5.1-ga (+2), jdk-27.0.1.1-ga (+4).
Temurin had not shipped these when this was written.

Reconciled with main since v2:
- CVE-2026-111943: main's eMudhra step (../jdk/cve-2026-111943.*) and
  its test are restored in all three. OpenJDK's own cacerts at these
  tags still holds both distrusted anchors. This is the blocker
  msample's review of gominimal#1242 found.
- gominimal#1406's test_deps (bash-bootstrap, grep, coreutils) replace `base`.
- jdk-27 is at 27.0.1.1, past main's Temurin 27.0.1.0.2, not 27 GA.

Sources are the GitHub tag archives mirrored to staging-archives.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* jdk-21, jdk-25, jdk-27: Temurin's shape, CDS, src.zip, static libstdc++; one shared build

Measured against Temurin 21.0.13.1+2, 25.0.5.1+2 and 27.0.1.1+4 (x64 tarballs and their
build-metadata configure lines); gap list in the PR.

Matches Temurin now:
- java -version: "OpenJDK Runtime Environment Minimal-21.0.13.1+2 (build 21.0.13.1+2-LTS)",
  i.e. --with-vendor-name=Minimal, --with-vendor-version-string=Minimal-<v>+<n>,
  --with-version-opt=LTS (21, 25; none for 27), --with-source-date=version, vendor URLs ours.
- lib/src.zip ships (through the existing zip normalisation).
- CDS archives ship, the same set per line as Temurin. They're re-dumped from the sorted classlist
  with Images.gmk's flags, twice, and the build fails unless the dumps are byte-identical.
- No jmods/ on 25 and 27 (--enable-linkable-runtime, JEP 493). No consumer uses jmods or jlink.
- --with-stdc++lib=static; build.sh fails if libjvm NEEDs libstdc++.
- cacerts from ../ca-certificates (Mozilla, the upstream Temurin's store comes from too) via
  --with-cacerts-src, with ASCII alias file names (NetLock's non-ASCII name breaks GenerateCacerts
  under LC_ALL=C). The CVE-2026-111943 step still runs, fail-closed.

Deliberately different: the registry's freetype/lcms2/libpng/libjpeg/giflib/zlib instead of
bundled copies (patched with the fleet, visible to the scanners); no separate debug image; no
dtrace; no Adoptium NOTICE.

Phase 2: one shared script (../jdk/build-from-source.sh via ../jdk/from-source.ncl), each
recipe's build.sh a wrapper selected by build_args (feature, boot, version_opt). Dropped the v2
fixes that are dead at these tags: the aarch64 call_VM_leaf_base dedupe (one declaration left),
the uabs rename (hotspot no longer defines uabs), the __DATE__/__TIME__ strip (gone), and the
libpng NEON pin (bundled libpng is only compiled without --with-libpng=system). -std=gnu17 stays.

Tests: java_version (shape, LTS, "sharing", no Adoptium/Temurin), cds (-Xshare:on, user dump),
src_zip, libjvm_static_libstdcpp; cve_2026_111943 unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* jdk-21/25/27: one ../jdk import (pkgs imports check)

minimal-check failed on d26431a: "identifier 'jdk_src' doesn't match
folder 'jdk' in import". A recipe can bind only one identifier per folder,
so from-source.ncl now carries the shared build script as `script` and the
CVE-2026-111943 inputs as `cve`, and each recipe imports just it. The
build_deps entries are the same five Local files; all three recipes
evaluate on amd64 and arm64. test_ci_scope's helper-chain comment follows
the new chain; its 15 tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* jdk-21/25/27: fontconfig at run time; leave .jmod files unnormalised

CodeRabbit on gominimal#1556:
- libfontmanager dlopens libfontconfig at run time, but fontconfig was only
  a build dep. It is now a runtime dep of all three, beside freetype.
- The zip normaliser rewrote every .jmod, but java.base.jmod records the
  hash of every other module's .jmod, so `jlink --module-path .../jmods`
  would fail with "Hash of <module> differs". .jmod files are no longer
  normalised (they are deterministic already: --with-source-date=version
  passes a fixed --date to `jmod`). jdk-21, the one line that still ships
  jmods, gets a jlink_roundtrip test that links java.base + java.logging
  from them and runs the result.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* jdk: replace the read-only CDS archives; check the shipped cacerts count

- The build at 2eef287 failed on both arches in jdk-21: the image installs
  classes*.jsa read-only (0444), so cp over one was "Permission denied".
  The re-dump now removes the file, copies the new dump, and sets 0644,
  Temurin's mode for every classes*.jsa. (The classlist is replaced with
  mv and the zip normaliser with os.replace, so neither needs a writable
  file.)
- cacerts: the source already had to hold every root of ca-certificates.crt
  (118 = curl's 2026-11-05 extract). The shipped store is now checked too:
  keytool must list exactly as many trustedCertEntry roots. For scale,
  Temurin 25.0.5.1's cacerts holds 117 roots (its 152,820 bytes are PKCS#12
  overhead); by SHA-256 the only difference is Izenpe.com, which Mozilla still
  trusts for TLS and Adoptium omits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* jdk: leave Izenpe.com out of the JDK trust store (Temurin's exact set)

Bryan, 2026-11-18: drop Izenpe.com. Mozilla trusts it for TLS only up to a
distrust-after date, which Java's cacerts cannot express; Temurin leaves it
out too, and with it gone the shipped store is Temurin 25.0.5.1's 117 roots
exactly (compared by SHA-256). JDK-only: the system ca-certificates keeps it.

The cacerts source step finds it by its label's file name, proves it by
SHA-256 with the boot JDK's keytool, and fails the build if either check
fails (moved, renamed, or a different cert). The source and shipped counts
are now the bundle minus one. The trust-store test treats its fingerprint
like the eMudhra anchors: it must be absent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* jdk: keep 25/27 linkable after the build; Izenpe.com optional

jdk-25 and jdk-27 build with --enable-linkable-runtime (JEP 493). jlink
records the SHA-512 of every module file outside lib/modules
(jdk.jlink runtimelink/fs_<module>_files) and refuses to link from an
image whose copy differs, except upgrade_files_<module>.conf entries
(java.base: lib/security/cacerts, lib/tzdb.dat). The script changed four
recorded files after the build: lib/classlist (sort), lib/jrt-fs.jar and
lib/ct.sym (zip normaliser), lib/security/blocked.certs (CVE step).

- blocked.certs: the 48 CVE-2026-111943 fingerprints go into the
  Gendata rule that writes it, before jlink records it; the CVE step
  after the build finds them in place and leaves the bytes unchanged.
  java.base.jmod now carries them too, so jdk-21's jlink output has them.
- classlist: no longer sorted; SortClasslist already orders it upstream
  (21, 25 and 27 tags).
- zip normaliser: skips every file a linkable runtime recorded.
- cacerts edits stay: jlink exempts cacerts.
- A build gate re-runs jlink's own SHA-512 comparison over every module
  at the end (25/27), and a jlink_from_runtime test links java.base, and
  java.base+jdk.compiler, from the installed image.

Izenpe.com: a ca-certificates without the file has nothing to leave
out; the expected count drops by one only when it was there.

Comment cleanup: no review-history references; one comment on the jdk
import; drop the dead zip `head`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci_scope test: assert the helper-to-helper edge itself

jdk-21/25/27 now import ca-certificates/build.ncl directly, so "jdk-21
is in scope" held even if load_graph read only build.ncl files. Assert
jdk's direct edge to ca-certificates, which exists only through
packages/jdk/cve-2026-111943.ncl, and that jdk is in the scoped set.
Fails with load_graph limited to build.ncl.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* jdk: say why cacerts is built in; fail the libstdc++ check on readelf

OpenJDK reads its roots from a keystore and on Linux has no keystore
type that reads /etc/ssl/certs, so jdk-21/25/27 build cacerts from
ca-certificates. Each build.ncl now says so, and names the denylists
that apply (ca-certificates' distrust.txt gate, blocked.certs).

The libstdc++ linkage check piped readelf into grep, so a readelf that
failed read as "no libstdc++". It now captures readelf's output, fails
if readelf fails or lists no NEEDED entries, then checks them, as the
libstdc++ standalone tests do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants