File 2-stabul.patch of Package kernel-source-stabul

Index: kernel-source-stabul/config.conf
===================================================================
--- kernel-source-stabul.orig/config.conf
+++ kernel-source-stabul/config.conf
@@ -16,1 +16,1 @@
-+x86_64		x86_64/default
++x86_64		x86_64/stabul
Index: kernel-source-stabul/config.sh
===================================================================
--- kernel-source-stabul.orig/config.sh
+++ kernel-source-stabul/config.sh
@@ -3,5 +3,5 @@
 # variant of the kernel-source package, either empty or "-rt"
-VARIANT=
+VARIANT=-stabul
 # enable kernel module compression
 COMPRESS_MODULES="zstd"
 COMPRESS_VMLINUX="xz"
Index: kernel-source-stabul/kernel.spec
===================================================================
--- kernel-source-stabul.orig/kernel-default.spec
+++ kernel-source-stabul/kernel-default.spec
@@ -23,4 +23,4 @@
-%define variant %{nil}
+%define variant -stabul%{nil}
 %define compress_modules zstd
 %define compress_vmlinux xz
 %define livepatch livepatch%{nil}
@@ -32,2 +32,2 @@
-%define build_flavor default
+%define build_flavor stabul
 %define generate_compile_commands 1
@@ -39,1 +39,1 @@
-Name:           kernel-default
+Name:           kernel-stabul
@@ -134,4 +134,6 @@
 %global cpu_arch %(%_sourcedir/arch-symbols %_target_cpu)
 %define cpu_arch_flavor %cpu_arch/%build_flavor
+# Use original kernel flavor for loading configs
+%define cpu_arch_oflavor %cpu_arch/default
 
 %if 0%{?_project:1} && ( %(echo %_project | grep -Ex -f %_sourcedir/release-projects | grep -vc ^PTF) || %(echo %_project | grep -Ec "^(Devel:)?Kernel:") )
@@ -141,7 +143,7 @@
 # Define some CONFIG variables as rpm macros as well. (rpm cannot handle
 # defining them all at once.)
 %define config_vars CONFIG_MODULES CONFIG_MODULE_SIG CONFIG_MODULE_SIG_HASH CONFIG_KMSG_IDS CONFIG_SUSE_KERNEL_SUPPORTED CONFIG_EFI_STUB CONFIG_LIVEPATCH_IPA_CLONES CONFIG_DEBUG_INFO_BTF_MODULES CONFIG_PREEMPT_DYNAMIC
-%{expand:%(eval "$(test -n "%cpu_arch_flavor" && tar -xjf %_sourcedir/config.tar.bz2 --to-stdout config/%cpu_arch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)}
+%{expand:%(eval "$(test -n "%cpu_arch_oflavor" && tar -xjf %_sourcedir/config.tar.bz2 --to-stdout config/%cpu_arch_oflavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)}
 %define split_extra ("%CONFIG_MODULES" == "y" && "%CONFIG_SUSE_KERNEL_SUPPORTED" == "y")
 
 %if "%CONFIG_MODULES" != "y"
@@ -1411,12 +1413,12 @@
 if ! [ -f %my_builddir/config/%cpu_arch/$config_base ] ; then
     config_base=%variant
     config_base=${config_base#-}
 fi
-if ! grep -q CONFIG_MMU= "%my_builddir/config/%cpu_arch_flavor"; then
+if ! grep -q CONFIG_MMU= "%my_builddir/config/%cpu_arch_oflavor"; then
 cp "%my_builddir/config/%cpu_arch/$config_base" .config
 ../scripts/kconfig/merge_config.sh -m .config \
-                                   %my_builddir/config/%cpu_arch_flavor
+                                   %my_builddir/config/%cpu_arch_oflavor
 else
-cp %my_builddir/config/%cpu_arch_flavor .config
+cp %my_builddir/config/%cpu_arch_oflavor .config
 fi
 if test -e %my_builddir/config.addon/%cpu_arch_flavor; then
 	# FIXME: config.addon doesn't affect the %CONFIG_ macros defined at
Index: kernel-source-stabul/kernel-syms.spec
===================================================================
--- kernel-source-stabul.orig/kernel-syms.spec
+++ kernel-source-stabul/kernel-syms.spec
@@ -1,5 +1,5 @@
 #
-# spec file for package kernel-syms
+# spec file for package kernel-syms-stabul
 #
 # Copyright (c) 2024 SUSE LLC
 #
@@ -20,5 +20,5 @@
-%define variant %{nil}
+%define variant -stabul%{nil}
 
 %include %_sourcedir/kernel-spec-macros
 
-Name:           kernel-syms
+Name:           kernel-syms-stabul
@@ -52,3 +52,3 @@ 
 %ifarch aarch64 armv6hl armv7hl %ix86 ppc64le riscv64 s390x x86_64
-Requires:       kernel-default-devel = %version-%source_rel
+Requires:       kernel-stabul-devel = %version-%source_rel
 %endif
Index: kernel-source-stabul/kernel-source.spec
===================================================================
--- kernel-source-stabul.orig/kernel-source.spec
+++ kernel-source-stabul/kernel-source.spec
@@ -1,5 +1,5 @@
 #
-# spec file for package kernel-source
+# spec file for package kernel-source-stabul
 #
 # Copyright (c) 2024 SUSE LLC
 #
@@ -22,1 +22,1 @@
-%define variant %{nil}
+%define variant -stabul%{nil}
openSUSE Build Service is sponsored by