Repository navigation
Trust no asahi-alarm key on a Mac - #155
Conversation
Omarchy 4.6 builds every Mac package from source in omacom/omarchy-pkgs and drops the [asahi-alarm] repository. The platform root names no keyring for omarchy update to refresh, first boot populates only Arch Linux ARM's (and Omarchy's) keys, and the hardware check fails a Mac that still configures [asahi-alarm].
omarchy-mac 0.2.7 ships omarchy-mac-drop-asahi-alarm, run as root by a oneshot unit at boot and after every pacman transaction until it records a verified cleanup. It waits for pacman to release its database, keeps the repository while anything still requires or lists the keyring, then drops the [asahi-alarm] section (following a symlink, keeping mode and owner), the keyring package and key 12CE6799 by fingerprint. What came from the repository is recorded once, and what [omarchy] does not take over is reported, such as asahi-alarm's steam sorting above Omarchy's. mac-check warns while the cleanup is pending and fails only when the repository comes back after it.
0e93aa0 to
9457717
Compare
An older Omarchy's pacman templates still carry [asahi-alarm], so a channel switch or omarchy-refresh-pacman can write it back after the move. The helper now treats done as standing only for a pacman.conf without it: with the repository back it clears done and moves off it again behind the same guards. The unit no longer stops at the marker, and the hook queues a marked machine only while [asahi-alarm] is back. mac-check warns on a returned repository instead of failing, since the next boot or pacman transaction removes it.
[High impact] The PR changes repository trust and cleanup across Apple Silicon Macs. The reviewed stack appears safe to merge under the stated release hold, with two non-blocking cleanup gaps. FindingsSummaryRemoves automatic trust in the asahi-alarm key and adds a guarded cleanup service for installed Macs.
|
| Operation = Install | ||
| Operation = Upgrade | ||
| Target = * |
There was a problem hiding this comment.
The hook runs after installs and upgrades, but not removals. If cleanup is waiting for a package that requires asahi-alarm-keyring, removing that package does not queue another attempt. Cleanup waits for a reboot or an unrelated install or upgrade. Add Operation = Remove so removing the last blocker also retries cleanup.
| Operation = Install | |
| Operation = Upgrade | |
| Target = * | |
| Operation = Install | |
| Operation = Upgrade | |
| Operation = Remove | |
| Target = * |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| comm -12 <(pacman -Slq "$repo" | sort -u) <(pacman -Qq | sort) >"$state/inventory.new" | ||
| mv -f "$state/inventory.new" "$state/inventory" |
There was a problem hiding this comment.
Failed queries erase package warnings
If the repository database is missing or unreadable, pacman -Slq can fail without making comm fail. The helper then saves an empty inventory file and never rebuilds it. Later reports permanently miss packages that no longer get updates. Check that both package queries succeed before saving the inventory.
Warning
Blocked by issue 08 (omacom/omarchy: remove
[asahi-alarm]from the Apple pacman.conf templates and installed Macs). Do not merge before it. Installed Macs and current images still have[asahi-alarm]withSigLevel = Required; a Mac whose first boot skips its key can't verify that repository.Summary
Omarchy 4.6 builds every Mac package in omacom/omarchy-pkgs and drops the asahi-alarm repository. This stops the Mac packages from trusting its key.
omarchy-mac-drop-asahi-alarm(moved here from omacom/omarchy#19261's migration)It installs and upgrades nothing. The update that brought this release already took the aurora-* replacements and higher-pkgrel builds from
[omarchy], which is listed first. The omarchy-mac release that carries it (0.2.8: edge's 0.2.7 is the earlier #161 release, without it) is published to a channel only together with the imports. Per CONTRIBUTING, its version bump is a separaterelease/omarchy-mac-0.2.8pull request after this merges. An older Omarchy's pacman templates still carry[asahi-alarm], so a channel switch oromarchy-refresh-pacmancan write it back after the move; the helper then drops it again behind the same guards. Pending runs exit 0 with the reason in the journal, so they never fail the unit or an update. Omarchy's update lock is per user ($XDG_RUNTIME_DIR), so a root unit can't take it; the unit uses pacman's database lock plus its ownflockinstead.omarchy-update-keyringreadskeyringsonly if it exists, so removing the file leaves just Arch's and Arch Linux ARM's keyrings.Follows omarchy-mac-pkgs#154 (merged). Removing
[asahi-alarm]from package resolution is a separate draft, because it only resolves once omarchy-mac and omarchy-mac-boot without the keyring dependency are on edge.Release together with:
asahi-alarm-keyringfrom both recipes, re-pinned to this merge[asahi-alarm]and its keyringEvidence
mac-first-boot-test.sh:--populate archlinuxarm asahi-alarm[ omarchy]--populate archlinuxarm[ omarchy]desktop-setup-test.sh:keyringsstaged, namingasahi-alarm-keyringkeyringsin the platform rootmac-check-test.sh:[asahi-alarm]configured and no marker →WARN repos [asahi-alarm] cleanup pending…, exit 0. With the marker →WARN … is back in pacman.conf after its cleanup; … removes it again at the next boot or pacman transaction, exit 0.drop-asahi-alarm-test.sh(new, ported from Take the Apple Silicon packages from Omarchy instead of Asahi ALARM omarchy#19261'sasahi-alarm-repo-migration-test.sh), 13 ok:[omarchy]carriessteam1.0.0.87-2. The helper reportssteam 20241231-4: newer than omarchy's 1.0.0.87-2, so pacman keeps it; switch with: pacman -S omarchy/steam.Merge Danger
Door: one-way once released
A Mac that boots this first-boot with
[asahi-alarm]still in pacman.conf can't verify that repository. Hence the hold.Blast Radius: every new Mac install
First boot's keyring is created once per install.