From 1a83867a1fd3c03436403356565b49f13ce95075 Mon Sep 17 00:00:00 2001 From: "fu.lin" Date: Sat, 26 Dec 2020 03:09:04 +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 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kernel.spec b/kernel.spec index 9621a608..61d03bc3 100644 --- a/kernel.spec +++ b/kernel.spec @@ -1,4 +1,3 @@ - %define with_signmodules 1 %define with_kabichk 0 @@ -16,6 +15,13 @@ %global pkg_release .7 %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 %define with_python2 0 -- Gitee