Update delivery
How the enzimos-updates publisher, read-only server and installed client sign, serve, verify and apply system updates.
Rolling system updates
Settings resolves a full Pacman upgrade against enzimos, enzimos-os and the official Arch repositories. The native backend checks the resolved additions and removals against the reviewed plan, verifies package signatures, and applies the transaction to an isolated Btrfs generation. A restart boots that generation once. After confirmation, the new generation becomes the default. The previous system remains available from the boot menu.
The rolling client uses {"schema":1,"source":"rolling"} in /etc/enzimos/updates.json. The native runtime owns review, staging and confirmation. Flatpak delivery stays separate.
TUF bootstrap for original installations
The original ISO #6 and #7 installations use the signed main TUF channel at https://packages.enzim.dev/system-updates. That channel delivers the bridge used in Switch to rolling updates. The publisher, server and client described below serve that bootstrap and a separate signed shell plugin catalog.
Components
| Binary | Role |
|---|---|
enzimos-updates | CLI with the publisher, server and client commands |
enzimos-update-worker | Transaction worker that the client launches under the native operation lock |
The crate depends on the shared platform, policy and backend crates from
enzimos-packages at pinned public Git revisions.
cargo build --locked --release
cargo test --lockedTrust model
Metadata uses TUF through the tough crate.
- Root and targets metadata each require two independent signatures.
- Snapshot and timestamp use separate keys.
- Private keys live outside the served tree. Root and targets keys should stay offline.
The client enforces TUF expiry, rollback and hash checks. It then verifies every Arch package's GPG signature against the currently approved package authority and checks the package's identity. TUF trust and package-signer trust are deliberately separate: enrolling a signer is a provisioning step and is never driven by downloaded metadata.
Transport is HTTPS only. Redirects and proxy environment variables are refused. Plain HTTP is accepted only with explicit lab configuration, and only on loopback or the QEMU host address.
Publishing
enzimos-updates init --repository work/public --keys work/offline-keys
enzimos-updates publish --repository work/public --keys work/offline-keys \
--packages work/cohort/packages --database work/verified.db
enzimos-updates serve --repository work/public --port 8080| Command | Options | What it does |
|---|---|---|
init | --repository, --keys | Creates keys and the initial metadata/1.root.json |
publish | --repository, --keys, --packages, --database, --channel | Publishes a package cohort to a channel |
rotate-root | --repository, --keys | Signs a new root version |
renew-timestamp | --repository, --keys | Re-signs timestamp metadata before it expires |
serve | --repository, --port | Serves the public tree read-only (default port 8080) |
publish takes a directory of packages and a verified package database. --channel is
main (the default) or testing. Each package is registered as a target by the SHA-256 of
the inspected archive, and the channel is described by a signed channels/<channel>.json
target:
{
"schema": 1,
"channel": "main",
"architecture": "x86_64",
"sequence": 12,
"expires": "2026-11-06T12:00:00Z",
"packages": ["..."],
"database": { "target": "...", "bytes": 0, "sha256": "..." }
}A channel document expires seven days after publishing; the client refuses an expired channel. Publishing one channel keeps the other channel's file, packages and database, and the plugin catalog, in the signed targets; targets nothing references any more are dropped.
Every intermediate root version is kept under metadata/ so that clients can follow root
rotations. Renew timestamp metadata from a separate job before it expires.
Serving
serve binds to loopback only and refuses anything else. It serves at most 16 connections
at a time. Put it behind a TLS reverse proxy; deploy/ contains a hardened systemd unit
(DynamicUser, read-only repository path, ProtectSystem=strict) and an nginx example.
Copy only the public metadata/ and targets/ tree to the server; never the key directory.
Installed client
The client reads root-owned /etc/enzimos/updates.json, which points at a bootstrap root
in /etc/enzimos/updates/root.json:
{
"schema": 1,
"root": "/etc/enzimos/updates/root.json",
"state": "/var/lib/enzimos-control/updates",
"metadata_url": "https://packages.enzim.dev/system-updates/metadata/",
"targets_url": "https://packages.enzim.dev/system-updates/targets/",
"channel": "main",
"lab_http": false
}The bootstrap root must come from the installer or release process, never from an
unauthenticated first-use download. The state directory must be
/var/lib/enzimos-control/updates: it lives in the independent control subvolume so that
admitted updates survive a system rollback.
| Command | What it does |
|---|---|
check | Refreshes and verifies metadata and reports whether a new cohort is published |
refresh | Downloads and admits a verified cohort; never installs. Respects network policy |
apply | Downloads and admits if needed, then applies the cohort; never reboots |
status | Prints the last recorded status for the configured channel, or not-checked |
All client commands accept --config PATH and default to /etc/enzimos/updates.json.
Output is JSON on stdout; errors are a JSON object with "status":"failed" on stderr.
Admission and apply
A downloaded cohort is admitted atomically under the native operation lock. apply then
uses the existing native update engine: a live full transaction with a retained kernel,
snapshots before and after, and boot confirmation of the new generation. It streams its
phases as one JSON object per line and finishes with either up-to-date or
prepared-not-rebooted and "reboot_requested": false. The user restarts when they choose;
the new generation is confirmed after a successful boot.
The transaction itself runs in enzimos-update-worker, which the client hands off to with a
journal (starting, handed-off, running, stopping, complete). Interrupted
operations are recorded and never replayed automatically.
An explicit apply may use a metered connection. Automatic refresh observes the network
and defers on disconnected, metered or unknown networks.
Refresh timer
The package ships enzimos-update-refresh.service and enzimos-update-refresh.timer. The
service runs enzimos-updates refresh at low CPU and idle I/O priority, only when
/etc/enzimos/updates.json exists. The timer fires ten minutes after boot and then every six
hours with a randomized delay. The 28 November image starts the timer through the installed systemd target dependency.
Signed plugin catalog
The same CLI publishes and fetches a separate catalog of shell plugin packages (the shell's format 1 JSON packages). Use a separate repository and signing directory:
enzimos-updates init --repository ./plugin-public --keys ./plugin-keys
enzimos-updates plugin-publish --repository ./plugin-public --keys ./plugin-keys --packages ./plugin-packages
enzimos-updates serve --repository ./plugin-public --port 8080On the account side, an owner-private configuration names an independently reviewed root and a state directory, with explicit absolute paths:
enzimos-updates plugin-check --config /absolute/path/catalog.json
enzimos-updates plugin-download --config /absolute/path/catalog.json --id exampleThe catalog client is unprivileged. It never installs, executes, enables or grants a plugin. A download returns the private path, byte count, SHA-256, ID and version; the shell must recheck those bytes, parse the package and present its own permission review. Catalogs are bounded to 32 entries and 128 KiB, input packages to 1 MiB each, and at most two versions per plugin ID are cached.
Packaging
python3 prepare_package.py --rust-release /path/to/release-build --output /path/to/fresh-outputThis verifies the release manifest and both ELF hashes and stages the
/usr/bin/enzimos-updates launcher, the refresh unit and the timer. The binaries ship in
the enzimos-rust-updates runtime package; packaging/rust/runtime.json describes that
payload for the image build. See Building from source.