Prove the rebuilt Mac boot image types with the layout setup picked - #669
Merged
Merged
Conversation
…cked provision-commit now extracts the image that boots (the UKI's initramfs on a Limine Mac) after its rebuild and refuses to finish unless it carries /etc/vconsole.conf's keyboard settings, the KEYMAP file and XKB symbols, and both load from the image's own files; a US or non-Latin layout must leave no other layout behind. A setup retry that picked another layout can no longer keep the old one at the disk password prompt. The layout checks move from the boot check into a shared library both use.
provision-commit now extracts the rebuilt image to check its keyboard layout; the stub image carries no vconsole.conf, as a Mac left on the US map builds.
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 111 (keyboard layout at disk unlock), omarchy-mac part.
provision-commitnow checks the image that will boot after its rebuild: the UKI's initramfs on a Limine Mac,/boot/initramfs-<kernel>.imgotherwise. It won't finish unless the image carries/etc/vconsole.conf's keyboard settings, the KEYMAP file and the XKB symbols. The keymap must also load (loadkeyschrooted into the image) and the XKB layout must compile from the image's own files (xkbcli --test). A US or non-Latin layout must leave no other layout behind. If any check fails, the staged key stays andrd.luks.key=is restored, so the retry still boots unattended. As a result, a setup retry that picked another layout can't keep the old one at the password prompt. The layout checks moved out ofomarchy-apple-silicon-boot-checkintolib/boot-image-layout.shso both use the same code. The boot check behaves as before.The runtime side is not in this PR. That covers fail-closed
apply_keyboardand forcing the rebuild on a retry whose layout changed (a journal fingerprint inluks-rekey.sh), and it belongs to omacom#13362. The Mac keyboard model/variant is deferred: no XKB variant fixes the Danish$ §key without breaking Super or other layouts, and a change the console map doesn't mirror would lock owners out (details in ticket 111).Tests: boot suite (all 27 files) and the related root shell tests pass as non-root in an Arch ARM container. The opt-in real-image test (
OMARCHY_DISPOSABLE_BOOT_TESTS) builds a Danish image with plymouth and proves the check against it; it now uses-Syu, since-Syno longer resolves. New Danish seam test:test/shell.d/mac-keyboard-layout-seam-test.sh. It covers vconsole.conf, the initramfs keymap list and the Hyprland input. Hardware: not run, since the test Macs are busy with a reinstall.Second review: safe to merge, no correctness defects. Its notes: tool behaviour is proven only in the container test, and the check relies on plymouth pulling in libxkbcommon.