sector-f-linux

Sector F Linux
git clone https://git.sectorflabs.com/sector-f-linux.git
Log | Files | Refs | README | LICENSE

0016-an-updater-app-and-ghcr-as-the-default-registry.md (3363B)


      1 # 0016. An updater app, and GitHub's registry as the default
      2 
      3 Date: 2026-11-27
      4 
      5 ## Status
      6 
      7 Proposed (the direction is the user's: an updates app that comes with the OS, a registry people can
      8 pick, GitHub's as the default; the details are mine). Amends [ADR-0009](0009-seflos-a-fedora-bootc-image-on-btrfs.md)
      9 (where the image lives) and [ADR-0015](0015-nothing-is-published-until-publish.md) (the registry).
     10 
     11 ## Context
     12 
     13 The image was published to a registry on the tailnet (`registry.sectorflabs.com`, on urd). Only
     14 machines on the tailnet could update from it, which is no way to ship an OS. The only way to move a
     15 machine to another image was `rpm-ostree rebase` or `bootc switch` by hand. The earlier try at
     16 building on GitHub's CI failed, so builds stay local.
     17 
     18 ## Decision
     19 
     20 - **The default registry is GitHub's:** `ghcr.io/sector-f-labs/sector-f-linux:latest`. `make publish`
     21   pushes there, from this machine, with `gh`'s token (scope `write:packages`). There is no CI.
     22   The ISO's installed machines follow the same name.
     23 - **The source is in a GitHub repository,** `Sector-F-Labs/sector-f-linux`, GPL-2.0. In this
     24   checkout `origin` stays our own remote and `github` is GitHub's.
     25 - **`patina-updater` is an app of this repository (`updater/`) that ships with the OS.** A Patina
     26   window, "Software Update". It shows the booted version and image, a list of registries with the
     27   default first and a field to add others, a check for updates, and the update. It also rolls back.
     28 - **Changing the system goes through one root helper,** `/usr/libexec/patina-update`
     29   (`upgrade`, `switch <image>`, `rollback`), run with pkexec. Polkit's action
     30   `com.sectorflabs.patina.update` asks an administrator's password (`auth_admin_keep`). The helper
     31   checks the image name itself (nothing starting with a dash, no transport prefix, a lowercase
     32   path), by the same rule as the app; a test feeds both the same names.
     33 - **rpm-ostree, not bootc,** does the work, for the reason in ADR-0009 (a layered package makes
     34   bootc refuse). A switch is `rpm-ostree rebase ostree-unverified-registry:<image>`.
     35 - **Checking needs no root:** `skopeo inspect` asks the registry for the image's digest and the app
     36   compares it with the booted one from `rpm-ostree status --json`.
     37 - **Switching registry is confirmed,** with a warning that whoever controls the registry controls
     38   what the computer runs. The previous build is kept, so it can be rolled back.
     39 
     40 ## What this gives up
     41 
     42 - **Signatures.** The image is unsigned and rpm-ostree is told `ostree-unverified-registry`. A
     43   registry that is not ours is trusted on the person's word. Signing (sigstore, cosign) is the
     44   fix, and is not done here.
     45 - **A private package** cannot be pulled without a login. For machines to update, the package
     46   `sector-f-linux` on ghcr must be public (set once, in GitHub's web page; there is no `gh` command).
     47 
     48 ## Open questions
     49 
     50 - **Automatic updates,** a notification, and checking in the background. Now it only checks when asked.
     51 - **Update channels** (`:stable`, `:latest`) as a choice in the app, not only as part of the name.
     52 - **Not tried end to end** as of this writing: an update against a published image, and the polkit
     53   password prompt in a desktop session. The helper's refusals, the action's registration and the
     54   status parsing against the VM's real `rpm-ostree status` are.