Repository navigation
1bit-update --latest [--channel] [--download-only]: a SIGNED download, then the same slot install (OS updater U2) - #3444
Conversation
…, then the same slot install (OS updater U2) Brief OS-UPDATER.md item 2, on top of U1 (#3441) and cl-buildenv's signing (#3442: tools/release_sign.py shipped as /usr/lib/1bit/release_sign.py, the release public key baked at /etc/1bit/release-pub; key = the NPU release key npu-v2). --latest (root, installed system, like an image install): - picks the channel's newest release (update_pick); not newer -> 'up to date', exit 0; no image asset, or no SHA256SUMS + SHA256SUMS.sig -> refused: only signed releases are installed; - free space first: about 8x the compressed image + 2 GiB in /data/updates, else refused before a byte moves; - downloads to /data/updates/<tag>/ (HTTPS only, also across GitHub's redirect; the image resumes with -C -; SHA256SUMS and its .sig always fresh); - update_verify: release_sign.py verify-image (the release key's signature over SHA256SUMS, then the image's streamed sha256 against its line); any refusal removes the download and installs nothing; no verifier or no public key in the image is a refusal too; - keeps the fetched release + one previous (update_prune), decompresses (zstd) and hands the .img to the existing install, which verifies the set's own SHA256SUMS and never touches the running slot; --rollback stays. --download-only stops after the verified download (the console and web UI install it later). tests/update_latest_test.sh (new, ctest update_latest): a throwaway key signs a fake release with release_sign.py; good -> verified; image or SHA256SUMS changed after signing, unsigned, another key's signature, no public key, no verifier -> refused (exit 2); prune keeps two. 8/8 under dash (env -i) and busybox ash. Co-Authored-By: Claude Opus 5.5 <[email protected]>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
cl-release, after merge: an end-to-end run against the real published v2026.49-rc1 (strixhalo, the installed rc1, main's Without 🤖 Generated with Claude Code |
OS updater, brief
OS-UPDATER.mditem 2. Builds on U1 (--check, #3441) and cl-buildenv's signing (#3442:tools/release_sign.py, shipped as/usr/lib/1bit/release_sign.py, with the release public key baked at/etc/1bit/release-pub; the key is the NPU release keynpu-v2). Both are merged.1bit-update --latest(root, installed system, the same rules as1bit-update <image>):SHA256SUMS(SHA256SUMS+SHA256SUMS.sig): only signed releases are installed./data/updates, else it refuses before a byte moves./data/updates/<tag>/: HTTPS only, also across GitHub's redirect (--proto =https --proto-redir =https). The image resumes (-C -);SHA256SUMSand its.sigare always fetched fresh.update_verifyrunsrelease_sign.py verify-image: the release key's signature overSHA256SUMS, then the image's streamed sha256 against the line naming it. Any refusal removes the download and installs nothing. No verifier or no public key in the image is also a refusal.update_prune), decompresses (zstd), and hands the.imgto the existing install. That install verifies the set's ownSHA256SUMSand never touches the running slot, so--rollbackstays available.--download-onlystops after the verified download, for the console menu (U4) and web UI (U5), which install later.Measured:
tests/update_latest_test.sh(new, ctestupdate_latest) signs a fake release with a throwaway key using main's owntools/release_sign.py:SHA256SUMSchanged after signing, an unsigned release, another key's signature, no public key, no verifier;8/8 under dash (
env -i) and busybox ash.update_check: ok. Pre-PR checks after the rebase: 17 green, 3 skipped.Not done here: a real
--latestend to end, because no published release carriesSHA256SUMS.sigyet. That's U7 (a release-check row and a QEMU test with a locally signed image).🤖 Generated with Claude Code