diff options
Diffstat (limited to 'kernel.spec')
-rw-r--r-- | kernel.spec | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/kernel.spec b/kernel.spec index c3dd5f7e6..e9068ac6d 100644 --- a/kernel.spec +++ b/kernel.spec @@ -32,6 +32,8 @@ Summary: The Linux kernel %endif # define buildid .local +%define packager Thorsten Leemhuis https://fedoraproject.org/wiki/Kernel_Vanilla_Repositories +%define buildid .vanilla.knurd.1 # baserelease defines which build revision of this kernel version we're # building. We used to call this fedora_build, but the magical name @@ -62,10 +64,16 @@ Summary: The Linux kernel # Do we have a -stable update to apply? %define stable_update 0 +# Is it a -stable RC? +%define stable_rc 0 # Set rpm version accordingly %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 5.%{base_sublevel}.%{stable_update} @@ -96,14 +104,14 @@ Summary: The Linux kernel # kernel PAE (only valid for ARM (lpae)) %define with_pae %{?_without_pae: 0} %{?!_without_pae: 1} # kernel-debug -%define with_debug %{?_without_debug: 0} %{?!_without_debug: 1} +%define with_debug %{?_with_debug: 1} %{?!_with_debug: 0} # kernel-doc %define with_doc %{?_without_doc: 0} %{?!_without_doc: 1} # kernel-headers %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} # @@ -123,7 +131,7 @@ Summary: The Linux kernel %define with_cross %{?_with_cross: 1} %{?!_with_cross: 0} # # build a release kernel on rawhide -%define with_release %{?_with_release: 1} %{?!_with_release: 0} +%define with_release %{?_without_release: 0} %{?!_without_release: 1} # verbose build, i.e. no silent rules and V=1 %define with_verbose %{?_with_verbose: 1} %{?!_with_verbose: 0} @@ -149,12 +157,17 @@ Summary: The Linux kernel %endif # Want to build a vanilla kernel build without any non-upstream patches? -%define with_vanilla %{?_with_vanilla: 1} %{?!_with_vanilla: 0} +%define with_vanilla %{?_without_vanilla: 0} %{?!_without_vanilla: 1} # 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 @@ -201,7 +214,7 @@ Summary: The Linux kernel %endif %if %{nopatches} -%define variant -vanilla +#define variant -vanilla %endif %if !%{debugbuildsenabled} @@ -390,7 +403,7 @@ Version: %{rpmversion} Release: %{pkg_release} # DO NOT CHANGE THE 'ExclusiveArch' LINE TO TEMPORARILY EXCLUDE AN ARCHITECTURE BUILD. # SET %%nobuildarches (ABOVE) INSTEAD -ExclusiveArch: x86_64 s390x %{arm} aarch64 ppc64le +ExclusiveArch: %{all_x86} x86_64 s390x %{arm} aarch64 ppc64le ExclusiveOS: Linux %ifnarch %{nobuildarches} Requires: kernel-core-uname-r = %{KVERREL}%{?variant} @@ -497,6 +510,10 @@ Source1000: kernel-local %define stable_patch_00 patch-5.%{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 @@ -1004,6 +1021,9 @@ fi xzcat %{SOURCE5000} | patch -p1 -F1 -s git commit -a -m "Stable update" %endif +%if 0%{?stable_rc} +ApplyPatch %{stable_patch_01} +%endif # Note: Even in the "nopatches" path some patches (build tweaks and compile # fixes) will always get applied; see patch defition above for details |