Exercise signed X11 installation from the desktop guest
@@ -76,8 +76,12 @@ def run(args):
7676 table.writerow(["name", "version", "sha256", "archive"])
7777 table.writerows((name, *selected[name]) for name in names)
7878 repo, client = args.work / "repo", args.work / "client"
79+ with (args.work / "publish.log").open("w") as log:
80+ subprocess.run(["feed", "publish", args.keys, repo, args.arch, *[selected[n][2] for n in names]],
81+ check=True, stdout=log, stderr=subprocess.STDOUT)
82+ if args.publish_only:
83+ return
7984 for label, command in [
80- ("publish", ["feed", "publish", args.keys, repo, args.arch, *[selected[n][2] for n in names]]),
8185 ("install", ["feed", "install", args.keys, repo, args.arch, client, "--fakeroot", *(args.install or names)]),
8286 ("audit", [args.auditor, args.arch, client]),
8387 ]:
@@ -93,6 +97,8 @@ if __name__ == "__main__":
9397 parser.add_argument(option, type=lambda x: Path(x).resolve())
9498 parser.add_argument("sources", nargs="+", type=lambda x: Path(x).resolve(),
9599 help="artifact directory, individual .sha256 receipt, or signed feed's packages.tsv")
96- parser.add_argument("--install", metavar="NAME", action="append",
97- help="install this root and its dependencies; repeat for additional roots (default: every package)")
100+ mode = parser.add_mutually_exclusive_group()
101+ mode.add_argument("--install", metavar="NAME", action="append",
102+ help="install this root and its dependencies; repeat for additional roots (default: every package)")
103+ mode.add_argument("--publish-only", action="store_true", help="publish the signed repository for a separate clean install")
98104 run(parser.parse_args())
@@ -34,7 +34,8 @@ def prepare(args):
3434 raise ValueError(f"invalid mount point: {directory}")
3535 directory.mkdir(exist_ok=True)
3636 (root / "tmp").chmod(0o1777)
37- for dest in (".vinix-image-id", "userland-check.sh", "etc/inittab"):
37+ launcher = "usr/libexec/vinix-version-check" if args.desktop_init else "etc/inittab"
38+ for dest in (".vinix-image-id", "userland-check.sh", launcher):
3839 if os.path.lexists(root / dest):
3940 raise ValueError(f"fixture would overwrite /{dest}")
4041 (root / ".vinix-image-id").write_text(identity)
@@ -44,12 +45,21 @@ def prepare(args):
4445 script.write(b'#!/bin/sh\nIFS= read -r volume_id </.vinix-image-id || exit 1\n'
4546 b'echo "VPAC DISK ROOT $volume_id"\n')
4647 shutil.copyfileobj(fixture, script)
47- (root / "etc").mkdir(exist_ok=True)
4848 console = "/dev/console" if args.arch == "aarch64" else "/dev/com1"
49- (root / "etc/inittab").write_text(f"::sysinit:/bin/sh -c 'exec /bin/sh /userland-check.sh >{console} 2>&1'\n")
50- # Account for data, directory blocks, inode tables and free working space.
51- usage = int(subprocess.check_output(["du", "-sB1", root], text=True).split()[0])
52- entries = sum(len(dirs) + len(files) for _, dirs, files in os.walk(root)) + 1
49+ command = f"exec /bin/sh /userland-check.sh >{console} 2>&1"
50+ launch = root / launcher
51+ if launch.parent.resolve() != launch.parent:
52+ raise ValueError(f"fixture launcher parent is a symlink: /{launcher}")
53+ launch.parent.mkdir(parents=True, exist_ok=True)
54+ if args.desktop_init:
55+ launch.write_text(f"#!/bin/sh\n{command}\n")
56+ launch.chmod(0o755)
57+ else:
58+ launch.write_text(f"::sysinit:/bin/sh -c '{command}'\n")
59+ # Account for the staged files and the files the guest will install.
60+ trees = [root, args.space_for] if args.space_for else [root]
61+ usage = sum(int(subprocess.check_output(["du", "-sB1", tree], text=True).split()[0]) for tree in trees)
62+ entries = sum(1 + sum(len(dirs) + len(files) for _, dirs, files in os.walk(tree)) for tree in trees)
5363 mib = 1024**2
5464 size = (usage * 5 // 4 + 64 * mib + mib - 1) // mib * mib
5565 with disk.open("xb") as output:
@@ -89,6 +99,10 @@ def run(args):
8999if __name__ == "__main__":
90100 parser = argparse.ArgumentParser(description=__doc__)
91101 parser.add_argument("arch", choices=("x86_64", "aarch64"))
102+ parser.add_argument("--desktop-init", action="store_true",
103+ help="launch the fixture through the native desktop PID 1 hook")
104+ parser.add_argument("--space-for", type=lambda path: Path(path).resolve(),
105+ help="reserve bytes and inodes for a separate installed package tree")
92106 for arg in ("root", "fixture", "iso", "boot", "work"):
93107 parser.add_argument(arg, type=lambda path: Path(path).resolve())
94108 run(parser.parse_args())
@@ -40,6 +40,9 @@ for attempt in $(seq 1 60); do
4040 echo "desktop watchdog PID $watchdog"
4141 fi
4242 echo "graphical session PID $session, registration PID $registration"
43+ if [ -n "${VINIX_DESKTOP_NEXT_FIXTURE:-}" ]; then
44+ exec /bin/sh "$VINIX_DESKTOP_NEXT_FIXTURE"
45+ fi
4346 echo 'VPAC FIXTURE GUEST PASS'
4447 exit 0
4548 fi
@@ -49,6 +49,10 @@ The Mesa 24.2.8 recipe compiles Gallium once and uses one Meson installation to
4949
5050For 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.
5151
52+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.
53+
54+Both architectures passed the desktop PID 1 and framebuffer checks from a disposable ext2 image. Those runs used the five checksum-pinned native programs from the November 28 release. The x86_64 chained fixture also ran its second script after registration and verified the larger disk size. A separate test published a signed feed with `--publish-only`, then installed musl and netbase into a clean root using the pinned public key. See `foundation/native-desktop-disk-path-01`, `foundation/native-desktop-chained-fixture-01` and `foundation/combined-publish-only-01`, receipt SHA-256 `86c564cb9415859d2411343f74b8ad8926418c16bedb4a612aab85db46137ccd`, `cb2d6c6afbdf2733676080f49792aa11b10907d1778d2bc3d01ae3317874a7e0` and `afde40678739b96cf16db58803ef87447ae4499a9e70f3425814a244e12d6883`. The complete desktop and X11 transaction still needs both graphics feeds.
55+
5256Set `VINIX_MESA_NATIVE_FILE` to a Meson native machine file whose `pkg_config_path` includes a build-host `wayland-scanner.pc`. The worker reused the source-built x86_64 Wayland scanner from an audited signed root. Meson found the native scanner through that file, found the target Wayland client in the SDK, and generated a protocol header. Mako and Intel CLC run in the build environment. See `xorg/mesa-host-tools-03/generator-check`, receipt SHA-256 `8df63367710d4ead9e968d30fe97eb3c63b45b4eba0f444447f5bf75b0cd4229`.
5357
5458The refreshed source plan includes the AArch64 GCC runtime release 2 and the split Mesa archives. The graphics dependency inventory found ready archives for 88 x86_64 and 71 AArch64 package names at their planned versions. AArch64 libxml2 had two different archives for 2.13.9-1. The graphics queue uses the archive already installed in the audited LLVM SDK, SHA-256 `b5cda4ef51da15ed533f54354aa54bdadf0b604fa3db5cfa1b903ed914206a5e`. See `xorg/mesa-dependency-pool-01` and `release-inputs/upstream-7f173671/order-02`, receipt SHA-256 `b5c322922dc200c50a7ac7d36fa9f07f5c09a699c1ca40dd7e13a6182bd01959` and `0432bbc6fff489421b88046086cd2de6f8cddc6242fd40605c2bbc70b2d0ff2b`.
@@ -3,7 +3,7 @@ set -eu
3export PATH=/bin:/usr/bin:/sbin:/usr/sbin HOME=/tmp
14export DISPLAY=:71 XAUTHORITY=/tmp/vinix-glx.Xauthority LIBGL_ALWAYS_SOFTWARE=1
25server=
3-phase=egl
6+phase=identity
47finish() {
58 status=$?
69 if [ "$status" -ne 0 ]; then
@@ -16,6 +16,20 @@ finish() {
1616trap finish EXIT
1717
1818test "$(uname -o)" = Vinix
19+if [ "${VINIX_X11_INSTALL_FROM_PKG:-0}" = 1 ]; then
20+ phase=package-install
21+ test ! -e /usr/bin/Xvfb-glx
22+ test "$(vpac o --quiet /usr/bin/pkg)" = vinix-pkg
23+ test "$(pkg search --exact x11)" = x11
24+ pkg install x11
25+ vpac q -F validation local/vinix-release-x11 >/tmp/x11-validation
26+ grep -Eq '^validation[[:space:]]+signature$' /tmp/x11-validation
27+ test "$(vpac o --quiet /usr/bin/Xvfb-glx)" = xorg-server
28+ test "$(vpac o --quiet /usr/lib/libgallium-24.2.8.so)" = mesa
29+ echo 'Vinix installed the signed X11 packages'
30+fi
31+
32+phase=egl
1933LIBGL_DRIVERS_PATH=/usr/lib/mesa24/dri /vinix-egl-check
2034
2135phase=glx-server