Bug 1221878 - kiwi: should strip the extension from the keytable when calling systemd-firstboot
Summary: kiwi: should strip the extension from the keytable when calling systemd-first...
Status: RESOLVED INVALID
Alias: None
Product: PUBLIC SUSE Linux Enterprise Server 15 SP6
Classification: openSUSE
Component: Kiwi Next Generation (KIWI NG) (show other bugs)
Version: unspecified
Hardware: Other Other
: P2 - High : Normal
Target Milestone: ---
Assignee: SUSE Public Cloud Maintainer
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-22 16:40 UTC by Eugenio Paolantonio
Modified: 2024-04-17 15:39 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugenio Paolantonio 2024-03-22 16:40:17 UTC
Hi,

The keytable preference might specify the file extension (like
us.map.gz), while systemd-firstboot actually expects only the
keymap name [0].

Until recently [1], systemd-firstboot would not validate the
supplied keymap, so /etc/vconsole.conf was always updated even
if the keymap is wrong.

After the recent change, kiwi would fail with this error message
when using the full file name as a keytable:

[   91s] [ INFO    ]: 11:04:56 | Setting up keytable: us.map.gz
[   91s] [ DEBUG   ]: 11:04:56 | EXEC: [chroot /usr/src/packages/KIWI-vmx/build/image-root systemd-firstboot --help]
[   91s] [ DEBUG   ]: 11:04:56 | EXEC: [chroot /usr/src/packages/KIWI-vmx/build/image-root systemd-firstboot --keymap=us.map.gz]
[   91s] [ DEBUG   ]: 11:04:56 | EXEC: Failed with stderr: Keymap us.map.gz is not installed.
[   91s] , stdout: (no output on stdout)
[   91s] [ ERROR   ]: 11:04:56 | KiwiCommandError: chroot: stderr: Keymap us.map.gz is not installed.
[   91s] , stdout: (no output on stdout)

[0] https://man7.org/linux/man-pages/man1/systemd-firstboot.1.html
[1] https://github.com/systemd/systemd/commit/321a8c595e3470a0fe9002014656eee6a50b9553
Comment 1 Eugenio Paolantonio 2024-03-22 16:44:10 UTC
My tentative fix: https://github.com/OSInside/kiwi/pull/2515
Comment 2 Eugenio Paolantonio 2024-04-17 15:39:39 UTC
After discussion in the mentioned Pull Request, it has been decided that the best way to go is to amend the documentation. I'm closing this bug.