diff options
Diffstat (limited to 'kernel.spec')
-rw-r--r-- | kernel.spec | 157 |
1 files changed, 120 insertions, 37 deletions
diff --git a/kernel.spec b/kernel.spec index 0b1abc362..c605d66bb 100644 --- a/kernel.spec +++ b/kernel.spec @@ -1,6 +1,30 @@ +# All Global changes to build and install go here. +# Per the below section about __spec_install_pre, any rpm +# environment changes that affect %%install need to go +# here before the %%install macro is pre-built. + +# Disable LTO in userspace packages. %global _lto_cflags %{nil} -# We have to override the new %%install behavior because, well... the kernel is special. + + +# The kernel's %%install section is special +# Normally the %%install section starts by cleaning up the BUILD_ROOT +# like so: +# +# %%__spec_install_pre %%{___build_pre}\ +# [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "${RPM_BUILD_ROOT}"\ +# mkdir -p `dirname "$RPM_BUILD_ROOT"`\ +# mkdir "$RPM_BUILD_ROOT"\ +# %%{nil} +# +# But because of kernel variants, the %%build section, specifically +# BuildKernel(), moves each variant to its final destination as the +# variant is built. This violates the expectation of the %%install +# section. As a result we snapshot the current env variables and +# purposely leave out the removal section. All global wide changes +# should be added above this line otherwise the %%install section +# will not see them. %global __spec_install_pre %{___build_pre} # Short-term fix so the package builds with GCC 10. @@ -32,7 +56,7 @@ Summary: The Linux kernel # For a stable, released kernel, released_kernel should be 1. %global released_kernel 0 -%global distro_build 0.rc1.20201028gited8780e3f2ec.57 +%global distro_build 0.rc2.62 %if 0%{?fedora} %define secure_boot_arch x86_64 @@ -73,20 +97,19 @@ Summary: The Linux kernel %endif %define rpmversion 5.10.0 -%define pkgrelease 0.rc1.20201028gited8780e3f2ec.57 +%define pkgrelease 0.rc2.62 # This is needed to do merge window version magic %define patchlevel 10 # allow pkg_release to have configurable %%{?dist} tag -%define specrelease 0.rc1.20201028gited8780e3f2ec.57%{?buildid}%{?dist} +%define specrelease 0.rc2.62%{?buildid}%{?dist} %define pkg_release %{specrelease} -# What parts do we want to build? We must build at least one kernel. -# These are the kernels that are built IF the architecture allows it. -# All should default to 1 (enabled) and be flipped to 0 (disabled) -# by later arch-specific checks. +# What parts do we want to build? These are the kernels that are built IF the +# architecture allows it. All should default to 1 (enabled) and be flipped to +# 0 (disabled) by later arch-specific checks. # The following build options are enabled by default. # Use either --without <opt> in your rpmbuild command or force values @@ -503,6 +526,7 @@ BuildRequires: numactl-devel %endif %if %{with_tools} BuildRequires: gettext ncurses-devel +BuildRequires: libcap-devel libcap-ng-devel %ifnarch s390x BuildRequires: pciutils-devel %endif @@ -512,7 +536,7 @@ BuildRequires: python3-docutils BuildRequires: zlib-devel binutils-devel %endif %if %{with_selftests} -BuildRequires: llvm +BuildRequires: clang llvm %ifnarch %{arm} BuildRequires: numactl-devel %endif @@ -570,7 +594,7 @@ BuildRequires: asciidoc # exact git commit you can run # # xzcat -qq ${TARBALL} | git get-tar-commit-id -Source0: linux-20201028gited8780e3f2ec.tar.xz +Source0: linux-5.10-rc2.tar.xz Source1: Makefile.rhelver @@ -1214,8 +1238,8 @@ ApplyOptionalPatch() fi } -%setup -q -n kernel-20201028gited8780e3f2ec -c -mv linux-20201028gited8780e3f2ec linux-%{KVERREL} +%setup -q -n kernel-5.10-rc2 -c +mv linux-5.10-rc2 linux-%{KVERREL} cd linux-%{KVERREL} # cp -a %{SOURCE1} . @@ -1342,33 +1366,18 @@ cp_vmlinux() %define make %{__make} %{?cross_opts} %{?make_opts} HOSTCFLAGS="%{?build_hostcflags}" HOSTLDFLAGS="%{?build_hostldflags}" -BuildKernel() { - MakeTarget=$1 - KernelImage=$2 - Flavour=$4 - DoVDSO=$3 - Flav=${Flavour:++${Flavour}} - InstallName=${5:-vmlinuz} +InitBuildVars() { + # Initialize the kernel .config file and create some variables that are + # needed for the actual build process. - DoModules=1 - if [ "$Flavour" = "zfcpdump" ]; then - DoModules=0 - fi + Flavour=$1 + Flav=${Flavour:++${Flavour}} - # Pick the right config file for the kernel we're building + # Pick the right kernel config file Config=kernel-%{version}-%{_target_cpu}${Flavour:+-${Flavour}}.config DevelDir=/usr/src/kernels/%{KVERREL}${Flav} - # When the bootable image is just the ELF kernel, strip it. - # We already copy the unstripped file into the debuginfo package. - if [ "$KernelImage" = vmlinux ]; then - CopyKernel=cp_vmlinux - else - CopyKernel=cp - fi - KernelVer=%{version}-%{release}.%{_target_cpu}${Flav} - echo BUILDING A KERNEL FOR ${Flavour} %{_target_cpu}... # make sure EXTRAVERSION says what we want it to say # Trim the release if this is a CI build, since KERNELVERSION is limited to 64 characters @@ -1379,8 +1388,6 @@ BuildKernel() { # if we are post rc1 this should match anyway so this won't matter perl -p -i -e 's/^PATCHLEVEL.*/PATCHLEVEL = %{patchlevel}/' Makefile - # and now to start the build process - %{make} %{?_smp_mflags} mrproper cp configs/$Config .config @@ -1397,6 +1404,32 @@ BuildKernel() { if [ "$Flavour" == "" ]; then KCFLAGS="$KCFLAGS %{?kpatch_kcflags}" fi +} + +BuildKernel() { + MakeTarget=$1 + KernelImage=$2 + Flavour=$4 + DoVDSO=$3 + Flav=${Flavour:++${Flavour}} + InstallName=${5:-vmlinuz} + + DoModules=1 + if [ "$Flavour" = "zfcpdump" ]; then + DoModules=0 + fi + + # When the bootable image is just the ELF kernel, strip it. + # We already copy the unstripped file into the debuginfo package. + if [ "$KernelImage" = vmlinux ]; then + CopyKernel=cp_vmlinux + else + CopyKernel=cp + fi + + InitBuildVars $Flavour + + echo BUILDING A KERNEL FOR ${Flavour} %{_target_cpu}... %{make} ARCH=$Arch olddefconfig >/dev/null @@ -1923,6 +1956,14 @@ BuildKernel %make_target %kernel_image %{use_vdso} lpae BuildKernel %make_target %kernel_image %{_use_vdso} %endif +%ifnarch noarch i686 +%if !%{with_debug} && !%{with_zfcpdump} && !%{with_up} +# If only building the user space tools, then initialize the build environment +# and some variables so that the various userspace tools can be built. +InitBuildVars +%endif +%endif + %global perf_make \ %{__make} -s EXTRA_CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags}" %{?cross_opts} -C tools/perf V=1 NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 prefix=%{_prefix} PYTHON=%{__python3} %if %{with_perf} @@ -2640,11 +2681,53 @@ fi # # %changelog -* Wed Oct 28 2020 Fedora Kernel Team <kernel-team@fedoraproject.org> [5.10.0-0.rc1.20201028gited8780e3f2ec.56] +* Mon Nov 02 2020 Fedora Kernel Team <kernel-team@fedoraproject.org> [5.10.0-0.rc2.61.test] +- v5.10-rc2 rebase + +* Sun Nov 01 2020 Fedora Kernel Team <kernel-team@fedoraproject.org> [5.10.0-0.rc1.20201101gitc2dc4c073fb7.60.test] +- c2dc4c073fb7 rebase + +* Sat Oct 31 2020 Fedora Kernel Team <kernel-team@fedoraproject.org> [5.10.0-0.rc1.20201031git5fc6b075e165.59.test] +- 5fc6b075e165 rebase +- Allow building of kernel-tools standalone (Don Zickus) +- Allow kernel-tools to build without selftests (Don Zickus) + +* Fri Oct 30 2020 Fedora Kernel Team <kernel-team@fedoraproject.org> [5.10.0-0.rc1.20201030git07e088730245.58.test] +- 07e088730245 rebase - Fix LTO issues with kernel-tools (Don Zickus) +- New configs in drivers/mfd (Fedora Kernel Team) +- arm64/defconfig: Enable CONFIG_KEXEC_FILE (Bhupesh Sharma) [https://bugzilla.redhat.com/show_bug.cgi?id=1821565] +- redhat/configs: Cleanup CONFIG_CRYPTO_SHA512 (Prarit Bhargava) +- redhat: ark: disable CONFIG_NET_ACT_CTINFO (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_TEQL (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_SFB (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_QFQ (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_PLUG (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_PIE (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_MULTIQ (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_HHF (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_DSMARK (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_DRR (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_CODEL (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_CHOKE (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_CBQ (Davide Caratti) +- redhat: ark: disable CONFIG_NET_SCH_ATM (Davide Caratti) +- redhat: ark: disable CONFIG_NET_EMATCH and sub-targets (Davide Caratti) +- redhat: ark: disable CONFIG_NET_CLS_TCINDEX (Davide Caratti) +- redhat: ark: disable CONFIG_NET_CLS_RSVP6 (Davide Caratti) +- redhat: ark: disable CONFIG_NET_CLS_RSVP (Davide Caratti) +- redhat: ark: disable CONFIG_NET_CLS_ROUTE4 (Davide Caratti) +- redhat: ark: disable CONFIG_NET_CLS_BASIC (Davide Caratti) +- redhat: ark: disable CONFIG_NET_ACT_SKBMOD (Davide Caratti) +- redhat: ark: disable CONFIG_NET_ACT_SIMP (Davide Caratti) +- redhat: ark: disable CONFIG_NET_ACT_NAT (Davide Caratti) + +* Thu Oct 29 2020 Fedora Kernel Team <kernel-team@fedoraproject.org> [5.10.0-0.rc1.20201029git23859ae44402.57.test] +- 23859ae44402 rebase + +* Thu Oct 29 2020 Fedora Kernel Team <kernel-team@fedoraproject.org> [5.10.0-0.rc1.20201029gited8780e3f2ec.56.test] - Point pathfix to the new location for gen_compile_commands.py ("Justin M. Forbes") - Filter out LTO build options from the perl ccopts ("Justin M. Forbes") -- Work around for gcc bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96377 ("Justin M. Forbes") * Wed Oct 28 2020 Fedora Kernel Team <kernel-team@fedoraproject.org> [5.10.0-0.rc1.20201028gited8780e3f2ec.55.test] - ed8780e3f2ec rebase |