From 2a55bce8303d9c4a5761d58c2982778ef799bed7 Mon Sep 17 00:00:00 2001
From: Ark74 <ark@switnet.org>
Date: Sun, 18 Dec 2022 18:06:22 -0600
Subject: [PATCH] finish-install: manually reconfigure keyboard before
 finish-install.

---
 .../fix_keyboard-configure-netinstall.patch      | 16 ++++++++++++++++
 helpers/make-finish-install                      |  3 ++-
 2 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 helpers/DATA/finish-install/fix_keyboard-configure-netinstall.patch

diff --git a/helpers/DATA/finish-install/fix_keyboard-configure-netinstall.patch b/helpers/DATA/finish-install/fix_keyboard-configure-netinstall.patch
new file mode 100644
index 00000000..231ab514
--- /dev/null
+++ b/helpers/DATA/finish-install/fix_keyboard-configure-netinstall.patch
@@ -0,0 +1,16 @@
+diff -Nru finish-install-2.104+11.0trisquel0/finish-install.d/10update-initramfs finish-install-2.104+11.0trisquel0/finish-install.d/10update-initramfs
+--- finish-install-2.104+11.0trisquel0/finish-install.d/10update-initramfs	2018-08-10 14:21:58.000000000 -0500
++++ finish-install-2.104+11.0trisquel0/finish-install.d/10update-initramfs	2022-12-18 17:56:21.817264252 -0600
+@@ -4,7 +4,11 @@
+ # update-initramfs to make sure one can type the passphrase
+ # (see #694156, workaround for #696773):
+ /bin/in-target \
+-    /bin/sh -c "dpkg-query -s cryptsetup >/dev/null 2>&1 && dpkg-query -s console-setup >/dev/null 2>&1"
++    /bin/sh -c "dpkg-query -s console-setup >/dev/null 2>&1"
++
++#Fix bug keyboard not using the selected layout.
++/bin/in-target \
++    dpkg-reconfigure -f noninteractive keyboard-configuration
+ 
+ if [ $? = 0 ]; then
+     echo "Encrypted LVM detected, refreshing initramfs"
diff --git a/helpers/make-finish-install b/helpers/make-finish-install
index b544de05..01d6d9da 100644
--- a/helpers/make-finish-install
+++ b/helpers/make-finish-install
@@ -23,12 +23,13 @@
 # such packages from Debian in order to build the required udeb packages.
 ##
 
-VERSION=0
+VERSION=1
 EXTERNAL='deb-src http://ftp.debian.org/debian stable main'
 REPOKEY=648ACFD622F3D138
 NETINST=true
 . ./config
 
+patch -p1 < $DATA/fix_keyboard-configure-netinstall.patch
 
 changelog "Fetch and build as udeb dependency for debian-installer."
 compile
-- 
GitLab