From 1fec4d1c3f5d379262fd15f2d8b04f5c54a9e278 Mon Sep 17 00:00:00 2001 From: "fu.lin" Date: Tue, 12 Jan 2021 08:39:25 +0000 Subject: [PATCH] spec: do not recompute the build-id of vmlinux Since rpm-build version 4.14.0-rc1(commit id: 4842adf), the new code will recompute the build-id of vmlinux when generating debuginfo, and results that the build-id is different from the boot image. Some debug tools, like perf, when we use `-k` to specify vmlinux, it would refuse to load vmlinux while detecing the build-id is different between vmlinux and the current boot image. We can use `$ file vmlinux` or `$ objdump -s -j .notes` to check vmlinux's build-id, and `$ hexdump /sys/kernel/notes` to check current boot image build-id. This patch is prevent build-id changing from generating debuginfo package. Signed-off-by: fu.lin Signed-off-by: yanglei --- kernel.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kernel.spec b/kernel.spec index 99b1f25f..ef2fa516 100644 --- a/kernel.spec +++ b/kernel.spec @@ -19,6 +19,12 @@ %define debuginfodir /usr/lib/debug %define with_debuginfo 1 +# Do not recompute the build-id of vmlinux in find-debuginfo.sh +%global _missing_build_ids_terminate_build 1 +%global _no_recompute_build_ids 1 +%undefine _include_minidebuginfo +%undefine _include_gdb_index +%undefine _unique_build_ids %define with_source 1 -- Gitee