Bug 914880

Summary: Systemd can't handle locally created keymaps
Product: [openSUSE] openSUSE Distribution Reporter: Geoff Kuenning <geoff>
Component: X.OrgAssignee: Stefan Dirsch <sndirsch>
Status: RESOLVED FIXED QA Contact: E-mail List <xorg-maintainer-bugs>
Severity: Normal    
Priority: P3 - Medium CC: chcao, dap.darkness, eich, geoff, matthias, msrb, opensuse.lietuviu.kalba, schwab, sndirsch, systemd-maintainers
Version: 13.2   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 13.2   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Geoff Kuenning 2015-01-27 07:34:26 UTC
I find it completely unsurprising that systemd is flummoxed by the idea that somebody might have created a private keymap; after all, everybody has exactly the same configuration as the systemd designers, right?

( 8/10) Installing: namazu-2.0.21-8.4.1 ..................................[done]
( 9/10) Installing: xdm-1.1.11-3.8.1 .....................................[done]
Additional rpm output:
Updating /etc/sysconfig/displaymanager...
/etc/vconsole.conf not available
/etc/sysconfig/keyboard available
KEYTABLE: us-ghk
Command: localectl set-keymap us-ghk
W: Can not found mapping for us-ghk in /usr/share/systemd/kbd-model-map
W: Please report bug of systemd.

In this case, "us-ghk" is a keymap I created and have used for many years.  Systemd shouldn't be bothered by that fact.  But of course it is.

(Incidentally, the correct English is "Please report a bug in systemd."  But given the difficulty of writing in foreign languages, that's entirely forgiveable.  Unlike the narrow vision of breaking on unexpected keymaps.)
Comment 1 Dr. Werner Fink 2015-01-27 09:28:30 UTC
I do not have us-ghk but current systemd-210 does not report any error but simply writes `KEYMAP=us-ghk' into /etc/vconsole.conf.

Is this really systemd-210 from openSUSE 13.2 or Base:System:Legacy?
Comment 2 Dr. Werner Fink 2015-01-27 09:32:08 UTC
Grumble ... this messages are located in /etc/X11/xdm/keytable

  # check systemd mapping
  NEWKEYMAP=$(echo "$1" | sed "s/ $//" )
  opts=$(grep -P "^$NEWKEYMAP\t" "$keyboard_map_systemd" | sed -re "s/[^\t]*//" -e "s/[\t]+/ /g" )
  if [ -z "$opts" ]; then
     echo "W: Can not found mapping for $NEWKEYMAP in $keyboard_map_systemd"
     echo "W: Please report bug of systemd."     
  else
     echo "I: Using systemd $keyboard_map_systemd mapping"
  fi

... IMHO this is not systemd
Comment 3 Stefan Dirsch 2015-01-27 10:32:29 UTC
Ok. This is a warning and could be misleading. I suggest to use

  W: Cannot find mapping for $NEWKEYMAP in $keyboard_map_systemd
  W: This will result in an 'us' X keyboard layout as default

instead.
Comment 4 Stefan Dirsch 2015-01-27 10:35:52 UTC
*** Bug 914793 has been marked as a duplicate of this bug. ***
Comment 5 Geoff Kuenning 2015-01-27 18:39:57 UTC
Werner, you don't have us-ghk because it's a private local keymap that I created for my own use (thus my initials in the filename).

Prior to the system update I did this weekend, my assignment of us-ghk at boot time worked just fine: /etc/defkeymap.name listed the keymap I had created, and I got the key bindings I wanted.  Now the error message has made me nervous.  (To be fair, I haven't rebooted yet because I try to avoid unnecessary reboots, so maybe it's just a warning and it won't default back to us.map.)

I just think it's a bit parochial to assume that there is a canonical, official list of keymaps and to fail to be robust against the addition of new ones.  Likewise, it's not a great design to have a separate list of keymaps (/usr/share/system/kbd-model-map) that has to be updated to keep track of what's actually in the directory.  Far better to use the directory contents itself.
Comment 6 Stefan Dirsch 2015-01-28 11:28:50 UTC
*** Bug 914972 has been marked as a duplicate of this bug. ***
Comment 7 Dr. Werner Fink 2015-01-28 14:25:18 UTC
(In reply to Geoff Kuenning from comment #5)

The classical meaning of /usr/share/system/kbd-model-map is to be able to use the *same* mappings with X as well as on console. Nothing more and nothing less.

This not not mean that any local mapping will not be supported anymore.
Comment 8 Andreas Schwab 2015-01-28 17:48:46 UTC
The last sentence contains too many nots, making it unparsable.  It's better to stay positive.
Comment 9 Geoff Kuenning 2015-01-29 07:28:28 UTC
Werner, if I may presume to speak for you (it's clear that one of those "nots" was just a typo) I think what you meant to say is this: "We do not intend to remove support for local mappings."
Comment 10 Dr. Werner Fink 2015-01-29 08:26:45 UTC
(In reply to Geoff Kuenning from comment #9)

Indeed ;)  ... (And I'm also not a native speaker)
Comment 11 Stefan Dirsch 2015-01-29 14:58:12 UTC
Fixed in X11:XOrg/xdm and submitrequested for openSUSE:Factory.
Comment 12 Bernhard Wiedemann 2015-01-29 15:00:09 UTC
This is an autogenerated message for OBS integration:
This bug (914880) was mentioned in
https://build.opensuse.org/request/show/283350 Factory / xdm