Exercise signed desktop installs with the native build layer
@@ -40,10 +40,18 @@ def native_overlay(archive, arch, root):
4040 copies.add(name)
4141 if copies != set(PROGRAMS):
4242 raise ValueError(f"missing release programs: {set(PROGRAMS) - copies}")
43+ record_native_programs(root)
44+
45+
46+def record_native_programs(root):
4347 watchdog = "usr/libexec/vinix-desktop-watchdog"
4448 checksummed = ["sbin/init", *PROGRAMS]
4549 if (root / watchdog).is_file():
4650 checksummed.append(watchdog)
51+ for name in checksummed:
52+ program = root / name
53+ if program.is_symlink() or not program.is_file() or not os.access(program, os.X_OK):
54+ raise ValueError(f"expected an installed native executable at /{name}")
4755 manifest = root / "desktop-programs.sha256"
4856 with manifest.open("x") as output:
4957 for name in checksummed:
@@ -65,7 +65,7 @@ The Mesa 24.2.8 recipe compiles Gallium once and uses one Meson installation to
6565
6666For those checks, install `vinix-release-x11` and `busybox-init` from the signed feed into a clean root and audit it. Build `egl.v` and `glx.v` against that SDK and place the executables at `/vinix-egl-check` and `/vinix-glx-check` in a disposable guest root. Boot `graphics.sh` using `tests/disk-root.py`. The fixture reads back the expected pixel from current Mesa's surfaceless EGL and again from an authenticated indirect GLX connection to `Xvfb-glx` using the legacy DRI directory.
6767
68-For the on-demand release test, combine the signed desktop and X11 package lists with `tests/combined-feed.py --publish-only`. Pass the combined feed to `tools/desktop-root.py` to install the desktop metapackage and embed the signed feed. Add the native desktop programs and framebuffer probe as in `tests/desktop-guest.py`. Set `VINIX_DESKTOP_NEXT_FIXTURE` in the desktop fixture to the guest path of `graphics.sh` and set `VINIX_X11_INSTALL_FROM_PKG=1` in that script. With `tests/disk-root.py --desktop-init --space-for "$x11_sdk/root"`, the guest must reach graphical registration, resolve `x11` by exact name, install the signed X11 metapackage, verify the server and Mesa owners, and pass both rendered pixel checks.
68+For the on-demand release test, combine the signed desktop and X11 package lists with `tests/combined-feed.py --publish-only`. Pass the combined feed and `--native-layer "$native_layer"` to `tools/desktop-root.py` to install the desktop metapackage, stage the source-built desktop programs and embed the signed feed. Run `record_native_programs` from `tests/desktop-guest.py` on the staged root and add the framebuffer probe. Set `VINIX_DESKTOP_NEXT_FIXTURE` in the desktop fixture to the guest path of `graphics.sh` and set `VINIX_X11_INSTALL_FROM_PKG=1` in that script. With `tests/disk-root.py --desktop-init --space-for "$x11_sdk/root"`, the guest must reach graphical registration, resolve `x11` by exact name, install the signed X11 metapackage, verify the server and Mesa owners, and pass both rendered pixel checks.
6969
7070Use the same signed feed for the downloadable X11 sidecar. Cold-install `vinix-release-desktop` into one client. Into a second client, cold-install both `vinix-release-desktop` and `vinix-release-x11` with the target font hooks enabled.
7171
@@ -40,8 +40,11 @@ def build(args):
4040 if (root / path).exists() or (root / path).is_symlink():
4141 raise ValueError(f"unexpected Alpine package-management path /{path}")
4242 if not args.install_only:
43- run("stage", [sys.executable, Path(__file__).with_name("stage-image.py"), args.arch, client,
44- args.repo, work / "image", args.auditor, args.fingerprint])
43+ command = [sys.executable, Path(__file__).with_name("stage-image.py"), args.arch, client,
44+ args.repo, work / "image", args.auditor, args.fingerprint]
45+ if args.native_layer:
46+ command += ["--native-layer", args.native_layer]
47+ run("stage", command)
4548 with (work / "receipts.sha256").open("x") as receipts:
4649 for path in sorted(work.glob("*.log")):
4750 with path.open("rb") as stream:
@@ -56,4 +59,9 @@ if __name__ == "__main__":
5659 parser.add_argument("fingerprint", help="the distributor's fingerprint supplied independently of the feed")
5760 parser.add_argument("--install-only", action="store_true",
5861 help="prepare the audited client for a separate image assembly")
59- build(parser.parse_args())
62+ parser.add_argument("--native-layer", type=lambda p: Path(p).resolve(),
63+ help="install the source-built native desktop layer into the staged image")
64+ args = parser.parse_args()
65+ if args.install_only and args.native_layer:
66+ parser.error("--native-layer requires image staging")
67+ build(args)