Repository navigation
Wait for the clock to sync before updating when it is behind the keyrings - #19587
seanfreiburg wants to merge 1 commit into
Conversation
…ings Apple Silicon reads its RTC as 1970, so an update started right after boot ran on an epoch clock and failed in the keyring step with keys "created in the future". omarchy update now runs omarchy-update-time --if-behind first: a clock older than the installed keyrings restarts timesyncd and is waited for, and stops the update with the reason if it never syncs. Fixes omacom#19584 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryAdds
Review was based on code inspection; no tests were run.
|
|
GPT-6 High in Codex read this diff, the update/keyring call paths, the No worker tests or reproduction ran, and no second model completed a review of this pull request. The availability check found that the primary reviewer, Opus 5.5 High, did not answer; the muse-wonder panel member answered the availability probe only. This is waiting on the maintainer to restore classification/review availability and rerun triage before verification can continue. |
What changes
Fixes #19584.
Apple Silicon reads its RTC as 1970, so for the first minute or so after boot the system clock sits at the epoch until timesyncd syncs. An
omarchy updatestarted in that window failed inomarchy-update-keyring: gpg rejected every key as "created 20682 days in the future", and pacman-key stopped withcould not be locally signed. The snapshot and the dev checkout's HTTPS fetch run earlier on the same clock, so they were wrong too.omarchy updatenow runsomarchy-update-time --if-behindright after sudo authorization, before pruning, the snapshot, the dev fetch, the keyrings and the main transaction:/usr/share/pacman/keyrings, i.e. provably behind. Any other clock is left alone, so a network that blocks NTP adds no wait to every update.systemd-timesyncd(only if that is the running NTP client, so chrony is not displaced) and waits up to 30 seconds.Plain
omarchy-update-time(Update › Time) behaves as before.Related: #13629 waits for NTP before snapshotting, for the opposite dual-boot clock-ahead case. #15019 and #18434 make timesyncd resync sooner.
Verification
test/shell.d/update-time-test.sh, fully stubbed (sudo,systemctl,timedatectl,sleep): a clock behind the keyrings restarts timesyncd and waits until it syncs; one that never syncs fails with the reason and leaves a non-timesyncd NTP client alone; an unsynced clock past the keyrings returns at once. The last two fail on the base branch.omarchy-update-timeand ran a realsystemctl restart.update-time,update-sequence,update-lock,update-disk-space,update-hangup,update-hook-security,update-user-path,update-boot-verify,update-restart-phasesand./test/cli: all pass.RTC time: 1970-01-01, and timesyncd's initial sync came after the failed update. I haven't yet booted it with this branch and updated inside that window.Screenshots
No visible change: update-pipeline step; the only output is a terminal message when the clock is behind.
🤖 Generated with Claude Code