From b4432f1004726864de2f2784f2392f36648cfd30 Mon Sep 17 00:00:00 2001 From: diviocity Date: Mon, 30 Nov 2026 11:57:06 +0100 Subject: [PATCH] Trace released X11 dependencies and record ARM BusyBox verification --- PROFILES.md | 4 +++ tests/busybox/README.md | 9 ++++++ tests/index-dependencies.py | 62 +++++++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 tests/index-dependencies.py diff --git a/PROFILES.md b/PROFILES.md index 6ad916b..1594c0e 100644 --- a/PROFILES.md +++ b/PROFILES.md @@ -49,6 +49,8 @@ Both desktop builders then remove `libOSMesa.so*`, `libGLU.so*` and `libxatracke The pinned archives and live v3.21 indexes in the November 2026 worker inventory yield 239 input rows per architecture, including 229 distinct binary names and 135 source origins. Of the 229 names, 50 occur only through X11 index dependencies. Keep the per-architecture inventory outside Git beside its input hashes. +`tests/index-dependencies.py INVENTORY IMAGE_NEEDED X11_NEEDED REPORT` joins the selected APK records to their requesting packages and to the `DT_NEEDED` tables from the published image and sidecar. On both architectures, one of the 50 index-only names provides a SONAME with a direct released ELF consumer. The current Mesa EGL and GBM libraries use `libwayland-server.so.0`, supplied by the Vinix `wayland` port. This scan covers ELF linkage. The Mesa build and runtime checks also track host generators, headers and libraries loaded through `dlopen`. The reports are in `foundation/release-index-dependencies-01`, receipt SHA-256 `48f72aa002190a0ee74be60c5ae5e7d334fa4b9a939b7aa62236b65a10d7c719`. + ## Files in the published release The worker compared the default ISOs and X11 archives for release `iso-2026-11-28` at Vinix revision `c34a6707e1d8d3a23d0b1bfe6e6dbb16290e4f75`. All four asset SHA-256 values match the release metadata. The six network, userland and X11 input scripts match the inventory revision byte for byte. The two desktop script differences select a V compiler flag. The deploy script differences change the release text. Both published initramfs archives contain an empty `/lib/apk/db/installed` and the same nine names in `/etc/vinix-pkg/base-world`. [Published assets](https://github.com/vlang/vinix/releases/tag/iso-2026-11-28) @@ -118,6 +120,8 @@ OpenSSL 3.5.9-4 on x86_64 enables those three methods. Its recipe creates and fr On aarch64, the signed BusyBox build SDK contains 12 packages, 1,497 owned files and links and 15 target ELFs. OpenSSL 3.5.9-5 supplies all 5,423 libcrypto exports and all 580 libssl exports from the published aarch64 image. Zlib 1.4-3 supplies all 95 compared exports. The three interface comparisons and the SDK receipt are recorded in `arm/abi16/release-ssl-01/receipts.sha256`, SHA-256 `fa5eef5427d1d9edc8d4a08a198f55b7715516ceff7494ae82831a117154ceb8`. +The signed aarch64 PCRE2 installation supplies all 77 published exports from `libpcre2-8` and all six from `libpcre2-posix`. The worker recorded both comparisons alongside the OpenSSL and zlib results in `arm/abi16/release-library-interfaces-01`, receipt SHA-256 `52f4a3b602d2350c6d6b0d6a00338b387d4827f84d6f2357fa69f3cff82435af`. + To survey the whole release initramfs, pass `--system-providers providers.tsv` to `tests/library-upgrades.py` in place of individual library arguments. It examines every regular shared-library ELF in `/lib` and `/usr/lib`, resolves its SONAME to an installed owner, and records absent providers and differing exports. The 129-package x86_64 root fully covered the exports for 51 of 69 regular library paths. Twelve had no installed provider and six had export differences, including the earlier OpenSSL build. Multiple paths in the release contain the same library. The nine-package arm64 bootstrap root covered its loader, had 68 missing providers and contained no replacement for the release's native OBS module without a SONAME. See `foundation/system-library-interfaces-01`, receipt SHA-256 `cdf961b747c2abcf7c90f0a5d011c783a16ad97e8aedb091f317c76628870381`. `tests/release-imports.py ARCHIVE SHA256 REPORT SYMBOL...` searches undefined dynamic symbols in the original binaries. Across 240 amd64 image files, 114 amd64 X11 files, 221 arm64 image files and 120 arm64 X11 files, no binary imported `_dlstart` or Zstd's deprecated experimental `ZSTD_copyCCtx` and `ZSTD_copyDCtx`, removed upstream in 1.6.0. The same scan found no direct imports of the five differing GMP helpers or the nine MPFR cache and default-state symbols. It found `ZSTD_decompress` in all four layers and `mpfr_init2` in both images. The scan measures link-time imports. MPFR's per-thread defaults need a runtime test independently. See `foundation/release-dynamic-imports-01`, receipt SHA-256 `2e5ff31cdbc7c255a15ba8b8da25749c1633e102245f89a95fe8dcdcdd9072a5`. diff --git a/tests/busybox/README.md b/tests/busybox/README.md index 179de1e..6a32d16 100644 --- a/tests/busybox/README.md +++ b/tests/busybox/README.md @@ -49,3 +49,12 @@ The x86-64 release guest from the same day verified 298 installed BusyBox links and ran the hook. Its serial log SHA-256 is `2adfdde432ff131e42dea57527fdd99946aa4608156d10887f1e5686d3bbfeb4`. The corresponding worker directory is `arm/coverage/release-x86_64`. + +The AArch64 release guest used BusyBox 1.38.0-5 and the published 16 KiB Vinix kernel. +On the worker, the signed root audit verified six packages, 856 owned files and +links, and 15 target ELFs. The fixture checked the installed applet links and +ran the hook. The serial log SHA-256 is +`8e3e5f4a36d8dbbbda47cec5b3cbbacadcb413d263b79a0c9c86de6fba06cfe0`. +The worker retains the owner report, boot log and image in +`arm/coverage/release-aarch64`, manifest SHA-256 +`69ab8c9889a56f8a332d83d8527af3e3126853a812259cd7ad1e32cc1a4ad70e`. diff --git a/tests/index-dependencies.py b/tests/index-dependencies.py new file mode 100644 index 0000000..990d26c --- /dev/null +++ b/tests/index-dependencies.py @@ -0,0 +1,62 @@ +"""Trace the X11 APK index dependencies to their requesters and released ELF consumers.""" +import argparse +import csv +import re +from collections import defaultdict +from pathlib import Path + + +def rows(path): + with path.open() as source: + return list(csv.DictReader(source, delimiter="\t")) + + +def depname(dependency): + return re.split(r"[<>=~]", dependency, maxsplit=1)[0] + + +def report(args): + inputs = [row for row in rows(args.inventory / "all.tsv") + if row["repository"] in ("main", "community")] + arch, = {row["arch"] for row in inputs} + selected = {(row["repository"], row["binary"], row["version"]) for row in inputs} + packages = {} + requesters = defaultdict(set) + for repo in ("main", "community"): + for record in (args.inventory / (repo + ".APKINDEX")).read_text().strip().split("\n\n"): + fields = dict(line.split(":", 1) for line in record.splitlines()) + key = (repo, fields["P"], fields["V"]) + if key in selected: + if key in packages or fields["A"] not in (arch, "noarch"): + raise ValueError(f"ambiguous or foreign index record for {key}") + packages[key] = {depname(value) for value in fields.get("p", "").split()} + for value in fields.get("D", "").split(): + requesters[depname(value)].add(fields["P"]) + if selected != packages.keys(): + raise ValueError(f"input rows missing from APKINDEX: {selected - packages.keys()}") + + consumers = defaultdict(set) + for layer, path in (("image", args.image_needed), ("x11", args.x11_needed)): + for row in rows(path): + for soname in filter(None, row["needed"].split(",")): + consumers[soname].add(layer + "/" + row["release_path"]) + with args.output.open("x") as out: + writer = csv.writer(out, delimiter="\t", lineterminator="\n") + writer.writerow(("package", "origin", "profiles", "provided_sonames", + "index_requesters", "release_elf_consumers")) + for row in inputs: + name = row["binary"] + provided = packages[row["repository"], name, row["version"]] + sonames = sorted(s[3:] for s in provided if s.startswith("so:")) + # One binary may provide a package alias, a SONAME and a command. + parents = {parent for key in provided | {name} for parent in requesters[key] if parent != name} + elfs = {path for soname in sonames for path in consumers[soname]} + writer.writerow((name, row["source"], row["profiles"], ",".join(sonames), + ",".join(sorted(parents)), ",".join(sorted(elfs)))) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description=__doc__) + for arg in ("inventory", "image_needed", "x11_needed", "output"): + parser.add_argument(arg, type=Path) + report(parser.parse_args()) -- 2.56.1