dracut/dracut-057-upstream-add_required_includes_for_keymaps.patch

29 lines
1.3 KiB
Diff
Raw Normal View History

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