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,6 +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
+%ifarch s390x
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
@@ -2078,6 +2079,7 @@ BuildKernel() {
cp %{vmlinux_decompressor}
$RPM_BUILD_ROOT%{debuginfodir}/lib/modules/$KernelVer/vmlinux.decompressor
fi
fi
+%endif
%endif
find $RPM_BUILD_ROOT/lib/modules/$KernelVer -name "*.ko" -type f
>modnames
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2255