Packaged Upgrade (deb and rpm)
Prove an in-place package upgrade from the previous stable release preserves the user's config byte-for-byte, that the old config loads on the new binary, and that the new release's file surface actually arrives. Run before every stable tag, against the release-candidate packages.
Run inside Docker so nothing touches the host. Both containers follow the same script; only the package manager differs.
# Run from the repository root.
PREV=1.0.1 # previous stable
NEXT=1.1.0-rc5 # candidate under test
SCRIPT=$(realpath docs/smoke_tests/packaged-upgrade.sh)
WORK=$(mktemp -d)
gh release download "v${PREV}" --repo peteonrails/voxtype --dir "$WORK" -p "voxtype_${PREV}-1_amd64.deb" -p "voxtype-${PREV}-1.x86_64.rpm"
gh release download "v${NEXT}" --repo peteonrails/voxtype --dir "$WORK" -p "voxtype_${NEXT}-1_amd64.deb" -p "voxtype-${NEXT}-1.x86_64.rpm"
# deb path
sudo docker run --rm -v "$WORK":/pkgs:ro -v "$SCRIPT":/t.sh:ro ubuntu:24.04 bash /t.sh "$PREV" "$NEXT" deb
# rpm path
sudo docker run --rm -v "$WORK":/pkgs:ro -v "$SCRIPT":/t.sh:ro fedora:40 bash /t.sh "$PREV" "$NEXT" rpmEach run must end with a RESULT: N passed, 0 failed line and exit 0. A run that prints no RESULT line tested nothing, whatever it exited with.
Mount the script as above; do not pipe it in with bash -s ... < packaged-upgrade.sh. Without -i the container gets no stdin, so bash runs nothing and exits 0. With -i, apt-get reads the rest of the script as its own input and the deb run stops after phase 1. Both looked like a pass.
What the script asserts, in order:
- The previous version installs and reports its version.
- A real config (with a replacement rule and
[osd]settings) loads:voxtype info enginesexits 0. - The in-place upgrade succeeds and
--versionreports the new version in full:voxtype 1.1.0-rc5forNEXT=1.1.0-rc5. - The user config is byte-identical after the upgrade (md5 compare - the packages must never touch it).
- The old config loads on the new binary (the backwards-compat gate).
- The new release's surface is present:
info stylesandinfo variantsexist, the baseline binary is in/usr/lib/voxtype, style packages are at/usr/share/voxtype/osdwithaegis-huddiscoverable, recipes and the quickshell tree shipped. - The Omarchy Settings plugin ships in its versioned layout:
/usr/share/voxtype/omarchy-plugin/io.voxtype.settings/manifest.jsonhas"version": "<NEXT>"and"panel": "<NEXT>/Panel.qml", and<NEXT>/Panel.qmland<NEXT>/components/*.qmlexist beside it.NEXTmust be the full version string, including any-rcNsuffix, because that is the directory name.
Harness lessons from the 1.1.0 run, so they are not relearned:
- Assert through schema-valid commands only.
config geton a map key (text.replacements) or a nonexistent key (audio.sample_rate) exits 2 by design; a harness using them reports false failures. Check the replacement rule by grepping the config file. - Fedora's base image has no
diff; compare withmd5sum. - The script exits non-zero unless it reached its last phase, ran at least one check and had no failure, so an exit status of 0 means the checks ran.
- Install with the package manager (
apt-get install ./pkg.deb,dnf install ./pkg.rpm) so dependencies resolve;rpm --nodepsleaves libasound missing and every binary failing for the wrong reason.