board-test.sh says what postinstall does not do, since the old sentence stopped being true

The asymmetry assertion described the hook as placing "units and accounts and nothing
else". That stopped being true when it took on the recovery scripts, then the voice bank,
and now the login-shell files — while the two `test !` lines under it went on pinning
exactly what they always did. The comment and the [ok] line now name those two things, the
journald drop-in and the robotctl symlink, and point at the half of §9.1 they are the
remainder of.

`setup-login.sh` joins the installer lint list, which is where `setup-gstreamer.sh`
already is: same class of script, run on a board, piped to `sh`.

Assisted-by: Claude:claude-opus-5
This commit is contained in:
Pierre Rouanet 2026-08-27 16:49:28 +02:00
parent 8725fbede2
commit 60a5e7e7b7
2 changed files with 13 additions and 8 deletions

View File

@ -97,7 +97,7 @@ jobs:
# a bashism would work on a dev box and fail on the board.
- name: Lint the installer
run: |
for script in scripts/install.sh scripts/setup-board.sh scripts/setup-gstreamer.sh scripts/migrate-network.sh scripts/provision.sh scripts/provision-board.sh scripts/ci-release-notes.sh scripts/robot-rescue scripts/dev-push.sh scripts/pad-link-test.sh scripts/pad-stack-report.sh; do
for script in scripts/install.sh scripts/setup-board.sh scripts/setup-gstreamer.sh scripts/setup-login.sh scripts/migrate-network.sh scripts/provision.sh scripts/provision-board.sh scripts/ci-release-notes.sh scripts/robot-rescue scripts/dev-push.sh scripts/pad-link-test.sh scripts/pad-stack-report.sh; do
sh -n "$script"
shellcheck --shell=sh "$script"
# The one-liner is only correct if the file is executable and self-contained.

View File

@ -1068,19 +1068,24 @@ for f in /etc/profile.d/robot-name-prompt.sh /etc/bash_completion.d/robotctl /et
done
echo " [ok] postinstall alone installs the login-shell files"
# The asymmetry, pinned because it is easy to assume otherwise: the hook places units and
# accounts and nothing else. Both of these were deleted above and the hook did not restore
# either, so a release that added a journald drop-in or moved robotctl delivers neither on an
# update — only install.sh does those, and it runs once, by hand, at provisioning time.
# What the hook does NOT place, which is now a short list and worth naming exactly: the journald
# drop-in and the robotctl symlink. Both were deleted above and the hook restored neither, so a
# release that changed either delivers it to no board that only updates — only install.sh does
# those, and it runs once, by hand, at provisioning time.
#
# This comment used to say the hook placed "units and accounts and nothing else", which stopped
# being true when it took on the recovery scripts, then the voice bank, then the login-shell
# files. The contract is the two lines below, not the sentence above them.
#
# Asserted rather than merely documented because the reasonable next change to this hook is to
# make it place everything install.sh places, and the person making it should find a test that
# states the current contract instead of discovering it on a board.
# make it place everything install.sh places — the remaining half of updater-design.md §9.1 —
# and the person making it should find a test that states the current contract instead of
# discovering it on a board.
test ! -f /etc/systemd/journald.conf.d/10-robot.conf \
|| { echo " [FAIL] postinstall now installs the journald drop-in"; exit 1; }
test ! -e /usr/local/bin/robotctl \
|| { echo " [FAIL] postinstall now creates the robotctl symlink"; exit 1; }
echo " [ok] postinstall covers units and accounts only, as documented"
echo " [ok] postinstall leaves the journald drop-in and the robotctl symlink alone"
'
for image in $IMAGES; do