Skip to content

Make the pacman keyring in the background during a first install - #19022

Merged
dhh merged 3 commits into
quattrofrom
install-pacman-keyring-background
Nov 15, 2026
Merged

dhh merged 3 commits into
quattrofrom
install-pacman-keyring-background

Conversation

@dhh

@dhh dhh commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

What changes

On aarch64 (except Apple Silicon), install finalization makes the machine's pacman keyring with pacman-key --init and --populate. It was the slowest step of a recent install at 3.7s, of about 18s in total, and it ran at the very end of system setup although nothing before it needs the keyring.

  • install/config/pacman-keyring.sh now starts it first thing in system setup, in the background, in a directory of its own (/etc/pacman.d/gnupg.omarchy-next). The rest of setup keeps using the keyring the image has.
  • install/post-install/pacman.sh waits for it on a lock, then moves it into place over the image's keyring. If it failed or never started, that step makes the keyring inline, as before.
  • Only a first install starts one. An upgrade's keyring may hold keys the user added, so it's left as it was.
  • Image builds still leave the keyring to each machine's first boot, unchanged.

Expected saving: most of the 3.7s, since config, hardware and login setup together take about as long and now run alongside it. I haven't measured it on a real install yet.

Verification

  • image-deferred-hardware-test.sh gets three new cases:
    • on a first install, finalization waits for a keyring still being made (its --populate is held until the test releases it), then moves it into place over the image's, with no second keyring made;
    • a background run that fails is made in finalization instead, leaving nothing behind;
    • an upgrade starts no keyring.
  • The existing keyring, image-build and first-boot cases pass unchanged, as do pacman-templates-test.sh, hardware-quirks-test.sh, region-pacman-test.sh and channel-switch-test.sh.

No visible change: install-time setup only.

🤖 Generated with Claude Code

Making it took 3.7s at the end of system setup on aarch64, and nothing
before that step needs it. It now starts first thing, in a directory of
its own, and finalization waits for it and moves it into place. A run that
fails or never started leaves finalization to make it, as before, and an
upgrade keeps its keyring.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The changes since the previous review appear safe to merge.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The changes since the previous review appear safe to merge.

Summary

The PR makes the pacman keyring in the background during a first install on supported ARM machines.

  • First installs prepare the pacman keyring while the rest of setup runs.

Reviews (4) · Last reviewed commit: "Stop the keyring test's held jobs when i..." · Reviewed by Greptile

The background job's --populate now blocks until the test releases it, so
a finalization that didn't wait on the lock would finish early and fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dhh
dhh merged commit c054e66 into quattro Nov 15, 2026
3 checks passed
@dhh
dhh deleted the install-pacman-keyring-background branch November 15, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant