From 54f944953b095569bd9a7ea16deac352a0f0740a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 30 Jun 2021 02:21:13 +0200 Subject: [PATCH] Build debuginfo packages And include few adjustments copied from Fedora's spec. Otherwise the build fails (for example on trying to make debuginfo for each sub-package and missing vmlinux in the process). --- kernel.spec.in | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/kernel.spec.in b/kernel.spec.in index e2abc17a..216daf50 100644 --- a/kernel.spec.in +++ b/kernel.spec.in @@ -34,18 +34,19 @@ %define debuginfodir /usr/lib/debug # debuginfo build is disabled by default to save disk space (it needs 2-3GB build time) -%define with_debuginfo 0 +%define with_debuginfo 1 # Sign all modules %global signmodules 1 %if !%{with_debuginfo} -%global debug_package %{nil} %define _build_id_links none %define setup_config --enable CONFIG_DEBUG_INFO_NONE \\\ --disable CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT \\\ --disable CONFIG_DEBUG_INFO +%define _enable_debug_packages 0 %else +%define _build_id_links alldebug %define setup_config --enable CONFIG_DEBUG_INFO \\\ --enable CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT \\\ --disable CONFIG_DEBUG_INFO_REDUCED @@ -92,6 +93,15 @@ BuildRequires: gcc-c++ BuildRequires: dwarves %endif +# Copied from Fedora's spec, to fix debuginfo package +%undefine _include_minidebuginfo +%undefine _find_debuginfo_dwz_opts +%undefine _unique_build_ids +%undefine _unique_debug_names +%undefine _unique_debug_srcs +%undefine _debugsource_packages +%undefine _debuginfo_subpackages + Provides: multiversion(kernel) Provides: %name = %kernelrelease