Require Vinix owners for release package replacements
@@ -140,6 +140,8 @@ python3 tools/release-owners.py x86_64 "$release/amd64/comparison" "$work/owners
140140python3 tools/release-owners.py aarch64 "$release/arm64/comparison" "$work/arm-pending"
141141```
142142
143+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`.
144+
143145The 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.
144146
145147The 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`.
@@ -132,6 +132,13 @@ def key(row):
132132 return row["binary"], row["version"], row["repository"]
133133
134134
135+def owner_requirement(value):
136+ path, separator, owner = value.rpartition("=")
137+ if not separator or not path.lstrip("/") or not owner:
138+ raise argparse.ArgumentTypeError("expected PATH=PACKAGE")
139+ return path.removeprefix("/"), owner
140+
141+
135142def action(row, state, names, expected, has_client):
136143 if int(row["unavailable"]):
137144 return "obtain and compare original source input"
@@ -154,6 +161,10 @@ def action(row, state, names, expected, has_client):
154161
155162def compare(args):
156163 versions, owners, audit = installed(args.client, args.arch, args.auditor) if args.client else ({}, {}, "")
164+ for path, expected in args.require_owner:
165+ actual = owners.get(path)
166+ if actual != expected:
167+ raise ValueError(f"{args.arch}: /{path} belongs to {actual or 'no package'}, expected {expected}")
157168 names = set(versions)
158169 packages = {key(row): row for row in rows(args.comparison / "packages.tsv")}
159170 details = defaultdict(Counter)
@@ -163,6 +174,11 @@ def compare(args):
163174 args.output.mkdir()
164175 if audit:
165176 (args.output / "installed-root.log").write_text(audit)
177+ if args.require_owner:
178+ with (args.output / "required-owners.tsv").open("x") as stream:
179+ writer = csv.writer(stream, delimiter="\t", lineterminator="\n")
180+ writer.writerow(["path", "owner", "version"])
181+ writer.writerows((path, owner, versions[owner]) for path, owner in args.require_owner)
166182 with (args.output / "paths.tsv").open("x") as stream:
167183 writer = csv.writer(stream, delimiter="\t", lineterminator="\n")
168184 writer.writerow(["binary", "version", "repository", "layer", "published_path",
@@ -221,7 +237,11 @@ if __name__ == "__main__":
221237 parser.add_argument("output", type=Path)
222238 parser.add_argument("--client", type=Path, help="fresh signed vpac client to audit")
223239 parser.add_argument("--auditor", type=Path, help="compiled tests/installed-root.v")
240+ parser.add_argument("--require-owner", action="append", type=owner_requirement, default=[],
241+ metavar="PATH=PACKAGE", help="require an installed owner for a specific path")
224242 args = parser.parse_args()
225243 if bool(args.client) != bool(args.auditor):
226244 parser.error("--client and --auditor must be used together")
245+ if args.require_owner and args.client is None:
246+ parser.error("--require-owner needs an installed client")
227247 compare(args)