Repository navigation
Conversation
install.sh trusts the asahi-alarm master key before refreshing the package databases; the upgrade carries its own copy of that path and did not, so a 3.x Mac on a generic aarch64 base fails the refresh on an unknown key and reports a missing database from the package pass instead (omacom#235).
scottjones
left a comment
There was a problem hiding this comment.
The bootstrap itself is right — same fingerprint I verified against the installed asahi-alarm-keyring package, ordering pinned before the refresh, and pinning the key against install.sh's copy so the two cannot drift is a nice touch. One placement problem below.
| log "Adding the Omarchy ARM package repo" | ||
| printf '\n%s\n' "$block" | sudo tee -a /etc/pacman.conf >/dev/null | ||
|
|
||
| ensure_asahi_alarm_keyring |
There was a problem hiding this comment.
ensure_arm_package_repo returns early on its first line when [omarchy-aarch64] is already in pacman.conf, so the bootstrap called from here never runs on those machines. Confirmed with a fake pacman.conf carrying both stanzas: zero pacman-key invocations.
The two conditions are unrelated — #235 is about [asahi-alarm] present without its keyring — and the realistic way in is a retry: the upgrade fails during the package pass (exactly the symptom this fixes), the ARM stanza was already written on that attempt, so the second run takes the early return and skips the fix.
Suggestion drops the call from here:
| ensure_asahi_alarm_keyring |
and it wants to move into main() instead, just above ensure_arm_package_repo:
validate_quattro_tree
ensure_asahi_alarm_keyring
ensure_arm_package_repo
install_quattro_packagesThat is reachable whatever pacman.conf already contains, and reads more honestly — trusting a signing key has nothing to do with adding a package repo. Your ordering assertion still holds, since it stays above the refresh. (I could not attach a suggestion to main() directly, since those lines are not part of this diff.)
|
Move ensure_asahi_alarm_keyring into main before ensure_arm_package_repo; the current early return skips it whenever the ARM stanza already exists. Then rebase onto current quattro and rerun the retry case. |
install.shlearned to bootstrap the Asahi Alarm signing key before it refreshes the package databases (b3770ce, #229). The Quattro upgrade refreshes the same databases from its own copy of that code path and never got the same treatment, so a 3.x Mac that was put together on a generic aarch64 base still walks into #235 — just later, and with a worse error.ensure_arm_package_repoadds the[omarchy-aarch64]stanza and then runspacman -Sy. On a machine whose/etc/pacman.confalso carries[asahi-alarm]withoutasahi-alarm-keyringinstalled, pacman stops on the unknown master key:The refresh output is discarded and the failure is downgraded to a warning, so the upgrade continues and
install_quattro_packagesreports the misleadingdatabase file for 'asahi-alarm' does not existinstead — for a package that has nothing to do with the key.This ports
ensure_asahi_alarm_keyringfrominstall.shverbatim and calls it before the refresh. Both guards are kept: no[asahi-alarm]stanza means nothing to trust, and an already-installed keyring is left alone, so a Mac installed from the Asahi Alarm image (the common case) does not touch a keyserver on upgrade.The upgrade script is self-contained by design — 3.x users pipe it straight from
curl— so it carries its own copy rather than sourcing the installer. The test pins the fingerprint toinstall.sh's, since that is the part that would go quiet if the two ever drift.Tests
test/shell.d/upgrade-to-quattro-mac-test.shgains the wiring checks thatinstall-mac-test.shalready makes for the installer, plus a stubbed run of the function itself covering all three paths (no stanza, keyring present, keyring missing)../test/allhas four failures on my machine that are also present on a pristinequattrocheckout, so they are not from this change: two want a siblingomarchy-pkgscheckout for PKGBUILD coverage, and two need a live session (config-test's per-screen IPC count,theme-install-guards-test's URL check).Reverting the
bin/change alone fails the new test.Note
Overlaps textually with #250, which restructures the same function. Whichever lands first, I'll rebase.