kernel.spec: fix posttrans kernel scriptlet failed for 64KB version

As commit 17c97290621 ("Enable kabi checking and adapt the check-kabi script")
dropped /boot/symvers-*.gz if with_kabichk was unset(64K situation), the error
that "Symvers dump file is not found in /boot/symvers-*.gz" is reported during
kernel rpm install, causing posttrans kernel scriptlet failed.

Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com>
This commit is contained in:
Zheng Zengkai 2024-09-09 09:46:40 +08:00
parent ed4b685c30
commit 89e22d31ac

View File

@ -11,7 +11,7 @@
%global upstream_sublevel 0
%global devel_release 248
%global maintenance_release .0.0
%global pkg_release .149
%global pkg_release .150
%define with_debuginfo 1
# Do not recompute the build-id of vmlinux in find-debuginfo.sh
@ -492,9 +492,7 @@ popd
install -m 644 .config $RPM_BUILD_ROOT/boot/config-%{KernelVer}
install -m 644 System.map $RPM_BUILD_ROOT/boot/System.map-%{KernelVer}
%if 0%{?with_kabichk}
gzip -c9 < Module.symvers > $RPM_BUILD_ROOT/boot/symvers-%{KernelVer}.gz
%endif
gzip -c9 < Module.symvers > $RPM_BUILD_ROOT/boot/symvers-%{KernelVer}.gz
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
install -m 755 %{SOURCE200} $RPM_BUILD_ROOT%{_sbindir}/mkgrub-menu-%{devel_release}.sh
@ -818,9 +816,7 @@ fi
%ifarch aarch64
/boot/dtb-*
%endif
%if 0%{?with_kabichk}
/boot/symvers-*
%endif
/boot/System.map-*
/boot/vmlinuz-*
%ghost /boot/initramfs-%{KernelVer}.img
@ -932,6 +928,9 @@ fi
%endif
%changelog
* Thu Feb 06 2025 Zheng Zengkai <zhengzengkai@huawei.com> - 5.10.0-248.0.0.150
- kernel.spec: fix posttrans kernel scriptlet failed for 64KB version
* Thu Feb 06 2025 Zheng Zengkai <zhengzengkai@huawei.com> - 5.10.0-248.0.0.149
- kernel.spec: build kernel tools for 64KB version