Switch up some Fedora options
Downstream has different requirements than Fedora in some places. Add some macros to support both cases.
This commit is contained in:
parent
5648544aab
commit
d9864a2973
30
kernel.spec
30
kernel.spec
@ -8,8 +8,14 @@ Summary: The Linux kernel
|
|||||||
# be 0.
|
# be 0.
|
||||||
%global released_kernel 0
|
%global released_kernel 0
|
||||||
|
|
||||||
|
%if 0%{?fedora}
|
||||||
|
%define secure_boot_arch x86_64
|
||||||
|
%else
|
||||||
|
%define secure_boot_arch x86_64 aarch64 s390x ppc64le
|
||||||
|
%endif
|
||||||
|
|
||||||
# Signing for secure boot authentication
|
# Signing for secure boot authentication
|
||||||
%ifarch %{ix86} x86_64
|
%ifarch %{secure_boot_arch}
|
||||||
%global signkernel 1
|
%global signkernel 1
|
||||||
%else
|
%else
|
||||||
%global signkernel 0
|
%global signkernel 0
|
||||||
@ -166,6 +172,10 @@ Summary: The Linux kernel
|
|||||||
%define with_ipaclones 0
|
%define with_ipaclones 0
|
||||||
# no whitelist
|
# no whitelist
|
||||||
%define with_kernel_abi_whitelists 0
|
%define with_kernel_abi_whitelists 0
|
||||||
|
# Fedora builds these separately
|
||||||
|
%define with_perf 0
|
||||||
|
%define with_tools 0
|
||||||
|
%define with_bpftool 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with_verbose}
|
%if %{with_verbose}
|
||||||
@ -289,8 +299,6 @@ Summary: The Linux kernel
|
|||||||
%define with_kabidwchk 0
|
%define with_kabidwchk 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%define all_x86 i386 i686
|
|
||||||
|
|
||||||
%if %{with_vdso_install}
|
%if %{with_vdso_install}
|
||||||
%define use_vdso 1
|
%define use_vdso 1
|
||||||
%endif
|
%endif
|
||||||
@ -307,10 +315,12 @@ Summary: The Linux kernel
|
|||||||
%define doc_build_fail true
|
%define doc_build_fail true
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?fedora}
|
||||||
# don't do debug builds on anything but i686 and x86_64
|
# don't do debug builds on anything but i686 and x86_64
|
||||||
%ifnarch i686 x86_64
|
%ifnarch i686 x86_64
|
||||||
%define with_debug 0
|
%define with_debug 0
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
# don't build noarch kernels or headers (duh)
|
# don't build noarch kernels or headers (duh)
|
||||||
%ifarch noarch
|
%ifarch noarch
|
||||||
@ -329,7 +339,7 @@ Summary: The Linux kernel
|
|||||||
|
|
||||||
# Per-arch tweaks
|
# Per-arch tweaks
|
||||||
|
|
||||||
%ifarch %{all_x86}
|
%ifarch i686
|
||||||
%define asmarch x86
|
%define asmarch x86
|
||||||
%define hdrarch i386
|
%define hdrarch i386
|
||||||
%define all_arch_configs kernel-%{version}-i?86*.config
|
%define all_arch_configs kernel-%{version}-i?86*.config
|
||||||
@ -404,7 +414,11 @@ Summary: The Linux kernel
|
|||||||
# Which is a BadThing(tm).
|
# Which is a BadThing(tm).
|
||||||
|
|
||||||
# We only build kernel-headers on the following...
|
# We only build kernel-headers on the following...
|
||||||
|
%if 0%{?fedora}
|
||||||
%define nobuildarches i386
|
%define nobuildarches i386
|
||||||
|
%else
|
||||||
|
%define nobuildarches i386 i686
|
||||||
|
%endif
|
||||||
|
|
||||||
%ifarch %nobuildarches
|
%ifarch %nobuildarches
|
||||||
%define with_up 0
|
%define with_up 0
|
||||||
@ -416,7 +430,11 @@ Summary: The Linux kernel
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Architectures we build tools/cpupower on
|
# Architectures we build tools/cpupower on
|
||||||
|
%if 0%{?fedora}
|
||||||
%define cpupowerarchs %{ix86} x86_64 ppc64le %{arm} aarch64
|
%define cpupowerarchs %{ix86} x86_64 ppc64le %{arm} aarch64
|
||||||
|
%else
|
||||||
|
%define cpupowerarchs i686 x86_64 ppc64le aarch64
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{use_vdso}
|
%if %{use_vdso}
|
||||||
|
|
||||||
@ -446,7 +464,11 @@ Version: %{rpmversion}
|
|||||||
Release: %{pkg_release}
|
Release: %{pkg_release}
|
||||||
# DO NOT CHANGE THE 'ExclusiveArch' LINE TO TEMPORARILY EXCLUDE AN ARCHITECTURE BUILD.
|
# DO NOT CHANGE THE 'ExclusiveArch' LINE TO TEMPORARILY EXCLUDE AN ARCHITECTURE BUILD.
|
||||||
# SET %%nobuildarches (ABOVE) INSTEAD
|
# SET %%nobuildarches (ABOVE) INSTEAD
|
||||||
|
%if 0%{?fedora}
|
||||||
ExclusiveArch: x86_64 s390x %{arm} aarch64 ppc64le
|
ExclusiveArch: x86_64 s390x %{arm} aarch64 ppc64le
|
||||||
|
%else
|
||||||
|
ExclusiveArch: noarch i386 i686 x86_64 s390x %{arm} aarch64 ppc64le
|
||||||
|
%endif
|
||||||
ExclusiveOS: Linux
|
ExclusiveOS: Linux
|
||||||
%ifnarch %{nobuildarches}
|
%ifnarch %{nobuildarches}
|
||||||
Requires: kernel-core-uname-r = %{KVERREL}%{?variant}
|
Requires: kernel-core-uname-r = %{KVERREL}%{?variant}
|
||||||
|
Loading…
Reference in New Issue
Block a user