Repository navigation
Apple owner provisioning through lifecycle dispatch entrypoints - #545
Merged
Merged
Conversation
…erface # Conflicts: # bin/omarchy-provision-owner # test/shell.d/luks-rekey-journal-test.sh
omarchy-mac-boot now ships provision-prepare, provision-commit and provision-verify in /usr/lib/omarchy/mac-boot, wrapping #503's provision module. Owner provisioning keeps only dispatch calls for the Mac boot chain: the Apple re-key folds into the shared journal, which keeps an acknowledged recovery slot, and the Apple-only recovery key stays a core policy. provision-prepare holds setup to the encryption install.conf asked for (an absent one means encrypt), the vendor firmware before the password prompt and the ESP the device tree names (omarchy-mac-esp, from omarchy-mx-mac).
A failed commit put rd.luks.key= back only when the same attempt had removed it, so an attempt killed after rewriting GRUB's defaults left a retry with the key on the boot partition but no command line naming it. Also drop a stale recovery slot from encrypt.state, refuse an encrypt.state without a phase, log the real reason provision-prepare refuses, and keep the password out of xtrace in rekey_accepts_password.
…points With it unmounted, /boot is a directory on the root and commit, verify and the initramfs rebuild would all work on the wrong files. Also keep a recovery slot that equals the owner slot out of encrypt.state, read the device-tree ESP node only from the live system as root, and say which slots the journal found when they are not the kept ones.
…sion #540 landed with the provisioning operations optional on Apple, so owner setup kept #527's direct Apple re-key until omarchy-mac-boot shipped its entrypoints. This branch removes that direct path, so an optional operation would now send a Mac to the generic Limine path, which leaves the boot-partition key and rd.luks.key= behind. omarchy-mac-boot 20260925-2 ships the entrypoints, so provision-prepare, -commit and -verify are required again, as the contract planned for this ticket: a Mac with an older package stops before the owner form naming it. boot-rebuild stays optional until tickets 35 and 36 ship it.
…t-rebuild The stale-entry refresh test only ran against a fake boot-rebuild the real package does not ship. Also make the old-package case look like #527's package, and correct the contract's boot-rebuild row.
maralcbr
added a commit
that referenced
this pull request
Sep 25, 2026
Owner provisioning and its journal test take quattro-upstream's version, which already carries #540 and ticket 32. The dispatch contract keeps both sides; boot-rebuild stays optional until ticket 36, since the update path does not call it.
This was referenced Sep 25, 2026
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.
Ticket 32 of the Apple Silicon convergence plan: Apple owner provisioning (install.conf handoff, the initramfs conversion's re-key, firmware ordering and ESP selection) now goes through the lifecycle dispatch interface.
Base is
mac/04-land-503(#527, merged in at0b08030ae). #540 (mac/20-lifecycle-dispatch,df641c871) is merged into this branch, so the diff shows #540's commits as well; once #527 and #540 land, only the last commit remains. These three should merge together: #540 alone makes Apple provisioning fail without these entrypoints.What changed
omarchy-mac-bootshipsprovision-prepare,provision-commitandprovision-verifyin/usr/lib/omarchy/mac-boot, one install loop, thin wrappers around Converge Apple installation with shared Omarchy and package boot support #503'slib/provision.sh.bash -p, and as root ignore the environment and use a fixedPATH.provision-prepare(read-only, before the owner is asked anything) refuses:encrypt=1, which it records for an absent install.conf, so an absent install.conf still means encrypting/etc/crypttabdoesn't nameomarchy-mac-esp, ported from omarchy-mx-mac)provision-commitdropsrd.luks.key=, rebuilds, checks the rebuilt initramfs still orders the firmware, then removes the boot-partition key and recordsphase=finishedwith the owner and acknowledged recovery slots. A failure restoresrd.luks.key=, and the key goes last, so the retry still boots unattended. It never touches the key while a conversion is unfinished.provision-verifyfails while the boot-partition key,rd.luks.key=in GRUB's defaults or the loader's command line, or an unfinishedencrypt.stateremain.omarchy-provision-ownerloses Converge Apple installation with shared Omarchy and package boot support #503's Apple re-key,encrypt.stateand GRUB handling. The Mac boot chain is reached only through dispatch.luks-rekey.shkeeps a recovery slot once the owner acknowledged its key, and retires an unacknowledged one; x86 never records one.recovery_key_offered), as in Converge Apple installation with shared Omarchy and package boot support #503. Whether every encrypted install gets one is ticket 33's call. Once it sits beside the owner slot, a retry must use the same password.docs/lifecycle-dispatch.mdand the boot README describe the implementation.Not here:
boot-rebuild, which provisioning uses only to refresh stale Limine entries after a factory reset (tickets 34/35 own it), and pointingomarchy-mac-limine-deployatomarchy-mac-esp(gap-audit B6).Testing
packages/omarchy-mac/boot/test/mac-provision-test.shruns the staged entrypoints against a fixture root:test/shell.d/provision-owner-luks-test.shnow drivesomarchy-provision-ownerthrough the real dispatcher and the real staged entrypoints: recovery key, re-key, failed rebuild and retry, retry after commit, leftovers stopping setup, xtrace.luks-rekey-journal-test.sh(x86 crash matrix unchanged) adds kept and retired recovery slots.mac-boot-provider-test.shfails if core names Mac boot files again. Also new:mac-esp-test.sh, and entrypoint staging inmac-boot-install-test.sh.95d90cfebvia workflow_dispatch, since this base triggers no PR checks.test/allpasses, and so does the disposable in-place conversion test (privileged container).provision-preparerequires, and its ESP is the device-tree partition at/boot/efi.Second review, two rounds:
encrypt.state, an empty phase, weak leftover tests, and xtrace./boot. Its nits were an ESP override honoured as root, the journal message, and the docs.encrypt.stateowner-slot backstop for a lost journal, which no in-repo path reaches.