me

/

vinix-ports Public
382 commits 0 issues 0 pull requests 1 contributor Discussions Projects Snippets LOC history Platform CI

Track release inputs installed under Vinix target and data paths

diviocity committed 5 days ago · c6895517c2081e0adf4663c1802c0a38b43311cd View patch
Unverified signature 2 files changed +39 -5
PROFILES.md +2 -0

@@ -92,4 +92,6 @@ The first arm64 SDK provided 231 of those 4,019 matching paths under their expec

9292

9393The 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`.

9494

95+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`.

96+

9597Both 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`.

tools/release-owners.py +37 -5

@@ -63,17 +63,39 @@ def field(body, name):

6363

6464def installed(client, arch, auditor):

6565 result = subprocess.check_output([auditor, arch, client], text=True)

66- names = set()

66+ versions = {}

6767 owners = {}

6868 for description in sorted((client / "db/local").glob("*/desc")):

69- name, = field(description.read_text(), "NAME")

70- names.add(name)

69+ record = description.read_text()

70+ name, = field(record, "NAME")

71+ version, = field(record, "VERSION")

72+ versions[name] = version

7173 for path in field(description.with_name("files").read_text(), "FILES"):

7274 if not path.endswith("/"):

7375 if path in owners:

7476 raise ValueError(f"multiple owners for {path}")

7577 owners[path] = name

76- return names, owners, result

78+ return versions, owners, result

79+

80+

81+def relocated(row, path, arch, versions):

82+ origin = row["origin"]

83+ if origin == "zsh" and origin in versions:

84+ old = row["version"].rsplit("-r", 1)[0]

85+ new = versions[origin].rsplit("-", 1)[0]

86+ if path == f"bin/zsh-{old}":

87+ return f"bin/zsh-{new}"

88+ for base in ("usr/share/zsh", "usr/lib/zsh"):

89+ prefix = f"{base}/{old}/"

90+ if path.startswith(prefix):

91+ return f"{base}/{new}/" + path.removeprefix(prefix)

92+ if origin in ("font-misc-misc", "font-cursor-misc", "font-alias") and path.startswith("usr/share/fonts/misc/"):

93+ return "usr/share/fonts/X11/misc/" + path.removeprefix("usr/share/fonts/misc/")

94+ if origin == "ncurses" and path.startswith("etc/terminfo/"):

95+ return "usr/share/terminfo/" + path.removeprefix("etc/terminfo/")

96+ if origin == "binutils" and path.startswith(f"usr/{arch}-alpine-linux-musl/"):

97+ return f"usr/{arch}-linux-musl/" + path.removeprefix(f"usr/{arch}-alpine-linux-musl/")

98+ return None

7799

78100

79101def rows(path):

@@ -106,10 +128,12 @@ def action(row, state, names, expected, has_client):

106128

107129

108130def compare(args):

109- names, owners, audit = installed(args.client, args.arch, args.auditor) if args.client else (set(), {}, "")

131+ versions, owners, audit = installed(args.client, args.arch, args.auditor) if args.client else ({}, {}, "")

132+ names = set(versions)

110133 packages = {key(row): row for row in rows(args.comparison / "packages.tsv")}

111134 details = defaultdict(Counter)

112135 seen = set()

136+ moved = []

113137 args.output.mkdir()

114138 if audit:

115139 (args.output / "installed-root.log").write_text(audit)

@@ -130,6 +154,14 @@ def compare(args):

130154 if known and observation not in seen:

131155 seen.add(observation)

132156 details[k][match] += 1

157+ if match == "unowned":

158+ target = relocated(packages[k], path, args.arch, versions)

159+ if target and owners.get(target) in expected:

160+ moved.append((*k, row["layer"], path, target, owners[target]))

161+ with (args.output / "relocations.tsv").open("x") as stream:

162+ writer = csv.writer(stream, delimiter="\t", lineterminator="\n")

163+ writer.writerow(["binary", "version", "repository", "layer", "published_path", "installed_path", "owner"])

164+ writer.writerows(sorted(moved))

133165 with (args.output / "packages.tsv").open("x") as stream:

134166 writer = csv.writer(stream, delimiter="\t", lineterminator="\n")

135167 writer.writerow(["binary", "version", "repository", "origin", "profiles", "expected_packages",