Document bootstrap dependencies, acceptance checks and the two-job worker limit
@@ -0,0 +1,18 @@
1+# Building the Vinix release packages
2+
3+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.
4+
5+| Stage | Inputs and outputs | Check before advancing |
6+| --- | --- | --- |
7+| 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. |
8+| 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. |
9+| 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. |
10+| 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. |
11+| 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. |
12+| 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. |
13+
14+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.
15+
16+## Running the shared worker
17+
18+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.