39 lines
1.0 KiB
Diff
39 lines
1.0 KiB
Diff
|
From: Jiri Slaby <jslaby@suse.cz>
|
||
|
Date: Wed, 6 Nov 2019 10:57:01 +0100
|
||
|
Subject: brp-99-compress-vmlinux: support xz-compressed vmlinux
|
||
|
Patch-mainline: submitted as PR#16
|
||
|
References: bnc#1155921
|
||
|
|
||
|
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
|
||
|
---
|
||
|
brp-99-compress-vmlinux | 14 ++++++++------
|
||
|
1 file changed, 8 insertions(+), 6 deletions(-)
|
||
|
|
||
|
diff --git a/brp-99-compress-vmlinux b/brp-99-compress-vmlinux
|
||
|
index 2c8222d23024..ffe3841fb836 100755
|
||
|
--- a/brp-99-compress-vmlinux
|
||
|
+++ b/brp-99-compress-vmlinux
|
||
|
@@ -11,11 +11,13 @@ 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
|
||
|
+ for compression in gz/gzip xz; do
|
||
|
+ if test -e "$f" -a -e "$f.${compression%/*}"; then
|
||
|
+ echo "${compression#*/} $f"
|
||
|
+ # Deliberately not using -n; the vmlinux image has a
|
||
|
+ # predictable timestamp (bnc#880848#c20)
|
||
|
+ ${compression#*/} -k -9 -f "$f"
|
||
|
+ fi
|
||
|
+ done
|
||
|
done
|
||
|
|
||
|
--
|
||
|
2.24.0
|
||
|
|