.. SPDX-License-Identifier: copyleft-next-0.3.1 :orphan: =============== The build Store =============== The Store lets an identical `Linux kernel`_ or `QEMU`_ build be reused or fetched instead of rebuilt, whether on a single host or across a fleet. Every build is keyed by a reproducible build identity. That identity is published to the `Nix store`_ and indexed, so a later build with the same identity skips compilation, and a peer's build can be pulled over the network. Each build follows one decision rule: reuse a local build, else fetch a peer's, else build from source. Fetch beats build. The Store moves build outputs through the Nix store rather than ``rsync``. ADR 0005 first chose a custom identity-keyed destdir with an ``rsync`` fetch and recorded the Nix-store transport (``nix store add-path`` plus ``nix copy``) as the expected evolution; that evolution is what runs today. The toolchain is already a pinned `Nix`_ devShell, so two hosts building from one ``flake.lock`` get a byte-identical toolchain closure, and publishing the outputs to that same store and moving them with ``nix copy`` reuses the Nix machinery rather than reinventing a transport. Build identity ============== The build identity is a short content hash over the inputs that fix a build's bytes: the ``.config`` (minus its localversion), the ``build-kernel`` or ``build-qemu`` devShell derivation path (the toolchain), the make flags (with host paths normalized), and the source tree (the worktree's ``HEAD`` tree object, so a ``b4`` series re-applied with ``git am`` keeps one identity over identical content even though each commit's SHA changes). The same identity implies the same bytes. See ADR 0002 (build-identity-in-kernelrelease). Where it can, a project bakes the identity into its own artifact so the result self-reports it: * The kernel bakes the identity into ``CONFIG_LOCALVERSION``, so ``uname -r`` reports it directly as ``-