Repository navigation
Keep Snapper off non-Btrfs roots - #6730
yashranaway wants to merge 10 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Guards Snapper’s Btrfs-only root setup and repairs affected non-Btrfs installations.
Changes:
- Detects the root filesystem before configuring Snapper.
- Adds non-Btrfs cleanup and service disablement.
- Adds migration and shell-test coverage.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
install/config/snapper.sh |
Gates setup and removes invalid configuration. |
migrations/1786482992.sh |
Repairs existing non-Btrfs installations. |
test/shell.d/snapper-test.sh |
Tests filesystem-specific behavior and migration. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
abadc77 to
b5d583f
Compare
Snapper's root configuration and Limine integration only work on Btrfs, but system setup installed and enabled them on every filesystem. Gate setup on the root filesystem and remove the impossible Btrfs root config from affected machines while preserving any other Snapper configuration.\n\nAdd an idempotent migration and regression coverage for Btrfs, non-Btrfs, and mixed-config systems.
b5d583f to
6899005
Compare
|
Can we tag this as high priority since it's breaking the upgrade and leaves it in a limbo state? |
|
I do not have permission to add upstream labels, but the upgrade-blocking impact is documented in the PR. |
|
Reviewed at Reproduction, on a real ext4 root (a chroot into an ext4 image on the worker, running the real
Tests: Second opinion: Codex at medium effort reviewed the same head and found no execution defect in the setup or migration paths. It also found, as I did, one gap that this change leaves open:
Waiting on the maintainer: to merge this, and to decide on that warning. |
|
|
Fixed the remaining guidance issue: unconfigured ext4 users now see that automatic snapshots require Btrfs, while Btrfs users retain setup advice. Snapshot creation and Snapper regressions pass. |
|
Re-reviewed at Reproduction, on a real ext4 root (a chroot whose
Tests: Second opinion: Codex at medium effort reviewed the same head. It agreed that the change is proportionate, that the ISO, upgrade and migration callers all see the target's own root, and that the Btrfs path is unchanged; its independence is not guaranteed. It also found something I checked against
Fixes #6683, now linked. #9633 and #10428 change the same lines in Waiting on the maintainer. |
`SNAPPER_CONFIGS= # root home` is an empty assignment to bash and to snapper. The parser stripped the whitespace after `=` before looking for a comment, so the value became `# root home`, and with no root config present the repair rewrote it as `SNAPPER_CONFIGS="# home"`, registering whatever the comment named. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
|
Re-reviewed at Pushed: Reproduction, on a real ext4 root (a chroot whose
Tests: Second opinion: Codex at medium effort reviewed Fixes #6683, linked again since the description was edited. Waiting on the maintainer. |
|
Closing as out of scope: Omarchy now supports only installs made from the official Omarchy ISO, and this change exists for a root filesystem other than Btrfs, which the ISO doesn't produce. We aren't taking on code paths for setups outside that, because nobody here can test or maintain them. Thanks for the work that went into this. (Checked by Claude Opus 5.5; no second review.) |
Keeps the Btrfs-only Snapper root config and Limine integration off ext4 and other non-Btrfs installs. Existing affected machines are repaired without disturbing other Snapper configs.
<<<< AI wording below >>>>
Problem
install/config/snapper.shinstalls a root config withFSTYPE="btrfs"and enables Snapper cleanup plus Limine snapshot sync on every filesystem. On a non-Btrfs root, both services fail repeatedly and the phantom root config also makes pre-update snapshot creation abort.Fix
Gate automatic root snapshot setup on Btrfs. On other filesystems, remove the invalid root config and stale root registration, including partially cleaned installs, while preserving other shared settings and comments. Keep cleanup only for remaining registered config files. Give unconfigured non-Btrfs users accurate filesystem guidance.
Verification
bash test/shell.d/snapper-test.shpasses. Changed Bash files pass syntax checks andgit diff --checkpasses. Snapshot creation tests also pass. Package and ISO assertions use the companion checkouts; no live filesystem setup was changed.Review follow-up, 1 October
The registration parser handles literal single-quoted, double-quoted, and unquoted SNAPPER_CONFIGS values. An embedded hash in an unquoted config name stays literal; only a whitespace-separated hash starts a comment. Cleanup remains available for registered config files, and removing stale root registration preserves unrelated settings.
Focused regressions, Bash syntax, command metadata, and diff checks pass. Hardware and live Hyprland behavior were not exercised on this host.
Fixes #6683