…d install, reboot offer, roll back, channel (OS updater U4)
Brief OS-UPDATER.md item 4. On an INSTALLED machine item 5 ('Update / roll back 1bit OS') opens:
1 Check for an update (and install it): 1bit-update --check shown; when an update is available AND signed, a
confirm names the version and download size, then 1bit-update --latest --channel <ch> (signed download -> the
other slot), then 'Reboot now?' (no = at the next reboot; this version stays as the rollback);
2 Roll back to the previous version: --status shown, confirm, --rollback, reboot offer;
3 Update channel stable <-> test, in /data/1bit/update.conf (switching to test asks first);
4 Install onto a DIFFERENT disk (the previous item 5, unchanged).
A live stick keeps 'Install 1bit OS to a disk'. --run 5 on an installed machine only CHECKS (and still prints
install-guard-checked for vm-check's U2 row).
Safety: the menu's yesno answers yes when dialog is missing (right for showing a key, wrong for replacing an OS), so
installs and rollbacks use a new confirm: default no, a typed y on a text terminal, ALWAYS no non-interactively. An
unsigned release is never offered. ONEBIT_MENU_LIB=1 sources the functions for tests.
tests/console_update_test.sh (new, ctest console_update): text-terminal path with a fake 1bit-update - confirm
semantics, check-only --run 5, y/n install, reboot offer, unsigned not offered, rollback, channel toggle, the label:
12/12 under dash (env -i) and busybox ash. console_chain: 0 failures.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
OS updater, brief
OS-UPDATER.mditem 4. Uses1bit-update --check(U1, #3441, merged) and--latest(U2, #3444, open). This PR's tests use a fake1bit-update, so they don't depend on #3444. Installs from the menu work once #3444 merges.On an INSTALLED machine, item 5 is now "Update / roll back 1bit OS":
1bit-update --check. When an update is available and signed, a confirm names the version and the download size, then1bit-update --latest --channel <ch>runs (signed download into the other slot), then "Reboot now?". No means it runs at the next reboot, and this version stays as the rollback.--status, confirm,--rollback, then a reboot offer./data/1bit/update.conf. Switching to test asks first.A live stick keeps "Install 1bit OS to a disk". On an installed machine,
--run 5only checks, and still printsinstall-guard-checkedfor vm-check'sU2 menu actionsrow.Safety: the menu's
yesnoanswers yes whendialogis missing. That's right for showing a key, wrong for replacing the OS. So installs and rollbacks use a newconfirm: default no, a typedyon a text terminal, and always no non-interactively. An unsigned release is never offered.ONEBIT_MENU_LIB=1sources the functions for tests.Measured:
tests/console_update_test.sh(new, ctestconsole_update) runs the text-terminal path with a fake1bit-updatethat records its calls. It covers confirm semantics (non-interactive no,yyes, Enter no), check-only--run 5, install ony/ nothing onn, the reboot offer both ways, an unsigned release not offered, rollback, the channel toggle both ways, and the label. 12/12 under dash (env -i) and busybox ash.console_chain: 0 failures. Pre-PR checks after committing: 17 green, 3 skipped.🤖 Generated with Claude Code