[PATCH 1/2][disco linux-signed] UBUNTU: compress arm64 generic kernel images

Seth Forshee seth.forshee at canonical.com
Tue Dec 18 15:57:17 UTC 2018


BugLink: https://bugs.launchpad.net/bugs/1804481

Our arm64 generic kernels are gzip compressed, but we must
uncompress them in the signing tarball. We wish for the kernel
image we install to remain compressed, so recompress it after
downloading.

This is pretty kludgy as it simply compresses efi files with
-generic in the name when the build arch is arm64. I would like
to do something nicer, however this is difficult as we don't have
information in the signed tarball about whether or not the kernel
image had originally been compressed.

Signed-off-by: Seth Forshee <seth.forshee at canonical.com>
---
 debian/rules | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/debian/rules b/debian/rules
index b9afe67a162e..07bab5c2c8fc 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,9 +1,11 @@
 #! /usr/bin/make -f
 
 ##export DH_VERBOSE := 1
+export SHELL=/bin/bash -e
 
 #VERSION := $(shell LC_ALL=C dpkg-parsechangelog | grep ^Version: | cut -d ' ' -f 2)
 DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH)
+DEB_BUILD_ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH)
 
 # Work out the source package name and version.  We assume the source package
 # is the name of this package with -signed stripped.  The version is identical
@@ -42,6 +44,11 @@ override_dh_auto_build:
 		cd "$(src_version)" || exit 1;					\
 		for s in *.efi.signed; do					\
 			[ ! -f "$$s" ] && continue;				\
+			if [ "$(DEB_BUILD_ARCH)" = "arm64" ] &&			\
+			   [[ "$$s" =~ -generic ]]; then			\
+				gzip "$$s";					\
+				mv "$${s}.gz" "$$s";				\
+			fi;							\
 			chmod 600 "$$s";					\
 			base=$$(echo "$$s" | sed -e 's/.efi.signed//');		\
 			ln "$$s" "../SIGNED/$$base";				\
-- 
2.19.1




More information about the kernel-team mailing list