5.8 KiB
Repository-backed Host Extensions (experimental implementation)
D-088 adds extension remove NAME... and separates support from customization.
Repository-name additions retain support on a distribution-signed base; customed
lists sorted effective additions (including dependencies), ten names then
… +N packages. Custom overlays, local files and unknown legacy provenance do not
gain support. Base signature verification uses a separate cache and the embedded
distribution key; unavailable verification yields unknown, not supported.
Metadata v2 retains requested names and a request_sources mapping. Old metadata
is read conservatively as unknown provenance, never inferred from names. The current
repository adapter refuses to replay local/unknown sources; remove those requests
explicitly before composing a repository-only set. Removing the final request stages
the original managed base, preserving history and user data. Update plan v3 retains
the mapping; earlier plans must be recreated. Booted and pending are reported
separately. Out-of-band mutation detection remains outside this private adapter.
The CLI accepts extension add NAME.... This implements the D-037 requested-set
model: resolve against the base image's retained sync databases; download exact
packages; compose the entire explicit set against the immutable base and its ALPM
database. Dependencies remain resolved state, not explicit user requests.
Selection starts with the staged deployment when present, otherwise the booted
deployment. Extension metadata identifies the original managed base (including
Managed Overlays), rather than treating the preceding extension image as the base.
Repeated requests are idempotent. Successful additions replace the staged candidate
only after composition and checks succeed. OSTree retains booted/rollback deployments;
each generation has independent refs for its base and result. There is no automatic
reboot, removal of old generation inputs, or package/database refresh (-Sy/-Syu).
Prototype storage (not a stable schema):
/var/lib/archipelago/host-extensions/generations/<id>/
base, requested, snapshot, base-packages, resolved, plan, inputs/, logs/
package-db/, result, failure
/usr/lib/archipelago/extensions.json # per-image base + explicit requests
The base's retained repository databases pin available versions/checksums. The
mirror is only transport: if an exact archive disappears, installation fails; a
rolling sync must not repair it. Monthly snapshot publication remains separate.
An optional /etc/archipelago/extensions-mirrorlist changes download transport
without changing the selected database or relaxing signatures/checksums.
Dependencies, signatures and transaction ordering are handled by pacman. Downloads
run in a staging container; the actual pacman -S transaction and finalization run
without network, with retained inputs. Base package replacement is rejected.
Package hooks/scriptlets need snapshot-specific classification (RFC-0005). Known
base hooks are captured by checksum when building Core; new unclassified actions
require an adapter before deployment. /opt and persistent-file payload adapters
and alternate kernel profiles remain open contracts; these cases must fail
explicitly rather than discard payload or mutate the live system. This is general
name/dependency resolution, not a claim that every Arch package is already adapted.
Acceptance includes multiple additions before reboot, further additions after activation, duplicate requests, dependencies, failure with an existing pending deployment, retained inputs/history, and preservation of the managed overlay.
Experimental DKMS adapter
extension add v4l2loopback-dkms uses the same cumulative request path. The adapter
recognizes reviewed exact package archives in adapters/dkms-policy.tsv; source
or framework drift requires review, not a wildcard exemption. Initial scope is the
x86_64 Core linux profile without Secure Boot; this is not universal DKMS support.
- Resolve
<pkgbase>-headers=<installed kernel package version>against retained sync DBs. Generated transaction targets stay separate from explicit requests. - Review DKMS 3.4.4's package scriptlet (historical informational upgrade message) and three ALPM hooks. Replace those exact framework hooks with the offline finalizer: native helper can skip a failed build and still return zero.
- Only reviewed source archives may contribute
/usr/src; header packages may contribute kernel build trees and vDSO objects;linux-headersmay supply its/usr/src/linuxlink. Unclassified package actions still fail. - Offline staging explicitly adds/builds/installs each source for each image kernel, with bounded commands. Validate matching headers, installed status, nonempty module outputs and vermagic; preserve preexisting modules. Then run depmod and regenerate initramfs before committing/staging.
- Preserve kernel input hashes, per-module hashes/vermagic and DKMS status/logs/state
under generation
logs/dkms; publish module provenance at/usr/lib/archipelago/dkms-modules.tsv. Disposable/var/lib/dkmsand generated signing keys are not shipped into the deployment or shared with the running host. - Every recomposition builds from the managed base plus the full requested set.
A required failure prevents staging and retains previous pending/booted state.
Activation and module loading occur only in the target lifecycle after explicit
reboot. Live module loading/building is not part of
extension add.
VM acceptance (core_iso_acceptance.py --dkms) checks build/staging, duplicate and
failed-request preservation, post-reboot modprobe and /dev/video0, then another
cumulative addition and reboot. Hardware-driver coverage, module signing for Secure
Boot, updates to another kernel and the stable shared action engine need further work.