From 8889befdae1082ed94839355a09db8d36bb61537 Mon Sep 17 00:00:00 2001 From: Thorsten Leemhuis Date: Wed, 21 Nov 2018 12:29:02 +0100 Subject: disable debuginfo generation and add hunks to build stable-rc kernels --- kernel.spec | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/kernel.spec b/kernel.spec index 95cdaf686..955b6874f 100644 --- a/kernel.spec +++ b/kernel.spec @@ -54,6 +54,8 @@ Summary: The Linux kernel ## If this is a released kernel ## %if 0%{?released_kernel} +# Is it a -stable RC? +%define stable_rc 0 # Do we have a -stable update to apply? %define stable_update 3 @@ -61,6 +63,10 @@ Summary: The Linux kernel %if 0%{?stable_update} %define stablerev %{stable_update} %define stable_base %{stable_update} +%if 0%{?stable_rc} +# stable RCs are incremental patches, so we need the previous stable patch +%define stable_base %(echo $((%{stable_update} - 1))) +%endif %endif %define rpmversion 4.%{base_sublevel}.%{stable_update} @@ -96,7 +102,7 @@ Summary: The Linux kernel %define with_headers %{?_without_headers: 0} %{?!_without_headers: 1} %define with_cross_headers %{?_without_cross_headers: 0} %{?!_without_cross_headers: 1} # kernel-debuginfo -%define with_debuginfo %{?_without_debuginfo: 0} %{?!_without_debuginfo: 1} +%define with_debuginfo %{?_with_debuginfo: 1} %{?!_with_debuginfo: 0} # Want to build a the vsdo directories installed %define with_vdso_install %{?_without_vdso_install: 0} %{?!_without_vdso_install: 1} # @@ -144,7 +150,12 @@ Summary: The Linux kernel # pkg_release is what we'll fill in for the rpm Release: field %if 0%{?released_kernel} +%if 0%{?stable_rc} +%define stable_rctag .rc%{stable_rc} +%define pkg_release 0%{stable_rctag}.%{fedora_build}%{?buildid}%{?dist} +%else %define pkg_release %{fedora_build}%{?buildid}%{?dist} +%endif %else @@ -476,6 +487,10 @@ Source2001: cpupower.config %define stable_patch_00 patch-4.%{base_sublevel}.%{stable_base}.xz Source5000: %{stable_patch_00} %endif +%if 0%{?stable_rc} +%define stable_patch_01 patch-3.%{base_sublevel}.%{stable_update}-rc%{stable_rc}.xz +Patch01: %{stable_patch_01} +%endif # non-released_kernel case # These are automagically defined by the rcrev and gitrev values set up @@ -1129,6 +1144,9 @@ do rm $i.tmp done %endif +%if 0%{?stable_rc} +ApplyPatch %{stable_patch_01} +%endif # only deal with configs if we are going to build for the arch %ifnarch %nobuildarches -- cgit