diff --git a/.gitignore b/.gitignore index 571cdcf..4b5c56d 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ __pycache__/ *.env !*.example.env *.secret +*.env.before-fix-* *.sqlite *.sqlite3 *.sqlite-wal diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ad6024..6016e38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,31 @@ All notable changes to VesselStack are documented here. The project follows Semantic Versioning. +## 0.6.1 - 2026-11-02 + +### Highlights + +- Upgrades and installs now offer to fix an unsupported units setting or an unsafe saved value at the prompt, instead of stopping; unattended runs still stop safely and print the exact fix. Each fix keeps a root-only `*.before-fix-*` copy of the previous settings file, which you can delete once the install works. +- The Control Panel shows the exact fix when an update or backup stops for something you can fix (for example an unmounted backup drive). +- When the backup drive isn't mounted, updates and backups offer to mount it, pick a connected USB drive, check again, or back up to the system disk once, instead of stopping. + +### Fixes + +- The backup-drive menu now lists a USB drive that has no label (its columns were shifted, so the wrong value reached `mount`), accepts only exactly one listed answer (`1 2` is asked again, never guessed), and is not offered drives that `/etc/fstab` assigns to another mount point. An empty list says how to unmount a drive your desktop already mounted. +- Fresh installs started with `--yes`, `--defaults` or scripted answers no longer let the installer ask questions. +- A drive mounted from the menu is checked before anything is written: its top folder must be owned by root and not writable by others, and no folder on the way to the backup folder may be a symbolic link or belong to another user. +- The prompt library, its parent folders and the folder of a settings file being fixed must be root-controlled; the scripted-answers test hook (`VESSELSTACK_PROMPT_ANSWERS`) is read only from a private file you own. `vesselstackctl uninstall` also removes the prompt library. + +- Upgrading a boat whose settings say `BOAT_UNITS=nautical` (offered by older setup wizards) no + longer stops the update; it is read as metric, and knots and nautical miles are kept. +- A clearer message, naming the file and the fix, for any other unsupported `BOAT_UNITS` value. + +### Release status + +`v0.6.1` is an SSH-signed tag verified by the release workflow against `.github/allowed_signers`. +It is published first as a pre-release and marked Latest after the maintainer's physical +Raspberry Pi install passes. + ## 0.6.0 - 2026-11-02 ### Highlights diff --git a/README.md b/README.md index bf7d293..a6bba0a 100644 --- a/README.md +++ b/README.md @@ -157,18 +157,18 @@ session), run the pinned release installer and answer the questions in the same ```bash ssh -t YOUR_USER@raspberrypi.local -curl -fsSL https://github.com/jclima/VesselStack/releases/download/v0.6.0/get-vesselstack.sh | sudo bash +curl -fsSL https://github.com/jclima/VesselStack/releases/download/v0.6.1/get-vesselstack.sh | sudo bash ``` -The same release is also selected by `VESSELSTACK_VERSION=0.6.0` or `--version 0.6.0`: +The same release is also selected by `VESSELSTACK_VERSION=0.6.1` or `--version 0.6.1`: ```bash -curl -fsSL https://github.com/jclima/VesselStack/releases/download/v0.6.0/get-vesselstack.sh | sudo VESSELSTACK_VERSION=0.6.0 bash -curl -fsSL https://github.com/jclima/VesselStack/releases/download/v0.6.0/get-vesselstack.sh | sudo bash -s -- --version 0.6.0 +curl -fsSL https://github.com/jclima/VesselStack/releases/download/v0.6.1/get-vesselstack.sh | sudo VESSELSTACK_VERSION=0.6.1 bash +curl -fsSL https://github.com/jclima/VesselStack/releases/download/v0.6.1/get-vesselstack.sh | sudo bash -s -- --version 0.6.1 ``` > [!NOTE] -> The pinned URL names the release explicitly, so it installs exactly 0.6.0 whatever +> The pinned URL names the release explicitly, so it installs exactly 0.6.1 whatever > GitHub marks as Latest. The form `https://github.com/jclima/VesselStack/releases/latest/download/get-vesselstack.sh` > points to whichever release GitHub marks Latest, which is not necessarily the newest > one (every 0.5.x release was published as a prerelease, so that URL kept serving @@ -215,10 +215,10 @@ that does not point at the exact commit being built, before building anything. T ```bash # defaults, plus the settings you name (repeat --set; names as in vesselstack.example.env) -curl -fsSL https://github.com/jclima/VesselStack/releases/download/v0.6.0/get-vesselstack.sh \ +curl -fsSL https://github.com/jclima/VesselStack/releases/download/v0.6.1/get-vesselstack.sh \ | sudo bash -s -- --yes --set BOAT_NAME=Foo --set SOCKETCAN_ENABLE=true # every question's own default answer, nothing asked -curl -fsSL https://github.com/jclima/VesselStack/releases/download/v0.6.0/get-vesselstack.sh | sudo bash -s -- --defaults +curl -fsSL https://github.com/jclima/VesselStack/releases/download/v0.6.1/get-vesselstack.sh | sudo bash -s -- --defaults # a ready-made vesselstack.env (optionally with --set overrides) sudo bash get-vesselstack.sh --yes --config ./vesselstack.env --set BOAT_NAME=Foo ``` @@ -357,8 +357,8 @@ script is wrapped in functions and ends with a single `main "$@"` call, so a truncated download cannot half-run. If you prefer to read it first (recommended): ```bash -curl -fsSLO https://github.com/jclima/VesselStack/releases/download/v0.6.0/get-vesselstack.sh -curl -fsSLO https://github.com/jclima/VesselStack/releases/download/v0.6.0/get-vesselstack.sh.sha256 +curl -fsSLO https://github.com/jclima/VesselStack/releases/download/v0.6.1/get-vesselstack.sh +curl -fsSLO https://github.com/jclima/VesselStack/releases/download/v0.6.1/get-vesselstack.sh.sha256 sha256sum -c get-vesselstack.sh.sha256 less get-vesselstack.sh sudo bash get-vesselstack.sh @@ -380,7 +380,7 @@ from the end-to-end guide: ```bash git clone https://github.com/jclima/VesselStack.git cd VesselStack -git checkout v0.6.0 +git checkout v0.6.1 python3 vesselstack-wizard.py --cli # terminal questions (no browser) # python3 vesselstack-wizard.py # or the optional browser wizard ``` @@ -427,7 +427,66 @@ before carrying an update to a boat without internet access. ## Upgrading to 0.6.0 Read this before updating an installed system. Update from [Updating](#updating) with a backup -on a mounted external drive, not while underway. +on a mounted external drive, not while underway. This section applies to 0.6.0 and 0.6.1. + +**Settings that say `BOAT_UNITS=nautical` (fixed in 0.6.1).** Older setup wizards offered +"nautical" as a units choice, and installers before 0.5.7 did not check it, so such a +`vesselstack.env` may exist. 0.6.0 refused it with `BOAT_UNITS must be us_customary or metric` +and stopped the update before changing anything. From 0.6.1 the installer reads `nautical` as +`metric` (metres for depth; knots and nautical miles are kept in both systems), prints one +`Note:` line, and a real install or update rewrites `vesselstack.env` with `BOAT_UNITS=metric` +(a dry run only prints the note). The setup wizard and the Control Panel also show it as Metric +without changing it. Any other unsupported value is still refused before anything is changed, +now with a message naming the file and the fix. If you are stuck on 0.6.0, change the value +by hand and run the update again: + +```bash +sudo sed -i 's/^BOAT_UNITS=.*/BOAT_UNITS=metric/' /opt/vesselstack/config/vesselstack.env +``` + +**Backup drive not mounted (0.6.1).** When the backup folder is under `/media` or `/mnt` and the +drive is not mounted, `get-vesselstack.sh` and (from an installed 0.6.1) `vesselstackctl update` and +`vesselstackctl backup` no longer just stop: before anything is stopped or changed they ask +whether to mount the drive from `/etc/fstab`, pick a connected USB drive, check again, or back up +to the system disk once. See [Backups](#backups). A direct `sudo vesselstackctl update