From: Prarit Bhargava <prarit(a)redhat.com>
redhat/kernel.spec.template: Fix vmlinux_decompressor on !s390x
The build log contains
eu-readelf: cannot open input file '%{vmlinux_decompressor}': No such file or
directory
This should only execute on s390x.
Fix vmlinux_decompressor warnings for all other arches.
Signed-off-by: Prarit Bhargava <prarit(a)redhat.com>
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
index blahblah..blahblah 100755
--- a/redhat/kernel.spec.template
+++ b/redhat/kernel.spec.template
@@ -2068,7 +2068,7 @@ BuildKernel() {
mkdir -p $RPM_BUILD_ROOT%{debuginfodir}/lib/modules/$KernelVer
mv vmlinux $RPM_BUILD_ROOT%{debuginfodir}/lib/modules/$KernelVer
ln -s $RPM_BUILD_ROOT%{debuginfodir}/lib/modules/$KernelVer/vmlinux vmlinux
- if [ -n "%{vmlinux_decompressor}" ]; then
+ if [ -n "%{?vmlinux_decompressor}" ]; then
eu-readelf -n %{vmlinux_decompressor} | grep "Build ID" | awk '{print
$NF}' > vmlinux.decompressor.id
# Without build-id the build will fail. But for s390 the build-id
# wasn't added before 5.11. In case it is missing prefer not
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2255