Updates
sudo reportlog updates # is there an update, and what would it change?
sudo reportlog deploy <commit> # install one from a terminal
Or, with no terminal: Records › Updates on the site, for administrators.
reportlog updates fetches the repository (REPO_URL and DEPLOY_REF in
/etc/reportlog/deploy.env) and says how far the running release is behind
the branch, which releases lie between them, with their notes from the
newest CHANGELOG.md, the commits, and the exact deploy command. It
installs nothing. Releases are numbered ("version" in the root
package.json, shown in every page's footer) and tagged vX.Y.Z; the
repository's README says how one is cut. sudo reportlog deploy vX.Y.Z
installs a tagged release.
The same check runs every morning around 06:00 as root
(reportlog-update-check.timer). When it finds a commit it has not told you
about, it emails OPS_ALERT_EMAIL once. The doctor warns while the server
is behind, when the repository could not be fetched (and says why: a
credential, DNS, the network), and when the daily check has stopped. To turn
the check off: sudo systemctl disable --now reportlog-update-check.timer
(a deploy turns it back on).
The Updates screen. Records › Updates says what is installed (version, commit, when, and the branch it came from) and what the last check found. One button: Check for update, which becomes Install update when the check found one; installing asks first, naming what. Roll back appears only while it can be used: one step back to an older release, once.
Branches. main is live; beta and alpha are for testing. Pressing
the installed version eight times adds a branch selector beside the button,
and a server that does not follow main always shows it. Choose a branch,
check, and the screen shows what that branch offers; installing asks first,
naming the branch. Installing from a branch makes the server follow it:
root writes the branch to /srv/reportlog/follow, and every later check,
the daily one included, and a plain sudo reportlog deploy, use it. Until
somebody installs from a branch the server follows DEPLOY_REF, which may
name a branch outside the three (a test server following test, say): it
is shown, checked and updated as before, but never asked for by name. To go
back to DEPLOY_REF, delete /srv/reportlog/follow.
The same eight presses offer every release the server keeps
(/srv/reportlog/releases, newest first, with date, commit and branch) to
roll back to, each asking first. Nothing new is stored for this: they are
the releases a deploy keeps anyway (KEEP_RELEASES, five).
How a request is checked. The website never runs git and never deploys
anything itself. It writes one small request file
(/var/lib/reportlog/update-request/request), and the root unit
reportlog-update-request.path sees it and runs reportlog request, which
treats the file as untrusted. It reads it once, from a plain file (never
through a link), at most 4 KB. Each value must have an exact shape, or the
whole request is refused:
| Field | Accepted |
|---|---|
action | check, apply or rollback |
branch | main, beta or alpha, word for word (check and apply only); reaches git as refs/heads/… |
sha | 40 hex characters (apply only); must be the branch's tip after a fresh fetch |
release | <UTC time>-<12 hex> (rollback only); must be the exact name of a kept release directory |
A field said twice, or one the action does not take, also refuses it. An
apply is refused when the commit moved since the page was loaded, and when
it is older than the database (above). So the worst a forged request can do
is install the newest commit of one of the three branches, or go back to a
release this server already ran. The deploy is the same one
sudo reportlog deploy runs, with the same checks and the same automatic
switch back, under the same lock, and the end of its output appears on the
screen. (Decided 22 October 2026, docs/decisions.md 68; branches decided
by the owner, 29 October 2026.)
The check runs as root only because the repository's address and credentials
are root's, as they are for a deploy; it runs root's own copy of these
scripts (/usr/local/lib/reportlog), never code from a release.