From 87e166a2f03d4250895f939cdfeb1945627ccc9ea16a11f5855b8a7037a6d453 Mon Sep 17 00:00:00 2001 From: Gary Ching-Pang Lin Date: Thu, 21 Aug 2014 04:08:32 +0000 Subject: [PATCH] Accepting request 245477 from home:michal-m:branches:Base:System - brp-99-compress-vmlinux: Compress the vmlinux image after find-debuginfo (bnc#880848, bnc#884459) OBS-URL: https://build.opensuse.org/request/show/245477 OBS-URL: https://build.opensuse.org/package/show/Base:System/pesign-obs-integration?expand=0&rev=35 --- brp-99-compress-vmlinux | 21 +++++++++++++++++++++ gen-hmac | 12 ------------ pesign-obs-integration.changes | 6 ++++++ pesign-obs-integration.spec | 9 +++++++-- 4 files changed, 34 insertions(+), 14 deletions(-) create mode 100644 brp-99-compress-vmlinux diff --git a/brp-99-compress-vmlinux b/brp-99-compress-vmlinux new file mode 100644 index 0000000..1701ed7 --- /dev/null +++ b/brp-99-compress-vmlinux @@ -0,0 +1,21 @@ +#!/bin/bash + +# Compress the /boot/vmlinux image after find-debuginfo.sh has done its job + +set -e + +case "$RPM_PACKAGE_NAME" in +kernel-*) + ;; +*) + exit 0 +esac +for f in $RPM_BUILD_ROOT/boot/vmlinux-*; do + if test -e "$f" -a -e "$f.gz"; then + echo "gzip $f" + # Deliberately not using gzip -n; the vmlinux image has a + # predictable timestamp (bnc#880848#c20) + gzip -k -9 -f "$f" + fi +done + diff --git a/gen-hmac b/gen-hmac index e46de79..ec33f99 100644 --- a/gen-hmac +++ b/gen-hmac @@ -20,16 +20,4 @@ my $fn = shift @ARGV; system("fipshmac $buildroot$fn"); -#my $out = `sha512hmac "$buildroot$fn"`; -#if ($?) { -# exit 1; -#} -#my @t = split(" ", $out); -#my $hmac = $t[0]; - -#(my $hmacfn = "$buildroot$fn") =~ s|([^/]*)$|.$1.hmac|; -#open(my $fd, '>', $hmacfn) or die "$0: Cannot open $hmacfn: $!\n"; -#print $fd "$hmac $fn\n"; -#close($fd); - exit 0; diff --git a/pesign-obs-integration.changes b/pesign-obs-integration.changes index 3517124..aa5b1b7 100644 --- a/pesign-obs-integration.changes +++ b/pesign-obs-integration.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Aug 20 15:09:50 UTC 2014 - mmarek@suse.cz + +- brp-99-compress-vmlinux: Compress the vmlinux image after + find-debuginfo (bnc#880848, bnc#884459) + ------------------------------------------------------------------- Tue Aug 12 13:38:14 UTC 2014 - meissner@suse.com diff --git a/pesign-obs-integration.spec b/pesign-obs-integration.spec index 9b6882a..dc83b3c 100644 --- a/pesign-obs-integration.spec +++ b/pesign-obs-integration.spec @@ -40,6 +40,7 @@ Source6: README Source7: kernel-sign-file Source8: modsign-repackage Source9: gen-hmac +Source10: brp-99-compress-vmlinux BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -56,8 +57,12 @@ cp %_sourcedir/{COPYING,README} . mkdir -p %buildroot/usr/lib/rpm/brp-suse.d %buildroot/usr/lib/rpm/pesign cd %_sourcedir -install pesign-gen-repackage-spec kernel-sign-file gen-hmac %buildroot/usr/lib/rpm/pesign -install brp-99-pesign %buildroot/usr/lib/rpm/brp-suse.d +install pesign-gen-repackage-spec kernel-sign-file gen-hmac %buildroot/usr/lib/rpm/pesign +install brp-99-pesign %buildroot/usr/lib/rpm/brp-suse.d +# brp-99-compress-vmlinux has nothing to do with signing. It is packaged in +# pesign-obs-integration because this package is already used by the kernel +# build +install brp-99-compress-vmlinux %buildroot/usr/lib/rpm/brp-suse.d install -m644 pesign-repackage.spec.in %buildroot/usr/lib/rpm/pesign mkdir -p %buildroot/usr/bin install modsign-repackage %buildroot/usr/bin/