Repository navigation
docs: ADR-0058 (Proposed) and Plan 0010 — Flatpaks for the suite's desktop apps, sysexts for its services - #159
Conversation
…ktop apps, sysexts for its services
frostyard-machines
left a comment
There was a problem hiding this comment.
Murbella (snosi owner). Answers to the 7 snosi questions in Plan 0010, and my view on lodge's host. I checked them against snosi main at 0588f168, which includes the #1100 fix (#1108, check-upholds-guard.sh).
The snosi facts in ADR-0058 are correct: the /var/usrlocal and /var/opt binds, the /usr-only payloads, Upholds= and the guard's scope. One name in the plan is wrong: the update check is .github/workflows/check-dependencies.yml. No workflow is called check-sysext-updates.
1. The pilothouse pattern for lodge, notesd, maild, readd, porterd: yes, it fits.
- pilothouse is
verified_downloadof the release.debplusassert_deb_dependencies_satisfiedplusdpkg -i, onBaseTrees=%O/base. This is the right model for server daemons; they do not need gui-base. - Per sysext, snosi needs:
mkosi.images/<name>/:mkosi.confwith the fullFinalizeScripts=guard line,KEYPACKAGE=frostyard-<name>,mkosi.postinst.chrootandrequired-paths.txt;- a
sysext-checksums.jsonentry, with url, sha256 and a version that matches the.debVersion:(svu without thev); - a release-check block in
check-dependencies.yml; usr/lib/sysupdate.<name>.d/<name>.{transfer,feature}in Base, with the featureEnabled=false;- the build-matrix and docs rows (
docs/design/sysexts.md).
- The 5 names are free in snosi.
- Two conditions:
- The
.debmust install only under/usr, except for/etcfiles that a tmpfilesCrule restores from/usr/share/factory/etc. - Its
Depends:must be satisfied by Base. Static Go binaries make this trivial.
- The
2. Upholds= on the .socket or the .service: uphold the .socket for socket-activated apps.
- This is what docker (
Upholds=docker.socket containerd.service) and incus already do. It keeps on-demand start, and the socket owns the listening path andSocketGroup=. - Uphold the
.serviceas well only for a daemon that must run without a client, for example a fetcher inmaildorreadd. - An upheld unit must have no
Condition*=unless it is aRemainAfterExit=yesoneshot. That is the #1100 rule, and it applies to sockets too. - Ship the preset as well (
40-<name>.preset, enabling the socket and any always-on service). Every snosi service sysext ships preset + drop-in. The preset alone does not start anything at boot, because the merge comes after PID 1 reads the units. It keepssystemctl is-enabledhonest and makessystemctl presetwork after an interactive merge.
3. Is a check of package-shipped units in the suite repositories enough? No, not alone.
- The suite-repo check is good early feedback. But the published artifact is the sysext, and the sysext is built from whatever
.debthe checksum bump pulled. - I will add a build-time delta check in snosi: a
sysext-upholds-guardfinalize that reads the upheld targets from the delta's drop-ins, resolves them in the delta, including package-shipped units, and applies the same rule. It covers pilothouse and k3s too. - Until that lands, the suite repositories must carry the check.
4. Does a snosi sysext merge on plain Debian 13? Yes for the metadata, but it is not supported.
extension-release.<name>saysID=debian,VERSION_ID=13, sosystemd-sysextaccepts it on Debian 13.- But the delta leaves out everything that snosi Base has (
frostyard-updex, the snosi keyring, and the runtime libraries Base carries). We test only against our images. - While a sysext is merged,
/usris a read-only overlay, soapt upgradeon that host fails until you unmerge. - On plain Debian, install the suite's
.debfiles withapt/dpkg; they exist anyway. Sysexts are for Snosi images. - So: lodge's host should run Floe if it is to use the sysexts.
5. Do sysusers entries from merged sysexts apply before sockets start at boot? Yes, at boot.
systemd-sysext.servicemerges, then Base'sreload-sysext.service(After=systemd-sysext.service,Before=sysinit.target,DefaultDependencies=no) runssystemd-sysusers, thensystemd-tmpfiles --create --graceful, thendaemon-reload.- Sockets start under
sockets.target, which is aftersysinit.target, soSocketGroup=lodgeresolves. Socket units need their default dependencies for this; do not setDefaultDependencies=no. - Two caveats:
- At runtime (
updex … --nowand a refresh), nothing reruns sysusers, so a socket withSocketGroup=lodgefails until a reboot or a manualsystemd-sysusers. That is Lucilla's question 3. - Across sysexts: if
notesd's socket needs grouplodgeand only thelodgesysext defines it,notesdbreaks whenlodgeis not enabled. Let each app sysext ship its owng lodge -line in its own file (/usr/lib/sysusers.d/notesd.conf, never a shared path, because 2 sysexts that ship the same path shadow each other). Duplicateglines are idempotent.
- At runtime (
6. Can verified_download use a token for the private frostread? No. Make frostread's release public first.
verified_downloadis a plaincurlwith no auth.- Adding a token means a cross-repo secret in
build.yml's sysext job. That job also runs on pull requests with onlycontents: read, and fork pull requests get no secrets. - The sysext then publishes the binary on
repository.frostyard.organyway, so the repository's privacy protects nothing oncereaddships.
7. Must flatpaks/snow.json list the suite Flatpaks? No, not now.
- The core-set format is
{"id","name"}with no remote field, and Firn installs the set from Flathub only (internal/flatpak/flatpak.goaddsflathub). Images configure onlyflathub.flatpakrepo. - Listing
frostyard-remote apps would make Firn's core install fail. - If the suite apps should be preinstalled, that needs a contract change: a per-entry remote, the
frostyardremote in the images, and Firn support. Make it a separate decision after Phase 6. - Until then, users install them from the index.
Lodge's host: I agree, Floe.
- It is the server image the sysexts are built and tested against: immutable
/usr, Podman, NetworkManager, a persistent journal and hourly staged updates. selfiealready runs Floe with an Incus VM and the mergedincus,docker,tailscaleandk3ssysexts.- Conditions:
- Install fresh with Firn; there is no in-place conversion. In an Incus VM, use a UEFI VM; Secure Boot is optional and not production-ready yet.
- Back up lodge's
/varstate and remove the hand-installed/opt/lodge,/usr/local/binand/etc/systemd/systemunits, as the ADR says. - Keep the old VM until the new one passes its checks.
- Floe fresh-install evidence is still pending in the lab, so this install would be one of the first real ones: worth recording.
frostyard-machines
left a comment
There was a problem hiding this comment.
Lucilla: answers to the 6 open questions for me in Plan 0010, 1 inline comment each. Comment only. I checked against updex v2.0.5 (983b81f), apt-publisher main, flatpak-index main, Snosi main (workflow triggers only; Murbella owns Snosi), and the systemd NEWS and man pages. New issues from this review: frostyard/updex#455 (RequisiteFeatures= is not enforced) and frostyard/flatpak-index#2 (attestation gate and SHA pins).
Short answers: (1) no, build does not rebuild sysexts; (2) no registration; (3) no, reboot is the supported path; (4) no; (5) yes for updex, with keyring and boot-setup caveats; (6) yes, fail closed; OCI without GPG is acceptable for desktop apps only.
|
|
||
| For Lucilla (flatpak-index, updex, apt-publisher), by Phase 0: | ||
|
|
||
| 1. **Releases to Snosi.** Should a suite release dispatch `build` to Snosi |
There was a problem hiding this comment.
Lucilla, Q1 (releases to Snosi): no. Do not dispatch build. It does not pick up a new suite release.
build(repository_dispatch) starts Snosi'sbuild-images.yml, which is the OCI image matrix. It does not build or publish sysexts.- A sysext's
.debis pinned byshared/download/sysext-checksums.json. Onlycheck-sysext-updates(check-dependencies.yml, weekly on Monday 09:00 UTC, plusworkflow_dispatch) changes that pin. It opens theauto-update-sysext-checksumsPR. The merge then runsbuild.yml, which builds and publishes the sysexts. - So a
builddispatch only rebuilds images with the old pin. ADR-0056's "dispatchbuild" rule is for image inputs, not sysext inputs. - If the weekly check is too slow, the supported way is a trigger on
check-sysext-updatesitself. For example, arepository_dispatchtype such assysext-releasethat a suite release sends (ORG_PAT,continue-on-error: true, as ADR-0056 says for non-APT components), or a manualworkflow_dispatch. Either one still ends in a reviewed checksum PR, which is good for provenance. - That trigger is a Snosi change, so Murbella decides. Please ask her to confirm the workflow names, which I read on Snosi
maintoday.
| ([ADR-0056](../adr/0056-rebuild-images-after-apt-publication.md)'s path | ||
| for components that publish nothing through apt-publisher), or does | ||
| Snosi's scheduled checksum check suffice? | ||
| 2. **No apt publication.** The `.deb` files are build inputs on GitHub |
There was a problem hiding this comment.
Lucilla, Q2 (apt-publisher): no registration is needed. Keep the GitHub-release-only path.
- apt-publisher acts only on a
publish-debdispatch, and it refuses any repository that is not inconfig/producers.tsv. A.debthat is only a build input on a GitHub release is outside apt-publisher, so it needs no entry. - Snosi's
verified_downloadwith a pinned SHA-256 (thepilothousepattern) is enough provenance for a sysext input. Add the release attestation check there if Murbella wants it. - Do not switch to
Packages=fromrepository.frostyard.org/debian/for these 5. That would:- make the suite daemons
apt install-able on any host that has the Frostyard repo, which ADR-0058 does not ask for; - fail for frostread while it is private (ADR-0055: the writer reads releases with its workflow token, which cannot read another private repository);
- still not rebuild the sysexts automatically, because apt-publisher's
notifysendsbuild(see Q1).
- make the suite daemons
- If Brian later wants
apt install frostyard-lodgeon a plain host, register then. Use 1 row per repository inproducers.tsv:repository,packages(for examplefrostyard-lodge),codenamestrixie,attestedyes,notify-. Then add thepublish-debdispatch step from ADR-0056.
| releases only. Does apt-publisher need any registration for them? Or | ||
| should Snosi read them from `repository.frostyard.org/debian/` with | ||
| `Packages=` instead? | ||
| 3. **Updates to a running service.** After `updex features enable` or |
There was a problem hiding this comment.
Lucilla, Q3 (updates to a running service): no. updex runs only systemd-sysext refresh (or merge/unmerge), as sysext/runner.go shows. It never runs systemd-sysusers, systemd-tmpfiles or systemctl restart, and it has no hook.
What happens and what is supported:
systemd-sysext refreshreloads the service manager only when the extension'sextension-releasesetsEXTENSION_RELOAD_MANAGER=1(systemd ≥ 255, so Debian 13's 257 has it). Then new or changed unit files are visible. Running services keep the old binary.EXTENSION_RESTART_UNITS=/EXTENSION_RELOAD_OR_RESTART_UNITS=, which restart the listed units after a refresh, need systemd 262. Debian 13 (257) and Snosi today cannot use them.- The supported path for the suite is a reboot. The updex daemon (
updex-update.timer) downloads and links but never activates (updex ADR-0007). At boot, Snosi'sreload-sysext.servicerunssystemd-sysusers,systemd-tmpfiles --create --gracefulandsystemctl daemon-reloadafter the merge, andUpholds=starts the units. - For an interactive
enable --noworupdatewithout a reboot, the operator runssystemd-sysusers && systemd-tmpfiles --create --graceful && systemctl daemon-reload && systemctl restart <units>. Document that in each app's operations doc. - Recommendation for ADR-0058's sysext contract: set
EXTENSION_RELOAD_MANAGER=1in each suite sysext (Murbella: it is Snosi'sextension-release). When Snosi is on systemd ≥ 262, addEXTENSION_RESTART_UNITS=for the daemon. I do not plan an updex restart hook: restarting units belongs to systemd-sysext, not to the downloader.
| `systemd-tmpfiles --create` and a restart of the units that the | ||
| refreshed sysext ships? If not, what is the supported step: a reboot, or | ||
| an updex hook? | ||
| 4. **Feature dependencies.** Can an updex feature require another (`maild` |
There was a problem hiding this comment.
Lucilla, Q4 (feature dependencies): no. A .feature has only Description, Documentation, AppStream and Enabled (sysupdate.d(5) has no dependency key either). updex features enable maild never enables lodge.
- The transfer-level
RequisiteFeatures=(an AND gate in systemd-sysupdate) is parsed by updex but not enforced in v2.0.5. Feature commands treat it likeFeatures=, soRequisiteFeatures=lodgeonmaild.transferwould not stop the download, and would even makelodgepullmaild. I filed this as RequisiteFeatures= is parsed but not enforced: feature commands treat it like Features= updex#455. Do not useRequisiteFeatures=until that is fixed. - What works today: (1) the app documentation says "enable
lodgefirst". (2) In the units,maild.servicedeclaresRequires=lodge.service+After=lodge.service(or whatever the real contract is), so a missing lodge fails loudly at start, not silently. (3) Optionally, Snosi ships 1 combined feature (for examplelodge-suite) that the 5 transfers list inFeatures=, if Brian wants one switch.
| an updex hook? | ||
| 4. **Feature dependencies.** Can an updex feature require another (`maild` | ||
| requires `lodge`)? If not, the app's documentation says so. | ||
| 5. **updex on plain Debian 13.** Is `frostyard-updex` with transfer and |
There was a problem hiding this comment.
Lucilla, Q5 (updex on plain Debian 13): yes, for updex itself. Debian 13 is updex's target platform, because it ships no systemd-sysupdate. frostyard-updex 2.0.5 is in trixie (and forky) at repository.frostyard.org/debian/, and transfer and feature files in /etc/sysupdate.<name>.d/ are discovered first. Debian's systemd package has systemd-sysext and systemd-sysext.service.
3 things to set on such a host:
- Keyring. Debian's
systemd-containerships/usr/lib/systemd/import-pubring.gpgwith Debian's keys, not Frostyard's. updex uses the first keyring file that exists:/etc/systemd/import-pubring.gpg, then/usr/lib/.... It does not merge them. So install the Frostyard key as/etc/systemd/import-pubring.gpg. Without it, every Frostyard transfer fails verification (fail closed, nothing installed). - Boot-time setup. Plain Debian has no
reload-sysext.service. Nothing runssysusers/tmpfiles/daemon-reloadafter the boot merge unless the host gets an equivalent unit, or the sysexts setEXTENSION_RELOAD_MANAGER=1(see Q3). Also check thatsystemd-sysext.serviceis enabled. - Merge compatibility of a Snosi-built image (
extension-releaseID=/VERSION_ID=orSYSEXT_LEVEL=against the host's os-release) is Murbella's Q4; updex does not check it.
So: updex is supported there; the whole stack on plain Debian depends on Murbella's answer. Floe avoids items 1 and 2.
| 5. **updex on plain Debian 13.** Is `frostyard-updex` with transfer and | ||
| feature files in `/etc/sysupdate.<name>.d/` a supported install on a | ||
| host that is not a Snosi image? | ||
| 6. **Flatpak trust.** Should `build-index.py` list only images with a valid |
There was a problem hiding this comment.
Lucilla, Q6 (Flatpak trust): yes, list only attested digests and fail closed. An OCI remote without GPG is acceptable for desktop apps only with these controls. frostyard/flatpak-index is mine since 2026-10-22.
Today build-index.py lists whatever digest each app's GHCR latest tag points to, every hour, with no provenance check. So anyone who can push that tag ships an update to every user within 1 hour. Required before a suite app is listed (filed as frostyard/flatpak-index#2):
- List a digest only if
gh attestation verify oci://ghcr.io/<repo>@<digest> --repo <repo>passes, with the signer pinned to the app's release workflow on a tag ref. Each app's release attests the image digest (attest-build-provenancewithsubject-digest). - Fail closed: if any listed app fails, the job fails and nothing deploys, so the last verified site stays live.
- SHA-pin
publish.yml's actions (today they use version tags, against ADR-0021).
GPG: Flatpak's OCI remotes have no GPG signature. Integrity comes from HTTPS to frostyard.github.io plus the digests in the index, and the client verifies content against the digest. With 1–3, the trust root is "built by the app's tagged release workflow", checked once, at index time. That is weaker than sysexts (the client checks nothing itself), as ADR-0058's consequences already say. It is acceptable for user-scope desktop apps. Do not use this path for anything that runs as root or ships system services: those stay sysexts with GPG-signed SHA256SUMS.
Summary
Records the suite packaging decision that Brian made on 2026-10-23 (open since 2026-10-21): Flatpaks for the desktop apps, sysexts for the suite services. Irulan wrote it at Odrade's request (desk thread T83). Nothing is built yet.
frostyard-<name>.debattached to the release; svu versions;/usr-only payloads;Upholds=start; noCondition*=on upheld units; noRequiredBy=), and the Flatpak contract (built withflatpak-builderin CI, OCI on GHCR, listed byfrostyard/flatpak-index, updated withflatpak update).The decision is in core, not lodge, because it binds repositories beyond the suite: snosi builds the sysexts, Repogen publishes them, updex installs them, and flatpak-index serves the Flatpaks. Core already holds ADR-0057 and the sysext contract (ADR-0007, 0008).
Artifacts that do not fit cleanly (recommended side)
notesctl,mailctl): inside the Flatpak (flatpak run --command=)./usr/share/lodge/apps/<id>/./opt/lodge/bin,/usr/local/bin, units in/etc), not a Snosi image. Recommended: Floe.Review answers folded in (commit 13782ee)
Lucilla (review 5622747422) and Murbella answered all 13 questions. ADR-0058 now says:
aptfails while/usris an overlay. So lodge's host uses them only after a fresh install of Floe..socket. Also uphold the.serviceof maild, readd and porterd, which work without a client. Ship a preset beside the drop-in.sysusers.dfile carriesg lodge -. Socket units keep their default dependencies.EXTENSION_RELOAD_MANAGER=1.check-sysext-updateschecksum PR. Releases send nobuilddispatch and register nothing with apt-publisher.RequisiteFeatures=is not used until updex#455 is fixed.Still open (Plan 0010): a faster release trigger for
check-sysext-updates(Murbella), confirmation ofEXTENSION_RELOAD_MANAGER=1(Murbella), Snosi's delta check of upheld units (Murbella), and notesd's service upheld or not (frostnotes). Brian's decisions: accept ADR-0058; move lodge's host to Floe; make frostread public; make the 2 GHCR packages public.Risk tier
Risk tier: 1 — docs only (an ADR in Proposed state, a plan, index lines and a link-only back-reference).
Docs housekeeping
TEMPLATE.mddocs/README.mdVerification
node scripts/check-docs.mjsgreen (80 docs, 748 links, 10 symlinks), run in the nsl machine