From 78b2f420a5b8c8dfe49a4a8691d524efb2e0b990 Mon Sep 17 00:00:00 2001 From: Breadway Date: Sun, 5 Jul 2026 09:16:22 +0800 Subject: [PATCH] Fix snapper ALLOW_USERS seeding: set-config, not a fragile sed The sed matched snapper's default config template text exactly (ALLOW_USERS=""), so any drift in that template across snapper versions made it silently no-op -- leaving ALLOW_USERS empty and every non-root snapper call (including bos-settings' Snapshots page) failing with "No permissions." forever, with no error surfaced anywhere at install time. `snapper -c root set-config` is the stable API regardless of template wording. --- iso/airootfs/etc/calamares/post-install.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/iso/airootfs/etc/calamares/post-install.sh b/iso/airootfs/etc/calamares/post-install.sh index 025178e..7899e67 100644 --- a/iso/airootfs/etc/calamares/post-install.sh +++ b/iso/airootfs/etc/calamares/post-install.sh @@ -320,8 +320,14 @@ if command -v snapper &>/dev/null; then sed -i 's/NUMBER_MIN_AGE="[^"]*"/NUMBER_MIN_AGE="1800"/' /etc/snapper/configs/root sed -i 's/NUMBER_LIMIT="[^"]*"/NUMBER_LIMIT="10"/' /etc/snapper/configs/root sed -i 's/NUMBER_LIMIT_IMPORTANT="[^"]*"/NUMBER_LIMIT_IMPORTANT="5"/' /etc/snapper/configs/root + # set-config (not sed) — snapper's own template text for this line has + # drifted across versions before, and a sed that doesn't match just + # silently no-ops, leaving ALLOW_USERS empty and every non-root + # `snapper` call (bos-settings' Snapshots page included) failing with + # "No permissions." forever. set-config is the stable API regardless + # of template wording. [[ -n "$MAIN_USER" ]] && \ - sed -i "s/ALLOW_USERS=\"\"/ALLOW_USERS=\"$MAIN_USER\"/" /etc/snapper/configs/root + snapper -c root set-config "ALLOW_USERS=$MAIN_USER" else echo "ERROR: snapper config for root still missing after 3 attempts — snapshots/rollback will not work on this install" fi @@ -369,7 +375,8 @@ fi # is bakery-managed, not pacman: the binaries and bakery manifest live in # /etc/skel/.local (baked in at ISO build time) and are copied into the user's # home below, so the install works fully offline with no DNS for bakery/GitHub. -# bos-settings is the only pacman bread package and was installed by unpackfs. +# bos-settings and breadhelp are the only pacman bread packages and were +# installed by unpackfs. # --------------------------------------------------------------------------- # Deploy dotfiles + the bakery bread ecosystem into the user's home (Calamares