From: Herton R. Krzesinski herton@redhat.com
rpmspec: only build debug meta packages where we build debug ones
Previous commit "rpmspec: build debug-* meta-packages if debug builds are disabled" failed to consider the architectures or cases where we disable debug packages, and made meta packages being built for them even if real debug package build was disabled in the normal case. So eg. for arches we don't build kernels (eg. i686) debug meta packages could appear even if we don't have kernel/kernel-debug being built.
This adds some logic to see if really with_debug was enabled, and creating the meta-package only when it is enabled/set.
Signed-off-by: Herton R. Krzesinski herton@redhat.com
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template index blahblah..blahblah 100755 --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -281,10 +281,6 @@ Summary: The Linux kernel %define debugbuildsenabled 1 %endif
-%if !%{debugbuildsenabled} -%define with_debug 0 -%endif - %if !%{with_debuginfo} %define _enable_debug_packages 0 %endif @@ -508,6 +504,18 @@ Summary: The Linux kernel %define _use_vdso 0 %endif
+# If build of debug packages is disabled, we need to know if we want to create +# meta debug packages or not, after we define with_debug for all specific cases +# above. So this must be at the end here, after all cases of with_debug or not. +%define with_debug_meta 0 +%if !%{debugbuildsenabled} +%if %{with_debug} +%define with_debug_meta 1 +%endif +%define with_debug 0 +%endif + + # # Packages that need to be installed before the kernel is, because the %%post # scripts use them. @@ -2856,7 +2864,7 @@ fi
%kernel_variant_files %{_use_vdso} %{with_up} %kernel_variant_files %{_use_vdso} %{with_debug} debug -%if !%{debugbuildsenabled} +%if %{with_debug_meta} %files debug %files debug-core %files debug-devel
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1198
From: Justin M. Forbes on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1198#note_6147298...
Acked-by: Justin M. Forbes jforbes@fedoraproject.org (via approve button)
From: Patrick Talbert on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1198#note_6150500...
Acked-by: Patrick Talbert ptalbert@redhat.com (via approve button)
kernel@lists.fedoraproject.org