10i18n: added upstream patches to fix adding required includes for keymaps and other fix for font [release 057-3mamba;Fri Sep 30 2022]

This commit is contained in:
Silvan Calarco 2024-01-05 21:56:19 +01:00
parent b8838cc432
commit 61c9081a83
3 changed files with 70 additions and 2 deletions

View File

@ -0,0 +1,28 @@
From fe8fa2b0cadbb33e27c8dd8b5851548dcd65835c Mon Sep 17 00:00:00 2001
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
Date: Mon, 27 Jun 2022 13:19:41 +0200
Subject: [PATCH] fix(i18n): add required includes for keymaps
Commit https://github.com/dracutdevs/dracut/commit/f3441cc7 removed shell
options but didn't adapt all the code that requires nullglob and globstar.
This caused the initrd to be generated without the required includes for
keymaps.
---
modules.d/10i18n/module-setup.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh
index 35bda36fb..6fd5fd433 100755
--- a/modules.d/10i18n/module-setup.sh
+++ b/modules.d/10i18n/module-setup.sh
@@ -63,7 +63,9 @@ install() {
readarray -t INCLUDES < <("$CMD" '^include ' "$MAP" | while read -r _ a _ || [ -n "$a" ]; do echo "${a//\"/}"; done)
for INCL in "${INCLUDES[@]}"; do
- for FN in "$dracutsysrootdir""${kbddir}"/keymaps/**/"$INCL"*; do
+ local -a FNS
+ mapfile -t -d '' FNS < <(find "${dracutsysrootdir}${kbddir}"/keymaps/ -type f -name "${INCL}*" -print0)
+ for FN in "${FNS[@]}"; do
[[ -f $FN ]] || continue
[[ -v KEYMAPS["$FN"] ]] || findkeymap "$FN"
done

View File

@ -0,0 +1,33 @@
From e1de5bd2d711df2c6814a3c3ab8472cdb4de9101 Mon Sep 17 00:00:00 2001
From: Antonio Alvarez Feijoo <antonio.feijoo@suse.com>
Date: Fri, 9 Sep 2022 13:11:14 +0200
Subject: [PATCH] fix(i18n): do not fail if FONT in /etc/vconsole.conf has the
file extension
If the FONT option defined in /etc/vconsole.conf refers to a file with its
extension, not just the file name, dracut should not fail and install it. The
systemd-vconsole-setup service ends up calling setfont, which supports both file
names and files with extensions.
---
modules.d/10i18n/module-setup.sh | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh
index 6fd5fd433..ac456112f 100755
--- a/modules.d/10i18n/module-setup.sh
+++ b/modules.d/10i18n/module-setup.sh
@@ -222,8 +222,12 @@ install() {
inst_opt_decompress "${kbddir}"/consolefonts/"${DEFAULT_FONT}".*
if [[ ${FONT} ]] && [[ ${FONT} != "${DEFAULT_FONT}" ]]; then
- FONT=${FONT%.psf*}
- inst_opt_decompress "${kbddir}"/consolefonts/"${FONT}".*
+ if [[ -f "${kbddir}"/consolefonts/"${FONT}" ]]; then
+ inst_opt_decompress "${kbddir}"/consolefonts/"${FONT}"
+ else
+ FONT=${FONT%.psf*}
+ inst_opt_decompress "${kbddir}"/consolefonts/"${FONT}".*
+ fi
fi
if [[ ${FONT_MAP} ]]; then

View File

@ -1,6 +1,6 @@
Name: dracut
Version: 057
Release: 2mamba
Release: 3mamba
Summary: Generic, modular initramfs generation tool that can be used across various distributions
Group: System/Kernel and Hardware
Vendor: openmamba
@ -27,6 +27,8 @@ Patch23: dracut-044-bash-4.4.patch
Patch24: dracut-049-squash-live-systemd-240.patch
Patch25: dracut-055-bluetooth-lib64-fix.patch
Patch26: dracut-057-i18n-fix-adding-keymaps-includes.patch
Patch27: dracut-057-upstream-add_required_includes_for_keymaps.patch
Patch28: dracut-057-upstream-dont_fail_if_FONT_has_the_file_extension.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
@ -115,7 +117,9 @@ This package conatins extra optional modules for dracut.
%ifarch x86_64 aarch64
%patch25 -p1
%endif
%patch26 -p1
#%patch26 -p1
%patch27 -p1 -b .upstream-add_required_includes_for_keymaps
%patch28 -p1 -b .upstream-dont_fail_if_FONT_has_the_file_extension
#chmod +x modules.d/99squash-live/*
@ -430,6 +434,9 @@ fi
#%doc NEWS README README.generic README.kernel README.modules TODO
%changelog
* Fri Sep 30 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 057-3mamba
- 10i18n: added upstream patches to fix adding required includes for keymaps and other fix for font
* Sat Jul 02 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 057-2mamba
- added a patch to fix adding keymap includes causing systemd-vconsole startup error with host-only initramfs