From 9e947f441600d0d22cdf31337514c163ac4a3a05 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Mon, 16 Apr 2012 03:18:48 +0200 Subject: [PATCH 1/3] Add error detection to copy_binaries --- gen_initramfs.sh | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/gen_initramfs.sh b/gen_initramfs.sh index f3c14c2..61ebce1 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -6,13 +6,23 @@ CPIO_ARGS="--quiet -o -H newc" copy_binaries() { local destdir=$1 shift - lddtree "$@" \ - | tr ')(' '\n' \ - | awk '/=>/{ if($3 ~ /^\//){print $3}}' \ - | sort \ - | uniq \ - | cpio -p --make-directories --dereference --quiet $destdir + for binary in "$@"; do + [[ -e "${binary}" ]] \ + || gen_die "Binary ${binary} could not be found" + + if LC_ALL=C lddtree "${binary}" 2>&1 | fgrep -q 'not found'; then + gen_die "Binary ${binary} is linked to missing libraries and may need to be re-built" + fi + + lddtree "${binary}" \ + | tr ')(' '\n' \ + | awk '/=>/{ if($3 ~ /^\//){print $3}}' \ + | sort \ + | uniq \ + | cpio -p --make-directories --dereference --quiet "${destdir}" \ + || gen_die "Binary ${f} or some of its library dependencies could not be copied" + done } append_base_layout() { From 23ef50635129dceb4df353b2d03770c287da5864 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Mon, 16 Apr 2012 03:55:46 +0200 Subject: [PATCH 2/3] Support a non-static cryptsetup binary (bug #409277) .. by making use of copy_binaries --- ChangeLog | 3 +++ gen_initramfs.sh | 6 +----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5de0eff..8eebbaf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ # Distributed under the GPL v2 # $Id$ + 16 Apr 2012; Sebastian Pipping gen_initramfs.sh: + Support a non-static cryptsetup binary (bug #409277) + 09 Apr 2012; Sebastian Pipping defaults/initrd.scripts, defaults/keymaps/keymapList, defaults/keymaps/sf.map: Add keymap "sf" from Pentoo diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 61ebce1..720a25e 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -419,12 +419,8 @@ append_luks() { [ -x "${_luks_source}" ] \ || gen_die "$(printf "${_luks_error_format}" "no file ${_luks_source}")" - is_static "${_luks_source}" \ - || gen_die "$(printf "${_luks_error_format}" "${_luks_source} not a static binary")" - print_info 1 "Including LUKS support" - cp "${_luks_source}" ${TEMP}/initramfs-luks-temp${_luks_dest} - chmod +x "${TEMP}/initramfs-luks-temp${_luks_dest}" + copy_binaries "${TEMP}/initramfs-luks-temp/" /sbin/cryptsetup fi find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ From 08b7a087524ebbfa47f822d0fd4d8b69fdcc4be9 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Mon, 16 Apr 2012 04:10:17 +0200 Subject: [PATCH 3/3] Bump version to 3.4.30 --- ChangeLog | 3 +++ genkernel | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8eebbaf..fcdde94 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ # Distributed under the GPL v2 # $Id$ + 16 Apr 2012; Sebastian Pipping genkernel: + Bump version to 3.4.30 + 16 Apr 2012; Sebastian Pipping gen_initramfs.sh: Support a non-static cryptsetup binary (bug #409277) diff --git a/genkernel b/genkernel index ea7e596..b4a899f 100755 --- a/genkernel +++ b/genkernel @@ -2,7 +2,7 @@ # $Id$ PATH="${PATH}:/sbin:/usr/sbin" -GK_V='3.4.29' +GK_V='3.4.30' # Set the default for TMPDIR. May be modified by genkernel.conf or the # --tempdir command line option.