[PATCH 1/2][disco linux-signed] UBUNTU: compress arm64 generic kernel images
Seth Forshee
seth.forshee at canonical.com
Tue Jan 8 14:35:07 UTC 2019
On Tue, Jan 08, 2019 at 02:25:53PM +0000, Andy Whitcroft wrote:
> On Tue, Dec 18, 2018 at 09:57:17AM -0600, Seth Forshee wrote:
> > 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; \
>
> Ugg, as everything you put in the signing tarball is maintained, and
> safely ignored. Could we not like touch in a foo.efi.recompress flag
> file in the upload?
Great, as stated in the commit message I didn't like the "assume arm64
generic should be compressed" bit, but I didn't know that signing would
ignore extensions it doesn't know about. So I will change this to do
something like you suggest.
>
> > chmod 600 "$$s"; \
> > base=$$(echo "$$s" | sed -e 's/.efi.signed//'); \
> > ln "$$s" "../SIGNED/$$base"; \
>
> -apw
More information about the kernel-team
mailing list