feat(install): use exact native 0.x packages on fresh Linux hosts - #1359
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 23861768d6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if [[ "$#" != 2 || "${1:-}" != --tag ]]; then | ||
| usage >&2 | ||
| exit 2 |
There was a problem hiding this comment.
Update the README to pass the required release tag
Anyone following the primary Linux installation instructions in README.md:91-100 still pipes this script into bash without arguments, so this new guard exits with status 2 before installing anything while the README continues to promise a Docker installation. Update that entry point to use the exact-tag native flow and describe its new behavior in the same change.
AGENTS.md reference: AGENTS.md:L24-L25
Useful? React with 👍 / 👎.
| existing_paths=( | ||
| /opt/ftw /var/lib/ftw /etc/systemd/system/ftw.service | ||
| /etc/systemd/system/forty-two-watts.service | ||
| "$HOME/ftw/docker-compose.yml" | ||
| "$HOME/forty-two-watts/docker-compose.yml" | ||
| ) |
There was a problem hiding this comment.
Detect supported custom legacy install directories
For an existing Compose site created with the old installer's supported FTW_DIR override, such as /srv/ftw, none of these checks sees its docker-compose.yml. Running this fresh installer can therefore collide with the active container or create a blank native state alongside the preserved household state, despite the documented refusal of existing sites; inspect known running containers/services or require an explicit fresh-host acknowledgement rather than checking only two paths under the invoking user's home.
AGENTS.md reference: AGENTS.md:L20-L21
Useful? React with 👍 / 👎.
| if ! as_root systemctl enable --now ftw.service; then | ||
| as_root systemctl disable --now ftw.service || true | ||
| echo "FTW did not start; the verified package remains at /opt/ftw for inspection." >&2 | ||
| exit 1 |
There was a problem hiding this comment.
Keep failed fresh installations retryable
If the initial service start fails, this branch disables the unit but retains the ftw account, /opt/ftw, and /etc/systemd/system/ftw.service; every subsequent invocation is then rejected by the preflight checks at lines 57-65. The same dead end occurs when the later startup probe fails, even though its message explicitly says to inspect the journal before retrying, so the failure path should either remove the newly created artifacts or resume the exact staged installation.
AGENTS.md reference: AGENTS.md:L24-L25
Useful? React with 👍 / 👎.
New FTW sites need the published native 0.x package, while the old one-line installer still pulled a moving Docker image. The fresh Linux installer now requires an exact
v0.X.Y[-beta.N]tag and an explicit--fresh-hostacknowledgement. It checks the archive and checksum, stages it throughftw-launcher, then creates the native service. README and the setup guides point beta testers to this path and stop recommending the old Pi image for new installs.The installer refuses known old paths, services, the FTW account and an occupied port before downloading. A custom, stopped Docker site cannot be found by fixed path, so
--fresh-hostasks the operator to confirm that none exists. If the first install fails after host changes,--resume --tagrequires the same tag and package digest, checks the pending service, preserves persistent data, and retries the start. The pending record is removed only after the service stays active.This is for fresh 64-bit Linux beta hosts. It does not migrate 1.x, 2.x, 3.x or an earlier native site; those remain on their current version until the guided migration is tested.
releases/lateststill points to the legacy 2.x line.Validation:
make verifywith Bash 5, installer guard tests, checksum and receipt checks on both publishedv0.131.0-beta.1assets, and a read-only refusal onhomelab-rpibefore sudo or download while its existing service stayed active. A full fresh-host systemd install and a legacy migration still need field testing. The README edit is separate from the small README hunk in open PR #1051.