FS#44805 - [mkinitcpio] keymap hook: Don't warn if no KEYMAP not found in configuration, it defaults to "us"

Attached to Project: Arch Linux
Opened by Alain Kalker (ackalker) - Friday, 01 May 2015, 17:45 GMT
Last edited by Dave Reisner (falconindy) - Sunday, 03 July 2016, 18:23 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Thomas Bächler (brain0)
Dave Reisner (falconindy)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

From `man vconsole.conf`:

KEYMAP= defaults to "us" if not set.

I think it is reasonable for users to include the keymap hook in HOOKS without having an /etc/vconsole.conf (or one that doesn't specify KEYMAP) if all they want is the "us" keymap (maybe it includes more than the default kernel keymap, I don't know).
I would suggest initializing:

KEYMAP=us

before the loop reading the .conf files

Additional info:
* package version(s)
mkinitcpio 18-2
* config and/or log files etc.


Steps to reproduce:
This task depends upon

Closed by  Dave Reisner (falconindy)
Sunday, 03 July 2016, 18:23 GMT
Reason for closing:  Fixed
Additional comments about closing:  mkinitcpio-20-1
Comment by Alain Kalker (ackalker) - Friday, 01 May 2015, 18:37 GMT
Hmm, from /usr/share/doc/systemd/NEWS:

CHANGES WITH 194:

* If /etc/vconsole.conf is non-existent or empty we will no
longer load any console font or key map at boot by
default. Instead the kernel defaults will be left
intact. This is definitely the right thing to do, as no
configuration should mean no configuration, and hard-coding
font names that are different on all archs is probably a bad
idea. Also, the kernel default key map and font should be
good enough for most cases anyway, and mostly identical to
the userspace fonts/key maps we previously overloaded them
with. If distributions want to continue to default to a
non-kernel font or key map they should ship a default
/etc/vconsole.conf with the appropriate contents.

This begs the question: what exactly
Should we stick to what the man page says and assume: no KEYMAP in /etc/vconsole.conf means use the default KEYMAP=us, or should we rely on what NEWS says and assume: no /etc/vconsole.conf means do nothing?

What is meant by 'defaults to "us"' in this case anyway? Default only if /etc/vconsole.conf exists?
Comment by Alain Kalker (ackalker) - Friday, 01 May 2015, 18:43 GMT
One particular point in which the "us" keymap appears to differ from the kernel keymap is in that at some point it includes /usr/share/kbd/keymaps/i386/include/linux-keys-bare.inc, which in turn has the line:

alt keycode 103 = KeyboardSignal

This sets the key combo Alt-UpArrow to perform 'kbrequest', which in turn can be used to start an emergency or rescue shell of some kind.
Comment by Dave Reisner (falconindy) - Friday, 01 May 2015, 20:48 GMT
If you ask for a keymap and you didn't specify a keymap, I think that's pretty clearly an error worth mentioning and not papering over. This will bite you pretty hard if you rely on a specific keymap for, say, unlocking your root device with a passphrase.
Comment by Alain Kalker (ackalker) - Friday, 01 May 2015, 23:30 GMT
The problem is with "not specifying a keymap", which I take as meaning "leaving KEYMAP unset" and the manual page stating that in that case KEYMAP defaults to "us". Specifying KEYMAP="us" in /etc/vconsole.conf would then be redundant.
Comment by Alain Kalker (ackalker) - Friday, 01 May 2015, 23:53 GMT
Perhaps my previous comment was not clear. If a user either has no /etc/vconsole.conf file or has no KEYMAP specified in it, then the warning by mkinitcpio can be confusing.

It appears that both the keymap hook and systemd rely on behaviour which is not documented in the man page (only in the NEWS file), namely that if /etc/vconsole.conf doesn't exist, the keymap will not be touched. and the default value for KEYMAP doesn't apply in that case.

If you feel that this is a problem with systemd's man page, then maybe I will report it as a bug upstream.
Comment by Dave Reisner (falconindy) - Sunday, 03 July 2016, 17:58 GMT

Loading...