From 24513ca950abf47a0b0734820b9cafb9d4a8c514 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Thu, 11 Oct 2012 02:17:32 +0100 Subject: [PATCH] live-build/auto/build: If they exist, link *.efi.signed versions of the kernel to binary/$INITFS/kernel-$FLAVOUR rather than the unsigned versions. --- debian/changelog | 8 ++++++++ live-build/auto/build | 8 ++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 34491b50..f6efa666 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +livecd-rootfs (2.89) UNRELEASED; urgency=low + + * live-build/auto/build: If they exist, link *.efi.signed versions of the + kernel to binary/$INITFS/kernel-$FLAVOUR rather than the unsigned + versions. + + -- Colin Watson Thu, 11 Oct 2012 02:16:26 +0100 + livecd-rootfs (2.88) quantal; urgency=low * live-build/auto/config: Add photography and publishing metas for diff --git a/live-build/auto/build b/live-build/auto/build index a87021f8..c043a370 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -320,7 +320,7 @@ for FLAVOUR in $LB_LINUX_FLAVOURS; do if [ -z "$LB_LINUX_FLAVOURS" ] || [ "$LB_LINUX_FLAVOURS" = "none" ]; then continue fi - KVERS="$( (cd "binary/$INITFS"; ls vmlinu?-* 2>/dev/null || true) | sed -n "s/^vmlinu.-\\([^-]*-[^-]*-$FLAVOUR\\)$/\\1/p" )" + KVERS="$( (cd "binary/$INITFS"; ls vmlinu?-* 2>/dev/null || true) | fgrep -v .efi.signed | sed -n "s/^vmlinu.-\\([^-]*-[^-]*-$FLAVOUR\\)$/\\1/p" )" if [ -z "$KVERS" ]; then if [ -e "binary/$INITFS/vmlinuz" ]; then # already renamed by ubuntu-defaults-image @@ -334,7 +334,11 @@ for FLAVOUR in $LB_LINUX_FLAVOURS; do echo "Cannot handle more than one kernel for $FLAVOUR ($KVERS)!" >&2 exit 1 fi - ln "binary/$INITFS/"vmlinu?-"$KVERS" "$PREFIX.kernel-$FLAVOUR" + if [ -e "binary/$INITFS/"vmlinu?-"$KVERS.efi.signed" ]; then + ln "binary/$INITFS/"vmlinu?-"$KVERS.efi.signed" "$PREFIX.kernel-$FLAVOUR" + else + ln "binary/$INITFS/"vmlinu?-"$KVERS" "$PREFIX.kernel-$FLAVOUR" + fi chmod 644 "$PREFIX.kernel-$FLAVOUR" if [ -e "binary/$INITFS/initrd.img-$KVERS" ]; then ln "binary/$INITFS/initrd.img-$KVERS" "$PREFIX.initrd-$FLAVOUR"