From 54a93b55dd7456e2d7edd7acc21719e3d9ad1072 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Luis=20Guzm=C3=A1n?= <ark@switnet.org>
Date: Wed, 23 Nov 2022 21:15:34 +0000
Subject: [PATCH] console-setup: add debian's source to match d-i setup.

---
 .../DATA/console-setup/fix_1.205_ftbfs.patch  | 23 +++++++++++++++++++
 helpers/make-console-setup                    |  8 ++++---
 2 files changed, 28 insertions(+), 3 deletions(-)
 create mode 100644 helpers/DATA/console-setup/fix_1.205_ftbfs.patch

diff --git a/helpers/DATA/console-setup/fix_1.205_ftbfs.patch b/helpers/DATA/console-setup/fix_1.205_ftbfs.patch
new file mode 100644
index 00000000..21f4eb0d
--- /dev/null
+++ b/helpers/DATA/console-setup/fix_1.205_ftbfs.patch
@@ -0,0 +1,23 @@
+From 8de87da89372d778f490aee8a9198c22521c97d2 Mon Sep 17 00:00:00 2001
+From: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Sun, 31 Oct 2021 18:04:36 +0100
+Subject: [PATCH] Keyboard/kbdcompiler: Avoid 'custom' layout
+
+Closes: #997110.
+---
+ Keyboard/kbdcompiler | 1 +
+ debian/changelog     | 3 +++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/Keyboard/kbdcompiler b/Keyboard/kbdcompiler
+index 61c96af..726b23d 100755
+--- a/Keyboard/kbdcompiler
++++ b/Keyboard/kbdcompiler
+@@ -93,6 +93,7 @@ printf STDERR "Compiling compact keymaps for %s...\n", $model;
+ for my $layout (values %KeyboardNames::layouts) {
+     next if ($layout eq 'nec/jp');
+     next if ($layout eq 'nec_vndr/jp');
++    next if ($layout eq 'custom');
+     my $actual_layout = (($layout eq 'rs') ? 'rs,rs'
+ 			 : (($layout eq 'lt') ? 'lt,lt'
+ 			    : (($nonlatin =~ / $layout /)
diff --git a/helpers/make-console-setup b/helpers/make-console-setup
index 1e7e8207..1fc8180e 100644
--- a/helpers/make-console-setup
+++ b/helpers/make-console-setup
@@ -23,12 +23,14 @@
 # or fetch such packages from Debian in order to build the required udeb packages.
 ##
 
-VERSION=1
+VERSION=2
+EXTERNAL='deb-src http://ftp.debian.org/debian stable main'
+REPOKEY=648ACFD622F3D138
 NETINST=true
-
 . ./config
 
-sed -i "s|cdebconf-newt-detect-keys, ||" debian/control
+#Fix ftbfs on debian stable
+patch -p1 < $DATA/fix_1.205_ftbfs.patch
 
 changelog "Rebuild upstream to get udeb dependency for debian-installer."
 compile
-- 
GitLab