Skip to content

Authorize the quiet boot migration without sudo -v - #15729

Merged
dhh merged 2 commits into
omacom:quattrofrom
filipenevola:fix-limine-migration-sudo-v
Nov 18, 2026
Merged

dhh merged 2 commits into
omacom:quattrofrom
filipenevola:fix-limine-migration-sudo-v

Conversation

@filipenevola

Copy link
Copy Markdown
Contributor

Summary

Migration 1791898365 (#15301) checks for an unreadable Limine menu with sudo -v before running sudo test -f. Under sudo's default verifypw=all, sudo -v asks for a password whenever any of the user's rules needs one, even when every command runs passwordless. That puts the #9066 failure back on the update path: omarchy update -y on a passwordless machine stops at the prompt after packages are already upgraded, and the run aborts.

This change authorizes with sudo true, the same approach omarchy-update uses (#13323). A denied prompt still makes the command fail, so under bash -euo pipefail the migration stays pending, which is what the original comment requires.

Fixes #15728

Test plan

  • Updated test/shell.d/limine-quiet-boot-migration-test.sh so its sudo stub behaves like passwordless sudo under verifypw=all: commands run, -v fails. Before the fix the test fails on the "no Limine menu" case. After the fix all seven cases pass.
  • The denied-prompt case (every sudo command fails) still leaves the migration failing and the menu untouched.
  • test/shell.d/config-test.sh and test/shell.d/migrate-notify-test.sh pass.
  • On the affected machine, with this change applied by hand, the pending migrations completed and a second omarchy update -y finished.

🤖 Generated with Claude Code

Under sudo's default verifypw=all, sudo -v asks for a password even when
passwordless sudo is enabled, so an unattended omarchy update stopped on
this migration's prompt. Run a command instead, as omarchy-update does.

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

greptile-apps Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This change appears safe to merge.

Summary

Replaces sudo -v with sudo true in the quiet boot migration.

  • The quiet-boot migration authorizes passwordless commands without using sudo -v.

Reviews (2) · Last reviewed commit: "Merge quattro, dropping the migration te..." · Reviewed by Greptile

@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Oct 18, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed and verified; nothing found that needs changing.

Reproduced on a disposable worker built from the Omarchy ISO, with /boot mounted fmask=0077 and a user holding the stock ALL=(ALL) ALL rule beside NOPASSWD: ALL, the shape omarchy sudo passwordless leaves. There sudo -n -v asks for a password while sudo -n true succeeds. Run with no terminal, as an unattended update runs it, the migration on quattro stops at sudo -v ("a terminal is required to read the password") and exits 1; at this head it completes. With the NOPASSWD rule removed, this head still exits 1 at sudo true, so a denied prompt leaves the migration pending as the original comment requires.

The updated test/shell.d/limine-quiet-boot-migration-test.sh fails on the "no Limine menu" case with sudo -v put back and passes with the fix. ./test/cli and the limine, config and migrate-notify shell tests pass at 0ca916c, and again with it merged onto current quattro (4e059ac).

Second opinion: Codex at medium effort reviewed the diff and found no defects. It agreed the problem is real and the change proportionate, and that the other sudo -v calls (omarchy-upgrade-to-quattro, omarchy-sudo-keepalive) are not reached by omarchy update. It could read this review as it went, so its agreement is not guaranteed independent.

#15527 also edits this migration and changes the same line of the test's sudo stub, so whichever lands second will need that line reconciled. They fix different bugs and do not compete.

This is waiting on the maintainer.

quattro removed migration tests in omacom#16302 (migrations get no suite test), so the test this branch changed goes with them; the migration fix stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Nov 1, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

This had stopped merging cleanly, so I merged current quattro (1843592) into the branch as cdac276. The only conflict was test/shell.d/limine-quiet-boot-migration-test.sh, which quattro removed in #16302 along with every other migration test (AGENTS.md now says migrations get no suite test), so the merge takes that deletion. The change against quattro is now just the sudo -v → sudo true line and its comment in migrations/1791898365.sh, the same as your commit had it. The test changes the description mentions are no longer part of the diff.

I re-verified the merged head on a disposable worker built from the Omarchy ISO, with /boot mounted fmask=0077, the stock passworded rule, and the exact omarchy ALL=(ALL) NOPASSWD: ALL line omarchy-sudo-passwordless writes. There sudo -n -v asks for a password while sudo -n true succeeds. Run with no terminal, the migration on quattro exits 1 at sudo -v, and so does this head with the fix reverted. This head applies timeout: 1 and quiet: yes, and a second run changes nothing. With the NOPASSWD rule removed, it still exits 1 at sudo true and leaves the menu untouched, so a denied prompt keeps the migration pending. ./test/cli and the migrate-notify, migrate-scope, factory-reset-limine and update-sequence shell tests pass at cdac276.

Second opinion: Codex at medium effort and muse-wonder (via pi, thinking high) each reviewed the merged diff and the conflict resolution and found no defects. Both agreed the deletion follows quattro's rules, that a denied sudo true still stops the migration before omarchy-migrate marks it done, and that the change matches omarchy-update. They could read this review as it went, so their agreement is not guaranteed to be independent.

#15527 still edits this migration for a different bug. With the test gone, the two no longer touch the same lines.

This is waiting on the maintainer.

@dhh
dhh merged commit 78a3148 into omacom:quattro Nov 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

omarchy update stops on sudo -v in the quiet boot migration under passwordless sudo

3 participants