Repository navigation
Keep a non-Latin vconsole.conf out of the initramfs again - #14885
Conversation
Since 26.134.222-3, Arch's plymouth hook copies /etc/vconsole.conf into the initramfs itself. The guard added for omacom#6229 only leaves the file out of FILES, so it no longer stops it: with a first XKB layout that types no Latin letters, Plymouth asks for the LUKS passphrase in that layout and the passphrase cannot be typed (omacom#14246). omarchy_vconsole.conf refuses the file in add_file unless FILES lists it, which is how it worked before. It is a drop-in of its own because pacman keeps omarchy_hooks.conf as configuration, so a machine whose copy was edited or predates the package never receives a change to it. Nothing rebuilds the boot image when a drop-in changes, so a migration rebuilds it once where the installed drop-ins now leave the file out and the plymouth hook copies it.
[Medium impact] The PR appears safe to merge; no blocking issues remain. SummaryKeeps non-Latin keyboard settings out of boot images while preserving Latin layouts and explicit
Reviews (4) · Last reviewed commit: "Keep a Latin layout at the prompt when o..." · Reviewed by Greptile |
The guard checked FILES once, when its drop-in was sourced, so a drop-in sorting after it that lists /etc/vconsole.conf was refused as well. It now checks FILES inside add_file: a hook runs with FILES local and empty, so its copy is still refused, and parse_config adds the configuration's own FILES once the hooks have run. The migration read only Omarchy's two drop-ins, so a mkinitcpio.conf or later drop-in listing the file got a rebuild that changed nothing. It now sources the main file and every drop-in as one, as mkinitcpio does.
|
Thanks for this. omabot read the pull request and its description, and Claude Opus 5.5 classifies it as a bug fix (keeping a non-Latin So nothing beyond that reading has happened yet: no label, no tests on a worker, no line-by-line review, and no finding either way. The pull request stays in omabot's queue and will be classified and verified on a later pass; until then it is waiting on that pass, not on you. |
…e package An omarchy_hooks.conf written before the package (3.0 to 3.8.2) never lists vconsole.conf in FILES, so on such a machine Plymouth's own copy is what brings a Latin layout like German to the LUKS prompt since 26.134.222-3. Refusing it there switched the prompt to US and rejected a passphrase typed in German. Refuse the file only when the first layout is in the non-Latin list omarchy_hooks.conf already keeps out of FILES.
|
I pushed one commit (16d4e05) on top of yours, because of a lockout we found while testing this for 4.0.6. On a machine that kept the Tested at boot level in QEMU/KVM, with the passphrase typed as keystrokes on the graphical Plymouth prompt:
|
* Keep a non-Latin vconsole.conf out of the initramfs again Since 26.134.222-3, Arch's plymouth hook copies /etc/vconsole.conf into the initramfs itself. The guard added for #6229 only leaves the file out of FILES, so it no longer stops it: with a first XKB layout that types no Latin letters, Plymouth asks for the LUKS passphrase in that layout and the passphrase cannot be typed (#14246). omarchy_vconsole.conf refuses the file in add_file unless FILES lists it, which is how it worked before. It is a drop-in of its own because pacman keeps omarchy_hooks.conf as configuration, so a machine whose copy was edited or predates the package never receives a change to it. Nothing rebuilds the boot image when a drop-in changes, so a migration rebuilds it once where the installed drop-ins now leave the file out and the plymouth hook copies it. * Read FILES when vconsole.conf is added, not when the guard loads The guard checked FILES once, when its drop-in was sourced, so a drop-in sorting after it that lists /etc/vconsole.conf was refused as well. It now checks FILES inside add_file: a hook runs with FILES local and empty, so its copy is still refused, and parse_config adds the configuration's own FILES once the hooks have run. The migration read only Omarchy's two drop-ins, so a mkinitcpio.conf or later drop-in listing the file got a rebuild that changed nothing. It now sources the main file and every drop-in as one, as mkinitcpio does. * Keep a Latin layout at the prompt when omarchy_hooks.conf predates the package An omarchy_hooks.conf written before the package (3.0 to 3.8.2) never lists vconsole.conf in FILES, so on such a machine Plymouth's own copy is what brings a Latin layout like German to the LUKS prompt since 26.134.222-3. Refusing it there switched the prompt to US and rejected a passphrase typed in German. Refuse the file only when the first layout is in the non-Latin list omarchy_hooks.conf already keeps out of FILES. --------- Co-authored-by: Emir Beganovic <[email protected]> (cherry picked from commit 1d134a5)
Closes #14246.
Since
26.134.222-3(packaging commit 159d7694), Arch's plymouth mkinitcpio hook copies the keyboard config itself:The issue blames mkinitcpio 42.2, but the block comes from the plymouth package, as jandrusk pointed out there.
The guard added for #6229 keeps a non-Latin layout out of the initramfs by leaving
/etc/vconsole.confout ofFILES. A hook callingadd_filedirectly goes around it. With a first XKB layout that types no Latin letters (ru,us,ua,us,il, ...), Plymouth then asks for the LUKS passphrase in that layout, and the Latin passphrase can't be typed.The
-3upgrade rebuilds the boot image itself, because the hook lives underusr/lib/initcpio/, so the first boot after that update is the lockout. As of 10 October, the x86 edge mirror and the aarch64 mirror serve-3. The x86 stable and rc mirrors still serve-2, so promoting-3there before this lands would lock out non-Latin LUKS users on those channels.Fix
New drop-in
etc/mkinitcpio.conf.d/omarchy_vconsole.conf. It refuses/etc/vconsole.confinadd_fileunlessFILESlists it, which restores how things worked before-3. The layout decision stays inomarchy_hooks.conf, which this PR doesn't touch, so aFILES=(/etc/vconsole.conf)someone set on purpose is still honoured.omarchy_hooks.confas configuration (backup=()). On a machine whose copy was edited, or predates the package (Omarchy 3 upgrades, see Snapper rollbacks silently un-apply Omarchy migrations (surfaced as: LUKS prompt still QWERTY after e891e5c) #9828), a change to it would only ever arrive as a.pacnew. A new file outsidebackup=()reaches every machine.add_file. A second wrap would makeadd_filecall itself.Migration
1791621765.sh. Nothing rebuilds the image when a drop-in changes, so an image built since-3still holds the file. The migration rebuilds once per machine, withlimine-mkinitcpio, like the other rebuild migrations. It only does so where both of these hold:1786605598does;limine-mkinitcpioexits 0 after skipping a kernel it couldn't build, so the migration also watches for that message and stays pending.I didn't ship an
/etc/initcpio/install/plymouthoverride (suggested in the issue). It would stand in for Arch's hook on every machine, and put the same decision in a second place.Tested
Real images built with mkinitcpio 41.1 and 42.2 in an unprivileged namespace, with the plymouth
-3hook.etc/vconsole.confin the image:ru,us(the reporter's file),ua,us,ilderu,us, Omarchy 3omarchy_hooks.conf(no vconsole lines)base systemd plymouth),ru,usdeFILES=(/etc/vconsole.conf)inmkinitcpio.conf,ru,usWhere the result changes, the images differ only by
etc/vconsole.conf.test/shell.d/mkinitcpio-vconsole-test.shbuilds the image the way mkinitcpio does: drop-ins sourced withadd_filedefined, the plymouth-3call,FILES, then the second sourcing and anotheradd_file.add_file.FUNCNEST, it also fails if the once-only check is removed.test/shell.d/plymouth-vconsole-migration-test.shcovers:-2hook, a hook that copies the file from itsmaplist, an Omarchy 3omarchy_hooks.conf, and a drop-in that bundles the file on purpose;vconsole.conf, an exportedXKBLAYOUT, and no Limine.hyprland-keyboard-layout-test.sh(which reads the layout list fromomarchy_hooks.conf),mkinitcpio-hooks-test.sh,mkinitcpio-apple-drop-ins-test.sh,nvidia-kms-hook-test.sh,settings-runtime-profile-test.shandconfig-test.sh(against an omarchy-pkgs checkout) pass.#12896 rewrites the same
caseinomarchy_hooks.conf. This PR doesn't touch that file, so the two don't conflict, and its Latin-variant rule carries throughFILES.Fixes #15802