Building the Vinix release packages
Build the ports outside the source checkout. Keep a separate SDK and package database for each target. Each SDK contains the target headers, startup objects and libraries installed by vpac from a signed test repository. Build tools such as the bootstrap compiler, Make, Python and Meson execute on the Linux worker. Keep their host libraries out of the target include and linker search paths.
| Stage | Inputs and outputs | Check before advancing |
|---|---|---|
| C runtime and headers | Build patched musl and the architecture-specific Linux UAPI package independently. Install both into the first SDK. Build BusyBox against that SDK. | Check the linker map and header inputs. Boot the installed shell and run a dynamically linked program through the packaged loader. |
| Base libraries and tools | Use musl for zlib, bzip2, XZ, Zstandard, Brotli, Expat, libffi, pkgconf, ncurses and GNU Make. libuuid and libcap also use UAPI headers. PCRE2 uses zlib. Vim uses ncurses. Zsh uses ncurses, PCRE2 and libcap. | Install each dependency before its consumers. Exercise its library, CLI or loadable modules. |
| Native compiler | Build GMP, then MPFR, then MPC. Build binutils before GCC. GCC also needs a working build-machine C++ compiler. Build its target C++ runtime with the new compiler. | Compile, link and run C and C++ programs in the installed target root. Inspect the runtime libraries and startup object ownership. |
| Package installation and networking | Build OpenSSL against musl and UAPI. Install the Mozilla CA bundle. Build libarchive with the packaged compression libraries. GPGME requires libgpg-error and libassuan. Its OpenPGP operations require a working GnuPG installation. Build vpac with its pinned nspkg, Stutter and Vile sources and the target libraries. Build the c-ares and nghttp2 libraries needed by curl before the network tools. | In Vinix, use the target vpac to install by name, reject a tampered package, upgrade a package and query ownership. Exercise TLS with the installed CA store. |
| Fonts and X clients | Build libpng against zlib. Build FreeType with Brotli, bzip2, libpng and zlib, then fontconfig against FreeType and Expat. Build X protocol data, Xau and Xdmcp before XCB, then Xlib and the extension libraries. Add font and keyboard data before the server smoke test. | Exercise font selection and an X client against the packaged server. |
| Graphics and release assembly | Resolve the current Mesa and legacy Mesa/LLVM stack for the sidecar layout in PROFILES.md. Install the package-owned base, compiler and desktop packages into fresh roots on both architectures. |
Boot both images. Exercise the native compiler, desktop and GLX. Compare the shipped files and their owners to the release inputs. |
The order above describes dependencies. The signed feed receipt, clean-install log, file-ownership check and guest transcript record how far a particular build got. Keep these records beside the package archives, outside Git.
For the exact order within a source-built feed, run the following on the worker. The checker verifies each archive against the receipt from feed publish, reads its .PKGINFO, and resolves runtime, build and check dependencies including versioned providers. Its inputs are the feed and the indicated target architecture. The worker supplies bsdtar, ALPM's vercmp and Python 3.11 or later.
python3 tools/build-order.py x86_64 "$signed_feed" "$work/order"
order.tsv groups packages that may be built after earlier stages finish. edges.tsv records every declared dependency and the selected provider. Missing providers, ambiguous virtual names and cycles leave a pending row and cause a nonzero exit. Host tools still follow the bootstrap sequence above.
To plan before the archives exist, point the same command at a trusted ports checkout. It uses vpac to evaluate each native recipe's metadata for the selected architecture. Include a prepared signing-key port with --extra-recipe when it belongs in the build.
python3 tools/build-order.py --recipes aarch64 "$ports" "$work/source-order" \
--extra-recipe "$work/vinix-keyring/PKGBUILD.vile"
The worker cross-checked the source plan against the signed x86_64 archives for musl, Linux UAPI, zlib and PCRE2. The package versions, stages and dependency edges matched byte for byte. A second check of ports revision c745c03 found an unsatisfied check dependency on xkeyboard-config for xkbcomp on both targets. It ordered the other 100 x86_64 and 99 arm64 packages in that checkout. The worker keeps the results in foundation/source-order-01. Its receipt manifest has SHA-256 d46e8c29cb0404a5dc61489662e41e8999aaea0bb4186d534fea50dea7a15797.
At ports revision 06d5cb5, xkeyboard-config supplies the missing check dependency. The source planner placed all 114 recipes in seven stages independently on each architecture. See foundation/source-order-02, receipt SHA-256 813b33eb878851d7c32bae9a9cd2b05ad6365f034e286183d633f1836e09901c. Signed installation and guest execution have their own receipts.
vinix-release-desktop selects the source-built base, network utilities, compiler tools and desktop init by name. The architecture-specific recipe adds libuuid for the amd64 userland stage. The existing Vinix image builder also supplies the kernel, compositor and native services. Once the complete signed feed is available, a fresh install of this metapackage must resolve all its dependencies. The November 30 development snapshot placed the metapackage in stage 8, with 153 recipes across 15 stages on both targets including the X11 work. The exact recipe hashes and edges are in foundation/full-source-order-01, receipt SHA-256 86a9b1ae365bfe0cfb79f4a98407caf8d0ac92bea37e96eca7472eadaba11624. This snapshot includes recipes awaiting their first successful build.
The worker resolved all 81 packages in foundation/xlib-combined-01/repo into seven stages. For example, BusyBox follows musl and Linux headers, Xlib follows XCB and Xtrans, and the bitmap fonts follow mkfontscale. The order is in foundation/xlib-order-01/order.tsv with SHA-256 51d1464a0a994328c40264105f8b95b7b22a8922cad177daef98e593d4a6930c. The first signed ARM feed puts both musl and Linux headers in stage zero. Its signed, installed root passed the ownership and ELF audit for 1,165 files and links, including six target ELFs. The worker keeps that receipt in arm/common/sdk-01-audit.log with SHA-256 b315f8d20f2d4c7737fd2e5078c33e12b6183d2ee86a22a9ba6db6852d68c59b.
Running the shared worker
The released arm64 kernel uses 16 KiB pages. For every nonempty ELF load segment, the virtual address and file offset must have the same remainder modulo 16384. The x86_64 page size is 4096. Check a package before adding it to the build SDK with python3 tests/archive-pages.py aarch64 "$archive". Add --inventory to survey older archives and record every affected executable or shared object. The released kernel must also execute the installed payload.
The initial arm64 survey covered 22 distinct archive names. Thirteen contained an incompatible load segment, affecting 28 of 53 packaged executables and shared objects. BusyBox 1.38.0-4 and both initial musl releases were affected. The Linux UAPI and fortify headers contained no executable or shared object. Earlier arm64 installation and ownership receipts predate this kernel check. The worker stores the source archive hashes and segment offsets in arm/abi16/previous-02, receipt SHA-256 676679a285a3ccd67bbd85ea2415fbc46e0e79b4f6bfc9bb5e9a12c310bd54f6. The wrong-machine, historical BusyBox, header-only and x86_64 musl controls are in arm/abi16/archive-controls-01, receipt SHA-256 cc8e171dc5febc3ec75a7a3c30a008c9e49bd7bbc8e9d7ace465c576dee762e1.
The desktop metapackage requires musl 1.2.6-3 or later on arm64 and 1.2.6-2 or later on x86_64. A vpac metadata check on each architecture accepted the intended minimum and rejected the obsolete ARM loader version for arm64. See foundation/release-musl-floor-01, receipt SHA-256 8ebf28b531b0db68fd393028c3205df6edb719d0675875b6f7a0442077a2621f.
Run python3 tests/exec-linkage.py x86_64 "$client" "$auditor" --proot "$(command -v proot)" on an x86_64 worker to exercise the installed loader against each dynamic executable in an audited root. For a Vinix guest, use --fixture "$work/linkage.sh" and pass that script to the boot harness. Packaged musl 1.2.6 applies relocations before returning from --list. It resolved all 109 dynamic executables in the signed 106-package x86_64 root. Renaming the exported OPENSSL_init_ssl symbol in an isolated copy of libssl caused the loader to reject /usr/bin/openssl with status 127. See foundation/exec-linkage-01, receipt SHA-256 cb2fdec09f4b9e7c873ec82d672af576e9e0c26484f9496744588323a01ed3a0.
The Ubuntu build worker runs one build or guest test at a time under its shared compile.lock. Builds may use two compiler jobs under the same 1 GiB memory limit. Set MAKEFLAGS=-j2 and CMAKE_BUILD_PARALLEL_LEVEL=2, or pass -j2 to Ninja or Meson. The systemd service runs as a dynamic user with CPUQuota=200%, MemoryHigh=768M, MemoryMax=1G and MemorySwapMax=0. Keep downloads, build directories, emulators and signing tools in private worker state. Store the cgroup's memory.peak and memory.events with each build and record any single-job retry. The operator laptop needs only source edits and SSH.
Verified x86_64 bootstrap
The November 2026 worker run installed 24 packages by name into a fresh root from a test-signed repository. The ownership and ELF auditor at ports revision 4cc4c14 checked 8,169 files and links and 67 ELF files, including interpreter and shared library resolution. The package set includes BusyBox 1.38.0-4, musl, Linux headers, GNU Make, GMP, OpenSSL, the CA bundle, libpng, nghttp2 and c-ares. The worker retains the package hashes in foundation/feed-01/packages.tsv and the client in foundation/sdk-01.
A separate client upgraded BusyBox 1.38.0-3 to 1.38.0-4 and installed vinix-release. vpac recorded BusyBox as owner of /bin/uname and the identity package as owner of /usr/bin/uname. The installed OS ID was vinix. Signed upgrade commands
On the operator machine, ~/.local/state/vinix/ports/musl-busybox-CqkBEA/foundation/receipts.sha256 records the transaction and audit logs. The clean-root audit log has SHA-256 328fbb76a322e5e61b572ee9e7d6fdd52a5cb37613fbc8de2b07d0290f075f49. The signed upgrade log has SHA-256 802496df0b3da0f5f66f1a12f293c910ebb43c4d19a781b58f88bd8ccbd303c6. Guest boot and display protocol checks have their own serial transcript. XCB guest run