Skip to content

Install offline OS updates from signed NanoKVM package deltas - #1156

Merged
dormancygrace merged 5 commits into
mainfrom
codex/offline-os-update
Dec 2, 2026
Merged

dormancygrace merged 5 commits into
mainfrom
codex/offline-os-update

Conversation

@dormancygrace

@dormancygrace dormancygrace commented Dec 2, 2026 •

Copy link
Copy Markdown
Owner

Install a signed offline update from Settings → System → Updates on the Stable channel. Ordinary online updates and channel switching keep their existing behavior.

  • The archive declares a signed minimum installed version. A compatible Stable device can update directly when its installed version is at least that minimum and below the target.
  • A release can opt into a wider range in firmware/alpine/offline-minimums.json, including a previous major. Without an override, the previous public Stable release on the same major is the minimum.
  • The signer plans against each public Stable baseline in the range, collects the changed NanoKVM packages and required dependencies in one archive, then rechecks each plan against that archive without a network. The device verifies the signature, range, package plan and free space before installation.
  • Beta releases and Pages-only updates omit the archive. Devices on Beta use the online updater. The documentation includes the first offline upgrade from Stable 5.0.1 via SSH.

Verification

A locally signed test archive targeting 6.0.0 with minimum 5.3.0 upgraded isolated 5.3.0 and 5.4.0 package databases directly. The two baselines needed different dependency updates. Each applied only its own, preserved APK world and retained an unrelated Alpine package. The verifier rejected 5.1.2, 6.0.0, 6.1.0 and the Beta channel. Host tests used riscv64 package metadata and disabled package scripts.

Earlier verification covered the RISC-V server and updater build, browser upload progress and retry, interrupted/concurrent uploads, tampered/truncated archives and insufficient space.

Chained offline upgrade verification

With apk-tools 3.0.8 and temporary signing keys, two isolated riscv64 package databases with different providers upgraded from 5.3.0 and 5.4.0 to 6.0.0 and then to 6.0.1. A clean 6.0.0 image with a third provider also reached 6.0.1. Each installation ran apk --no-network --no-scripts upgrade --no-self-upgrade nanokvm-release against the signed local index and retained its original /etc/apk/world byte for byte. The native archive reader verified both archives. When the next update would have removed an installed provider, the release planner rejected the archive before assembly.

@dormancygrace dormancygrace left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The offline solver regression passed with apk-tools 3.0.8, and the release tar and APK re-signing tests passed. One release sequence blocks merging: a device that takes a beta can lose every subsequent offline upgrade path when stable is published. The two comments address archive generation and device eligibility.

Comment thread scripts/offline_delta.py Resolved
Comment thread server-cpp/src/osupdate/offline.cpp Resolved
@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Build outputs

Compared with the build of main at 485f39e; main is at dda44d9, so outputs changed since then are listed too.

3 changed, 246 added, 246 removed of 722 outputs.

directory files
changed server server/NanoKVM-Server
server/nkos-update
changed web web/index.html
added web 246 files
removed web 246 files
Hashes: outputs-sha256 artifact of this run.

@dormancygrace dormancygrace left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified the revised Stable-only contract. The release selector excludes Beta, the device eligibility tests pass, and the two previous threads are addressed. The APK solver, release tar and re-signing tests also passed. One blocking issue remains when a device takes a second offline update after a multi-baseline release.

Comment thread scripts/offline_delta.py Resolved
@dormancygrace
dormancygrace merged commit a811521 into main Dec 2, 2026
19 of 20 checks passed
@dormancygrace
dormancygrace deleted the codex/offline-os-update branch December 2, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant