quarry delivers updates over
TUF: machines run systemd-sysupdate against a local quarry proxy,
which serves only files that the repository's signed targets list. quarry.release turns an
image.artifacts release folder into one that carries those targets. Whoever
publishes the release imports them into its repository and signs them with its own keys, so the
build holds no signing key.
examples/image-secureboot publishes its release this way.
load("@tine//quarry:defs.bzl", "quarry")
quarry.release(
name = "release",
targets = [":image", ":image[qcow2]", ":image[sbom]", ":demo-ext"],
transfers = {"sysupdate.d": "sysupdate.d"},
)targetsare whatimage.artifactsgathers into the release folder.transfersmaps a component dir,sysupdate.dorsysupdate.<component>.d, to the directory of its sysupdate definitions. hardhat inlines them in the targets as.quarry/<component dir>/<file>, without a version. A component's.componentand.featurefiles decide on which machines it is enabled. A transfer'sMatchPattern=starts with**/, because the publisher decides in which directory of the repository the files of a release end up.excludeselects files that the targets leave out. The folder still holds them. A selector names a kind of the release's description, which picks every subkind of it, or<kind>/<subkind>with an fnmatch glob as the subkind:partition/usr*picks the usr partition and its verity partitions,extensionevery extension. It defaults to["disk/raw"], as the sparse raw disk is not meant to be published to HTTP (only a disk's[qcow2]and[raw.zst]subtargets are).hardhatis the hardhat binary buck target that writes the TUF targets. Defaults totine//quarry:hardhatfrom the quarry commit thattine.lock.jsonpins. A project that also builds quarry for its images can pass its own, so that one quarry version writes and reads its releases.
The rule adds targets_<arch>.json to the folder, next to artifacts_<arch>.json. hardhat links to
libpathrs, which Debian does not package, so a release is incompatible with Debian. A target that
depends on a release needs to be declared target_compatible_with = quarry.compatible_with().
Every target carries quarry's marks under custom.quarry. They come from the release's
description:
| Mark | On |
|---|---|
version |
every file: the version of the release's images, which must all have the same one |
update |
what systemd-sysupdate installs: UKIs, usr partitions and their verity partitions, extensions of any class, portable images |
supplemented-by |
what a client fetches alongside: a UKI brings its usr partition and the initrd's SBOMs and package database, a usr partition its verity partitions and the image's SBOMs and package database, an extension or a portable image its own SBOMs and package database. Each names its media type where it has one |
verity-root-hash |
the usr partition, extensions and portable images |
Only buck build of a release builds hardhat and the boxes that build and run it. A project without a
release never builds them.