Repository navigation
Ship the complete passwordless-sudo lifecycle in settings-dev - #645
spencerbull merged 5 commits into
Conversation
592ec4a to
0a3dfc8
Compare
|
Thanks for tracking this down. The missing hook is exactly why It doesn't hold past the next update, though. The hook runs This also overlaps #257, which ships the same hook from The rest checks out. The hook is installed byte-for-byte at 0644 and passes the helper's exact-match and ownership checks. The helper and Next step: the maintainer decides between landing #257 and extending this PR with a settings-dev Reviewed by Opus 5.5 in Claude Code, with Codex XHigh as a second opinion. Codex reached the same finding on the marker from the same lines, but the prompt pointed it there, so that's agreement rather than an independent find. Checked by reading the source and running upstream's lifecycle test, not by installing built packages. |
|
I've pushed a rework of this branch ( What changed. The scriptlet and two of the tests come from @AFOliveira's #257, credited on the commit. This is effectively #257's dev half. Once it lands, #257 reduces to the stable pair for the release that carries the hardened helper. Tests added:
I broke the fix on purpose several ways to confirm the tests catch each one: the hook back in On Proxmox workers, each flow ran on a fresh Omarchy 4.0.4 worker. Packages were built from
Not covered: packages built or installed on aarch64 (only its Reviewed by Opus 5.5 in Claude Code, with Codex XHigh as the second opinion on the reworked diff. Codex found no defect in the packaging. It traced the ownership move and hook/scriptlet ordering through libalpm's source, and the dependency floor through the build planner and upstream sync. It also found that nothing checked the recipe still registers its scriptlet; that check is the second commit. This is waiting on a maintainer. The title and description above still describe the original one-line change. |
|
Update, now at What changed since my last comment. The first CI run on the reworked branch failed both
Re-checked on fresh Proxmox workers with packages rebuilt from this head. Today's edge is -1/-4, this pair is -2/-5, and a settings-only bump is -6. pacman ran with
Reviewed by Opus 5.5 in Claude Code, with Codex XHigh as the second opinion on both new commits. On |
|
Verified from my side at The rework direction looks right — shipping the full grant lifecycle in Happy with this as the merge shape — over to you for merge. |
ef07c51 to
417c2f1
Compare
|
Rebased onto master ( Upstream didn't change the helper, the library, the hooks or Re-checked at
|
417c2f1 to
c35e69a
Compare
|
Rebased onto master The conflict was the upstream pin bump
Verified locally: |
c35e69a to
942d77b
Compare
|
Rebased onto master 5a49a3f to resolve the conflicts. The conflict was the upstream pin bump r6689.gb421b1b -> r6691.g8b4eae6 colliding with this branch's pkgver/pkgrel in both dev PKGBUILDs. Resolution keeps master's new pin with the PR's pkgrel=2:
Verified locally: passwordless-package-files.sh PASS (both arches), passwordless-package-lifecycle.py 11/11 PASS. CI re-running on the pushed head. |
1481961 to
556ae8e
Compare
|
Rebased onto master ( The rebase. Edge publishes What the review changed. The conflict floor is gone. It had to name the last settings-dev release without the helpers, and that version moves with every upstream pin bump and every settings-only
On fresh Proxmox workers with packages built from
Reviewed by Opus 5.5 in Claude Code, with Codex XHigh as the second opinion. On the rebased head it confirmed the four numbers against the published versions. It found the stale-floor gap independently, with a concrete settings-only-bump case, and proposed the capability. On the capability commit it checked the built archives and ran libalpm checks for each transition, and found no defect. It noted that the test read settings-dev's |
556ae8e to
b73c53a
Compare
ryanrhughes
left a comment
There was a problem hiding this comment.
Builds and tests pass on b73c53a for both packages and both architectures. Ships the full grant lifecycle in omarchy-settings-dev as docs/passwordless-sudo.md describes, which fixes passwordless sudo on edge.
|
Current-head CI follow-up for The failure occurs before that package builds. The other three package/architecture builds passed, and Tests passed build isolation and self-tests. This is a key-fetch/build-environment failure, not a reported sudo lifecycle assertion failure; the current ARM runtime build still needs a successful run. Could a repository maintainer rerun the failed jobs on this head? I inspected the logs only; no code changes or additional host-side validation are claimed. |
|
Reviewed again at This matters more now than it did. #896 landed today and ships the Checked on fresh Proxmox workers, with packages built by
One sequence breaks, and the fix is upstream. Not covered: installing on aarch64 (only its Reviewed by Opus 5.5 in Claude Code, with Codex XHigh as the second opinion, run twice on |
|
@spencerbull Thanks for reproducing the pkg-test ownership-transfer failure. I have prepared a local source-side fix that builds the entire requested package set first and installs its archives in one pacman -U transaction. The command-level regression rejects the original sequential install, checks that a failed second build installs nothing, and retains explicit single-package alias behavior. The focused checks, complete CLI suite, bin style check, and git diff --check pass. No real package transaction was run on the development machine. Published as befcecb3 (fix) and f7eaf229 (regression coverage), with a draft source PR at omacom/omarchy#14844. It does not change the approved packaging implementation. Also acknowledging the description correction: after #896 the revoke hook is shipped, but the incomplete-transaction marker still needs the recovery implemented here. The opening description's absent-hook premise is now stale. |
The hardened omarchy-sudo-passwordless publishes a grant only when its revocation hook is installed and no package transaction has left /run/omarchy-sudo-passwordless-package-removing behind. The hook sets that marker before every settings upgrade, and the settings scriptlets are what clear it, so shipping the hook alone let the first grant work and then refused every grant after the next update until a reboot. omarchy-settings-dev now ships the command, omarchy-security-functions, the boot cleanup rule and the hook together, with the scriptlets from omacom#257 that revoke before the package changes and clear the marker once no grant remains. omarchy-dev stops shipping the two helpers and requires the settings release that does: without it omarchy-update has no library to source. Co-authored-by: Afonso Oliveira <afonso.oliveira707@gmail.com>
…ercises The lifecycle test reads the .install file directly, so it kept passing with the recipe's install= line gone, which is the one change that would strand the hook's marker again. Co-Authored-By: Codex XHigh <noreply@openai.com>
The dev pair builds each package on its own against the published edge repository, in the PR build and in publish alike, so omarchy-dev cannot require a settings-dev release that only this change produces: the floor failed both omarchy-dev builds on this PR, and an exact pkgver match would fail the same way on every upstream pin bump. Nothing needs it. The upstream watch moves both pins together, publish stops the run before anything is published when one package fails, and a new settings-dev over an old runtime is refused on the files they would both own.
With the dependency unversioned, a new omarchy-dev could still install over a settings-dev that is held back or not yet published, removing omarchy-security-functions from both, and omarchy-update cannot start without it. A versioned conflict refuses that pairing at install time without constraining the per-package builds, which resolve only depends. Co-Authored-By: Codex XHigh <noreply@openai.com>
The conflict named the last settings-dev release without the helpers, a version that moves with every upstream pin bump and settings-only pkgrel while this change waits to merge, and a rebase that kept a stale floor still passed the tests while the published release slipped past it. omarchy-settings-dev now provides omarchy-security-functions and omarchy-dev's package() requires it. makepkg checks only the top-level depends before building, so the per-package builds still resolve against the published repository, while pacman refuses a runtime without a settings release that ships the library, and pulls that release in when only the runtime is asked for. Co-Authored-By: Codex XHigh <noreply@openai.com>
a41190e to
99cf1d8
Compare
Publish succeeded → livePackages: omarchy-dev (x86_64, PR artifact); omarchy-dev (aarch64, PR artifact); omarchy-settings-dev (x86_64, PR artifact); omarchy-settings-dev (aarch64, PR artifact)
Some planned slots did not run because an earlier slot failed. |
omarchy-settings-dev took over the temporary sudo grant command, its library, and the revocation hook in omacom#645. 4.5.0 is cut from quattro, which ships them, so the stable pair needs the same split before its RC pin: settings ships the helpers and hook, provides omarchy-security-functions, depends on sudo and runs the grant transition from its scriptlet, while omarchy stops shipping the helpers and requires the library. The PKGBUILD side is conditional on the source carrying the revocation hook, so an older pinned source still builds with the grant command in omarchy. The tests now cover both pairs and that older layout.
Edge now ships the passwordless-sudo revoke hook through
omarchy-dev, but a settings transaction leaves its package-transition marker set. Subsequent grant enabling is refused until reboot. This change ships the complete grant lifecycle inomarchy-settings-dev, so upgrading or removing settings revokes active grants and a completed reinstall permits enabling them again without a reboot.Settings owns the grant helper, security library, boot cleanup rule, and revoke hook. Its scriptlet sweeps stale grants and clears the transition marker only after successful installation.
omarchy-devrequires the security-library capability in built package metadata, preventing an incompatible runtime/settings pairing without requiring an unpublished dependency during isolated builds. The release packages are unchanged.CI on the reviewed packaging head reports successful Tests and all four package builds. Spencer's latest review records fresh-worker validation of the ownership transfer, recovery from the stuck marker, settings-only upgrades, and timer expiry. See that review for its aarch64-install, ISO, and stable-package limitations.
Separate developer-tool follow-up:
omarchy dev pkg-testinstalls each archive in its own pacman transaction. Across this ownership move, that sequence can delete transferred helpers. omacom/omarchy#14844 builds both archives first and installs them in one transaction; normal repository upgrades were verified in the packaging review.