From c6895517c2081e0adf4663c1802c0a38b43311cd Mon Sep 17 00:00:00 2001 From: diviocity Date: Mon, 30 Nov 2026 02:30:36 +0100 Subject: [PATCH] Track release inputs installed under Vinix target and data paths --- PROFILES.md | 2 ++ tools/release-owners.py | 42 ++++++++++++++++++++++++++++++++++++----- 2 files changed, 39 insertions(+), 5 deletions(-) diff --git a/PROFILES.md b/PROFILES.md index 841f847..d6d443e 100644 --- a/PROFILES.md +++ b/PROFILES.md @@ -92,4 +92,6 @@ The first arm64 SDK provided 231 of those 4,019 matching paths under their expec The 106-package x86_64 root passed the installed-root audit for 17,128 paths and 273 target ELFs. The 27-package arm64 root passed for 1,967 paths and 31 target ELFs. Vinix packages the individual Mozilla authorities in `ca-certificates-bundle`, the update tools and configuration in `ca-certificates`, and the login banner in `vinix-release`. Applying those ownership rules to the published paths gives 1,250 expected owners and 2,649 missing original paths on x86_64, and 556 expected owners and 3,463 missing original paths on arm64. The worker records the per-file results in `foundation/split-owners-01`, receipt SHA-256 `e1404e666c4035989856488ab77253cfb48bfec023cc44d43ef30ddab42ac9c1`. +The same checker writes `relocations.tsv` for original paths whose expected owner installed the file under a new path. The 106-package x86_64 root has 850 such versioned Zsh paths, 335 X11 bitmap font paths, 135 binutils target paths and 40 terminal descriptions. They account for 1,360 of the 2,649 missing original paths. A relocation records a path and its installed owner. The files, their consumers and their behavior can then be checked in the guest. The worker retains both architectures' tables in `foundation/relocations-01`, receipt SHA-256 `244339f89da83ab65177fa2fd34f75d5fa402a0cd13607e522fa881097911a62`. + Both targets also passed a fresh signed install of musl, `vinix-accounts`, `vinix-filesystem` and `netbase`. Each root had 252 owned files and links and six target ELFs. Run `python3 tests/layout.py "$client/root"` after the installed-root audit to check the modes on shadow, root and the temporary directories, the runtime symlinks and the account and network defaults. The worker retains both runs in `foundation/layout-03` with receipt manifest SHA-256 `d5c1cba079ab9cb1f04f2de7f17ab9d270e9066fc2472ac486fd079fa1139a1e`. diff --git a/tools/release-owners.py b/tools/release-owners.py index 65a4a1c..ef6ee41 100644 --- a/tools/release-owners.py +++ b/tools/release-owners.py @@ -63,17 +63,39 @@ def field(body, name): def installed(client, arch, auditor): result = subprocess.check_output([auditor, arch, client], text=True) - names = set() + versions = {} owners = {} for description in sorted((client / "db/local").glob("*/desc")): - name, = field(description.read_text(), "NAME") - names.add(name) + record = description.read_text() + name, = field(record, "NAME") + version, = field(record, "VERSION") + versions[name] = version for path in field(description.with_name("files").read_text(), "FILES"): if not path.endswith("/"): if path in owners: raise ValueError(f"multiple owners for {path}") owners[path] = name - return names, owners, result + return versions, owners, result + + +def relocated(row, path, arch, versions): + origin = row["origin"] + if origin == "zsh" and origin in versions: + old = row["version"].rsplit("-r", 1)[0] + new = versions[origin].rsplit("-", 1)[0] + if path == f"bin/zsh-{old}": + return f"bin/zsh-{new}" + for base in ("usr/share/zsh", "usr/lib/zsh"): + prefix = f"{base}/{old}/" + if path.startswith(prefix): + return f"{base}/{new}/" + path.removeprefix(prefix) + if origin in ("font-misc-misc", "font-cursor-misc", "font-alias") and path.startswith("usr/share/fonts/misc/"): + return "usr/share/fonts/X11/misc/" + path.removeprefix("usr/share/fonts/misc/") + if origin == "ncurses" and path.startswith("etc/terminfo/"): + return "usr/share/terminfo/" + path.removeprefix("etc/terminfo/") + if origin == "binutils" and path.startswith(f"usr/{arch}-alpine-linux-musl/"): + return f"usr/{arch}-linux-musl/" + path.removeprefix(f"usr/{arch}-alpine-linux-musl/") + return None def rows(path): @@ -106,10 +128,12 @@ def action(row, state, names, expected, has_client): def compare(args): - names, owners, audit = installed(args.client, args.arch, args.auditor) if args.client else (set(), {}, "") + versions, owners, audit = installed(args.client, args.arch, args.auditor) if args.client else ({}, {}, "") + names = set(versions) packages = {key(row): row for row in rows(args.comparison / "packages.tsv")} details = defaultdict(Counter) seen = set() + moved = [] args.output.mkdir() if audit: (args.output / "installed-root.log").write_text(audit) @@ -130,6 +154,14 @@ def compare(args): if known and observation not in seen: seen.add(observation) details[k][match] += 1 + if match == "unowned": + target = relocated(packages[k], path, args.arch, versions) + if target and owners.get(target) in expected: + moved.append((*k, row["layer"], path, target, owners[target])) + with (args.output / "relocations.tsv").open("x") as stream: + writer = csv.writer(stream, delimiter="\t", lineterminator="\n") + writer.writerow(["binary", "version", "repository", "layer", "published_path", "installed_path", "owner"]) + writer.writerows(sorted(moved)) with (args.output / "packages.tsv").open("x") as stream: writer = csv.writer(stream, delimiter="\t", lineterminator="\n") writer.writerow(["binary", "version", "repository", "origin", "profiles", "expected_packages", -- 2.56.1