[Pki-clean-room-devel] Add support for customizing locale and language to cleanroom image

Jens Reyer jre.winesim at gmail.com
Fri Jan 5 20:23:54 UTC 2018


---
Hi,

this patch adds support for setting locale and keyboard settings before
building the image.

I (mostly) successfully tested this with

  LIVE_LOCALE=de_DE.UTF8
  LIVE_KEYBOARD_LAYOUTS=de

Most importantly, the keyboard layout works as expected, so I can type
"dpkg-reconfigure" without having to search for the "-".

However I noticed that some characters, e.g. "§" (section sign) or "ä"
(German a Umlaut) are not available after logging in, while they are
available at the login prompt itself.  I didn't investigate this any
further.


Remarks:
I think the UTF8 --> UTF-8 change is not needed to fix issues, I just took
that from the mentioned file.
Further I assume, but couldn't verify, that LIVE_KEYBOARD_LAYOUTS=us is the
correct default.
This mail is "git am"-able if you want to apply the patch unchanged.

btw, my plan was to do my keysigning in the cleanroom.  But unfortunately
signing-party in jessie doesn't support gpg2, so I stopped here for now.

Greets
jre



 scripts/make-pgpcleanroom | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/scripts/make-pgpcleanroom b/scripts/make-pgpcleanroom
index f552eae..d2cbe4b 100755
--- a/scripts/make-pgpcleanroom
+++ b/scripts/make-pgpcleanroom
@@ -3,7 +3,19 @@
 set -e
 
 LIVE_USER=pgp
-LIVE_LOCALE=en_US.UTF8
+
+# More information on customizing locale and language can be found at
+# https://debian-live.alioth.debian.org/live-manual/stable/manual/html/live-manual.en.html
+
+# A list of supported locales and the encoding for each can be found in
+# /usr/share/i18n/SUPPORTED.
+LIVE_LOCALE=en_US.UTF-8
+
+# This controls the keyboard-layout of both the console and X keyboard.  You may
+# additionally specify keyboard-variants, keyboard-options and keyboard-model
+# boot parameters in the --bootappend-live option below.
+# Valid options for these can be found in /usr/share/X11/xkb/rules/base.lst.
+LIVE_KEYBOARD_LAYOUTS=us
 
 LIVE_ARCH=i386
 LIVE_FLAVOUR=686-pae
@@ -37,14 +49,17 @@ lb config \
    --debian-installer live \
    --binary-images iso-hybrid \
    --archive-areas "main" \
-   --bootappend-live "boot=live locales=$LIVE_LOCALE hostname=${LIVE_USER}live username=${LIVE_USER}" \
-   --architectures $LIVE_ARCH $LB_PARAM_LINUX_FLAVOURS \
+   --bootappend-live "boot=live locales=${LIVE_LOCALE} keyboard-layouts=${LIVE_KEYBOARD_LAYOUTS} hostname=${LIVE_USER}live username=${LIVE_USER}" \
+   --architectures ${LIVE_ARCH} ${LB_PARAM_LINUX_FLAVOURS} \
    --iso-volume "${LIVE_ISO}"
 
 mkdir -p config/package-lists
 
 #echo task-gnome-desktop > config/package-lists/desktop.list.chroot
 
+# required for non-default keyboard layouts
+echo "console-data console-setup" > config/package-lists/keyboard.list.chroot
+
 echo "rsync pciutils less cups hplip printer-driver-hpcups haveged gnupg2 gnupg-agent libpth20 pinentry-curses libccid pcscd scdaemon libksba8 paperkey opensc libgfshare-bin strongswan-starter mdadm btrfs-tools secure-delete" > config/package-lists/custom.list.chroot
 
 rsync -ar "${RESOURCE_DIR}/" .
-- 
2.15.1




More information about the PKI-Clean-Room-Devel mailing list