From e09fc801af7aded6b9b777b36ab47f733df5be0f Mon Sep 17 00:00:00 2001 From: diviocity Date: Mon, 30 Nov 2026 21:13:21 +0100 Subject: [PATCH] Require Vinix owners for release package replacements --- PROFILES.md | 2 ++ tools/release-owners.py | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/PROFILES.md b/PROFILES.md index 6a1a3f6..95de273 100644 --- a/PROFILES.md +++ b/PROFILES.md @@ -140,6 +140,8 @@ python3 tools/release-owners.py x86_64 "$release/amd64/comparison" "$work/owners python3 tools/release-owners.py aarch64 "$release/arm64/comparison" "$work/arm-pending" ``` +Pass `--require-owner PATH=PACKAGE` for each replacement that must exist in the signed root. The worker checked the shell, desktop init, OS identity, vpac, the `pkg` frontend, the keyring, GCC and `ssl_client` in fresh 70-package x86_64 and 69-package AArch64 clients. Both reported `ID=vinix` and had no `/sbin/apk`, Alpine release file or Alpine key directory. A control naming vpac as the owner of `/usr/bin/pkg` failed before writing a report. See `foundation/release-desktop-required-owners-02`, receipt SHA-256 `13bfc67c7890b24c8150574202c0f0f818de8f7c2aa07d1743fc9179007704dd`. + The 62-package x86_64 root for the November 28 image had 3,899 matching input/layer/path observations. It had 928 with an expected owner, 117 with another owner and 2,854 without an owner in this snapshot. The same path can appear in more than one Alpine package version or release layer. Rebuilt bytes normally differ, and matching an owned path still leaves ABI and runtime behavior to verify. The arm64 baseline had 4,019 observations awaiting an installed root. The worker retains the per-row results and hashes in `amd64/owners-62` and `arm64/owners-pending` beside the release comparisons. The first arm64 SDK provided 231 of those 4,019 matching paths under their expected owner. The comparison in `arm64/owners-runtime-01` records the other 3,788. Both architectures' owner tables now assign the versioned GCC runtime libraries to `gcc-libs`. diff --git a/tools/release-owners.py b/tools/release-owners.py index 2d23add..030fe36 100644 --- a/tools/release-owners.py +++ b/tools/release-owners.py @@ -132,6 +132,13 @@ def key(row): return row["binary"], row["version"], row["repository"] +def owner_requirement(value): + path, separator, owner = value.rpartition("=") + if not separator or not path.lstrip("/") or not owner: + raise argparse.ArgumentTypeError("expected PATH=PACKAGE") + return path.removeprefix("/"), owner + + def action(row, state, names, expected, has_client): if int(row["unavailable"]): return "obtain and compare original source input" @@ -154,6 +161,10 @@ def action(row, state, names, expected, has_client): def compare(args): versions, owners, audit = installed(args.client, args.arch, args.auditor) if args.client else ({}, {}, "") + for path, expected in args.require_owner: + actual = owners.get(path) + if actual != expected: + raise ValueError(f"{args.arch}: /{path} belongs to {actual or 'no package'}, expected {expected}") names = set(versions) packages = {key(row): row for row in rows(args.comparison / "packages.tsv")} details = defaultdict(Counter) @@ -163,6 +174,11 @@ def compare(args): args.output.mkdir() if audit: (args.output / "installed-root.log").write_text(audit) + if args.require_owner: + with (args.output / "required-owners.tsv").open("x") as stream: + writer = csv.writer(stream, delimiter="\t", lineterminator="\n") + writer.writerow(["path", "owner", "version"]) + writer.writerows((path, owner, versions[owner]) for path, owner in args.require_owner) with (args.output / "paths.tsv").open("x") as stream: writer = csv.writer(stream, delimiter="\t", lineterminator="\n") writer.writerow(["binary", "version", "repository", "layer", "published_path", @@ -221,7 +237,11 @@ if __name__ == "__main__": parser.add_argument("output", type=Path) parser.add_argument("--client", type=Path, help="fresh signed vpac client to audit") parser.add_argument("--auditor", type=Path, help="compiled tests/installed-root.v") + parser.add_argument("--require-owner", action="append", type=owner_requirement, default=[], + metavar="PATH=PACKAGE", help="require an installed owner for a specific path") args = parser.parse_args() if bool(args.client) != bool(args.auditor): parser.error("--client and --auditor must be used together") + if args.require_owner and args.client is None: + parser.error("--require-owner needs an installed client") compare(args) -- 2.56.1