Repository navigation
Share one sudo authorization until migrations - #13321
Closed
shawnyeager wants to merge 1 commit into
Closed
shawnyeager wants to merge 1 commit into
shawnyeager wants to merge 1 commit into
Conversation
omarchy update put the no-update sudo wrapper on for the whole run, so every sudo prompted and none of them saved a timestamp. Cache sudo for the fixed helpers before migrations, then revoke and install the wrapper at omarchy-migrate. Stay-awake start authenticates with sudo -N and no longer clears a timestamp it did not create.
This was referenced Sep 26, 2026
Contributor
|
Thanks for the thorough analysis in #13319. Closing in favor of #13323. The call there is one password for the whole update, including migrations, the post-update hook and mise. AUR updates are the one exception: they run last, with no saved password, through the no-update wrapper. #13323 also covers the stay-awake revocation you identified. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #13319.
omarchy updateon r2304 asks for the sudo password on every privileged command. The run this morning prompted four times before snapshot cleanup (paccache,snapper list-configs,snapper create,snapper cleanup) and never finished.bin/omarchy-updaterevoked the timestamp and installeddefault/omarchy/sudo-no-update/sudobefore any work. That wrapper execssudo -N.--no-updateauthenticates and does not write a timestamp, so the nextsudohas nothing to reuse.omarchy-update-stay-awake startthensudo -ks on the way in and on the way out, which clears the account timestamp in the middle of the run.#9469 keeps hooks, AUR builds, mise, and channel hooks from reusing an update's authorization. Migrations are the mixed-trust boundary: they interleave user-controlled code with later privileged repairs. The cold wrapper belongs there, not on prune and snapshot.
This does that.
omarchy-migrate, prune, snapshot, keyring, and pacman share one cached sudo. The command path stays fixed. A channel switch that already exportedOMARCHY_SUDO_NO_UPDATEkeeps its wrapper and does not open a caching window.omarchy-migratethe timestamp is revoked and the no-update wrapper goes on for the rest of the run, including orphan removal and service restarts. Those two run after migrations, so a caching sudo there would republish a ticket for anything a migration started.omarchy-update-stay-awake startusessudo -Nonly. It can borrow the cached timestamp without refreshing it, and a successful start no longer revokes. A failed or cancelled launch still revokes.stopstill revokes on entry and exit.#13268 describes the same failure and stops the global wrapper install, but it leaves stay-awake clearing the ticket and it leaves migrations on caching sudo. The tests there stub both, so they stay green.
Verified with
update-hook-security,update-user-path,update-sequence,update-lock,channel-sudo-boundary,update-stay-awake-security, andupdate-pkg-prune.