Files
Classroom_Desktop/update_classroom_v2.sh
T
ekklesiaandClaude Opus 5 34fd02e08f feat: give every room the broker, one scale, and its own panel back
Little Waders took the Plasma build and reported what a container
cannot. A disc player on a machine with no optical drive, a clock nobody
at the back of the room could read, a browser at half the size of the
panel around it, and Parent Call with no broker to call.

The broker is the same for every classroom, so it is a default now and
not something to fill in room by room. classroom-migrate brings an
existing room to the same place without touching its name, its username
or its password, and Parent Call distinguishes a broker it cannot reach
from one that was never set up: those send somebody to look at
completely different things.

The disc player's detection was right and ran too late — alongside the
session rather than before it, and the panel is built from the layout the
moment a session starts. It runs before the display manager now, and
again from udev when a drive is plugged in.

UI_SCALE had a ceiling of 1.5, which cannot express a 4K television; a
clock pinned at 15 points, which is the same size at every scale; and a
browser that was never told the number at all. All three are fixed and
the room doubles together at 200%.

This also brings 0.1.47's work into the repository, where it had only
ever existed in a build directory under /tmp: the hidden display dialog,
its authenticated writer, the polkit action, and the church's own
wallpaper. One piece of it is deliberately left out. The custom volume
display needed a shell package of our own, and with one selected
plasmashell builds no panel at all — measured twice, with that build's
own files, on a classroom that deletes its panel configuration at every
login by design.

The lab connected to the real church broker the moment the package
defaulted to it. Nothing was left behind, which was checked, but the
guard that should have stopped it had never worked: it used iptables,
which the lab image does not have, and probed with /dev/tcp under dash,
where that always fails. Both reported success.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-12 19:05:09 -05:00

97 lines
2.7 KiB
Bash
Executable File

#!/bin/bash
set -euo pipefail
# Publish a build to the classroom-v2 channel.
#
# The v2 rooms are on a channel of their own, and classroom-migrate moves
# a machine onto it as soon as it takes this package: stable and canary
# are both the sway line, and a v2 room left on either is handed the old
# desktop back by the next release there.
#
# Nothing here can touch stable or canary. It writes one manifest, in one
# directory, named after the one channel this file is about.
#
# ./update_classroom_v2.sh 0.1.48
#
# The package goes up first and the manifest last, so a room that checks
# for an update in the middle of a publish is offered nothing rather than
# a manifest pointing at a file that is not there yet.
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$ROOT"
CHANNEL=classroom-v2
if [[ $# -ne 1 ]]; then
echo "Usage: $0 VERSION"
echo "For example: $0 0.1.48"
exit 1
fi
version="$1"
if [[ ! "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Invalid version: $version"
exit 1
fi
package_name="ekklesia-classroom_${version}_amd64.deb"
package_path="$ROOT/dist/$package_name"
if [[ ! -f "$package_path" ]]; then
echo "No such package: $package_path"
echo "Build it first: tools/build-release.sh $version"
exit 1
fi
echo "Publishing $version to $CHANNEL"
echo
# The same gate canary uses, against the exact artifact being published.
validation_args=("$package_path")
if [[ -f "$ROOT/repo/$CHANNEL/manifest.json" ]]; then
previous_name="$(python3 -c \
"import json; print(json.load(open('repo/$CHANNEL/manifest.json'))['package'].rsplit('/', 1)[-1])")"
previous="$ROOT/repo/packages/$previous_name"
if [[ -f "$previous" && "$previous" != "$package_path" ]]; then
validation_args+=("$previous")
fi
fi
"$ROOT/tools/validate-trixie-release.sh" "${validation_args[@]}"
hash="$(sha256sum "$package_path" | awk '{print $1}')"
mkdir -p "$ROOT/repo/packages" "$ROOT/repo/$CHANNEL"
cp "$package_path" "$ROOT/repo/packages/$package_name"
cat > "$ROOT/repo/$CHANNEL/manifest.json" <<MANIFEST
{
"version": "$version",
"package": "/packages/$package_name",
"sha256": "$hash",
"requires_reboot": true
}
MANIFEST
echo
echo "Publishing package..."
rsync -av -e ssh \
"$ROOT/repo/packages/$package_name" \
classroom-control:/srv/ekklesia/classroom-updates/packages/
echo
echo "Publishing $CHANNEL manifest..."
# Manifest deliberately goes LAST.
rsync -av -e ssh \
"$ROOT/repo/$CHANNEL/manifest.json" \
"classroom-control:/srv/ekklesia/classroom-updates/$CHANNEL/manifest.json"
echo
echo "Published Ekklesia Classroom $version to $CHANNEL"
echo "https://updates.riverofglorymn.org/$CHANNEL/manifest.json"