FS#45444 - [mkinitcpio] sd-vconsole fails to add some console fonts

Attached to Project: Arch Linux
Opened by Dāvis (davispuh) - Wednesday, 24 June 2015, 01:36 GMT
Last edited by Toolybird (Toolybird) - Thursday, 17 November 2022, 07:27 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Giancarlo Razzolini (grazzolini)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 6
Private No

Details

Description:

sd-vconsole hook didn't add some font files (like those without font extension or with .cp)
Causing systemd-vconsole-setup.service to fail.

Additional info:
using package version: mkinitcpio 18-2

from log
systemd[1]: systemd-vconsole-setup.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: Failed to start Setup Virtual Console.
systemd[1]: systemd-vconsole-setup.service: Unit entered failed state.
systemd[1]: systemd-vconsole-setup.service: Failed with result 'exit-code'.
systemd-vconsole-setup[74]: /usr/bin/setfont failed with error code 66.
systemd-vconsole-setup[74]: Cannot open font file iso04.16

Steps to reproduce:

1. Add "FONT=iso04.16" (or some other font, eg. 737) to /etc/vconsole.conf
2. Generate initramfs
3. Reboot and check journal



I attached patch which fixes this and should work for all font files from /usr/share/kbd/consolefonts/
This task depends upon

Closed by  Toolybird (Toolybird)
Thursday, 17 November 2022, 07:27 GMT
Reason for closing:  Fixed
Additional comments about closing:  See comments
Comment by Dāvis (davispuh) - Thursday, 03 September 2015, 18:45 GMT
ping? this is still broken, just apply patch...
Comment by Dave Reisner (falconindy) - Friday, 04 September 2015, 12:24 GMT
Well, I can't apply the patch as is. It doesn't follow style, and it's potentially broken in spots where you've neglected to quote variable expansions (mostly $BUILDROOT). I'm also not keen on matching comments in the font files, as this likely has no guarantees about stability. The wording could change in the future, or go away.

Rather than add even more complexity to this hook, it probably makes more sense to ask upstream to provide a compiler which can spit out a single file containing everything needed to load the font (similar to what we do with loadkeys in the keymap hook).
Comment by Dāvis (davispuh) - Friday, 04 September 2015, 13:25 GMT
You can just fix patch. I looked at setfont source code and there that "# combine partial fonts" is hardcoded to always be first 23 bytes to identify if it's a file of font names and it's unlikely that it will ever change as that would break current files.

About upstream providing tool for this of course that would be best but it might take quite a while...

Comment by Giancarlo Razzolini (grazzolini) - Wednesday, 20 March 2019, 18:22 GMT
Davis, can you re-submit the patch for this? I did a quick check and it looks like we still can't get all fonts in a single file yet the way things are now.
Comment by Dāvis (davispuh) - Wednesday, 20 March 2019, 19:23 GMT
My patch still applies cleanly on mkinitcpio so there's nothing to resubmit.
Comment by Giancarlo Razzolini (grazzolini) - Wednesday, 20 March 2019, 19:44 GMT
The fact it applies cleanly doensn't change the fact it doesn't follow style nor that some quoting is missing, like Dave said. I didn't found a bug report upstream too for the feature request discussed, maybe I'm looking a the wrong place. Don't know if this was reported there too or not.
Comment by Dāvis (davispuh) - Wednesday, 20 March 2019, 20:07 GMT
I don't remember, but most likely I didn't submitted bug report upstream. And anyone can fix that patch.
Comment by nl6720 (nl6720) - Thursday, 17 November 2022, 06:35 GMT

Loading...