release: v2.6.0-beta signed updates and browser restart

This commit is contained in:
fsylvain committed 2026-10-02 16:56:04 +02:00
1 parent 5a430c08f4
commit 02a0a36dc3
3 files changed
+48 -1

No files matched your search

+1
View File
@@ -27,3 +27,4 @@ Each body lives in `docs/releases/<tag>.md`. Publish with `tea releases create -
| `v2.3.0-beta` | v2.3.0-beta - Multi-user invitations, display names & profile page |
| `v2.4.0-beta` | v2.4.0-beta - Owner role, invite management & Settings page |
| `v2.5.0-beta` | v2.5.0-beta - Media library & image picker |
| `v2.6.0-beta` | v2.6.0-beta - Signed updates and browser restart |
+46
View File
@@ -0,0 +1,46 @@
RenewCMS can now check for releases, download a signed update and install it from Settings. On Linux with systemd, the owner can restart the site from the browser, with automatic binary rollback if the new version fails to start.
## New
**Updates in Settings**
- Owners can check for a newer release, read its release notes and download it while the site stays online.
- Downloads show progress, verify the release signature and binary checksum, check the staged version and back up the database before becoming ready to install.
- The Home page and Settings navigation show an owner-only update notification, and the Home banner can be dismissed for each version.
- Admins can read the update status without starting an update or restart.
**Browser restart and installation**
- Owners can confirm an update installation or a plain site restart from Settings.
- A restart overlay waits for the site to return and offers a reload action when the restart takes longer than expected.
- Linux installations with systemd can enable browser updates using `renewcms enable-browser-updates` and remove the helper using `renewcms disable-browser-updates`.
- The helper verifies the staged files again, keeps the previous binary and restores it if the new version does not start successfully.
## Improvements and fixes
- Update status and download progress survive navigation and are shared between owners.
- Update checks and download starts have separate per-user rate limits with retry countdowns.
- Restart confirmations identify whether the action installs an update or only restarts the site, and refuse a request when another owner's action has changed that state.
- Completion messages are shown in the browser tab that requested the restart.
## API
- `GET /v1/system/update` returns the current and latest versions, release notes, release URL, helper availability, progress, state, error kind and operation timestamps for verified users, without changing state.
- `POST /v1/system/update/check` checks the release feed for owners and returns 200, 403 for insufficient permissions, 429 with `Retry-After`, or 500 when the feed cannot be reached.
- `POST /v1/system/update/download` starts an owner-only background download with 202, or returns 400 when nothing is available, 403, 409 for an unavailable helper or conflicting job, 422 for a pre-flight refusal, or 429.
- `POST /v1/system/update/restart` accepts an optional `kind` of `update` or `restart` and returns 202, 400 for invalid input, 403, 409 for an unavailable helper or conflicting state, or 500 when the request cannot be saved.
## Under the hood
- Releases include signed `checksums.txt` and `checksums.txt.sig` files alongside the six platform binaries.
- The update helper runs separately from the unprivileged app, copies staged files into a private directory and verifies the bytes it installs rather than trusting a mutable staged path.
- Feature specifications, fake-backed Go tests and SPA tests cover release checks, downloads, restart requests and rollback decisions.
## Upgrading
- Back up your SQLite database and uploads, then replace the binary and restart manually for this first release with browser-update support.
- No database schema change is introduced by the update features.
- `UPDATE_FEED_URL` is optional and defaults to the project's release feed; existing configuration remains usable.
- On Linux with systemd, run `sudo renewcms enable-browser-updates` after the manual upgrade to enable future updates and restarts from Settings.
- Keep the update status files, staged files and backups beside the database in the data directory, with the permissions described in `docs/deployment.md`.
## Known limitations
- The privileged update helper has automated coverage through fakes, but its first real Linux/systemd update and rollback checks are still pending.
- Browser installation and restart require Linux with systemd; Windows, macOS and other init systems remain manual upgrades.
- Updating or restarting briefly takes the site offline, and a reverse proxy may return errors during that interval.
- Automatic rollback restores the previous binary; it does not restore the database, so schema-changing upgrades still require a backup and a recovery plan.
- Update assets and redirects must use HTTPS on the configured feed host.
+1 -1
View File
@@ -1 +1 @@
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
cuIg/xm6NmUEi3WtUTO3Rrjo8QoUyKzU315g0HtiVcI=