Repository navigation
Move the Mac factory-reset first-boot markers into reset-prepare - #579
Merged
Merged
Conversation
… reset omarchy-system-factory-reset is now upstream/48-lifecycle-dispatch's, which arms only owner setup. omarchy-mac-boot's reset-prepare re-arms mac-first-boot/pending in the factory root without the conversion token or install.conf, and drops them and owner setup's markers from the sealed @factory beside it, as the runtime did inline. The reset's passphrase check keeps --token-type passphrase-only, which upstream/48 lacks.
…set-prepare-marker
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 81. The runtime factory reset is now upstream/48-lifecycle-dispatch's
omarchy-system-factory-reset. The Mac first-boot marker handling it used to do inline now lives inomarchy-mac-boot'sreset-prepare.What changed
bin/omarchy-system-factory-resetis upstream/48's file, except for one line. The passphrase check keeps--token-type passphrase-only, which quattro-upstream had since Apple factory reset through lifecycle dispatch #552 and upstream/48 dropped. That line should go into upstream/48. The file also brings in upstream's stricter account scrub and its slot lookup by key, and drops the quattro-only test hooks.mac-first-boot/deferred-steps,install.conf, the ESPinstall.conf) from the factory root and armsmac-first-boot/pending. It also clears that state and owner setup's markers from the sealed@factorybeside the root. It unseals@factoryonly when something is there, and reseals it after. A factory root with no@factorybeside it is refused.factory-reset-dispatch-test.shandfactory-reset-accounts-test.share added.factory-reset-luks-test.shnow loads the functions the way upstream's tests do, and checks the markers after a full Apple reset through the real entrypoints. Two tests no longer source the reset script, which now elevates with sudo when run.Publish order
Recorded in
docs/lifecycle-dispatch.md. Anomarchy-mac-bootpin that includes this must publish before any runtime without the inline handling. Otherwise a reset leaves the factory root without the Mac's first boot, which makes its package keyring, or with an older image's conversion token. A new boot package with an older runtime is safe: the steps are idempotent.Behaviour change
A reset cancelled at the passphrase prompt no longer clears
@factory's first-boot markers. The next reset that reachesreset-prepareclears them. Completed and rolled-back resets behave as before.Testing
mac-reset-test.sh,factory-reset-luks-test.sh,factory-reset-dispatch-test.sh,mac-boot-provider-test.sh,provision-root-environment-test.shandlifecycle-dispatch-test.shpass, after the merge of current quattro-upstream.factory-reset-accounts-test.shpasses with user namespaces allowed.@factoryscrub fails both the boot-package suite and the runtime suite. The second review broke the marker handling eight ways, and each break was caught.mac-first-bootwas created, the root hash in@and@factoryis!, and there are no account backups.@factorystays read-only.Second review: no blockers. It found one doc line that called the passphrase check upstream's, now fixed, and the cancel-path difference above. Fable re-check owed.