me

/

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

Identify the release desktop and command-line consumers of apk

diviocity committed 5 days ago · df47b46c485bdaae7fb1d0d6ac5688b6c59fb065 View patch
Unverified signature 2 files changed +13 -1
PROFILES.md +2 -0

@@ -115,3 +115,5 @@ OpenSSL 3.5.9-4 on x86_64 enables those three methods. Its recipe creates and fr

115115To 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`.

116116

117117`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`.

118+

119+With `--dependencies needed.tsv` the same command records each ELF's library dependencies. Across both images and their X11 bundles, only `/sbin/apk` links to `libapk.so.2.14.0`. The native desktop still uses apk through two other interfaces. The first-run selector invokes `/sbin/apk search --exact`, and System Information reads `/lib/apk/db/installed`. Both images also ship a 49,083-byte `/usr/bin/pkg` shell frontend that runs apk transactions. The cutover needs a vpac repository query for the selector, vpac records for System Information, and a working native backend for the published `pkg` commands. Test all three interfaces in the guest alongside first-boot registration. See `foundation/release-dependency-edges-01` and `foundation/release-pkg-callers-01`, receipt manifests `b003d96cba8b6d0a6ca4461865241b2815657b309f1fac8844cdd5f0806b67c2` and `6ec3399d9c79ceb33cd4099c9fad7d22d270f04595227fb1ba472bb80cbead49`.

tests/release-imports.py +11 -1

@@ -16,6 +16,7 @@ def scan(args):

1616 if hashlib.file_digest(stream, "sha256").hexdigest() != args.sha256:

1717 raise ValueError("release archive checksum mismatch")

1818 results = []

19+ dependencies = []

1920 files = 0

2021 with tempfile.TemporaryDirectory() as temp, tarfile.open(args.archive, "r|gz") as archive:

2122 elf = Path(temp) / "member"

@@ -32,18 +33,26 @@ def scan(args):

3233 files += 1

3334 report = subprocess.check_output(["readelf", "-Wd", "--dyn-syms", elf], text=True)

3435 needed = ",".join(re.findall(r"\(NEEDED\)[^\n]*?\[([^\]]+)\]", report))

36+ path = entry.name.removeprefix("./")

37+ if args.dependencies:

38+ dependencies.append((path, needed))

3539 for line in report.splitlines():

3640 cols = line.split()

3741 if len(cols) < 8 or cols[6] != "UND" or not cols[0].removesuffix(":").isdigit():

3842 continue

3943 if cols[7].split("@", 1)[0] in symbols:

40- results.append((entry.name.removeprefix("./"), cols[7], cols[4], needed))

44+ results.append((path, cols[7], cols[4], needed))

4145 if not files:

4246 raise ValueError("release archive contains no regular ELF files")

4347 with args.output.open("x") as out:

4448 table = csv.writer(out, delimiter="\t", lineterminator="\n")

4549 table.writerow(("release_path", "import", "binding", "needed"))

4650 table.writerows(sorted(results))

51+ if args.dependencies:

52+ with args.dependencies.open("x") as out:

53+ table = csv.writer(out, delimiter="\t", lineterminator="\n")

54+ table.writerow(("release_path", "needed"))

55+ table.writerows(sorted(dependencies))

4756 for name in sorted(symbols):

4857 count = sum(symbol.split("@", 1)[0] == name for _, symbol, _, _ in results)

4958 print(f"{name}\t{count}")

@@ -56,4 +65,5 @@ if __name__ == "__main__":

5665 parser.add_argument("sha256")

5766 parser.add_argument("output", type=Path)

5867 parser.add_argument("symbol", nargs="+")

68+ parser.add_argument("--dependencies", type=Path, help="list DT_NEEDED entries for every regular ELF")

5969 scan(parser.parse_args())