From 43b5dd313cc7127722d80f0c3dd4f0b35352e3c3 Mon Sep 17 00:00:00 2001 From: Michal Suchanek Date: May 26 2022 08:43:07 +0000 Subject: kernel-binary.spec: Support radio selection for debuginfo. To disable debuginfo on 5.18 kernel a radio selection needs to be switched to a different selection. This requires disabling the currently active option and selecting NONE as debuginfo type. Signed-off-by: Michal Suchanek --- diff --git a/rpm/kernel-binary.spec.in b/rpm/kernel-binary.spec.in index 138c8e5..ca47698 100644 --- a/rpm/kernel-binary.spec.in +++ b/rpm/kernel-binary.spec.in @@ -441,6 +441,11 @@ if echo %_project | grep -Eqx -f %_sourcedir/release-projects; then fi %endif +DEBUG_INFO_TYPE="$(grep "CONFIG_DEBUG_INFO_DWARF.*=y" .config)" +DEBUG_INFO_TYPE="${DEBUG_INFO_TYPE%%=y}" +DEBUG_INFO_TYPE="${DEBUG_INFO_TYPE##CONFIG_DEBUG_INFO_}" +echo "Kernel debuginfo type: ${DEBUG_INFO_TYPE}" + ../scripts/config \ --set-str CONFIG_LOCALVERSION -%source_rel-%build_flavor \ --enable CONFIG_SUSE_KERNEL \ @@ -448,7 +453,9 @@ fi %if 0%{?__debug_package:1} --enable CONFIG_DEBUG_INFO %else - --disable CONFIG_DEBUG_INFO + --disable CONFIG_DEBUG_INFO \ + --disable CONFIG_DEBUG_INFO_"${DEBUG_INFO_TYPE}" \ + --enable CONFIG_DEBUG_INFO_NONE %endif if [ %CONFIG_MODULE_SIG = "y" ]; then