Repository navigation
tests: minimal test_deps for older standalone tests (batch 3 of 6, gradle–libcap-ng) - #1406
Conversation
…adle–libcap-ng) Replace `base` in test_deps with bash-bootstrap plus the tools each script actually calls, so the test closure no longer masks undeclared runtime libraries. Test commands are unchanged; tests are not in the spec hash. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…hem) Gradle's launcher (unixStartScript) dies "xargs is not available" without findutils, then pipes the JVM opts through `xargs -n1 | sed | tr` and runs `uname`. base had hidden this; with minimal test_deps `gradle --version` printed no "Gradle". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Review on Karl's behalf. This is a comment, not an approval. Nothing was built for it. The findings come from reading the declarations and fetching upstream sources, and each one says how it was checked. The CI rollup on this head is now SUCCESS.
CI: all green, including minimal build SUCCESS and CodeRabbit SUCCESS. The bot's details URL is just https://minimal.dev, so I can't tell whether it ran httpie:system_ca_default (see below).
Should-fix
packages/httpie/build.ncl:216(testsystem_ca_default, deps at :149): the client dialsurl="https://localhost:$(cat port)/".- What breaks:
/etc/hostscame only frombase. Its output isetc/hosts;base-bootstrapis the only other package that ships one. Without it,localhostdoesn't resolve. The firsthttpcall then fails on name resolution instead of on certificate verification.grep -qi 'certificate verify failed' outfails and the test exits 1. If it somehow passed, it would pass for the wrong reason. - Evidence: this is exactly the failure the author recorded for actions-runner in #1404 commit bec1f28: "no /etc/hosts (base provided it), so node's lookup of
localhostfailed with EAI_AGAIN". - Fix: use
https://127.0.0.1:…, as in bec1f28. The embedded leaf certificate already carriesIP:127.0.0.1in its subjectAltName (it decodes toDNS:localhostandIP:127.0.0.1), and the server already binds 127.0.0.1. No new certificate is needed. - How I found it: grepped every test block in all six PRs for
localhost. This is the only test where a client resolves the name; the other hits are SNIservername, aHost:header, or comments. - Not confirmed by a build: CI is green, which argues against this unless the bot didn't run this test.
- What breaks:
Nit
- PR body: "Only test_deps / changes no package output" is no longer true. Commit 534714d adds coreutils, findutils and sed to gradle's runtime_deps, so gradle rebuilds.
Verdict: needs changes (httpie).
Without base there is no /etc/hosts, so `localhost` does not resolve and the test would fail on name resolution instead of certificate verification (agent-137 on #1406; same as actions-runner in bec1f28). The leaf already carries IP:127.0.0.1 and the server binds 127.0.0.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`pscap --help 2>&1 || true` passed whatever happened, including a missing or unloadable pscap. pscap 0.9.6's usage() (utils/pscap.c) prints "usage: pscap [-a] [-p pid] [--tree]" and exits 1 for any unknown argument, so the test now requires that line and that status. Bash builtins only, so test_deps stays [bash-bootstrap]. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Scope matches the title. The diff has 25 build.ncl files, and each test drops base for bash-bootstrap plus the base tools that its script calls. Three follow-up commits on the branch go beyond test_deps: the gradle runtime_deps, the httpie localhost to 127.0.0.1 change, and the stricter pscap assertion. Each commit message explains its change. The PR body still says "No test command was changed", so update the body to name the httpie and libcap-ng command changes. Clobber none. git log on gradle, httpie and libcap-ng shows only #1386 and #1135 before this branch, and the diff reverts neither. Correctness I read every changed test script and compared the commands it calls with its new test_deps. I found no missing tool. tar -tzf in jreleaser gets gzip through the tar runtime_deps. bash-bootstrap ships usr/bin/sh for the #!/bin/sh scripts (the gradle wrapper and jemalloc-config). Every new import is used. The gradle version test now runs without findutils and sed in test_deps, so it is the regression test for the new gradle runtime_deps. bash-bootstrap next to a package with a bash runtime dep is an established pattern in 62 packages. One nit is filed: guile carries an unused coreutils. Not checked: whether each test passes under the minimal closure, because that needs a build. The PR says that this is the purpose of the build-bot run. I also did not check the pscap usage string against the libcap-ng 0.9.6 source, because the source is not in the checkout.
| { | ||
| class = 'Standalone, | ||
| test_deps = [base], | ||
| test_deps = [bash-bootstrap, coreutils], |
There was a problem hiding this comment.
nit · The eval test calls only guile and the bash builtin test. It does not need coreutils. kissat uses the same test "$(...)" = ... form and gets only bash-bootstrap. Remove coreutils here and its import on line 6. This keeps the closure minimal, which is the purpose of this PR. coreutils also brings gmp, acl and libcap into the test closure.
…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>
Re-checks older standalone tests with minimal
test_deps(batch 3 of 6,gradle–libcap-ng): 25 packages, 44 tests.These tests were written with
test_deps = [base].basebrings in bash, coreutils, grep, sed, gawk, diffutils, findutils, tar, gzip, xz, bzip2, file and tzdata, and through them zlib, zstd, libmagic, libstdc++ and more. That masks missing runtime libraries: a binary that needs an undeclared library still loads, because base put the library in the test closure. The smoke-test batches of 11-06/07 (#1364–#1368, #1372, #1373) used minimal deps and found several real missing runtime_deps this way.What changed
Only
test_deps. No test command was changed.baseis removed from every test'stest_deps.bash-bootstrapis added where a command runs/bin/bashor/bin/sh(its only runtime_dep is glibc).coreutils,grep,diffutils,findutils,gawk,tar,gzip. They were found by scanning each script's command positions, including multi-linem%"…"%scripts and#!/usr/bin/envshebangs.toolchain,jdk,ocaml,git, and so on) are kept as they were.let base = import …stays whereverbaseis still a build dep.testsare not part of the spec hash, so the test_deps changes rebuild nothing. gradle is the exception: its runtime_deps gain coreutils, findutils and sed (its launcher script runs them), so it rebuilds.Expected failures
Some of these tests are expected to fail. That is the point of the PR. A failure with the minimal closure, typically exit 127 with empty stderr (a loader failure) or a missing shared library, shows a package with an UNDECLARED runtime_dep that
basewas hiding. Each one gets fixed in a follow-up commit on this branch by adding the missingruntime_deps(which does rebuild that package). A failure can also come from a script calling a tool the scan missed. Those get fixed by adding that tool totest_deps, never by addingbaseback.The failures were deliberately not predicted ahead of time. This PR exists so the build-bot runs every test under the minimal closure.
Tests
basebash-bootstrap, grepbasebash-bootstrapbase, toolchain, binutils, linux_headersbash-bootstrap, toolchain, binutils, linux_headersbasebash-bootstrapbase, toolchain, binutils, protobuf, python, linux_headersbash-bootstrap, toolchain, binutils, protobuf, python, linux_headersbasebash-bootstrap, coreutilsbasebash-bootstrap, grepbasebash-bootstrap, coreutils, grepbasebash-bootstrap, grepbasebash-bootstrap, grepbasebash-bootstrap, coreutilsbase, ca-certificatesbash-bootstrap, ca-certificates, coreutils, grepbasebash-bootstrap, coreutilsbasebash-bootstrap, grepbasebash-bootstrap, grepbasebash-bootstrap, grepbasebash-bootstrap, grepbasebash-bootstrap, grepbasebash-bootstrap, coreutils, grepbasebash-bootstrap, grepbasebash-bootstrap, grepbasebash-bootstrap, coreutils, grepbasebash-bootstrap, grepbasebash-bootstrap, grepbasebash-bootstrap, coreutils, grepbase, toolchain, pkgconfbash-bootstrap, toolchain, pkgconf, coreutils, grepbasebash-bootstrap, diffutils, grepbasebash-bootstrap, grepbasebash-bootstrap, grepbasebash-bootstrap, grepbasebash-bootstrap, coreutils, grepbase, gitbash-bootstrap, git, coreutils, grep, tarbasebash-bootstrap, coreutils, grepbasebash-bootstrap, grepbasebash-bootstrapbasebash-bootstrap, grepbasebash-bootstrap, grepbasebash-bootstrapbasebash-bootstrap, grepbasebash-bootstrap, coreutilsbasebash-bootstrap, grepbasebash-bootstrapbase, toolchainbash-bootstrap, toolchain, coreutils, grepbasebash-bootstrapAlso: a pscap test that can fail
pscap --help 2>&1 || truepassed whatever happened. It now requires pscap's exact usage line (usage: pscap [-a] [-p pid] [--tree]) and exit status 1, perutils/pscap.cat 0.9.6. Bash builtins only.🤖 Generated with Claude Code
Summary by CodeRabbit
127.0.0.1.