[Yaird-devel] Bug#435231: yaird: fails to load keymap before cryptsetup with gzip >= 1.3.12-1.

Peter Colberg peterco at gmx.net
Mon Jul 30 07:57:43 UTC 2007


Package: yaird
Version: 0.0.12-20
Severity: normal
Tags: patch

With recent versions of the Debian gzip package (>= 1.3.12-1), yaird
fails to load the boottime keymap as intended in the cryptsetup
template.

This is due to gunzip having been replaced by a script in recent gzip
versions, which executes the gzip binary. yaird cannot not detect this
type of implicit dependency, and thus fails to copy the gzip binary
to the initramfs image.

The patch below resolves the problem by replacing all occurrences of
"gunzip" with a more portable "gzip -d" call and directly including
the gzip binary in the cryptsetup template.

Regards,
Peter


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (400, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.22-maia
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages yaird depends on:
ii  cpio                         2.9-2       GNU cpio -- a program to manage ar
ii  dash                         0.5.4-1     The Debian Almquist Shell
ii  libc6                        2.6-4       GNU C Library: Shared libraries
ii  libhtml-template-perl        2.9-1       HTML::Template : A module for usin
ii  libparse-recdescent-perl     1.94.free-4 Generates recursive-descent parser
ii  perl                         5.8.8-7     Larry Wall's Practical Extraction 

yaird recommends no packages.

-- no debconf information
-------------- next part --------------
diff -ruN yaird-0.0.12.orig/templates/Debian.cfg yaird-0.0.12/templates/Debian.cfg
--- yaird-0.0.12.orig/templates/Debian.cfg	2007-03-30 23:24:21.000000000 +0200
+++ yaird-0.0.12/templates/Debian.cfg	2007-03-30 23:28:27.000000000 +0200
@@ -336,8 +336,22 @@
 	TEMPLATE cryptsetup
 	BEGIN
 		FILE "/sbin/cryptsetup"
+		FILE "/bin/loadkeys"
+		FILE "/bin/gzip"
+		FILE "/etc/console/boottime.kmap.gz"
 		SCRIPT "/init"
 		BEGIN
+		        !# loadkeys from the kbd package has problems
+			!# uncompressing the keymap on-the-fly when
+			!# run from initramfs, don't know why
+			!if [ -e /etc/console/boottime.kmap.gz ]
+			!then
+			!	gzip -d /etc/console/boottime.kmap.gz
+			!fi
+			!if [ -e /etc/console/boottime.kmap ]
+			!then
+			!	loadkeys /etc/console/boottime.kmap
+			!fi
 			!DOCRYPT=1
 			!while [ "$DOCRYPT" != "0" ]
 			!do
@@ -368,8 +382,22 @@
 	TEMPLATE cryptsetup_luks
 	BEGIN
 		FILE "/sbin/cryptsetup"
+		FILE "/bin/loadkeys"
+		FILE "/bin/gzip"
+		FILE "/etc/console/boottime.kmap.gz"
 		SCRIPT "/init"
 		BEGIN
+		        !# loadkeys from the kbd package has problems
+			!# uncompressing the keymap on-the-fly when
+			!# run from initramfs, don't know why
+			!if [ -e /etc/console/boottime.kmap.gz ]
+			!then
+			!	gzip -d /etc/console/boottime.kmap.gz
+			!fi
+			!if [ -e /etc/console/boottime.kmap ]
+			!then
+			!	loadkeys /etc/console/boottime.kmap
+			!fi
 			!DOCRYPT=1
 			!while [ "$DOCRYPT" != "0" ]
 			!do
diff -ruN yaird-0.0.12.orig/templates/Debian-initrd.cfg yaird-0.0.12/templates/Debian-initrd.cfg
--- yaird-0.0.12.orig/templates/Debian-initrd.cfg	2007-03-30 23:24:21.000000000 +0200
+++ yaird-0.0.12/templates/Debian-initrd.cfg	2007-03-30 23:27:37.000000000 +0200
@@ -315,8 +315,22 @@
 	TEMPLATE cryptsetup
 	BEGIN
 		FILE "/sbin/cryptsetup"
+		FILE "/bin/loadkeys"
+		FILE "/bin/gzip"
+		FILE "/etc/console/boottime.kmap.gz"
 		SCRIPT "/sbin/init"
 		BEGIN
+		        !# loadkeys from the kbd package has problems
+			!# uncompressing the keymap on-the-fly when
+			!# run from initramfs, don't know why
+			!if [ -e /etc/console/boottime.kmap.gz ]
+			!then
+			!	gzip -d /etc/console/boottime.kmap.gz
+			!fi
+			!if [ -e /etc/console/boottime.kmap ]
+			!then
+			!	loadkeys /etc/console/boottime.kmap
+			!fi
 			!DOCRYPT=1
 			!while [ "$DOCRYPT" != "0" ]
 			!do
@@ -347,8 +361,22 @@
 	TEMPLATE cryptsetup_luks
 	BEGIN
 		FILE "/sbin/cryptsetup"
+		FILE "/bin/loadkeys"
+		FILE "/bin/gzip"
+		FILE "/etc/console/boottime.kmap.gz"
 		SCRIPT "/sbin/init"
 		BEGIN
+		        !# loadkeys from the kbd package has problems
+			!# uncompressing the keymap on-the-fly when
+			!# run from initramfs, don't know why
+			!if [ -e /etc/console/boottime.kmap.gz ]
+			!then
+			!	gzip -d /etc/console/boottime.kmap.gz
+			!fi
+			!if [ -e /etc/console/boottime.kmap ]
+			!then
+			!	loadkeys /etc/console/boottime.kmap
+			!fi
 			!DOCRYPT=1
 			!while [ "$DOCRYPT" != "0" ]
 			!do
diff -ruN yaird-0.0.12.orig/templates/Fedora.cfg yaird-0.0.12/templates/Fedora.cfg
--- yaird-0.0.12.orig/templates/Fedora.cfg	2007-03-30 23:24:21.000000000 +0200
+++ yaird-0.0.12/templates/Fedora.cfg	2007-03-30 23:31:32.000000000 +0200
@@ -347,8 +347,22 @@
 	TEMPLATE cryptsetup
 	BEGIN
 		FILE "/sbin/cryptsetup"
+		FILE "/bin/loadkeys"
+		FILE "/bin/gzip"
+		FILE "/etc/console/boottime.kmap.gz"
 		SCRIPT "/init"
 		BEGIN
+		        !# loadkeys from the kbd package has problems
+			!# uncompressing the keymap on-the-fly when
+			!# run from initramfs, don't know why
+			!if [ -e /etc/console/boottime.kmap.gz ]
+			!then
+			!	gzip -d /etc/console/boottime.kmap.gz
+			!fi
+			!if [ -e /etc/console/boottime.kmap ]
+			!then
+			!	loadkeys /etc/console/boottime.kmap
+			!fi
 			!DOCRYPT=1
 			!while [ "$DOCRYPT" != "0" ]
 			!do
@@ -379,8 +393,22 @@
 	TEMPLATE cryptsetup_luks
 	BEGIN
 		FILE "/sbin/cryptsetup"
+		FILE "/bin/loadkeys"
+		FILE "/bin/gzip"
+		FILE "/etc/console/boottime.kmap.gz"
 		SCRIPT "/init"
 		BEGIN
+		        !# loadkeys from the kbd package has problems
+			!# uncompressing the keymap on-the-fly when
+			!# run from initramfs, don't know why
+			!if [ -e /etc/console/boottime.kmap.gz ]
+			!then
+			!	gzip -d /etc/console/boottime.kmap.gz
+			!fi
+			!if [ -e /etc/console/boottime.kmap ]
+			!then
+			!	loadkeys /etc/console/boottime.kmap
+			!fi
 			!DOCRYPT=1
 			!while [ "$DOCRYPT" != "0" ]
 			!do


More information about the Yaird-devel mailing list