Justin Vreeland 1fc083
# All Global changes to build and install go here.
Justin Vreeland 1fc083
# Per the below section about __spec_install_pre, any rpm
Justin Vreeland 1fc083
# environment changes that affect %%install need to go
Justin Vreeland 1fc083
# here before the %%install macro is pre-built.
Justin Vreeland 1fc083
Justin Vreeland 1fc083
# Disable LTO in userspace packages.
Justin Vreeland 1fc083
%global _lto_cflags %{nil}
Justin Vreeland 1fc083
Justin Vreeland 1fc083
# Option to enable compiling with clang instead of gcc.
Justin Vreeland 1fc083
%bcond_with toolchain_clang
Justin Vreeland 1fc083
Justin Vreeland 1fc083
%if %{with toolchain_clang}
Justin Vreeland 1fc083
%global toolchain clang
Justin Vreeland 1fc083
%endif
Justin Vreeland 794d92
Justin Vreeland 1fc083
# Cross compile on copr for arm
Justin Vreeland 1fc083
# See https://bugzilla.redhat.com/1879599
Justin Vreeland 1fc083
%if 0%{?_with_cross_arm:1}
Justin Vreeland 1fc083
%global _target_cpu armv7hl
Justin Vreeland 1fc083
%global _arch arm
Justin Vreeland 1fc083
%global _build_arch arm
Justin Vreeland 1fc083
%global _with_cross    1
Justin Vreeland 1fc083
%endif
Justin Vreeland 1fc083
Justin Vreeland 1fc083
# The kernel's %%install section is special
Justin Vreeland 1fc083
# Normally the %%install section starts by cleaning up the BUILD_ROOT
Justin Vreeland 1fc083
# like so:
Justin Vreeland 1fc083
#
Justin Vreeland 1fc083
# %%__spec_install_pre %%{___build_pre}\
Justin Vreeland 1fc083
#     [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "${RPM_BUILD_ROOT}"\
Justin Vreeland 1fc083
#     mkdir -p `dirname "$RPM_BUILD_ROOT"`\
Justin Vreeland 1fc083
#     mkdir "$RPM_BUILD_ROOT"\
Justin Vreeland 1fc083
# %%{nil}
Justin Vreeland 1fc083
#
Justin Vreeland 1fc083
# But because of kernel variants, the %%build section, specifically
Justin Vreeland 1fc083
# BuildKernel(), moves each variant to its final destination as the
Justin Vreeland 1fc083
# variant is built.  This violates the expectation of the %%install
Justin Vreeland 1fc083
# section.  As a result we snapshot the current env variables and
Justin Vreeland 1fc083
# purposely leave out the removal section.  All global wide changes
Justin Vreeland 1fc083
# should be added above this line otherwise the %%install section
Justin Vreeland 1fc083
# will not see them.
Justin Vreeland 1fc083
%global __spec_install_pre %{___build_pre}
Justin Vreeland 794d92
Justin Vreeland 794d92
# At the time of this writing (2019-03), RHEL8 packages use w2.xzdio
Justin Vreeland 794d92
# compression for rpms (xz, level 2).
Justin Vreeland 794d92
# Kernel has several large (hundreds of mbytes) rpms, they take ~5 mins
Justin Vreeland 794d92
# to compress by single-threaded xz. Switch to threaded compression,
Justin Vreeland 794d92
# and from level 2 to 3 to keep compressed sizes close to "w2" results.
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# NB: if default compression in /usr/lib/rpm/redhat/macros ever changes,
Justin Vreeland 794d92
# this one might need tweaking (e.g. if default changes to w3.xzdio,
Justin Vreeland 794d92
# change below to w4T.xzdio):
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# This is disabled on i686 as it triggers oom errors
Justin Vreeland 794d92
Justin Vreeland 794d92
%ifnarch i686
Justin Vreeland 794d92
%define _binary_payload w3T.xzdio
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
Summary: The Linux kernel
Justin Vreeland 794d92
Justin Vreeland 794d92
# For a kernel released for public testing, released_kernel should be 1.
Justin Vreeland 794d92
# For internal testing builds during development, it should be 0.
Justin Vreeland 794d92
# For rawhide and/or a kernel built from an rc or git snapshot,
Justin Vreeland 794d92
# released_kernel should be 0.
Justin Vreeland 794d92
# For a stable, released kernel, released_kernel should be 1.
Justin Vreeland 1fc083
%global released_kernel 0
Justin Vreeland 794d92
Justin Vreeland d5a02a
%global distro_build 76
Justin Vreeland 1fc083
Justin Vreeland 1fc083
# hyperscale
Justin Vreeland 1fc083
# %if 0%{?fedora}
Justin Vreeland 1fc083
# %define secure_boot_arch x86_64
Justin Vreeland 1fc083
# %else
Justin Vreeland 1fc083
# %define secure_boot_arch x86_64
Justin Vreeland 1fc083
# %endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# Signing for secure boot authentication
Justin Vreeland 1fc083
# %ifarch %{secure_boot_arch}
Justin Vreeland 1fc083
# %global signkernel 1
Justin Vreeland 1fc083
# %else
Justin Vreeland 794d92
%global signkernel 0
Justin Vreeland 1fc083
# %endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# Sign modules on all arches
Justin Vreeland 1fc083
%global signmodules 0
Justin Vreeland 794d92
Justin Vreeland 794d92
# Compress modules only for architectures that build modules
Justin Vreeland 794d92
%ifarch noarch
Justin Vreeland 794d92
%global zipmodules 0
Justin Vreeland 794d92
%else
Justin Vreeland 794d92
%global zipmodules 1
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{zipmodules}
Justin Vreeland 794d92
%global zipsed -e 's/\.ko$/\.ko.xz/'
Justin Vreeland 794d92
# for parallel xz processes, replace with 1 to go back to single process
Justin Vreeland 794d92
%global zcpu `nproc --all`
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# define buildid .local
Justin Vreeland 794d92
Justin Vreeland 1fc083
Justin Vreeland 794d92
%if 0%{?fedora}
Justin Vreeland 794d92
%define primary_target fedora
Justin Vreeland 794d92
%else
Justin Vreeland 61e3fc
%define primary_target rhel
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 1fc083
%define rpmversion 5.14.0
Justin Vreeland 1fc083
%define stableversion 5.14
Justin Vreeland d5a02a
%define pkgrelease 76.hs1.el8
Justin Vreeland 794d92
Justin Vreeland 1fc083
# This is needed to do merge window version magic
Justin Vreeland 1fc083
%define patchlevel 14
Justin Vreeland 794d92
Justin Vreeland 1fc083
# allow pkg_release to have configurable %%{?dist} tag
16261a
%define specrelease 76.hs2%{?buildid}%{?dist}
Justin Vreeland 794d92
Justin Vreeland 1fc083
%define pkg_release %{specrelease}
Justin Vreeland 794d92
Justin Vreeland 1fc083
# What parts do we want to build? These are the kernels that are built IF the
Justin Vreeland 1fc083
# architecture allows it. All should default to 1 (enabled) and be flipped to
Justin Vreeland 1fc083
# 0 (disabled) by later arch-specific checks.
Justin Vreeland 794d92
Justin Vreeland 794d92
# The following build options are enabled by default.
Justin Vreeland 794d92
# Use either --without <opt> in your rpmbuild command or force values
Justin Vreeland 794d92
# to 0 in here to disable them.
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# standard kernel
Justin Vreeland 794d92
%define with_up        %{?_without_up:        0} %{?!_without_up:        1}
Justin Vreeland 794d92
# kernel PAE (only valid for ARM (lpae))
Justin Vreeland 794d92
%define with_pae       %{?_without_pae:       0} %{?!_without_pae:       1}
Justin Vreeland 794d92
# kernel-debug
Justin Vreeland 794d92
%define with_debug     %{?_without_debug:     0} %{?!_without_debug:     1}
Justin Vreeland 794d92
# kernel-doc
Justin Vreeland 794d92
%define with_doc       %{?_without_doc:       0} %{?!_without_doc:       1}
Justin Vreeland 794d92
# kernel-headers
Justin Vreeland 794d92
%define with_headers   %{?_without_headers:   0} %{?!_without_headers:   1}
Justin Vreeland 794d92
%define with_cross_headers   %{?_without_cross_headers:   0} %{?!_without_cross_headers:   1}
Justin Vreeland 794d92
# perf
Justin Vreeland 794d92
%define with_perf      %{?_without_perf:      0} %{?!_without_perf:      1}
Justin Vreeland 794d92
# tools
Justin Vreeland 794d92
%define with_tools     %{?_without_tools:     0} %{?!_without_tools:     1}
Justin Vreeland 794d92
# bpf tool
Justin Vreeland 794d92
%define with_bpftool   %{?_without_bpftool:   0} %{?!_without_bpftool:   1}
Justin Vreeland 794d92
# kernel-debuginfo
Justin Vreeland 794d92
%define with_debuginfo %{?_without_debuginfo: 0} %{?!_without_debuginfo: 1}
Justin Vreeland 794d92
# Want to build a the vsdo directories installed
Justin Vreeland 794d92
%define with_vdso_install %{?_without_vdso_install: 0} %{?!_without_vdso_install: 1}
Justin Vreeland 794d92
# kernel-zfcpdump (s390 specific kernel for zfcpdump)
Justin Vreeland 794d92
%define with_zfcpdump  %{?_without_zfcpdump:  0} %{?!_without_zfcpdump:  1}
Justin Vreeland 794d92
# kernel-abi-whitelists
Justin Vreeland 1fc083
%define with_kernel_abi_whitelists %{?_without_kernel_abi_whitelists: 0} %{?!_without_kernel_abi_whitelists: 1}
Justin Vreeland 794d92
# internal samples and selftests
Justin Vreeland 794d92
%define with_selftests %{?_without_selftests: 0} %{?!_without_selftests: 1}
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# Additional options for user-friendly one-off kernel building:
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# Only build the base kernel (--with baseonly):
Justin Vreeland 794d92
%define with_baseonly  %{?_with_baseonly:     1} %{?!_with_baseonly:     0}
Justin Vreeland 794d92
# Only build the pae kernel (--with paeonly):
Justin Vreeland 794d92
%define with_paeonly   %{?_with_paeonly:      1} %{?!_with_paeonly:      0}
Justin Vreeland 794d92
# Only build the debug kernel (--with dbgonly):
Justin Vreeland 794d92
%define with_dbgonly   %{?_with_dbgonly:      1} %{?!_with_dbgonly:      0}
Justin Vreeland 794d92
# Control whether we perform a compat. check against published ABI.
Justin Vreeland 735474
%define with_kabichk   %{?_without_kabichk:   0} %{?!_without_kabichk:   0}
Justin Vreeland 794d92
# Temporarily disable kabi checks until RC.
Justin Vreeland 794d92
%define with_kabichk 0
Justin Vreeland 794d92
# Control whether we perform a compat. check against DUP ABI.
Justin Vreeland 794d92
%define with_kabidupchk %{?_with_kabidupchk:  1} %{?!_with_kabidupchk:   0}
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# Control whether to run an extensive DWARF based kABI check.
Justin Vreeland 794d92
# Note that this option needs to have baseline setup in SOURCE300.
Justin Vreeland 1fc083
%define with_kabidwchk %{?_without_kabidwchk: 0} %{?!_without_kabidwchk: 0}
Justin Vreeland 794d92
%define with_kabidw_base %{?_with_kabidw_base: 1} %{?!_with_kabidw_base: 0}
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# should we do C=1 builds with sparse
Justin Vreeland 794d92
%define with_sparse    %{?_with_sparse:       1} %{?!_with_sparse:       0}
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# Cross compile requested?
Justin Vreeland 794d92
%define with_cross    %{?_with_cross:         1} %{?!_with_cross:        0}
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# build a release kernel on rawhide
Justin Vreeland 794d92
%define with_release   %{?_with_release:      1} %{?!_with_release:      0}
Justin Vreeland 794d92
Justin Vreeland 794d92
# verbose build, i.e. no silent rules and V=1
Justin Vreeland 794d92
%define with_verbose %{?_with_verbose:        1} %{?!_with_verbose:      0}
Justin Vreeland 794d92
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# check for mismatched config options
Justin Vreeland 794d92
%define with_configchecks %{?_without_configchecks:        0} %{?!_without_configchecks:        1}
Justin Vreeland 794d92
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# gcov support
Justin Vreeland 794d92
%define with_gcov %{?_with_gcov:1}%{?!_with_gcov:0}
Justin Vreeland 794d92
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# ipa_clone support
Justin Vreeland 794d92
%define with_ipaclones %{?_without_ipaclones: 0} %{?!_without_ipaclones: 1}
Justin Vreeland 794d92
Justin Vreeland 794d92
# Want to build a vanilla kernel build without any non-upstream patches?
Justin Vreeland 794d92
%define with_vanilla %{?_with_vanilla: 1} %{?!_with_vanilla: 0}
Justin Vreeland 794d92
Justin Vreeland 794d92
# Set debugbuildsenabled to 1 for production (build separate debug kernels)
Justin Vreeland 794d92
#  and 0 for rawhide (all kernels are debug kernels).
Justin Vreeland 794d92
# See also 'make debug' and 'make release'.
Justin Vreeland 794d92
%define debugbuildsenabled 1
Justin Vreeland 794d92
Justin Vreeland 1fc083
# The kernel tarball/base version
Justin Vreeland 1fc083
%define kversion 5.14
Justin Vreeland 1fc083
Justin Vreeland 794d92
%if 0%{?fedora}
Justin Vreeland 794d92
# Kernel headers are being split out into a separate package
Justin Vreeland 794d92
%define with_headers 0
Justin Vreeland 794d92
%define with_cross_headers 0
Justin Vreeland 794d92
# no ipa_clone for now
Justin Vreeland 794d92
%define with_ipaclones 0
Justin Vreeland 794d92
# no whitelist
Justin Vreeland 794d92
%define with_kernel_abi_whitelists 0
Justin Vreeland 794d92
# Fedora builds these separately
Justin Vreeland 794d92
%define with_perf 0
Justin Vreeland 794d92
%define with_tools 0
Justin Vreeland 794d92
%define with_bpftool 0
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_verbose}
Justin Vreeland 794d92
%define make_opts V=1
Justin Vreeland 794d92
%else
Justin Vreeland 794d92
%define make_opts -s
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 1fc083
%if %{with toolchain_clang}
Justin Vreeland 1fc083
%global make_opts %{make_opts} HOSTCC=clang CC=clang
Justin Vreeland 1fc083
# clang does not support the -fdump-ipa-clones option
Justin Vreeland 1fc083
%global with_ipaclones 0
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# turn off debug kernel and kabichk for gcov builds
Justin Vreeland 794d92
%if %{with_gcov}
Justin Vreeland 794d92
%define with_debug 0
Justin Vreeland 794d92
%define with_kabichk 0
Justin Vreeland 794d92
%define with_kabidupchk 0
Justin Vreeland 794d92
%define with_kabidwchk 0
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# turn off kABI DWARF-based check if we're generating the base dataset
Justin Vreeland 794d92
%if %{with_kabidw_base}
Justin Vreeland 794d92
%define with_kabidwchk 0
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# kpatch_kcflags are extra compiler flags applied to base kernel
Justin Vreeland 794d92
# -fdump-ipa-clones is enabled only for base kernels on selected arches
Justin Vreeland 794d92
%if %{with_ipaclones}
Justin Vreeland 794d92
%ifarch x86_64 ppc64le
Justin Vreeland 794d92
%define kpatch_kcflags -fdump-ipa-clones
Justin Vreeland 794d92
%else
Justin Vreeland 794d92
%define with_ipaclones 0
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%define make_target bzImage
Justin Vreeland 794d92
%define image_install_path boot
Justin Vreeland 794d92
Justin Vreeland 794d92
%define KVERREL %{version}-%{release}.%{_target_cpu}
Justin Vreeland 794d92
%define KVERREL_RE %(echo %KVERREL | sed 's/+/[+]/g')
Justin Vreeland 794d92
%define hdrarch %_target_cpu
Justin Vreeland 794d92
%define asmarch %_target_cpu
Justin Vreeland 794d92
Justin Vreeland 794d92
%if 0%{!?nopatches:1}
Justin Vreeland 794d92
%define nopatches 0
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_vanilla}
Justin Vreeland 794d92
%define nopatches 1
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{nopatches}
Justin Vreeland 794d92
%define variant -vanilla
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if !%{debugbuildsenabled}
Justin Vreeland 794d92
%define with_debug 0
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if !%{with_debuginfo}
Justin Vreeland 794d92
%define _enable_debug_packages 0
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
%define debuginfodir /usr/lib/debug
Justin Vreeland 794d92
# Needed because we override almost everything involving build-ids
Justin Vreeland 794d92
# and debuginfo generation. Currently we rely on the old alldebug setting.
Justin Vreeland 794d92
%global _build_id_links alldebug
Justin Vreeland 794d92
Justin Vreeland 794d92
# kernel PAE is only built on ARMv7
Justin Vreeland 794d92
%ifnarch armv7hl
Justin Vreeland 794d92
%define with_pae 0
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# if requested, only build base kernel
Justin Vreeland 794d92
%if %{with_baseonly}
Justin Vreeland 794d92
%define with_pae 0
Justin Vreeland 794d92
%define with_debug 0
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# if requested, only build pae kernel
Justin Vreeland 794d92
%if %{with_paeonly}
Justin Vreeland 794d92
%define with_up 0
Justin Vreeland 794d92
%define with_debug 0
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# if requested, only build debug kernel
Justin Vreeland 794d92
%if %{with_dbgonly}
Justin Vreeland 794d92
%define with_up 0
Justin Vreeland 794d92
%define with_tools 0
Justin Vreeland 794d92
%define with_perf 0
Justin Vreeland 794d92
%define with_bpftool 0
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# turn off kABI DUP check and DWARF-based check if kABI check is disabled
Justin Vreeland 794d92
%if !%{with_kabichk}
Justin Vreeland 794d92
%define with_kabidupchk 0
Justin Vreeland 794d92
%define with_kabidwchk 0
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_vdso_install}
Justin Vreeland 794d92
%define use_vdso 1
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
Justin Vreeland 794d92
%ifnarch noarch
Justin Vreeland 794d92
%define with_kernel_abi_whitelists 0
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# Overrides for generic default options
Justin Vreeland 794d92
Justin Vreeland 794d92
# only package docs noarch
Justin Vreeland 794d92
%ifnarch noarch
Justin Vreeland 794d92
%define with_doc 0
Justin Vreeland 794d92
%define doc_build_fail true
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if 0%{?fedora}
Justin Vreeland 794d92
# don't do debug builds on anything but i686 and x86_64
Justin Vreeland 794d92
%ifnarch i686 x86_64
Justin Vreeland 794d92
%define with_debug 0
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# don't build noarch kernels or headers (duh)
Justin Vreeland 794d92
%ifarch noarch
Justin Vreeland 794d92
%define with_up 0
Justin Vreeland 794d92
%define with_headers 0
Justin Vreeland 794d92
%define with_cross_headers 0
Justin Vreeland 794d92
%define with_tools 0
Justin Vreeland 794d92
%define with_perf 0
Justin Vreeland 794d92
%define with_bpftool 0
Justin Vreeland 794d92
%define with_selftests 0
Justin Vreeland 794d92
%define with_debug 0
Justin Vreeland 794d92
%define all_arch_configs kernel-%{version}-*.config
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# sparse blows up on ppc
Justin Vreeland 794d92
%ifnarch ppc64le
Justin Vreeland 794d92
%define with_sparse 0
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# zfcpdump mechanism is s390 only
Justin Vreeland 794d92
%ifnarch s390x
Justin Vreeland 794d92
%define with_zfcpdump 0
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if 0%{?fedora}
Justin Vreeland 794d92
# This is not for Fedora
Justin Vreeland 794d92
%define with_zfcpdump 0
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# Per-arch tweaks
Justin Vreeland 794d92
Justin Vreeland 794d92
%ifarch i686
Justin Vreeland 794d92
%define asmarch x86
Justin Vreeland 794d92
%define hdrarch i386
Justin Vreeland 794d92
%define all_arch_configs kernel-%{version}-i?86*.config
Justin Vreeland 794d92
%define kernel_image arch/x86/boot/bzImage
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%ifarch x86_64
Justin Vreeland 794d92
%define asmarch x86
Justin Vreeland 794d92
%define all_arch_configs kernel-%{version}-x86_64*.config
Justin Vreeland 794d92
%define kernel_image arch/x86/boot/bzImage
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%ifarch ppc64le
Justin Vreeland 794d92
%define asmarch powerpc
Justin Vreeland 794d92
%define hdrarch powerpc
Justin Vreeland 794d92
%define make_target vmlinux
Justin Vreeland 794d92
%define kernel_image vmlinux
Justin Vreeland 794d92
%define kernel_image_elf 1
Justin Vreeland 1fc083
%define use_vdso 0
Justin Vreeland 794d92
%define all_arch_configs kernel-%{version}-ppc64le*.config
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%ifarch s390x
Justin Vreeland 794d92
%define asmarch s390
Justin Vreeland 794d92
%define hdrarch s390
Justin Vreeland 794d92
%define all_arch_configs kernel-%{version}-s390x.config
Justin Vreeland 794d92
%define kernel_image arch/s390/boot/bzImage
Justin Vreeland 1fc083
%define vmlinux_decompressor arch/s390/boot/compressed/vmlinux
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%ifarch %{arm}
Justin Vreeland 794d92
%define all_arch_configs kernel-%{version}-arm*.config
Justin Vreeland 794d92
%define skip_nonpae_vdso 1
Justin Vreeland 794d92
%define asmarch arm
Justin Vreeland 794d92
%define hdrarch arm
Justin Vreeland 794d92
%define make_target bzImage
Justin Vreeland 794d92
%define kernel_image arch/arm/boot/zImage
Justin Vreeland 794d92
# http://lists.infradead.org/pipermail/linux-arm-kernel/2012-March/091404.html
Justin Vreeland 794d92
%define kernel_mflags KALLSYMS_EXTRA_PASS=1
Justin Vreeland 794d92
# we only build headers/perf/tools on the base arm arches
Justin Vreeland 794d92
# just like we used to only build them on i386 for x86
Justin Vreeland 794d92
%ifnarch armv7hl
Justin Vreeland 794d92
%define with_headers 0
Justin Vreeland 794d92
%define with_cross_headers 0
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
# These currently don't compile on armv7
Justin Vreeland 794d92
%define with_selftests 0
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%ifarch aarch64
Justin Vreeland 794d92
%define all_arch_configs kernel-%{version}-aarch64*.config
Justin Vreeland 794d92
%define asmarch arm64
Justin Vreeland 794d92
%define hdrarch arm64
Justin Vreeland 794d92
%define make_target Image.gz
Justin Vreeland 794d92
%define kernel_image arch/arm64/boot/Image.gz
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# Should make listnewconfig fail if there's config options
Justin Vreeland 794d92
# printed out?
Justin Vreeland 794d92
%if %{nopatches}
Justin Vreeland 794d92
%define with_configchecks 0
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 1fc083
# Setting the compiler to clang enables some different config options
Justin Vreeland 1fc083
# than what is expected, so disable this check for now.
Justin Vreeland 1fc083
# TODO: What's the best way to fix this?  Do wee need a different set of
Justin Vreeland 1fc083
# configs for clang?
Justin Vreeland 1fc083
%if %{with toolchain_clang}
Justin Vreeland 1fc083
%define with_configchecks 0
Justin Vreeland 1fc083
%endif
Justin Vreeland 1fc083
Justin Vreeland 794d92
# To temporarily exclude an architecture from being built, add it to
Justin Vreeland 794d92
# %%nobuildarches. Do _NOT_ use the ExclusiveArch: line, because if we
Justin Vreeland 794d92
# don't build kernel-headers then the new build system will no longer let
Justin Vreeland 794d92
# us use the previous build of that package -- it'll just be completely AWOL.
Justin Vreeland 794d92
# Which is a BadThing(tm).
Justin Vreeland 794d92
Justin Vreeland 794d92
# We only build kernel-headers on the following...
Justin Vreeland 794d92
%if 0%{?fedora}
Justin Vreeland 794d92
%define nobuildarches i386
Justin Vreeland 794d92
%else
Justin Vreeland 1fc083
%define nobuildarches i386 i686 %{arm}
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%ifarch %nobuildarches
Justin Vreeland 1fc083
# disable BuildKernel commands
Justin Vreeland 794d92
%define with_up 0
Justin Vreeland 794d92
%define with_debug 0
Justin Vreeland 1fc083
%define with_pae 0
Justin Vreeland 1fc083
%define with_zfcpdump 0
Justin Vreeland 1fc083
Justin Vreeland 794d92
%define with_debuginfo 0
Justin Vreeland 794d92
%define with_perf 0
Justin Vreeland 794d92
%define with_tools 0
Justin Vreeland 794d92
%define with_bpftool 0
Justin Vreeland 794d92
%define with_selftests 0
Justin Vreeland 794d92
%define _enable_debug_packages 0
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# Architectures we build tools/cpupower on
Justin Vreeland 794d92
%if 0%{?fedora}
Justin Vreeland 794d92
%define cpupowerarchs %{ix86} x86_64 ppc64le %{arm} aarch64
Justin Vreeland 794d92
%else
Justin Vreeland 794d92
%define cpupowerarchs i686 x86_64 ppc64le aarch64
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 1fc083
%if 0%{?use_vdso}
Justin Vreeland 794d92
Justin Vreeland 794d92
%if 0%{?skip_nonpae_vdso}
Justin Vreeland 794d92
%define _use_vdso 0
Justin Vreeland 794d92
%else
Justin Vreeland 794d92
%define _use_vdso 1
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%else
Justin Vreeland 794d92
%define _use_vdso 0
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# Packages that need to be installed before the kernel is, because the %%post
Justin Vreeland 794d92
# scripts use them.
Justin Vreeland 794d92
#
Justin Vreeland 794d92
%define kernel_prereq  coreutils, systemd >= 203-2, /usr/bin/kernel-install
Justin Vreeland 794d92
%define initrd_prereq  dracut >= 027
Justin Vreeland 794d92
Justin Vreeland 794d92
Justin Vreeland 794d92
Name: kernel%{?variant}
Justin Vreeland 794d92
License: GPLv2 and Redistributable, no modification permitted
Justin Vreeland 794d92
URL: https://www.kernel.org/
Justin Vreeland 794d92
Version: %{rpmversion}
Justin Vreeland 794d92
Release: %{pkg_release}
Justin Vreeland 794d92
# DO NOT CHANGE THE 'ExclusiveArch' LINE TO TEMPORARILY EXCLUDE AN ARCHITECTURE BUILD.
Justin Vreeland 794d92
# SET %%nobuildarches (ABOVE) INSTEAD
Justin Vreeland 794d92
%if 0%{?fedora}
Justin Vreeland 794d92
ExclusiveArch: x86_64 s390x %{arm} aarch64 ppc64le
Justin Vreeland 794d92
%else
Justin Vreeland 794d92
ExclusiveArch: noarch i386 i686 x86_64 s390x %{arm} aarch64 ppc64le
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
ExclusiveOS: Linux
Justin Vreeland 794d92
%ifnarch %{nobuildarches}
Justin Vreeland 794d92
Requires: kernel-core-uname-r = %{KVERREL}%{?variant}
Justin Vreeland 794d92
Requires: kernel-modules-uname-r = %{KVERREL}%{?variant}
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# List the packages used during the kernel build
Justin Vreeland 794d92
#
Justin Vreeland 794d92
BuildRequires: kmod, patch, bash, tar, git-core
Justin Vreeland 794d92
BuildRequires: bzip2, xz, findutils, gzip, m4, perl-interpreter, perl-Carp, perl-devel, perl-generators, make, diffutils, gawk
Justin Vreeland 1fc083
BuildRequires: gcc, binutils, redhat-rpm-config, hmaccalc, bison, flex, gcc-c++
Justin Vreeland 794d92
BuildRequires: net-tools, hostname, bc, elfutils-devel
Justin Vreeland 794d92
BuildRequires: dwarves
Justin Vreeland 794d92
BuildRequires: python3-devel
Justin Vreeland 1fc083
BuildRequires: gcc-plugin-devel
Justin Vreeland d5a02a
# glibc-static is required for a consistent build environment (specifically
Justin Vreeland d5a02a
# CONFIG_CC_CAN_LINK_STATIC=y).
Justin Vreeland d5a02a
BuildRequires: glibc-static
Justin Vreeland d5a02a
# BuildRequires: kernel-rpm-macros >= 185-9
Justin Vreeland d5a02a
%ifnarch %{nobuildarches} noarch
Justin Vreeland d5a02a
BuildRequires: bpftool
Justin Vreeland d5a02a
%endif
Justin Vreeland 794d92
%if %{with_headers}
Justin Vreeland 794d92
BuildRequires: rsync
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
%if %{with_doc}
Justin Vreeland 1fc083
BuildRequires: xmlto, asciidoc, python3-sphinx, python3-sphinx_rtd_theme
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
%if %{with_sparse}
Justin Vreeland 794d92
BuildRequires: sparse
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
%if %{with_perf}
16261a
BuildRequires: zlib-devel binutils-devel newt-devel bison flex xz-devel
16261a
# Drop perl dependency on el8 to avoid modularity issues
16261a
# https://pagure.io/centos-sig-hyperscale/package-bugs/issue/18
16261a
%if %{?rhel} >= 9
16261a
BuildRequires: perl(ExtUtils::Embed)
16261a
%endif
Justin Vreeland 794d92
BuildRequires: audit-libs-devel
Justin Vreeland 794d92
BuildRequires: java-devel
Justin Vreeland 794d92
%ifnarch %{arm} s390x
Justin Vreeland 794d92
BuildRequires: numactl-devel
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
%if %{with_tools}
Justin Vreeland 794d92
BuildRequires: gettext ncurses-devel
Justin Vreeland 1fc083
BuildRequires: libcap-devel libcap-ng-devel
Justin Vreeland 794d92
%ifnarch s390x
Justin Vreeland 794d92
BuildRequires: pciutils-devel
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
%if %{with_bpftool}
Justin Vreeland 794d92
BuildRequires: python3-docutils
Justin Vreeland 794d92
BuildRequires: zlib-devel binutils-devel
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
%if %{with_selftests}
Justin Vreeland 794d92
BuildRequires: clang llvm
Justin Vreeland 794d92
%ifnarch %{arm}
Justin Vreeland 794d92
BuildRequires: numactl-devel
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
BuildRequires: libcap-devel libcap-ng-devel rsync
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
BuildConflicts: rhbuildsys(DiskFree) < 500Mb
Justin Vreeland 794d92
%if %{with_debuginfo}
Justin Vreeland 794d92
BuildRequires: rpm-build, elfutils
Justin Vreeland 794d92
BuildConflicts: rpm < 4.13.0.1-19
Justin Vreeland 794d92
BuildConflicts: dwarves < 1.13
Justin Vreeland 794d92
# Most of these should be enabled after more investigation
Justin Vreeland 794d92
%undefine _include_minidebuginfo
Justin Vreeland 794d92
%undefine _find_debuginfo_dwz_opts
Justin Vreeland 794d92
%undefine _unique_build_ids
Justin Vreeland 794d92
%undefine _unique_debug_names
Justin Vreeland 794d92
%undefine _unique_debug_srcs
Justin Vreeland 794d92
%undefine _debugsource_packages
Justin Vreeland 794d92
%undefine _debuginfo_subpackages
Justin Vreeland 794d92
%global _find_debuginfo_opts -r
Justin Vreeland 794d92
%global _missing_build_ids_terminate_build 1
Justin Vreeland 794d92
%global _no_recompute_build_ids 1
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
%if %{with_kabidwchk} || %{with_kabidw_base}
Justin Vreeland 794d92
BuildRequires: kabi-dw
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 1fc083
# hyperscale
Justin Vreeland 1fc083
# there's a sign-file in the kernel's scripts
Justin Vreeland 1fc083
# %if %{signkernel}%{signmodules}
Justin Vreeland 794d92
BuildRequires: openssl openssl-devel
Justin Vreeland 1fc083
# %if %{signkernel}
Justin Vreeland 1fc083
# %ifarch x86_64 aarch64
Justin Vreeland 794d92
BuildRequires: nss-tools
Justin Vreeland 794d92
BuildRequires: pesign >= 0.10-4
Justin Vreeland 1fc083
# %endif
Justin Vreeland 1fc083
# %endif
Justin Vreeland 1fc083
# %endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_cross}
Justin Vreeland 794d92
BuildRequires: binutils-%{_build_arch}-linux-gnu, gcc-%{_build_arch}-linux-gnu
Justin Vreeland 794d92
%define cross_opts CROSS_COMPILE=%{_build_arch}-linux-gnu-
Justin Vreeland 1fc083
%define __strip %{_build_arch}-linux-gnu-strip
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# These below are required to build man pages
Justin Vreeland 794d92
%if %{with_perf}
Justin Vreeland 794d92
BuildRequires: xmlto
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
%if %{with_perf} || %{with_tools}
Justin Vreeland 794d92
BuildRequires: asciidoc
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 1fc083
%if %{with toolchain_clang}
Justin Vreeland 1fc083
BuildRequires: clang
Justin Vreeland 1fc083
%endif
Justin Vreeland 1fc083
Justin Vreeland 1fc083
# Because this is the kernel, it's hard to get a single upstream URL
Justin Vreeland 1fc083
# to represent the base without needing to do a bunch of patching. This
Justin Vreeland 1fc083
# tarball is generated from a src-git tree. If you want to see the
Justin Vreeland 1fc083
# exact git commit you can run
Justin Vreeland 1fc083
#
Justin Vreeland 1fc083
# xzcat -qq ${TARBALL} | git get-tar-commit-id
Justin Vreeland d5a02a
Source0: linux-5.14.0-76.hs1.el8.tar.xz
Justin Vreeland 1fc083
Justin Vreeland 1fc083
Source1: Makefile.rhelver
Justin Vreeland 1fc083
Justin Vreeland 794d92
Justin Vreeland 794d92
# Name of the packaged file containing signing key
Justin Vreeland 794d92
%ifarch ppc64le
Justin Vreeland 794d92
%define signing_key_filename kernel-signing-ppc.cer
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
%ifarch s390x
Justin Vreeland 794d92
%define signing_key_filename kernel-signing-s390.cer
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 1fc083
Source8: x509.genkey.rhel
Justin Vreeland 61e3fc
# Source9: x509.genkey.fedora
Justin Vreeland 1fc083
Justin Vreeland 794d92
%if %{?released_kernel}
Justin Vreeland 794d92
Justin Vreeland 1fc083
Source10: redhatsecurebootca5.cer
Justin Vreeland 1fc083
Source11: redhatsecurebootca1.cer
Justin Vreeland 1fc083
Source12: redhatsecureboot501.cer
Justin Vreeland 1fc083
Source13: redhatsecureboot301.cer
Justin Vreeland 1fc083
Source14: secureboot_s390.cer
Justin Vreeland 1fc083
Source15: secureboot_ppc.cer
Justin Vreeland 794d92
Justin Vreeland 1fc083
%define secureboot_ca_1 %{SOURCE10}
Justin Vreeland 1fc083
%define secureboot_ca_0 %{SOURCE11}
Justin Vreeland 794d92
%ifarch x86_64 aarch64
Justin Vreeland 1fc083
%define secureboot_key_1 %{SOURCE12}
Justin Vreeland 794d92
%define pesign_name_1 redhatsecureboot501
Justin Vreeland 1fc083
%define secureboot_key_0 %{SOURCE13}
Justin Vreeland 794d92
%define pesign_name_0 redhatsecureboot301
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
%ifarch s390x
Justin Vreeland 1fc083
%define secureboot_key_0 %{SOURCE14}
Justin Vreeland 794d92
%define pesign_name_0 redhatsecureboot302
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
%ifarch ppc64le
Justin Vreeland 1fc083
%define secureboot_key_0 %{SOURCE15}
Justin Vreeland 794d92
%define pesign_name_0 redhatsecureboot303
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# released_kernel
Justin Vreeland 794d92
%else
Justin Vreeland 794d92
Justin Vreeland 1fc083
Source10: redhatsecurebootca4.cer
Justin Vreeland 1fc083
Source11: redhatsecurebootca2.cer
Justin Vreeland 1fc083
Source12: redhatsecureboot401.cer
Justin Vreeland 1fc083
Source13: redhatsecureboot003.cer
Justin Vreeland 794d92
Justin Vreeland 1fc083
%define secureboot_ca_1 %{SOURCE10}
Justin Vreeland 1fc083
%define secureboot_ca_0 %{SOURCE11}
Justin Vreeland 1fc083
%define secureboot_key_1 %{SOURCE12}
Justin Vreeland 794d92
%define pesign_name_1 redhatsecureboot401
Justin Vreeland 1fc083
%define secureboot_key_0 %{SOURCE13}
Justin Vreeland 794d92
%define pesign_name_0 redhatsecureboot003
Justin Vreeland 794d92
Justin Vreeland 794d92
# released_kernel
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
Source22: mod-extra.list.rhel
Justin Vreeland 61e3fc
# Source16: mod-extra.list.fedora
Justin Vreeland 1fc083
Source17: mod-blacklist.sh
Justin Vreeland 794d92
Source18: mod-sign.sh
Justin Vreeland 794d92
Source79: parallel_xz.sh
Justin Vreeland 794d92
Justin Vreeland 1fc083
# Source80: filter-x86_64.sh.fedora
Justin Vreeland 1fc083
# Source81: filter-armv7hl.sh.fedora
Justin Vreeland 1fc083
# Source82: filter-i686.sh.fedora
Justin Vreeland 1fc083
# Source83: filter-aarch64.sh.fedora
Justin Vreeland 1fc083
# Source86: filter-ppc64le.sh.fedora
Justin Vreeland 1fc083
# Source87: filter-s390x.sh.fedora
Justin Vreeland 1fc083
# Source89: filter-modules.sh.fedora
Justin Vreeland 794d92
Justin Vreeland 794d92
Source90: filter-x86_64.sh.rhel
Justin Vreeland 794d92
Source91: filter-armv7hl.sh.rhel
Justin Vreeland 794d92
Source92: filter-i686.sh.rhel
Justin Vreeland 794d92
Source93: filter-aarch64.sh.rhel
Justin Vreeland 1fc083
# Source96: filter-ppc64le.sh.rhel
Justin Vreeland 1fc083
# Source97: filter-s390x.sh.rhel
Justin Vreeland 794d92
Source99: filter-modules.sh.rhel
Justin Vreeland 794d92
%define modsign_cmd %{SOURCE18}
Justin Vreeland 794d92
Justin Vreeland 794d92
Source20: kernel-aarch64-rhel.config
Justin Vreeland 794d92
Source21: kernel-aarch64-debug-rhel.config
Justin Vreeland 1fc083
# Source30: kernel-ppc64le-rhel.config
Justin Vreeland 1fc083
# Source31: kernel-ppc64le-debug-rhel.config
Justin Vreeland 1fc083
# Source32: kernel-s390x-rhel.config
Justin Vreeland 1fc083
# Source33: kernel-s390x-debug-rhel.config
Justin Vreeland 1fc083
# Source34: kernel-s390x-zfcpdump-rhel.config
Justin Vreeland 794d92
Source35: kernel-x86_64-rhel.config
Justin Vreeland 794d92
Source36: kernel-x86_64-debug-rhel.config
Justin Vreeland 794d92
Justin Vreeland 1fc083
# Source37: kernel-aarch64-fedora.config
Justin Vreeland 1fc083
# Source38: kernel-aarch64-debug-fedora.config
Justin Vreeland 1fc083
# Source39: kernel-armv7hl-fedora.config
Justin Vreeland 1fc083
# Source40: kernel-armv7hl-debug-fedora.config
Justin Vreeland 1fc083
# Source41: kernel-armv7hl-lpae-fedora.config
Justin Vreeland 1fc083
# Source42: kernel-armv7hl-lpae-debug-fedora.config
Justin Vreeland 1fc083
# Source43: kernel-i686-fedora.config
Justin Vreeland 1fc083
# Source44: kernel-i686-debug-fedora.config
Justin Vreeland 1fc083
# Source45: kernel-ppc64le-fedora.config
Justin Vreeland 1fc083
# Source46: kernel-ppc64le-debug-fedora.config
Justin Vreeland 1fc083
# Source47: kernel-s390x-fedora.config
Justin Vreeland 1fc083
# Source48: kernel-s390x-debug-fedora.config
Justin Vreeland 1fc083
# Source49: kernel-x86_64-fedora.config
Justin Vreeland 1fc083
# Source50: kernel-x86_64-debug-fedora.config
Justin Vreeland 1fc083
Justin Vreeland 61e3fc
# Source5000: kernel-x86_64-centos-sig-hyperscale.config
Justin Vreeland 61e3fc
# Source5001: kernel-x86_64-debug-centos-sig-hyperscale.config
Justin Vreeland 61e3fc
# Source5002: filter-x86_64.sh.centos-sig-hyperscale
Justin Vreeland 61e3fc
# Source5003: filter-modules.sh.centos-sig-hyperscale
Justin Vreeland 61e3fc
# Source5004: mod-extra.list.centos-sig-hyperscale
Justin Vreeland 61e3fc
# Source5005: kernel-aarch64-centos-sig-hyperscale.config
Justin Vreeland 61e3fc
# Source5006: kernel-aarch64-debug-centos-sig-hyperscale.config
Justin Vreeland 61e3fc
# Source5007: filter-aarch64.sh.centos-sig-hyperscale
Justin Vreeland 61e3fc
# Source5008: filter-modules.sh.centos-sig-hyperscale
Justin Vreeland 61e3fc
# Source5009: mod-extra.list.centos-sig-hyperscale
Justin Vreeland 794d92
Justin Vreeland 794d92
Source51: generate_all_configs.sh
Justin Vreeland 794d92
Justin Vreeland 794d92
Source52: process_configs.sh
Justin Vreeland 794d92
Source53: generate_bls_conf.sh
Justin Vreeland 794d92
Source56: update_scripts.sh
Justin Vreeland 794d92
Justin Vreeland 794d92
Source54: mod-internal.list
Justin Vreeland 1fc083
Justin Vreeland 1fc083
Source100: rheldup3.x509
Justin Vreeland 1fc083
Source101: rhelkpatch1.x509
Justin Vreeland 794d92
Justin Vreeland 794d92
Source200: check-kabi
Justin Vreeland 794d92
Justin Vreeland 794d92
Source201: Module.kabi_aarch64
Justin Vreeland 794d92
Source202: Module.kabi_ppc64le
Justin Vreeland 794d92
Source203: Module.kabi_s390x
Justin Vreeland 794d92
Source204: Module.kabi_x86_64
Justin Vreeland 794d92
Justin Vreeland 794d92
Source210: Module.kabi_dup_aarch64
Justin Vreeland 794d92
Source211: Module.kabi_dup_ppc64le
Justin Vreeland 794d92
Source212: Module.kabi_dup_s390x
Justin Vreeland 794d92
Source213: Module.kabi_dup_x86_64
Justin Vreeland 794d92
Justin Vreeland 1fc083
Source300: kernel-abi-stablelists-%{rpmversion}-%{distro_build}.tar.bz2
Justin Vreeland d5a02a
Source301: kernel-kabi-dw-%{rpmversion}-%{pkgrelease}.tar.bz2
Justin Vreeland 794d92
Justin Vreeland 794d92
# Sources for kernel-tools
Justin Vreeland 794d92
Source2000: cpupower.service
Justin Vreeland 794d92
Source2001: cpupower.config
Justin Vreeland 794d92
Justin Vreeland 1fc083
# Some people enjoy building customized kernels from the dist-git in Fedora and
Justin Vreeland 1fc083
# use this to override configuration options. One day they may all use the
Justin Vreeland 1fc083
# source tree, but in the mean time we carry this to support the legacy workflow
Justin Vreeland 1fc083
Source3000: merge.pl
Justin Vreeland 1fc083
Source3001: kernel-local
Justin Vreeland 1fc083
Source3003: Patchlist.changelog
Justin Vreeland 794d92
Justin Vreeland 1fc083
Source4000: README.rst
Justin Vreeland e85230
Justin Vreeland 794d92
## Patches needed for building this package
Justin Vreeland 794d92
Justin Vreeland 1fc083
%if !%{nopatches}
Justin Vreeland 794d92
Justin Vreeland 1fc083
Patch1: patch-%{stableversion}-redhat.patch
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 1fc083
# empty final patch to facilitate testing of kernel patches
Justin Vreeland 1fc083
Patch999999: linux-kernel-test.patch
Justin Vreeland 794d92
Justin Vreeland 794d92
# END OF PATCH DEFINITIONS
Justin Vreeland 794d92
Justin Vreeland 794d92
%description
Justin Vreeland 794d92
The kernel meta package
Justin Vreeland 794d92
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# This macro does requires, provides, conflicts, obsoletes for a kernel package.
Justin Vreeland 794d92
#	%%kernel_reqprovconf <subpackage>
Justin Vreeland 794d92
# It uses any kernel_<subpackage>_conflicts and kernel_<subpackage>_obsoletes
Justin Vreeland 794d92
# macros defined above.
Justin Vreeland 794d92
#
Justin Vreeland 794d92
%define kernel_reqprovconf \
Justin Vreeland 794d92
Provides: kernel = %{rpmversion}-%{pkg_release}\
Justin Vreeland 794d92
Provides: kernel-%{_target_cpu} = %{rpmversion}-%{pkg_release}%{?1:+%{1}}\
Justin Vreeland 794d92
Provides: kernel-drm-nouveau = 16\
Justin Vreeland 794d92
Provides: kernel-uname-r = %{KVERREL}%{?variant}%{?1:+%{1}}\
Justin Vreeland 794d92
Requires(pre): %{kernel_prereq}\
Justin Vreeland 794d92
Requires(pre): %{initrd_prereq}\
Justin Vreeland d5a02a
Requires(pre): ((linux-firmware >= 20150904-56.git6ebf5d57) if linux-firmware)\
Justin Vreeland d5a02a
Recommends: linux-firmware\
Justin Vreeland 794d92
Requires(preun): systemd >= 200\
Justin Vreeland 794d92
Conflicts: xfsprogs < 4.3.0-1\
Justin Vreeland 794d92
Conflicts: xorg-x11-drv-vmmouse < 13.0.99\
Justin Vreeland 794d92
%{expand:%%{?kernel%{?1:_%{1}}_conflicts:Conflicts: %%{kernel%{?1:_%{1}}_conflicts}}}\
Justin Vreeland 794d92
%{expand:%%{?kernel%{?1:_%{1}}_obsoletes:Obsoletes: %%{kernel%{?1:_%{1}}_obsoletes}}}\
Justin Vreeland 794d92
%{expand:%%{?kernel%{?1:_%{1}}_provides:Provides: %%{kernel%{?1:_%{1}}_provides}}}\
Justin Vreeland 794d92
# We can't let RPM do the dependencies automatic because it'll then pick up\
Justin Vreeland 794d92
# a correct but undesirable perl dependency from the module headers which\
Justin Vreeland 794d92
# isn't required for the kernel proper to function\
Justin Vreeland 794d92
AutoReq: no\
Justin Vreeland 794d92
AutoProv: yes\
Justin Vreeland 794d92
%{nil}
Justin Vreeland 794d92
Justin Vreeland 794d92
Justin Vreeland 794d92
%package doc
Justin Vreeland 794d92
Summary: Various documentation bits found in the kernel source
Justin Vreeland 794d92
Group: Documentation
Justin Vreeland 794d92
%description doc
Justin Vreeland 794d92
This package contains documentation files from the kernel
Justin Vreeland 794d92
source. Various bits of information about the Linux kernel and the
Justin Vreeland 794d92
device drivers shipped with it are documented in these files.
Justin Vreeland 794d92
Justin Vreeland 794d92
You'll want to install this package if you need a reference to the
Justin Vreeland 794d92
options that can be passed to Linux kernel modules at load time.
Justin Vreeland 794d92
Justin Vreeland 794d92
Justin Vreeland 794d92
%package headers
Justin Vreeland 794d92
Summary: Header files for the Linux kernel for use by glibc
Justin Vreeland 794d92
Obsoletes: glibc-kernheaders < 3.0-46
Justin Vreeland 794d92
Provides: glibc-kernheaders = 3.0-46
Justin Vreeland 794d92
%if "0%{?variant}"
Justin Vreeland 794d92
Obsoletes: kernel-headers < %{rpmversion}-%{pkg_release}
Justin Vreeland 794d92
Provides: kernel-headers = %{rpmversion}-%{pkg_release}
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
%description headers
Justin Vreeland 794d92
Kernel-headers includes the C header files that specify the interface
Justin Vreeland 794d92
between the Linux kernel and userspace libraries and programs.  The
Justin Vreeland 794d92
header files define structures and constants that are needed for
Justin Vreeland 794d92
building most standard programs and are also needed for rebuilding the
Justin Vreeland 794d92
glibc package.
Justin Vreeland 794d92
Justin Vreeland 794d92
%package cross-headers
Justin Vreeland 794d92
Summary: Header files for the Linux kernel for use by cross-glibc
Justin Vreeland 794d92
%description cross-headers
Justin Vreeland 794d92
Kernel-cross-headers includes the C header files that specify the interface
Justin Vreeland 794d92
between the Linux kernel and userspace libraries and programs.  The
Justin Vreeland 794d92
header files define structures and constants that are needed for
Justin Vreeland 794d92
building most standard programs and are also needed for rebuilding the
Justin Vreeland 794d92
cross-glibc package.
Justin Vreeland 794d92
Justin Vreeland 794d92
Justin Vreeland 794d92
%package debuginfo-common-%{_target_cpu}
Justin Vreeland 794d92
Summary: Kernel source files used by %{name}-debuginfo packages
Justin Vreeland 794d92
Provides: installonlypkg(kernel)
Justin Vreeland 794d92
%description debuginfo-common-%{_target_cpu}
Justin Vreeland 794d92
This package is required by %{name}-debuginfo subpackages.
Justin Vreeland 794d92
It provides the kernel source files common to all builds.
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_perf}
Justin Vreeland 794d92
%package -n perf
Justin Vreeland 794d92
Summary: Performance monitoring for the Linux kernel
Justin Vreeland 794d92
License: GPLv2
Justin Vreeland 794d92
%description -n perf
Justin Vreeland 794d92
This package contains the perf tool, which enables performance monitoring
Justin Vreeland 794d92
of the Linux kernel.
Justin Vreeland 794d92
Justin Vreeland 794d92
%package -n perf-debuginfo
Justin Vreeland 794d92
Summary: Debug information for package perf
Justin Vreeland 794d92
Requires: %{name}-debuginfo-common-%{_target_cpu} = %{version}-%{release}
Justin Vreeland 794d92
AutoReqProv: no
Justin Vreeland 794d92
%description -n perf-debuginfo
Justin Vreeland 794d92
This package provides debug information for the perf package.
Justin Vreeland 794d92
Justin Vreeland 794d92
# Note that this pattern only works right to match the .build-id
Justin Vreeland 794d92
# symlinks because of the trailing nonmatching alternation and
Justin Vreeland 794d92
# the leading .*, because of find-debuginfo.sh's buggy handling
Justin Vreeland 794d92
# of matching the pattern against the symlinks file.
Justin Vreeland 794d92
%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%%{_bindir}/perf(\.debug)?|.*%%{_libexecdir}/perf-core/.*|.*%%{_libdir}/traceevent/plugins/.*|.*%%{_libdir}/libperf-jvmti.so(\.debug)?|XXX' -o perf-debuginfo.list}
Justin Vreeland 794d92
Justin Vreeland 794d92
%package -n python3-perf
Justin Vreeland 794d92
Summary: Python bindings for apps which will manipulate perf events
Justin Vreeland 794d92
%description -n python3-perf
Justin Vreeland 794d92
The python3-perf package contains a module that permits applications
Justin Vreeland 794d92
written in the Python programming language to use the interface
Justin Vreeland 794d92
to manipulate perf events.
Justin Vreeland 794d92
Justin Vreeland 794d92
%package -n python3-perf-debuginfo
Justin Vreeland 794d92
Summary: Debug information for package perf python bindings
Justin Vreeland 794d92
Requires: %{name}-debuginfo-common-%{_target_cpu} = %{version}-%{release}
Justin Vreeland 794d92
AutoReqProv: no
Justin Vreeland 794d92
%description -n python3-perf-debuginfo
Justin Vreeland 794d92
This package provides debug information for the perf python bindings.
Justin Vreeland 794d92
Justin Vreeland 794d92
# the python_sitearch macro should already be defined from above
Justin Vreeland 794d92
%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%%{python3_sitearch}/perf.*so(\.debug)?|XXX' -o python3-perf-debuginfo.list}
Justin Vreeland 794d92
Justin Vreeland 794d92
# with_perf
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_tools}
Justin Vreeland 794d92
%package -n kernel-tools
Justin Vreeland 794d92
Summary: Assortment of tools for the Linux kernel
Justin Vreeland 794d92
License: GPLv2
Justin Vreeland 794d92
%ifarch %{cpupowerarchs}
Justin Vreeland 794d92
Provides:  cpupowerutils = 1:009-0.6.p1
Justin Vreeland 794d92
Obsoletes: cpupowerutils < 1:009-0.6.p1
Justin Vreeland 794d92
Provides:  cpufreq-utils = 1:009-0.6.p1
Justin Vreeland 794d92
Provides:  cpufrequtils = 1:009-0.6.p1
Justin Vreeland 794d92
Obsoletes: cpufreq-utils < 1:009-0.6.p1
Justin Vreeland 794d92
Obsoletes: cpufrequtils < 1:009-0.6.p1
Justin Vreeland 794d92
Obsoletes: cpuspeed < 1:1.5-16
Justin Vreeland 794d92
Requires: kernel-tools-libs = %{version}-%{release}
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
%define __requires_exclude ^%{_bindir}/python
Justin Vreeland 794d92
%description -n kernel-tools
Justin Vreeland 794d92
This package contains the tools/ directory from the kernel source
Justin Vreeland 794d92
and the supporting documentation.
Justin Vreeland 794d92
Justin Vreeland 794d92
%package -n kernel-tools-libs
Justin Vreeland 794d92
Summary: Libraries for the kernels-tools
Justin Vreeland 794d92
License: GPLv2
Justin Vreeland 794d92
%description -n kernel-tools-libs
Justin Vreeland 794d92
This package contains the libraries built from the tools/ directory
Justin Vreeland 794d92
from the kernel source.
Justin Vreeland 794d92
Justin Vreeland 794d92
%package -n kernel-tools-libs-devel
Justin Vreeland 794d92
Summary: Assortment of tools for the Linux kernel
Justin Vreeland 794d92
License: GPLv2
Justin Vreeland 794d92
Requires: kernel-tools = %{version}-%{release}
Justin Vreeland 794d92
%ifarch %{cpupowerarchs}
Justin Vreeland 794d92
Provides:  cpupowerutils-devel = 1:009-0.6.p1
Justin Vreeland 794d92
Obsoletes: cpupowerutils-devel < 1:009-0.6.p1
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Requires: kernel-tools-libs = %{version}-%{release}
Justin Vreeland 794d92
Provides: kernel-tools-devel
Justin Vreeland 794d92
%description -n kernel-tools-libs-devel
Justin Vreeland 794d92
This package contains the development files for the tools/ directory from
Justin Vreeland 794d92
the kernel source.
Justin Vreeland 794d92
Justin Vreeland 794d92
%package -n kernel-tools-debuginfo
Justin Vreeland 794d92
Summary: Debug information for package kernel-tools
Justin Vreeland 794d92
Requires: %{name}-debuginfo-common-%{_target_cpu} = %{version}-%{release}
Justin Vreeland 794d92
AutoReqProv: no
Justin Vreeland 794d92
%description -n kernel-tools-debuginfo
Justin Vreeland 794d92
This package provides debug information for package kernel-tools.
Justin Vreeland 794d92
Justin Vreeland 794d92
# Note that this pattern only works right to match the .build-id
Justin Vreeland 794d92
# symlinks because of the trailing nonmatching alternation and
Justin Vreeland 794d92
# the leading .*, because of find-debuginfo.sh's buggy handling
Justin Vreeland 794d92
# of matching the pattern against the symlinks file.
Justin Vreeland 1fc083
%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%%{_bindir}/centrino-decode(\.debug)?|.*%%{_bindir}/powernow-k8-decode(\.debug)?|.*%%{_bindir}/cpupower(\.debug)?|.*%%{_libdir}/libcpupower.*|.*%%{_bindir}/turbostat(\.debug)?|.*%%{_bindir}/x86_energy_perf_policy(\.debug)?|.*%%{_bindir}/tmon(\.debug)?|.*%%{_bindir}/lsgpio(\.debug)?|.*%%{_bindir}/gpio-hammer(\.debug)?|.*%%{_bindir}/gpio-event-mon(\.debug)?|.*%%{_bindir}/gpio-watch(\.debug)?|.*%%{_bindir}/iio_event_monitor(\.debug)?|.*%%{_bindir}/iio_generic_buffer(\.debug)?|.*%%{_bindir}/lsiio(\.debug)?|.*%%{_bindir}/intel-speed-select(\.debug)?|XXX' -o kernel-tools-debuginfo.list}
Justin Vreeland 794d92
Justin Vreeland 794d92
# with_tools
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_bpftool}
Justin Vreeland 794d92
Justin Vreeland 794d92
%package -n bpftool
Justin Vreeland 794d92
Summary: Inspection and simple manipulation of eBPF programs and maps
Justin Vreeland 794d92
License: GPLv2
Justin Vreeland 794d92
%description -n bpftool
Justin Vreeland 794d92
This package contains the bpftool, which allows inspection and simple
Justin Vreeland 794d92
manipulation of eBPF programs and maps.
Justin Vreeland 794d92
Justin Vreeland 794d92
%package -n bpftool-debuginfo
Justin Vreeland 794d92
Summary: Debug information for package bpftool
Justin Vreeland 794d92
Group: Development/Debug
Justin Vreeland 794d92
Requires: %{name}-debuginfo-common-%{_target_cpu} = %{version}-%{release}
Justin Vreeland 794d92
AutoReqProv: no
Justin Vreeland 794d92
%description -n bpftool-debuginfo
Justin Vreeland 794d92
This package provides debug information for the bpftool package.
Justin Vreeland 794d92
Justin Vreeland 794d92
%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%%{_sbindir}/bpftool(\.debug)?|XXX' -o bpftool-debuginfo.list}
Justin Vreeland 794d92
Justin Vreeland 794d92
# with_bpftool
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_selftests}
Justin Vreeland 794d92
Justin Vreeland 794d92
%package selftests-internal
Justin Vreeland 794d92
Summary: Kernel samples and selftests
Justin Vreeland 794d92
License: GPLv2
Justin Vreeland 794d92
Requires: binutils, bpftool, iproute-tc, nmap-ncat
Justin Vreeland 794d92
Requires: kernel-modules-internal = %{version}-%{release}
Justin Vreeland 794d92
%description selftests-internal
Justin Vreeland 794d92
Kernel sample programs and selftests.
Justin Vreeland 794d92
Justin Vreeland 794d92
# Note that this pattern only works right to match the .build-id
Justin Vreeland 794d92
# symlinks because of the trailing nonmatching alternation and
Justin Vreeland 794d92
# the leading .*, because of find-debuginfo.sh's buggy handling
Justin Vreeland 794d92
# of matching the pattern against the symlinks file.
Justin Vreeland 794d92
%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%%{_libexecdir}/(ksamples|kselftests)/.*|XXX' -o selftests-debuginfo.list}
Justin Vreeland 794d92
Justin Vreeland 794d92
# with_selftests
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_gcov}
Justin Vreeland 794d92
%package gcov
Justin Vreeland 794d92
Summary: gcov graph and source files for coverage data collection.
Justin Vreeland 794d92
%description gcov
Justin Vreeland 794d92
kernel-gcov includes the gcov graph and source files for gcov coverage collection.
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%package -n kernel-abi-whitelists
Justin Vreeland 794d92
Summary: The Red Hat Enterprise Linux kernel ABI symbol whitelists
Justin Vreeland 794d92
AutoReqProv: no
Justin Vreeland 794d92
%description -n kernel-abi-whitelists
Justin Vreeland 794d92
The kABI package contains information pertaining to the Red Hat Enterprise
Justin Vreeland 794d92
Linux kernel ABI, including lists of kernel symbols that are needed by
Justin Vreeland 794d92
external Linux kernel modules, and a yum plugin to aid enforcement.
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_kabidw_base}
Justin Vreeland 794d92
%package kabidw-base
Justin Vreeland 794d92
Summary: The baseline dataset for kABI verification using DWARF data
Justin Vreeland 794d92
Group: System Environment/Kernel
Justin Vreeland 794d92
AutoReqProv: no
Justin Vreeland 794d92
%description kabidw-base
Justin Vreeland 794d92
The kabidw-base package contains data describing the current ABI of the Red Hat
Justin Vreeland 794d92
Enterprise Linux kernel, suitable for the kabi-dw tool.
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# This macro creates a kernel-<subpackage>-debuginfo package.
Justin Vreeland 794d92
#	%%kernel_debuginfo_package <subpackage>
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# Explanation of the find_debuginfo_opts: We build multiple kernels (debug
Justin Vreeland 794d92
# pae etc.) so the regex filters those kernels appropriately. We also
Justin Vreeland 794d92
# have to package several binaries as part of kernel-devel but getting
Justin Vreeland 794d92
# unique build-ids is tricky for these userspace binaries. We don't really
Justin Vreeland 794d92
# care about debugging those so we just filter those out and remove it.
Justin Vreeland 794d92
%define kernel_debuginfo_package() \
Justin Vreeland 794d92
%package %{?1:%{1}-}debuginfo\
Justin Vreeland 794d92
Summary: Debug information for package %{name}%{?1:-%{1}}\
Justin Vreeland 794d92
Requires: %{name}-debuginfo-common-%{_target_cpu} = %{version}-%{release}\
Justin Vreeland 794d92
Provides: %{name}%{?1:-%{1}}-debuginfo-%{_target_cpu} = %{version}-%{release}\
Justin Vreeland 794d92
Provides: installonlypkg(kernel)\
Justin Vreeland 794d92
AutoReqProv: no\
Justin Vreeland 794d92
%description %{?1:%{1}-}debuginfo\
Justin Vreeland 794d92
This package provides debug information for package %{name}%{?1:-%{1}}.\
Justin Vreeland 794d92
This is required to use SystemTap with %{name}%{?1:-%{1}}-%{KVERREL}.\
Justin Vreeland 794d92
%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*\/usr\/src\/kernels/.*|XXX' -o ignored-debuginfo.list -p '/.*/%%{KVERREL_RE}%{?1:[+]%{1}}/.*|/.*%%{KVERREL_RE}%{?1:\+%{1}}(\.debug)?' -o debuginfo%{?1}.list}\
Justin Vreeland 794d92
%{nil}
Justin Vreeland 794d92
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# This macro creates a kernel-<subpackage>-devel package.
Justin Vreeland 794d92
#	%%kernel_devel_package <subpackage> <pretty-name>
Justin Vreeland 794d92
#
Justin Vreeland 794d92
%define kernel_devel_package() \
Justin Vreeland 794d92
%package %{?1:%{1}-}devel\
Justin Vreeland 794d92
Summary: Development package for building kernel modules to match the %{?2:%{2} }kernel\
Justin Vreeland 794d92
Provides: kernel%{?1:-%{1}}-devel-%{_target_cpu} = %{version}-%{release}\
Justin Vreeland 794d92
Provides: kernel-devel-%{_target_cpu} = %{version}-%{release}%{?1:+%{1}}\
Justin Vreeland 794d92
Provides: kernel-devel-uname-r = %{KVERREL}%{?variant}%{?1:+%{1}}\
Justin Vreeland 794d92
Provides: installonlypkg(kernel)\
Justin Vreeland 794d92
AutoReqProv: no\
Justin Vreeland 794d92
Requires(pre): findutils\
Justin Vreeland 794d92
Requires: findutils\
Justin Vreeland 794d92
Requires: perl-interpreter\
Justin Vreeland 1fc083
Requires: openssl-devel\
Justin Vreeland 1fc083
Requires: elfutils-libelf-devel\
Justin Vreeland 1fc083
Requires: bison\
Justin Vreeland 1fc083
Requires: flex\
Justin Vreeland 1fc083
Requires: make\
Justin Vreeland 1fc083
Requires: gcc\
Justin Vreeland 794d92
%description %{?1:%{1}-}devel\
Justin Vreeland 794d92
This package provides kernel headers and makefiles sufficient to build modules\
Justin Vreeland 794d92
against the %{?2:%{2} }kernel package.\
Justin Vreeland 794d92
%{nil}
Justin Vreeland 794d92
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# kernel-<variant>-ipaclones-internal package
Justin Vreeland 794d92
#
Justin Vreeland 794d92
%define kernel_ipaclones_package() \
Justin Vreeland 794d92
%package %{?1:%{1}-}ipaclones-internal\
Justin Vreeland 794d92
Summary: *.ipa-clones files generated by -fdump-ipa-clones for kernel%{?1:-%{1}}\
Justin Vreeland 794d92
Group: System Environment/Kernel\
Justin Vreeland 794d92
AutoReqProv: no\
Justin Vreeland 794d92
%description %{?1:%{1}-}ipaclones-internal\
Justin Vreeland 794d92
This package provides *.ipa-clones files.\
Justin Vreeland 794d92
%{nil}
Justin Vreeland 794d92
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# This macro creates a kernel-<subpackage>-modules-internal package.
Justin Vreeland 794d92
#	%%kernel_modules_internal_package <subpackage> <pretty-name>
Justin Vreeland 794d92
#
Justin Vreeland 794d92
%define kernel_modules_internal_package() \
Justin Vreeland 794d92
%package %{?1:%{1}-}modules-internal\
Justin Vreeland 794d92
Summary: Extra kernel modules to match the %{?2:%{2} }kernel\
Justin Vreeland 794d92
Group: System Environment/Kernel\
Justin Vreeland 794d92
Provides: kernel%{?1:-%{1}}-modules-internal-%{_target_cpu} = %{version}-%{release}\
Justin Vreeland 794d92
Provides: kernel%{?1:-%{1}}-modules-internal-%{_target_cpu} = %{version}-%{release}%{?1:+%{1}}\
Justin Vreeland 794d92
Provides: kernel%{?1:-%{1}}-modules-internal = %{version}-%{release}%{?1:+%{1}}\
Justin Vreeland 794d92
Provides: installonlypkg(kernel-module)\
Justin Vreeland 794d92
Provides: kernel%{?1:-%{1}}-modules-internal-uname-r = %{KVERREL}%{?variant}%{?1:+%{1}}\
Justin Vreeland 794d92
Requires: kernel-uname-r = %{KVERREL}%{?variant}%{?1:+%{1}}\
Justin Vreeland 794d92
Requires: kernel%{?1:-%{1}}-modules-uname-r = %{KVERREL}%{?variant}%{?1:+%{1}}\
Justin Vreeland 794d92
AutoReq: no\
Justin Vreeland 794d92
AutoProv: yes\
Justin Vreeland 794d92
%description %{?1:%{1}-}modules-internal\
Justin Vreeland 794d92
This package provides kernel modules for the %{?2:%{2} }kernel package for Red Hat internal usage.\
Justin Vreeland 794d92
%{nil}
Justin Vreeland 794d92
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# This macro creates a kernel-<subpackage>-modules-extra package.
Justin Vreeland 794d92
#	%%kernel_modules_extra_package <subpackage> <pretty-name>
Justin Vreeland 794d92
#
Justin Vreeland 794d92
%define kernel_modules_extra_package() \
Justin Vreeland 794d92
%package %{?1:%{1}-}modules-extra\
Justin Vreeland 794d92
Summary: Extra kernel modules to match the %{?2:%{2} }kernel\
Justin Vreeland 794d92
Provides: kernel%{?1:-%{1}}-modules-extra-%{_target_cpu} = %{version}-%{release}\
Justin Vreeland 794d92
Provides: kernel%{?1:-%{1}}-modules-extra-%{_target_cpu} = %{version}-%{release}%{?1:+%{1}}\
Justin Vreeland 794d92
Provides: kernel%{?1:-%{1}}-modules-extra = %{version}-%{release}%{?1:+%{1}}\
Justin Vreeland 794d92
Provides: installonlypkg(kernel-module)\
Justin Vreeland 794d92
Provides: kernel%{?1:-%{1}}-modules-extra-uname-r = %{KVERREL}%{?variant}%{?1:+%{1}}\
Justin Vreeland 794d92
Requires: kernel-uname-r = %{KVERREL}%{?variant}%{?1:+%{1}}\
Justin Vreeland 794d92
Requires: kernel%{?1:-%{1}}-modules-uname-r = %{KVERREL}%{?variant}%{?1:+%{1}}\
Justin Vreeland 794d92
AutoReq: no\
Justin Vreeland 794d92
AutoProv: yes\
Justin Vreeland 794d92
%description %{?1:%{1}-}modules-extra\
Justin Vreeland 794d92
This package provides less commonly used kernel modules for the %{?2:%{2} }kernel package.\
Justin Vreeland 794d92
%{nil}
Justin Vreeland 794d92
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# This macro creates a kernel-<subpackage>-modules package.
Justin Vreeland 794d92
#	%%kernel_modules_package <subpackage> <pretty-name>
Justin Vreeland 794d92
#
Justin Vreeland 794d92
%define kernel_modules_package() \
Justin Vreeland 794d92
%package %{?1:%{1}-}modules\
Justin Vreeland 794d92
Summary: kernel modules to match the %{?2:%{2}-}core kernel\
Justin Vreeland 794d92
Provides: kernel%{?1:-%{1}}-modules-%{_target_cpu} = %{version}-%{release}\
Justin Vreeland 794d92
Provides: kernel-modules-%{_target_cpu} = %{version}-%{release}%{?1:+%{1}}\
Justin Vreeland 794d92
Provides: kernel-modules = %{version}-%{release}%{?1:+%{1}}\
Justin Vreeland 794d92
Provides: installonlypkg(kernel-module)\
Justin Vreeland 794d92
Provides: kernel%{?1:-%{1}}-modules-uname-r = %{KVERREL}%{?variant}%{?1:+%{1}}\
Justin Vreeland 794d92
Requires: kernel-uname-r = %{KVERREL}%{?variant}%{?1:+%{1}}\
Justin Vreeland 794d92
AutoReq: no\
Justin Vreeland 794d92
AutoProv: yes\
Justin Vreeland 794d92
%description %{?1:%{1}-}modules\
Justin Vreeland 794d92
This package provides commonly used kernel modules for the %{?2:%{2}-}core kernel package.\
Justin Vreeland 794d92
%{nil}
Justin Vreeland 794d92
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# this macro creates a kernel-<subpackage> meta package.
Justin Vreeland 794d92
#	%%kernel_meta_package <subpackage>
Justin Vreeland 794d92
#
Justin Vreeland 794d92
%define kernel_meta_package() \
Justin Vreeland 794d92
%package %{1}\
Justin Vreeland 794d92
summary: kernel meta-package for the %{1} kernel\
Justin Vreeland 794d92
Requires: kernel-%{1}-core-uname-r = %{KVERREL}%{?variant}+%{1}\
Justin Vreeland 794d92
Requires: kernel-%{1}-modules-uname-r = %{KVERREL}%{?variant}+%{1}\
Justin Vreeland 794d92
Provides: installonlypkg(kernel)\
Justin Vreeland 794d92
%description %{1}\
Justin Vreeland 794d92
The meta-package for the %{1} kernel\
Justin Vreeland 794d92
%{nil}
Justin Vreeland 794d92
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# This macro creates a kernel-<subpackage> and its -devel and -debuginfo too.
Justin Vreeland 794d92
#	%%define variant_summary The Linux kernel compiled for <configuration>
Justin Vreeland 794d92
#	%%kernel_variant_package [-n <pretty-name>] <subpackage>
Justin Vreeland 794d92
#
Justin Vreeland 794d92
%define kernel_variant_package(n:) \
Justin Vreeland 794d92
%package %{?1:%{1}-}core\
Justin Vreeland 794d92
Summary: %{variant_summary}\
Justin Vreeland 794d92
Provides: kernel-%{?1:%{1}-}core-uname-r = %{KVERREL}%{?variant}%{?1:+%{1}}\
Justin Vreeland 794d92
Provides: installonlypkg(kernel)\
Justin Vreeland 794d92
%{expand:%%kernel_reqprovconf}\
Justin Vreeland 794d92
%if %{?1:1} %{!?1:0} \
Justin Vreeland 794d92
%{expand:%%kernel_meta_package %{?1:%{1}}}\
Justin Vreeland 794d92
%endif\
Justin Vreeland 794d92
%{expand:%%kernel_devel_package %{?1:%{1}} %{!?{-n}:%{1}}%{?{-n}:%{-n*}}}\
Justin Vreeland 794d92
%{expand:%%kernel_modules_package %{?1:%{1}} %{!?{-n}:%{1}}%{?{-n}:%{-n*}}}\
Justin Vreeland 794d92
%{expand:%%kernel_modules_extra_package %{?1:%{1}} %{!?{-n}:%{1}}%{?{-n}:%{-n*}}}\
Justin Vreeland 794d92
%{expand:%%kernel_modules_internal_package %{?1:%{1}} %{!?{-n}:%{1}}%{?{-n}:%{-n*}}}\
Justin Vreeland 794d92
%{expand:%%kernel_debuginfo_package %{?1:%{1}}}\
Justin Vreeland 794d92
%{nil}
Justin Vreeland 794d92
Justin Vreeland 794d92
# Now, each variant package.
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_pae}
Justin Vreeland 794d92
%define variant_summary The Linux kernel compiled for Cortex-A15
Justin Vreeland 794d92
%kernel_variant_package lpae
Justin Vreeland 794d92
%description lpae-core
Justin Vreeland 794d92
This package includes a version of the Linux kernel with support for
Justin Vreeland 794d92
Cortex-A15 devices with LPAE and HW virtualisation support
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_zfcpdump}
Justin Vreeland 794d92
%define variant_summary The Linux kernel compiled for zfcpdump usage
Justin Vreeland 794d92
%kernel_variant_package zfcpdump
Justin Vreeland 794d92
%description zfcpdump-core
Justin Vreeland 794d92
The kernel package contains the Linux kernel (vmlinuz) for use by the
Justin Vreeland 794d92
zfcpdump infrastructure.
Justin Vreeland 794d92
# with_zfcpdump
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%define variant_summary The Linux kernel compiled with extra debugging enabled
Justin Vreeland 794d92
%kernel_variant_package debug
Justin Vreeland 794d92
%description debug-core
Justin Vreeland 794d92
The kernel package contains the Linux kernel (vmlinuz), the core of any
Justin Vreeland 794d92
Linux operating system.  The kernel handles the basic functions
Justin Vreeland 794d92
of the operating system:  memory allocation, process allocation, device
Justin Vreeland 794d92
input and output, etc.
Justin Vreeland 794d92
Justin Vreeland 794d92
This variant of the kernel has numerous debugging options enabled.
Justin Vreeland 794d92
It should only be installed when trying to gather additional information
Justin Vreeland 794d92
on kernel bugs, as some of these options impact performance noticably.
Justin Vreeland 794d92
Justin Vreeland 794d92
# And finally the main -core package
Justin Vreeland 794d92
Justin Vreeland 794d92
%define variant_summary The Linux kernel
Justin Vreeland 794d92
%kernel_variant_package
Justin Vreeland 794d92
%description core
Justin Vreeland 794d92
The kernel package contains the Linux kernel (vmlinuz), the core of any
Justin Vreeland 794d92
Linux operating system.  The kernel handles the basic functions
Justin Vreeland 794d92
of the operating system: memory allocation, process allocation, device
Justin Vreeland 794d92
input and output, etc.
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_ipaclones}
Justin Vreeland 794d92
%kernel_ipaclones_package
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%prep
Justin Vreeland 794d92
# do a few sanity-checks for --with *only builds
Justin Vreeland 794d92
%if %{with_baseonly}
Justin Vreeland 1fc083
%if !%{with_up}
Justin Vreeland 794d92
echo "Cannot build --with baseonly, up build is disabled"
Justin Vreeland 794d92
exit 1
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# more sanity checking; do it quietly
Justin Vreeland 794d92
if [ "%{patches}" != "%%{patches}" ] ; then
Justin Vreeland 794d92
  for patch in %{patches} ; do
Justin Vreeland 794d92
    if [ ! -f $patch ] ; then
Justin Vreeland 794d92
      echo "ERROR: Patch  ${patch##/*/}  listed in specfile but is missing"
Justin Vreeland 794d92
      exit 1
Justin Vreeland 794d92
    fi
Justin Vreeland 794d92
  done
Justin Vreeland 794d92
fi 2>/dev/null
Justin Vreeland 794d92
Justin Vreeland 794d92
patch_command='patch -p1 -F1 -s'
Justin Vreeland 794d92
ApplyPatch()
Justin Vreeland 794d92
{
Justin Vreeland 794d92
  local patch=$1
Justin Vreeland 794d92
  shift
Justin Vreeland 794d92
  if [ ! -f $RPM_SOURCE_DIR/$patch ]; then
Justin Vreeland 794d92
    exit 1
Justin Vreeland 794d92
  fi
Justin Vreeland 794d92
  if ! grep -E "^Patch[0-9]+: $patch\$" %{_specdir}/${RPM_PACKAGE_NAME%%%%%{?variant}}.spec ; then
Justin Vreeland 794d92
    if [ "${patch:0:8}" != "patch-5." ] ; then
Justin Vreeland 794d92
      echo "ERROR: Patch  $patch  not listed as a source patch in specfile"
Justin Vreeland 794d92
      exit 1
Justin Vreeland 794d92
    fi
Justin Vreeland 794d92
  fi 2>/dev/null
Justin Vreeland 794d92
  case "$patch" in
Justin Vreeland 794d92
  *.bz2) bunzip2 < "$RPM_SOURCE_DIR/$patch" | $patch_command ${1+"$@"} ;;
Justin Vreeland 794d92
  *.gz)  gunzip  < "$RPM_SOURCE_DIR/$patch" | $patch_command ${1+"$@"} ;;
Justin Vreeland 794d92
  *.xz)  unxz    < "$RPM_SOURCE_DIR/$patch" | $patch_command ${1+"$@"} ;;
Justin Vreeland 794d92
  *) $patch_command ${1+"$@"} < "$RPM_SOURCE_DIR/$patch" ;;
Justin Vreeland 794d92
  esac
Justin Vreeland 794d92
}
Justin Vreeland 794d92
Justin Vreeland 794d92
# don't apply patch if it's empty
Justin Vreeland 794d92
ApplyOptionalPatch()
Justin Vreeland 794d92
{
Justin Vreeland 794d92
  local patch=$1
Justin Vreeland 794d92
  shift
Justin Vreeland 794d92
  if [ ! -f $RPM_SOURCE_DIR/$patch ]; then
Justin Vreeland 794d92
    exit 1
Justin Vreeland 794d92
  fi
Justin Vreeland 794d92
  local C=$(wc -l $RPM_SOURCE_DIR/$patch | awk '{print $1}')
Justin Vreeland 794d92
  if [ "$C" -gt 9 ]; then
Justin Vreeland 794d92
    ApplyPatch $patch ${1+"$@"}
Justin Vreeland 794d92
  fi
Justin Vreeland 794d92
}
Justin Vreeland 794d92
Justin Vreeland d5a02a
%setup -q  -n kernel-5.14.0-76.hs1.el8 -c
Justin Vreeland d5a02a
mv linux-5.14.0-76.hs1.el8 linux-%{KVERREL}
Justin Vreeland 794d92
Justin Vreeland 794d92
cd linux-%{KVERREL}
Justin Vreeland 1fc083
cp -a %{SOURCE1} .
Justin Vreeland 794d92
Justin Vreeland 1fc083
%if !%{nopatches}
Justin Vreeland 794d92
Justin Vreeland 1fc083
ApplyOptionalPatch patch-%{stableversion}-redhat.patch
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 1fc083
ApplyOptionalPatch linux-kernel-test.patch
Justin Vreeland 794d92
Justin Vreeland 794d92
# END OF PATCH APPLICATIONS
Justin Vreeland 794d92
Justin Vreeland 794d92
# Any further pre-build tree manipulations happen here.
Justin Vreeland 794d92
Justin Vreeland 794d92
chmod +x scripts/checkpatch.pl
Justin Vreeland 794d92
mv COPYING COPYING-%{version}-%{release}
Justin Vreeland 794d92
Justin Vreeland 794d92
# This Prevents scripts/setlocalversion from mucking with our version numbers.
Justin Vreeland 794d92
touch .scmversion
Justin Vreeland 794d92
Justin Vreeland 794d92
# Mangle /usr/bin/python shebangs to /usr/bin/python3
Justin Vreeland 794d92
# Mangle all Python shebangs to be Python 3 explicitly
Justin Vreeland 794d92
# -p preserves timestamps
Justin Vreeland 794d92
# -n prevents creating ~backup files
Justin Vreeland 794d92
# -i specifies the interpreter for the shebang
Justin Vreeland 794d92
# This fixes errors such as
Justin Vreeland 794d92
# *** ERROR: ambiguous python shebang in /usr/bin/kvm_stat: #!/usr/bin/python. Change it to python3 (or python2) explicitly.
Justin Vreeland 794d92
# We patch all sources below for which we got a report/error.
Justin Vreeland 794d92
pathfix.py -i "%{__python3} %{py3_shbang_opts}" -p -n \
Justin Vreeland 794d92
	tools/kvm/kvm_stat/kvm_stat \
Justin Vreeland 794d92
	scripts/show_delta \
Justin Vreeland 794d92
	scripts/diffconfig \
Justin Vreeland 794d92
	scripts/bloat-o-meter \
Justin Vreeland 794d92
	scripts/jobserver-exec \
Justin Vreeland 1fc083
	tools \
Justin Vreeland 794d92
	Documentation \
Justin Vreeland 1fc083
	scripts/clang-tools
Justin Vreeland 794d92
Justin Vreeland 794d92
# only deal with configs if we are going to build for the arch
Justin Vreeland 794d92
%ifnarch %nobuildarches
Justin Vreeland 794d92
Justin Vreeland 794d92
if [ -L configs ]; then
Justin Vreeland 794d92
	rm -f configs
Justin Vreeland 794d92
fi
Justin Vreeland 794d92
mkdir configs
Justin Vreeland 794d92
cd configs
Justin Vreeland 794d92
Justin Vreeland 794d92
# Drop some necessary files from the source dir into the buildroot
Justin Vreeland 794d92
cp $RPM_SOURCE_DIR/kernel-*.config .
Justin Vreeland 794d92
cp %{SOURCE51} .
Justin Vreeland 1fc083
# merge.pl
Justin Vreeland 1fc083
cp %{SOURCE3000} .
Justin Vreeland 1fc083
# kernel-local
Justin Vreeland 1fc083
cp %{SOURCE3001} .
Justin Vreeland 794d92
VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled}
Justin Vreeland 794d92
Justin Vreeland 1fc083
# Merge in any user-provided local config option changes
Justin Vreeland 25ae8f
%ifnarch %nobuildarches
Justin Vreeland 25ae8f
for i in %{all_arch_configs}
Justin Vreeland 25ae8f
do
Justin Vreeland 25ae8f
  mv $i $i.tmp
Justin Vreeland 1fc083
  ./merge.pl %{SOURCE3001} $i.tmp > $i
Justin Vreeland 25ae8f
  rm $i.tmp
Justin Vreeland 25ae8f
done
Justin Vreeland 25ae8f
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# enable GCOV kernel config options if gcov is on
Justin Vreeland 794d92
%if %{with_gcov}
Justin Vreeland 794d92
for i in *.config
Justin Vreeland 794d92
do
Justin Vreeland 794d92
  sed -i 's/# CONFIG_GCOV_KERNEL is not set/CONFIG_GCOV_KERNEL=y\nCONFIG_GCOV_PROFILE_ALL=y\n/' $i
Justin Vreeland 794d92
done
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 1fc083
# Add DUP and kpatch certificates to system trusted keys for RHEL
Justin Vreeland 1fc083
%if 0%{?rhel}
Justin Vreeland 1fc083
%if %{signkernel}%{signmodules}
Justin Vreeland 1fc083
openssl x509 -inform der -in %{SOURCE100} -out rheldup3.pem
Justin Vreeland 1fc083
openssl x509 -inform der -in %{SOURCE101} -out rhelkpatch1.pem
Justin Vreeland 1fc083
cat rheldup3.pem rhelkpatch1.pem > ../certs/rhel.pem
Justin Vreeland 1fc083
for i in *.config; do
Justin Vreeland 1fc083
  sed -i 's@CONFIG_SYSTEM_TRUSTED_KEYS=""@CONFIG_SYSTEM_TRUSTED_KEYS="certs/rhel.pem"@' $i
Justin Vreeland 1fc083
done
Justin Vreeland 1fc083
%endif
Justin Vreeland 1fc083
%endif
Justin Vreeland 1fc083
Justin Vreeland 794d92
cp %{SOURCE52} .
Justin Vreeland 794d92
OPTS=""
Justin Vreeland 794d92
%if %{with_configchecks}
Justin Vreeland 794d92
	OPTS="$OPTS -w -n -c"
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
./process_configs.sh $OPTS kernel %{rpmversion}
Justin Vreeland 794d92
Justin Vreeland 794d92
cp %{SOURCE56} .
Justin Vreeland 794d92
RPM_SOURCE_DIR=$RPM_SOURCE_DIR ./update_scripts.sh %{primary_target}
Justin Vreeland 794d92
Justin Vreeland 794d92
# end of kernel config
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
cd ..
Justin Vreeland 794d92
# # End of Configs stuff
Justin Vreeland 794d92
Justin Vreeland 794d92
# get rid of unwanted files resulting from patch fuzz
Justin Vreeland 794d92
find . \( -name "*.orig" -o -name "*~" \) -delete >/dev/null
Justin Vreeland 794d92
Justin Vreeland 794d92
# remove unnecessary SCM files
Justin Vreeland 794d92
find . -name .gitignore -delete >/dev/null
Justin Vreeland 794d92
Justin Vreeland 794d92
cd ..
Justin Vreeland 794d92
Justin Vreeland 794d92
###
Justin Vreeland 794d92
### build
Justin Vreeland 794d92
###
Justin Vreeland 794d92
%build
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_sparse}
Justin Vreeland 794d92
%define sparse_mflags	C=1
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
cp_vmlinux()
Justin Vreeland 794d92
{
Justin Vreeland 794d92
  eu-strip --remove-comment -o "$2" "$1"
Justin Vreeland 794d92
}
Justin Vreeland 794d92
Justin Vreeland 794d92
# Note we need to disable these flags for cross builds because the flags
Justin Vreeland 794d92
# from redhat-rpm-config assume that host == target so target arch
Justin Vreeland 794d92
# flags cause issues with the host compiler.
Justin Vreeland 794d92
%if !%{with_cross}
Justin Vreeland 794d92
%define build_hostcflags  %{?build_cflags}
Justin Vreeland 794d92
%define build_hostldflags %{?build_ldflags}
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 1fc083
%define make %{__make} %{?cross_opts} %{?make_opts} HOSTCFLAGS="%{?build_hostcflags}" HOSTLDFLAGS="%{?build_hostldflags}"
Justin Vreeland 794d92
Justin Vreeland 1fc083
InitBuildVars() {
Justin Vreeland 1fc083
    # Initialize the kernel .config file and create some variables that are
Justin Vreeland 1fc083
    # needed for the actual build process.
Justin Vreeland 794d92
Justin Vreeland 1fc083
    Flavour=$1
Justin Vreeland 1fc083
    Flav=${Flavour:++${Flavour}}
Justin Vreeland 794d92
Justin Vreeland 1fc083
    # Pick the right kernel config file
Justin Vreeland 794d92
    Config=kernel-%{version}-%{_target_cpu}${Flavour:+-${Flavour}}.config
Justin Vreeland 794d92
    DevelDir=/usr/src/kernels/%{KVERREL}${Flav}
Justin Vreeland 794d92
Justin Vreeland 794d92
    KernelVer=%{version}-%{release}.%{_target_cpu}${Flav}
Justin Vreeland 794d92
Justin Vreeland 794d92
    # make sure EXTRAVERSION says what we want it to say
Justin Vreeland 1fc083
    # Trim the release if this is a CI build, since KERNELVERSION is limited to 64 characters
Justin Vreeland 1fc083
    ShortRel=$(perl -e "print \"%{release}\" =~ s/\.pr\.[0-9A-Fa-f]{32}//r")
Justin Vreeland 1fc083
    perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -${ShortRel}.%{_target_cpu}${Flav}/" Makefile
Justin Vreeland 794d92
Justin Vreeland 794d92
    # if pre-rc1 devel kernel, must fix up PATCHLEVEL for our versioning scheme
Justin Vreeland 1fc083
    # if we are post rc1 this should match anyway so this won't matter
Justin Vreeland 1fc083
    perl -p -i -e 's/^PATCHLEVEL.*/PATCHLEVEL = %{patchlevel}/' Makefile
Justin Vreeland 794d92
Justin Vreeland 794d92
    %{make} %{?_smp_mflags} mrproper
Justin Vreeland 794d92
    cp configs/$Config .config
Justin Vreeland 794d92
Justin Vreeland 794d92
    %if %{signkernel}%{signmodules}
Justin Vreeland 794d92
    cp $RPM_SOURCE_DIR/x509.genkey certs/.
Justin Vreeland 794d92
    %endif
Justin Vreeland 794d92
Justin Vreeland 794d92
    Arch=`head -1 .config | cut -b 3-`
Justin Vreeland 794d92
    echo USING ARCH=$Arch
Justin Vreeland 794d92
Justin Vreeland 794d92
    KCFLAGS="%{?kcflags}"
Justin Vreeland 794d92
Justin Vreeland 794d92
    # add kpatch flags for base kernel
Justin Vreeland 794d92
    if [ "$Flavour" == "" ]; then
Justin Vreeland 794d92
        KCFLAGS="$KCFLAGS %{?kpatch_kcflags}"
Justin Vreeland 794d92
    fi
Justin Vreeland 1fc083
}
Justin Vreeland 1fc083
Justin Vreeland 1fc083
BuildKernel() {
Justin Vreeland 1fc083
    MakeTarget=$1
Justin Vreeland 1fc083
    KernelImage=$2
Justin Vreeland 1fc083
    Flavour=$4
Justin Vreeland 1fc083
    DoVDSO=$3
Justin Vreeland 1fc083
    Flav=${Flavour:++${Flavour}}
Justin Vreeland 1fc083
    InstallName=${5:-vmlinuz}
Justin Vreeland 1fc083
Justin Vreeland 1fc083
    DoModules=1
Justin Vreeland 1fc083
    if [ "$Flavour" = "zfcpdump" ]; then
Justin Vreeland 1fc083
	    DoModules=0
Justin Vreeland 1fc083
    fi
Justin Vreeland 1fc083
Justin Vreeland 1fc083
    # When the bootable image is just the ELF kernel, strip it.
Justin Vreeland 1fc083
    # We already copy the unstripped file into the debuginfo package.
Justin Vreeland 1fc083
    if [ "$KernelImage" = vmlinux ]; then
Justin Vreeland 1fc083
      CopyKernel=cp_vmlinux
Justin Vreeland 1fc083
    else
Justin Vreeland 1fc083
      CopyKernel=cp
Justin Vreeland 1fc083
    fi
Justin Vreeland 1fc083
Justin Vreeland 1fc083
    InitBuildVars $Flavour
Justin Vreeland 1fc083
Justin Vreeland 1fc083
    echo BUILDING A KERNEL FOR ${Flavour} %{_target_cpu}...
Justin Vreeland 794d92
Justin Vreeland 794d92
    %{make} ARCH=$Arch olddefconfig >/dev/null
Justin Vreeland 794d92
Justin Vreeland 794d92
    # This ensures build-ids are unique to allow parallel debuginfo
Justin Vreeland 794d92
    perl -p -i -e "s/^CONFIG_BUILD_SALT.*/CONFIG_BUILD_SALT=\"%{KVERREL}\"/" .config
Justin Vreeland 794d92
    %{make} ARCH=$Arch KCFLAGS="$KCFLAGS" WITH_GCOV="%{?with_gcov}" %{?_smp_mflags} $MakeTarget %{?sparse_mflags} %{?kernel_mflags}
Justin Vreeland 794d92
    if [ $DoModules -eq 1 ]; then
Justin Vreeland 794d92
	%{make} ARCH=$Arch KCFLAGS="$KCFLAGS" WITH_GCOV="%{?with_gcov}" %{?_smp_mflags} modules %{?sparse_mflags} || exit 1
Justin Vreeland 794d92
    fi
Justin Vreeland 794d92
Justin Vreeland 794d92
    mkdir -p $RPM_BUILD_ROOT/%{image_install_path}
Justin Vreeland 794d92
    mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer
Justin Vreeland 794d92
%if %{with_debuginfo}
Justin Vreeland 794d92
    mkdir -p $RPM_BUILD_ROOT%{debuginfodir}/%{image_install_path}
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%ifarch %{arm} aarch64
Justin Vreeland 794d92
    %{make} ARCH=$Arch dtbs INSTALL_DTBS_PATH=$RPM_BUILD_ROOT/%{image_install_path}/dtb-$KernelVer
Justin Vreeland 794d92
    %{make} ARCH=$Arch dtbs_install INSTALL_DTBS_PATH=$RPM_BUILD_ROOT/%{image_install_path}/dtb-$KernelVer
Justin Vreeland 794d92
    cp -r $RPM_BUILD_ROOT/%{image_install_path}/dtb-$KernelVer $RPM_BUILD_ROOT/lib/modules/$KernelVer/dtb
Justin Vreeland 794d92
    find arch/$Arch/boot/dts -name '*.dtb' -type f -delete
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
    # Start installing the results
Justin Vreeland 794d92
    install -m 644 .config $RPM_BUILD_ROOT/boot/config-$KernelVer
Justin Vreeland 794d92
    install -m 644 .config $RPM_BUILD_ROOT/lib/modules/$KernelVer/config
Justin Vreeland 794d92
    install -m 644 System.map $RPM_BUILD_ROOT/boot/System.map-$KernelVer
Justin Vreeland 794d92
    install -m 644 System.map $RPM_BUILD_ROOT/lib/modules/$KernelVer/System.map
Justin Vreeland 794d92
Justin Vreeland 794d92
    # We estimate the size of the initramfs because rpm needs to take this size
Justin Vreeland 794d92
    # into consideration when performing disk space calculations. (See bz #530778)
Justin Vreeland 794d92
    dd if=/dev/zero of=$RPM_BUILD_ROOT/boot/initramfs-$KernelVer.img bs=1M count=20
Justin Vreeland 794d92
Justin Vreeland 794d92
    if [ -f arch/$Arch/boot/zImage.stub ]; then
Justin Vreeland 794d92
      cp arch/$Arch/boot/zImage.stub $RPM_BUILD_ROOT/%{image_install_path}/zImage.stub-$KernelVer || :
Justin Vreeland 794d92
      cp arch/$Arch/boot/zImage.stub $RPM_BUILD_ROOT/lib/modules/$KernelVer/zImage.stub-$KernelVer || :
Justin Vreeland 794d92
    fi
Justin Vreeland 794d92
Justin Vreeland 794d92
    %if %{signkernel}
Justin Vreeland 794d92
    if [ "$KernelImage" = vmlinux ]; then
Justin Vreeland 794d92
        # We can't strip and sign $KernelImage in place, because
Justin Vreeland 794d92
        # we need to preserve original vmlinux for debuginfo.
Justin Vreeland 794d92
        # Use a copy for signing.
Justin Vreeland 794d92
        $CopyKernel $KernelImage $KernelImage.tosign
Justin Vreeland 794d92
        KernelImage=$KernelImage.tosign
Justin Vreeland 794d92
        CopyKernel=cp
Justin Vreeland 794d92
    fi
Justin Vreeland 794d92
Justin Vreeland 794d92
    # Sign the image if we're using EFI
Justin Vreeland 794d92
    # aarch64 kernels are gziped EFI images
Justin Vreeland 794d92
    KernelExtension=${KernelImage##*.}
Justin Vreeland 794d92
    if [ "$KernelExtension" == "gz" ]; then
Justin Vreeland 794d92
        SignImage=${KernelImage%.*}
Justin Vreeland 794d92
    else
Justin Vreeland 794d92
        SignImage=$KernelImage
Justin Vreeland 794d92
    fi
Justin Vreeland 794d92
Justin Vreeland 794d92
    %ifarch x86_64 aarch64
Justin Vreeland 794d92
    %pesign -s -i $SignImage -o vmlinuz.tmp -a %{secureboot_ca_0} -c %{secureboot_key_0} -n %{pesign_name_0}
Justin Vreeland 794d92
    %pesign -s -i vmlinuz.tmp -o vmlinuz.signed -a %{secureboot_ca_1} -c %{secureboot_key_1} -n %{pesign_name_1}
Justin Vreeland 794d92
    rm vmlinuz.tmp
Justin Vreeland 794d92
    %endif
Justin Vreeland 794d92
    %ifarch s390x ppc64le
Justin Vreeland 794d92
    if [ -x /usr/bin/rpm-sign ]; then
Justin Vreeland 794d92
	rpm-sign --key "%{pesign_name_0}" --lkmsign $SignImage --output vmlinuz.signed
Justin Vreeland 794d92
    elif [ $DoModules -eq 1 ]; then
Justin Vreeland 794d92
	chmod +x scripts/sign-file
Justin Vreeland 794d92
	./scripts/sign-file -p sha256 certs/signing_key.pem certs/signing_key.x509 $SignImage vmlinuz.signed
Justin Vreeland 794d92
    else
Justin Vreeland 794d92
	mv $SignImage vmlinuz.signed
Justin Vreeland 794d92
    fi
Justin Vreeland 794d92
    %endif
Justin Vreeland 794d92
Justin Vreeland 794d92
    if [ ! -s vmlinuz.signed ]; then
Justin Vreeland 794d92
        echo "pesigning failed"
Justin Vreeland 794d92
        exit 1
Justin Vreeland 794d92
    fi
Justin Vreeland 794d92
    mv vmlinuz.signed $SignImage
Justin Vreeland 794d92
    if [ "$KernelExtension" == "gz" ]; then
Justin Vreeland 794d92
        gzip -f9 $SignImage
Justin Vreeland 794d92
    fi
Justin Vreeland 794d92
    # signkernel
Justin Vreeland 794d92
    %endif
Justin Vreeland 794d92
Justin Vreeland 794d92
    $CopyKernel $KernelImage \
Justin Vreeland 794d92
                $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer
Justin Vreeland 794d92
    chmod 755 $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer
Justin Vreeland 794d92
    cp $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer $RPM_BUILD_ROOT/lib/modules/$KernelVer/$InstallName
Justin Vreeland 794d92
Justin Vreeland 794d92
    # hmac sign the kernel for FIPS
Justin Vreeland 794d92
    echo "Creating hmac file: $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac"
Justin Vreeland 794d92
    ls -l $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer
Justin Vreeland 794d92
    sha512hmac $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer | sed -e "s,$RPM_BUILD_ROOT,," > $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac;
Justin Vreeland 794d92
    cp $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac $RPM_BUILD_ROOT/lib/modules/$KernelVer/.vmlinuz.hmac
Justin Vreeland 794d92
Justin Vreeland 794d92
    if [ $DoModules -eq 1 ]; then
Justin Vreeland 794d92
	# Override $(mod-fw) because we don't want it to install any firmware
Justin Vreeland 794d92
	# we'll get it from the linux-firmware package and we don't want conflicts
Justin Vreeland 794d92
	%{make} %{?_smp_mflags} ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT %{?_smp_mflags} modules_install KERNELRELEASE=$KernelVer mod-fw=
Justin Vreeland 794d92
    fi
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_gcov}
Justin Vreeland 794d92
    # install gcov-needed files to $BUILDROOT/$BUILD/...:
Justin Vreeland 794d92
    #   gcov_info->filename is absolute path
Justin Vreeland 794d92
    #   gcno references to sources can use absolute paths (e.g. in out-of-tree builds)
Justin Vreeland 794d92
    #   sysfs symlink targets (set up at compile time) use absolute paths to BUILD dir
Justin Vreeland 794d92
    find . \( -name '*.gcno' -o -name '*.[chS]' \) -exec install -D '{}' "$RPM_BUILD_ROOT/$(pwd)/{}" \;
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
    # add an a noop %%defattr statement 'cause rpm doesn't like empty file list files
Justin Vreeland 794d92
    echo '%%defattr(-,-,-)' > ../kernel${Flavour:+-${Flavour}}-ldsoconf.list
Justin Vreeland 794d92
    if [ $DoVDSO -ne 0 ]; then
Justin Vreeland 794d92
        %{make} ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT vdso_install KERNELRELEASE=$KernelVer
Justin Vreeland 794d92
        if [ -s ldconfig-kernel.conf ]; then
Justin Vreeland 794d92
             install -D -m 444 ldconfig-kernel.conf \
Justin Vreeland 794d92
                $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernel-$KernelVer.conf
Justin Vreeland 794d92
	     echo /etc/ld.so.conf.d/kernel-$KernelVer.conf >> ../kernel${Flavour:+-${Flavour}}-ldsoconf.list
Justin Vreeland 794d92
        fi
Justin Vreeland 794d92
Justin Vreeland 794d92
        rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/vdso/.build-id
Justin Vreeland 794d92
    fi
Justin Vreeland 794d92
Justin Vreeland 794d92
    # And save the headers/makefiles etc for building modules against
Justin Vreeland 794d92
    #
Justin Vreeland 794d92
    # This all looks scary, but the end result is supposed to be:
Justin Vreeland 794d92
    # * all arch relevant include/ files
Justin Vreeland 794d92
    # * all Makefile/Kconfig files
Justin Vreeland 794d92
    # * all script/ files
Justin Vreeland 794d92
Justin Vreeland 794d92
    rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 794d92
    rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/source
Justin Vreeland 794d92
    mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 794d92
    (cd $RPM_BUILD_ROOT/lib/modules/$KernelVer ; ln -s build source)
Justin Vreeland 794d92
    # dirs for additional modules per module-init-tools, kbuild/modules.txt
Justin Vreeland 794d92
    mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/updates
Justin Vreeland 794d92
    mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/weak-updates
Justin Vreeland 794d92
    # CONFIG_KERNEL_HEADER_TEST generates some extra files in the process of
Justin Vreeland 794d92
    # testing so just delete
Justin Vreeland 794d92
    find . -name *.h.s -delete
Justin Vreeland 794d92
    # first copy everything
Justin Vreeland 794d92
    cp --parents `find  -type f -name "Makefile*" -o -name "Kconfig*"` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
    if [ ! -e Module.symvers ]; then
Justin Vreeland 1fc083
        touch Module.symvers
Justin Vreeland 1fc083
    fi
Justin Vreeland 794d92
    cp Module.symvers $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 794d92
    cp System.map $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 794d92
    if [ -s Module.markers ]; then
Justin Vreeland 794d92
      cp Module.markers $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 794d92
    fi
Justin Vreeland 794d92
Justin Vreeland 794d92
    # create the kABI metadata for use in packaging
Justin Vreeland 794d92
    # NOTENOTE: the name symvers is used by the rpm backend
Justin Vreeland 794d92
    # NOTENOTE: to discover and run the /usr/lib/rpm/fileattrs/kabi.attr
Justin Vreeland 794d92
    # NOTENOTE: script which dynamically adds exported kernel symbol
Justin Vreeland 794d92
    # NOTENOTE: checksums to the rpm metadata provides list.
Justin Vreeland 794d92
    # NOTENOTE: if you change the symvers name, update the backend too
Justin Vreeland 794d92
    echo "**** GENERATING kernel ABI metadata ****"
Justin Vreeland 794d92
    gzip -c9 < Module.symvers > $RPM_BUILD_ROOT/boot/symvers-$KernelVer.gz
Justin Vreeland 794d92
    cp $RPM_BUILD_ROOT/boot/symvers-$KernelVer.gz $RPM_BUILD_ROOT/lib/modules/$KernelVer/symvers.gz
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_kabichk}
Justin Vreeland 794d92
    echo "**** kABI checking is enabled in kernel SPEC file. ****"
Justin Vreeland 794d92
    chmod 0755 $RPM_SOURCE_DIR/check-kabi
Justin Vreeland 794d92
    if [ -e $RPM_SOURCE_DIR/Module.kabi_%{_target_cpu}$Flavour ]; then
Justin Vreeland 794d92
        cp $RPM_SOURCE_DIR/Module.kabi_%{_target_cpu}$Flavour $RPM_BUILD_ROOT/Module.kabi
Justin Vreeland 794d92
        $RPM_SOURCE_DIR/check-kabi -k $RPM_BUILD_ROOT/Module.kabi -s Module.symvers || exit 1
Justin Vreeland 794d92
        # for now, don't keep it around.
Justin Vreeland 794d92
        rm $RPM_BUILD_ROOT/Module.kabi
Justin Vreeland 794d92
    else
Justin Vreeland 794d92
        echo "**** NOTE: Cannot find reference Module.kabi file. ****"
Justin Vreeland 794d92
    fi
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_kabidupchk}
Justin Vreeland 794d92
    echo "**** kABI DUP checking is enabled in kernel SPEC file. ****"
Justin Vreeland 794d92
    if [ -e $RPM_SOURCE_DIR/Module.kabi_dup_%{_target_cpu}$Flavour ]; then
Justin Vreeland 794d92
        cp $RPM_SOURCE_DIR/Module.kabi_dup_%{_target_cpu}$Flavour $RPM_BUILD_ROOT/Module.kabi
Justin Vreeland 794d92
        $RPM_SOURCE_DIR/check-kabi -k $RPM_BUILD_ROOT/Module.kabi -s Module.symvers || exit 1
Justin Vreeland 794d92
        # for now, don't keep it around.
Justin Vreeland 794d92
        rm $RPM_BUILD_ROOT/Module.kabi
Justin Vreeland 794d92
    else
Justin Vreeland 794d92
        echo "**** NOTE: Cannot find DUP reference Module.kabi file. ****"
Justin Vreeland 794d92
    fi
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_kabidw_base}
Justin Vreeland 794d92
    # Don't build kabi base for debug kernels
Justin Vreeland 794d92
    if [ "$Flavour" != "kdump" -a "$Flavour" != "debug" ]; then
Justin Vreeland 794d92
        mkdir -p $RPM_BUILD_ROOT/kabi-dwarf
Justin Vreeland 794d92
        tar xjvf %{SOURCE301} -C $RPM_BUILD_ROOT/kabi-dwarf
Justin Vreeland 794d92
Justin Vreeland 794d92
        mkdir -p $RPM_BUILD_ROOT/kabi-dwarf/whitelists
Justin Vreeland 794d92
        tar xjvf %{SOURCE300} -C $RPM_BUILD_ROOT/kabi-dwarf/whitelists
Justin Vreeland 794d92
Justin Vreeland 794d92
        echo "**** GENERATING DWARF-based kABI baseline dataset ****"
Justin Vreeland 794d92
        chmod 0755 $RPM_BUILD_ROOT/kabi-dwarf/run_kabi-dw.sh
Justin Vreeland 794d92
        $RPM_BUILD_ROOT/kabi-dwarf/run_kabi-dw.sh generate \
Justin Vreeland 794d92
            "$RPM_BUILD_ROOT/kabi-dwarf/whitelists/kabi-current/kabi_whitelist_%{_target_cpu}" \
Justin Vreeland 794d92
            "$(pwd)" \
Justin Vreeland 794d92
            "$RPM_BUILD_ROOT/kabidw-base/%{_target_cpu}${Flavour:+.${Flavour}}" || :
Justin Vreeland 794d92
Justin Vreeland 794d92
        rm -rf $RPM_BUILD_ROOT/kabi-dwarf
Justin Vreeland 794d92
    fi
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_kabidwchk}
Justin Vreeland 794d92
    if [ "$Flavour" != "kdump" ]; then
Justin Vreeland 794d92
        mkdir -p $RPM_BUILD_ROOT/kabi-dwarf
Justin Vreeland 794d92
        tar xjvf %{SOURCE301} -C $RPM_BUILD_ROOT/kabi-dwarf
Justin Vreeland 794d92
        if [ -d "$RPM_BUILD_ROOT/kabi-dwarf/base/%{_target_cpu}${Flavour:+.${Flavour}}" ]; then
Justin Vreeland 794d92
            mkdir -p $RPM_BUILD_ROOT/kabi-dwarf/whitelists
Justin Vreeland 794d92
            tar xjvf %{SOURCE300} -C $RPM_BUILD_ROOT/kabi-dwarf/whitelists
Justin Vreeland 794d92
Justin Vreeland 794d92
            echo "**** GENERATING DWARF-based kABI dataset ****"
Justin Vreeland 794d92
            chmod 0755 $RPM_BUILD_ROOT/kabi-dwarf/run_kabi-dw.sh
Justin Vreeland 794d92
            $RPM_BUILD_ROOT/kabi-dwarf/run_kabi-dw.sh generate \
Justin Vreeland 794d92
                "$RPM_BUILD_ROOT/kabi-dwarf/whitelists/kabi-current/kabi_whitelist_%{_target_cpu}" \
Justin Vreeland 794d92
                "$(pwd)" \
Justin Vreeland 794d92
                "$RPM_BUILD_ROOT/kabi-dwarf/base/%{_target_cpu}${Flavour:+.${Flavour}}.tmp" || :
Justin Vreeland 794d92
Justin Vreeland 794d92
            echo "**** kABI DWARF-based comparison report ****"
Justin Vreeland 794d92
            $RPM_BUILD_ROOT/kabi-dwarf/run_kabi-dw.sh compare \
Justin Vreeland 794d92
                "$RPM_BUILD_ROOT/kabi-dwarf/base/%{_target_cpu}${Flavour:+.${Flavour}}" \
Justin Vreeland 794d92
                "$RPM_BUILD_ROOT/kabi-dwarf/base/%{_target_cpu}${Flavour:+.${Flavour}}.tmp" || :
Justin Vreeland 794d92
            echo "**** End of kABI DWARF-based comparison report ****"
Justin Vreeland 794d92
        else
Justin Vreeland 794d92
            echo "**** Baseline dataset for kABI DWARF-BASED comparison report not found ****"
Justin Vreeland 794d92
        fi
Justin Vreeland 794d92
Justin Vreeland 794d92
        rm -rf $RPM_BUILD_ROOT/kabi-dwarf
Justin Vreeland 794d92
    fi
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
    # then drop all but the needed Makefiles/Kconfig files
Justin Vreeland 794d92
    rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts
Justin Vreeland 794d92
    rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
Justin Vreeland 794d92
    cp .config $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 794d92
    cp -a scripts $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 794d92
    rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/tracing
Justin Vreeland 794d92
    rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/spdxcheck.py
Justin Vreeland 794d92
Justin Vreeland 794d92
    # Files for 'make scripts' to succeed with kernel-devel.
Justin Vreeland 794d92
    mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/security/selinux/include
Justin Vreeland 794d92
    cp -a --parents security/selinux/include/classmap.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 794d92
    cp -a --parents security/selinux/include/initial_sid_to_string.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 794d92
    mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/tools/include/tools
Justin Vreeland 794d92
    cp -a --parents tools/include/tools/be_byteshift.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 794d92
    cp -a --parents tools/include/tools/le_byteshift.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 794d92
Justin Vreeland 1fc083
    # Files for 'make prepare' to succeed with kernel-devel.
Justin Vreeland 1fc083
    cp -a --parents tools/include/linux/compiler* $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
    cp -a --parents tools/include/linux/types.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
    cp -a --parents tools/build/Build.include $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
    cp --parents tools/build/Build $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
    cp --parents tools/build/fixdep.c $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
    cp --parents tools/objtool/sync-check.sh $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
    cp -a --parents tools/bpf/resolve_btfids $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
Justin Vreeland 1fc083
    cp --parents security/selinux/include/policycap_names.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
    cp --parents security/selinux/include/policycap.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
Justin Vreeland 1fc083
    cp -a --parents tools/include/asm-generic $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
    cp -a --parents tools/include/linux $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
    cp -a --parents tools/include/uapi/asm $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
    cp -a --parents tools/include/uapi/asm-generic $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
    cp -a --parents tools/include/uapi/linux $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
    cp -a --parents tools/include/vdso $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
    cp --parents tools/scripts/utilities.mak $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
    cp -a --parents tools/lib/subcmd $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
    cp --parents tools/lib/*.c $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
    cp --parents tools/objtool/*.[ch] $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
    cp --parents tools/objtool/Build $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
    cp --parents tools/objtool/include/objtool/*.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
    cp -a --parents tools/lib/bpf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
    cp --parents tools/lib/bpf/Build $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
Justin Vreeland 794d92
    if [ -f tools/objtool/objtool ]; then
Justin Vreeland 794d92
      cp -a tools/objtool/objtool $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/tools/objtool/ || :
Justin Vreeland 794d92
    fi
Justin Vreeland 1fc083
    if [ -f tools/objtool/fixdep ]; then
Justin Vreeland 1fc083
      cp -a tools/objtool/fixdep $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/tools/objtool/ || :
Justin Vreeland 1fc083
    fi
Justin Vreeland 794d92
    if [ -d arch/$Arch/scripts ]; then
Justin Vreeland 794d92
      cp -a arch/$Arch/scripts $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/%{_arch} || :
Justin Vreeland 794d92
    fi
Justin Vreeland 794d92
    if [ -f arch/$Arch/*lds ]; then
Justin Vreeland 794d92
      cp -a arch/$Arch/*lds $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/%{_arch}/ || :
Justin Vreeland 794d92
    fi
Justin Vreeland 794d92
    if [ -f arch/%{asmarch}/kernel/module.lds ]; then
Justin Vreeland 794d92
      cp -a --parents arch/%{asmarch}/kernel/module.lds $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
Justin Vreeland 794d92
    fi
Justin Vreeland 794d92
    rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/*.o
Justin Vreeland 794d92
    rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/*/*.o
Justin Vreeland 794d92
%ifarch ppc64le
Justin Vreeland 794d92
    cp -a --parents arch/powerpc/lib/crtsavres.[So] $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
    if [ -d arch/%{asmarch}/include ]; then
Justin Vreeland 794d92
      cp -a --parents arch/%{asmarch}/include $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
Justin Vreeland 794d92
    fi
Justin Vreeland 794d92
%ifarch aarch64
Justin Vreeland 794d92
    # arch/arm64/include/asm/xen references arch/arm
Justin Vreeland 794d92
    cp -a --parents arch/arm/include/asm/xen $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
Justin Vreeland 794d92
    # arch/arm64/include/asm/opcodes.h references arch/arm
Justin Vreeland 794d92
    cp -a --parents arch/arm/include/asm/opcodes.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
    # include the machine specific headers for ARM variants, if available.
Justin Vreeland 794d92
%ifarch %{arm}
Justin Vreeland 794d92
    if [ -d arch/%{asmarch}/mach-${Flavour}/include ]; then
Justin Vreeland 794d92
      cp -a --parents arch/%{asmarch}/mach-${Flavour}/include $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
Justin Vreeland 794d92
    fi
Justin Vreeland 794d92
    # include a few files for 'make prepare'
Justin Vreeland 794d92
    cp -a --parents arch/arm/tools/gen-mach-types $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
Justin Vreeland 794d92
    cp -a --parents arch/arm/tools/mach-types $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
Justin Vreeland 794d92
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
    cp -a include $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
Justin Vreeland 794d92
%ifarch i686 x86_64
Justin Vreeland 794d92
    # files for 'make prepare' to succeed with kernel-devel
Justin Vreeland 794d92
    cp -a --parents arch/x86/entry/syscalls/syscall_32.tbl $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
Justin Vreeland 794d92
    cp -a --parents arch/x86/entry/syscalls/syscall_64.tbl $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
Justin Vreeland 794d92
    cp -a --parents arch/x86/tools/relocs_32.c $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
Justin Vreeland 794d92
    cp -a --parents arch/x86/tools/relocs_64.c $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
Justin Vreeland 794d92
    cp -a --parents arch/x86/tools/relocs.c $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
Justin Vreeland 794d92
    cp -a --parents arch/x86/tools/relocs_common.c $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
Justin Vreeland 794d92
    cp -a --parents arch/x86/tools/relocs.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
Justin Vreeland 794d92
    cp -a --parents arch/x86/purgatory/purgatory.c $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
Justin Vreeland 794d92
    cp -a --parents arch/x86/purgatory/stack.S $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
Justin Vreeland 794d92
    cp -a --parents arch/x86/purgatory/setup-x86_64.S $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
Justin Vreeland 794d92
    cp -a --parents arch/x86/purgatory/entry64.S $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
Justin Vreeland 794d92
    cp -a --parents arch/x86/boot/string.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
Justin Vreeland 794d92
    cp -a --parents arch/x86/boot/string.c $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
Justin Vreeland 794d92
    cp -a --parents arch/x86/boot/ctype.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
Justin Vreeland 1fc083
Justin Vreeland 1fc083
    cp -a --parents scripts/syscalltbl.sh $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
Justin Vreeland 1fc083
    cp -a --parents scripts/syscallhdr.sh $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
Justin Vreeland 1fc083
Justin Vreeland 1fc083
    cp -a --parents tools/arch/x86/include/asm $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
    cp -a --parents tools/arch/x86/include/uapi/asm $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
    cp -a --parents tools/objtool/arch/x86/lib $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
    cp -a --parents tools/arch/x86/lib/ $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
    cp -a --parents tools/arch/x86/tools/gen-insn-attr-x86.awk $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
    cp -a --parents tools/objtool/arch/x86/ $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 1fc083
Justin Vreeland 794d92
%endif
Justin Vreeland 1fc083
    # Clean up intermediate tools files
Justin Vreeland 1fc083
    find $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/tools \( -iname "*.o" -o -iname "*.cmd" \) -exec rm -f {} +
Justin Vreeland 1fc083
Justin Vreeland 794d92
    # Make sure the Makefile and version.h have a matching timestamp so that
Justin Vreeland 794d92
    # external modules can be built
Justin Vreeland 794d92
    touch -r $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/Makefile $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/generated/uapi/linux/version.h
Justin Vreeland 794d92
Justin Vreeland 794d92
    # Copy .config to include/config/auto.conf so "make prepare" is unnecessary.
Justin Vreeland 794d92
    cp $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/.config $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/config/auto.conf
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_debuginfo}
Justin Vreeland 794d92
    eu-readelf -n vmlinux | grep "Build ID" | awk '{print $NF}' > vmlinux.id
Justin Vreeland 794d92
    cp vmlinux.id $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/vmlinux.id
Justin Vreeland 794d92
Justin Vreeland 794d92
    #
Justin Vreeland 794d92
    # save the vmlinux file for kernel debugging into the kernel-debuginfo rpm
Justin Vreeland 794d92
    #
Justin Vreeland 794d92
    mkdir -p $RPM_BUILD_ROOT%{debuginfodir}/lib/modules/$KernelVer
Justin Vreeland 794d92
    cp vmlinux $RPM_BUILD_ROOT%{debuginfodir}/lib/modules/$KernelVer
Justin Vreeland 1fc083
    if [ -n "%{vmlinux_decompressor}" ]; then
Justin Vreeland 1fc083
	    eu-readelf -n  %{vmlinux_decompressor} | grep "Build ID" | awk '{print $NF}' > vmlinux.decompressor.id
Justin Vreeland 1fc083
	    # Without build-id the build will fail. But for s390 the build-id
Justin Vreeland 1fc083
	    # wasn't added before 5.11. In case it is missing prefer not
Justin Vreeland 1fc083
	    # packaging the debuginfo over a build failure.
Justin Vreeland 1fc083
	    if [ -s vmlinux.decompressor.id ]; then
Justin Vreeland 1fc083
		    cp vmlinux.decompressor.id $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/vmlinux.decompressor.id
Justin Vreeland 1fc083
		    cp %{vmlinux_decompressor} $RPM_BUILD_ROOT%{debuginfodir}/lib/modules/$KernelVer/vmlinux.decompressor
Justin Vreeland 1fc083
	    fi
Justin Vreeland 1fc083
    fi
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
    find $RPM_BUILD_ROOT/lib/modules/$KernelVer -name "*.ko" -type f >modnames
Justin Vreeland 794d92
Justin Vreeland 794d92
    # mark modules executable so that strip-to-file can strip them
Justin Vreeland 794d92
    xargs --no-run-if-empty chmod u+x < modnames
Justin Vreeland 794d92
Justin Vreeland 794d92
    # Generate a list of modules for block and networking.
Justin Vreeland 794d92
Justin Vreeland 794d92
    grep -F /drivers/ modnames | xargs --no-run-if-empty nm -upA |
Justin Vreeland 794d92
    sed -n 's,^.*/\([^/]*\.ko\):  *U \(.*\)$,\1 \2,p' > drivers.undef
Justin Vreeland 794d92
Justin Vreeland 794d92
    collect_modules_list()
Justin Vreeland 794d92
    {
Justin Vreeland 794d92
      sed -r -n -e "s/^([^ ]+) \\.?($2)\$/\\1/p" drivers.undef |
Justin Vreeland 794d92
        LC_ALL=C sort -u > $RPM_BUILD_ROOT/lib/modules/$KernelVer/modules.$1
Justin Vreeland 794d92
      if [ ! -z "$3" ]; then
Justin Vreeland 794d92
        sed -r -e "/^($3)\$/d" -i $RPM_BUILD_ROOT/lib/modules/$KernelVer/modules.$1
Justin Vreeland 794d92
      fi
Justin Vreeland 794d92
    }
Justin Vreeland 794d92
Justin Vreeland 794d92
    collect_modules_list networking \
Justin Vreeland 794d92
      'register_netdev|ieee80211_register_hw|usbnet_probe|phy_driver_register|rt(l_|2x00)(pci|usb)_probe|register_netdevice'
Justin Vreeland 794d92
    collect_modules_list block \
Justin Vreeland 794d92
      'ata_scsi_ioctl|scsi_add_host|scsi_add_host_with_dma|blk_alloc_queue|blk_init_queue|register_mtd_blktrans|scsi_esp_register|scsi_register_device_handler|blk_queue_physical_block_size' 'pktcdvd.ko|dm-mod.ko'
Justin Vreeland 794d92
    collect_modules_list drm \
Justin Vreeland 794d92
      'drm_open|drm_init'
Justin Vreeland 794d92
    collect_modules_list modesetting \
Justin Vreeland 794d92
      'drm_crtc_init'
Justin Vreeland 794d92
Justin Vreeland 794d92
    # detect missing or incorrect license tags
Justin Vreeland 794d92
    ( find $RPM_BUILD_ROOT/lib/modules/$KernelVer -name '*.ko' | xargs /sbin/modinfo -l | \
Justin Vreeland 794d92
        grep -E -v 'GPL( v2)?$|Dual BSD/GPL$|Dual MPL/GPL$|GPL and additional rights$' ) && exit 1
Justin Vreeland 794d92
Justin Vreeland 794d92
    # remove files that will be auto generated by depmod at rpm -i time
Justin Vreeland 794d92
    pushd $RPM_BUILD_ROOT/lib/modules/$KernelVer/
Justin Vreeland 794d92
        rm -f modules.{alias*,builtin.bin,dep*,*map,symbols*,devname,softdep}
Justin Vreeland 794d92
    popd
Justin Vreeland 794d92
Justin Vreeland 1fc083
    # Identify modules in the kernel-modules-extras package
Justin Vreeland 1fc083
    %{SOURCE17} $RPM_BUILD_ROOT lib/modules/$KernelVer $RPM_SOURCE_DIR/mod-extra.list
Justin Vreeland 1fc083
    # Identify modules in the kernel-modules-extras package
Justin Vreeland 1fc083
    %{SOURCE17} $RPM_BUILD_ROOT lib/modules/$KernelVer %{SOURCE54} internal
Justin Vreeland 794d92
Justin Vreeland 794d92
    #
Justin Vreeland 794d92
    # Generate the kernel-core and kernel-modules files lists
Justin Vreeland 794d92
    #
Justin Vreeland 794d92
Justin Vreeland 794d92
    # Copy the System.map file for depmod to use, and create a backup of the
Justin Vreeland 794d92
    # full module tree so we can restore it after we're done filtering
Justin Vreeland 794d92
    cp System.map $RPM_BUILD_ROOT/.
Justin Vreeland 794d92
    pushd $RPM_BUILD_ROOT
Justin Vreeland 794d92
    mkdir restore
Justin Vreeland 794d92
    cp -r lib/modules/$KernelVer/* restore/.
Justin Vreeland 794d92
Justin Vreeland 1fc083
    # don't include anything going into kernel-modules-extra in the file lists
Justin Vreeland 1fc083
    xargs rm -rf < mod-extra.list
Justin Vreeland 1fc083
    # don't include anything going int kernel-modules-internal in the file lists
Justin Vreeland 1fc083
    xargs rm -rf < mod-internal.list
Justin Vreeland 794d92
Justin Vreeland 794d92
    if [ $DoModules -eq 1 ]; then
Justin Vreeland 794d92
	# Find all the module files and filter them out into the core and
Justin Vreeland 794d92
	# modules lists.  This actually removes anything going into -modules
Justin Vreeland 794d92
	# from the dir.
Justin Vreeland 794d92
	find lib/modules/$KernelVer/kernel -name *.ko | sort -n > modules.list
Justin Vreeland 794d92
	cp $RPM_SOURCE_DIR/filter-*.sh .
Justin Vreeland 794d92
	./filter-modules.sh modules.list %{_target_cpu}
Justin Vreeland 794d92
	rm filter-*.sh
Justin Vreeland 794d92
Justin Vreeland 794d92
	# Run depmod on the resulting module tree and make sure it isn't broken
Justin Vreeland 794d92
	depmod -b . -aeF ./System.map $KernelVer &> depmod.out
Justin Vreeland 794d92
	if [ -s depmod.out ]; then
Justin Vreeland 794d92
	    echo "Depmod failure"
Justin Vreeland 794d92
	    cat depmod.out
Justin Vreeland 794d92
	    exit 1
Justin Vreeland 794d92
	else
Justin Vreeland 794d92
	    rm depmod.out
Justin Vreeland 794d92
	fi
Justin Vreeland 794d92
    else
Justin Vreeland 794d92
	# Ensure important files/directories exist to let the packaging succeed
Justin Vreeland 794d92
	echo '%%defattr(-,-,-)' > modules.list
Justin Vreeland 794d92
	echo '%%defattr(-,-,-)' > k-d.list
Justin Vreeland 794d92
	mkdir -p lib/modules/$KernelVer/kernel
Justin Vreeland 794d92
	# Add files usually created by make modules, needed to prevent errors
Justin Vreeland 794d92
	# thrown by depmod during package installation
Justin Vreeland 794d92
	touch lib/modules/$KernelVer/modules.order
Justin Vreeland 794d92
	touch lib/modules/$KernelVer/modules.builtin
Justin Vreeland 794d92
    fi
Justin Vreeland 794d92
Justin Vreeland 794d92
    # remove files that will be auto generated by depmod at rpm -i time
Justin Vreeland 794d92
    pushd $RPM_BUILD_ROOT/lib/modules/$KernelVer/
Justin Vreeland 794d92
        rm -f modules.{alias*,builtin.bin,dep*,*map,symbols*,devname,softdep}
Justin Vreeland 794d92
    popd
Justin Vreeland 794d92
Justin Vreeland 794d92
    # Go back and find all of the various directories in the tree.  We use this
Justin Vreeland 794d92
    # for the dir lists in kernel-core
Justin Vreeland 794d92
    find lib/modules/$KernelVer/kernel -mindepth 1 -type d | sort -n > module-dirs.list
Justin Vreeland 794d92
Justin Vreeland 794d92
    # Cleanup
Justin Vreeland 794d92
    rm System.map
Justin Vreeland 794d92
    cp -r restore/* lib/modules/$KernelVer/.
Justin Vreeland 794d92
    rm -rf restore
Justin Vreeland 794d92
    popd
Justin Vreeland 794d92
Justin Vreeland 794d92
    # Make sure the files lists start with absolute paths or rpmbuild fails.
Justin Vreeland 794d92
    # Also add in the dir entries
Justin Vreeland 794d92
    sed -e 's/^lib*/\/lib/' %{?zipsed} $RPM_BUILD_ROOT/k-d.list > ../kernel${Flavour:+-${Flavour}}-modules.list
Justin Vreeland 794d92
    sed -e 's/^lib*/%dir \/lib/' %{?zipsed} $RPM_BUILD_ROOT/module-dirs.list > ../kernel${Flavour:+-${Flavour}}-core.list
Justin Vreeland 794d92
    sed -e 's/^lib*/\/lib/' %{?zipsed} $RPM_BUILD_ROOT/modules.list >> ../kernel${Flavour:+-${Flavour}}-core.list
Justin Vreeland 1fc083
    sed -e 's/^lib*/\/lib/' %{?zipsed} $RPM_BUILD_ROOT/mod-extra.list >> ../kernel${Flavour:+-${Flavour}}-modules-extra.list
Justin Vreeland 1fc083
    sed -e 's/^lib*/\/lib/' %{?zipsed} $RPM_BUILD_ROOT/mod-internal.list >> ../kernel${Flavour:+-${Flavour}}-modules-internal.list
Justin Vreeland 794d92
Justin Vreeland 794d92
    # Cleanup
Justin Vreeland 794d92
    rm -f $RPM_BUILD_ROOT/k-d.list
Justin Vreeland 794d92
    rm -f $RPM_BUILD_ROOT/modules.list
Justin Vreeland 794d92
    rm -f $RPM_BUILD_ROOT/module-dirs.list
Justin Vreeland 1fc083
    rm -f $RPM_BUILD_ROOT/mod-extra.list
Justin Vreeland 1fc083
    rm -f $RPM_BUILD_ROOT/mod-internal.list
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{signmodules}
Justin Vreeland 794d92
    if [ $DoModules -eq 1 ]; then
Justin Vreeland 794d92
	# Save the signing keys so we can sign the modules in __modsign_install_post
Justin Vreeland 794d92
	cp certs/signing_key.pem certs/signing_key.pem.sign${Flav}
Justin Vreeland 794d92
	cp certs/signing_key.x509 certs/signing_key.x509.sign${Flav}
Justin Vreeland 794d92
    fi
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
    # Move the devel headers out of the root file system
Justin Vreeland 794d92
    mkdir -p $RPM_BUILD_ROOT/usr/src/kernels
Justin Vreeland 794d92
    mv $RPM_BUILD_ROOT/lib/modules/$KernelVer/build $RPM_BUILD_ROOT/$DevelDir
Justin Vreeland 794d92
Justin Vreeland 794d92
    # This is going to create a broken link during the build, but we don't use
Justin Vreeland 794d92
    # it after this point.  We need the link to actually point to something
Justin Vreeland 794d92
    # when kernel-devel is installed, and a relative link doesn't work across
Justin Vreeland 794d92
    # the F17 UsrMove feature.
Justin Vreeland 794d92
    ln -sf $DevelDir $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
Justin Vreeland 794d92
Justin Vreeland 794d92
    # prune junk from kernel-devel
Justin Vreeland 794d92
    find $RPM_BUILD_ROOT/usr/src/kernels -name ".*.cmd" -delete
Justin Vreeland 794d92
Justin Vreeland 794d92
    # build a BLS config for this kernel
Justin Vreeland 794d92
    %{SOURCE53} "$KernelVer" "$RPM_BUILD_ROOT" "%{?variant}"
Justin Vreeland 794d92
Justin Vreeland 794d92
    # Red Hat UEFI Secure Boot CA cert, which can be used to authenticate the kernel
Justin Vreeland 794d92
    mkdir -p $RPM_BUILD_ROOT%{_datadir}/doc/kernel-keys/$KernelVer
Justin Vreeland 794d92
    %ifarch x86_64 aarch64
Justin Vreeland 794d92
       install -m 0644 %{secureboot_ca_0} $RPM_BUILD_ROOT%{_datadir}/doc/kernel-keys/$KernelVer/kernel-signing-ca-20200609.cer
Justin Vreeland 794d92
       install -m 0644 %{secureboot_ca_1} $RPM_BUILD_ROOT%{_datadir}/doc/kernel-keys/$KernelVer/kernel-signing-ca-20140212.cer
Justin Vreeland 794d92
       ln -s kernel-signing-ca-20200609.cer $RPM_BUILD_ROOT%{_datadir}/doc/kernel-keys/$KernelVer/kernel-signing-ca.cer
Justin Vreeland 794d92
    %else
Justin Vreeland 794d92
       install -m 0644 %{secureboot_ca_0} $RPM_BUILD_ROOT%{_datadir}/doc/kernel-keys/$KernelVer/kernel-signing-ca.cer
Justin Vreeland 794d92
    %endif
Justin Vreeland 794d92
    %ifarch s390x ppc64le
Justin Vreeland 794d92
    if [ $DoModules -eq 1 ]; then
Justin Vreeland 794d92
	if [ -x /usr/bin/rpm-sign ]; then
Justin Vreeland 794d92
	    install -m 0644 %{secureboot_key_0} $RPM_BUILD_ROOT%{_datadir}/doc/kernel-keys/$KernelVer/%{signing_key_filename}
Justin Vreeland 794d92
	else
Justin Vreeland 794d92
	    install -m 0644 certs/signing_key.x509.sign${Flav} $RPM_BUILD_ROOT%{_datadir}/doc/kernel-keys/$KernelVer/kernel-signing-ca.cer
Justin Vreeland 794d92
	    openssl x509 -in certs/signing_key.pem.sign${Flav} -outform der -out $RPM_BUILD_ROOT%{_datadir}/doc/kernel-keys/$KernelVer/%{signing_key_filename}
Justin Vreeland 794d92
	    chmod 0644 $RPM_BUILD_ROOT%{_datadir}/doc/kernel-keys/$KernelVer/%{signing_key_filename}
Justin Vreeland 794d92
	fi
Justin Vreeland 794d92
    fi
Justin Vreeland 794d92
    %endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_ipaclones}
Justin Vreeland 794d92
    MAXPROCS=$(echo %{?_smp_mflags} | sed -n 's/-j\s*\([0-9]\+\)/\1/p')
Justin Vreeland 794d92
    if [ -z "$MAXPROCS" ]; then
Justin Vreeland 794d92
        MAXPROCS=1
Justin Vreeland 794d92
    fi
Justin Vreeland 794d92
    if [ "$Flavour" == "" ]; then
Justin Vreeland 794d92
        mkdir -p $RPM_BUILD_ROOT/$DevelDir-ipaclones
Justin Vreeland 794d92
        find . -name '*.ipa-clones' | xargs -i{} -r -n 1 -P $MAXPROCS install -m 644 -D "{}" "$RPM_BUILD_ROOT/$DevelDir-ipaclones/{}"
Justin Vreeland 794d92
    fi
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
}
Justin Vreeland 794d92
Justin Vreeland 794d92
###
Justin Vreeland 794d92
# DO it...
Justin Vreeland 794d92
###
Justin Vreeland 794d92
Justin Vreeland 794d92
# prepare directories
Justin Vreeland 794d92
rm -rf $RPM_BUILD_ROOT
Justin Vreeland 794d92
mkdir -p $RPM_BUILD_ROOT/boot
Justin Vreeland 794d92
mkdir -p $RPM_BUILD_ROOT%{_libexecdir}
Justin Vreeland 794d92
Justin Vreeland 794d92
cd linux-%{KVERREL}
Justin Vreeland 794d92
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_debug}
Justin Vreeland 794d92
BuildKernel %make_target %kernel_image %{_use_vdso} debug
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_zfcpdump}
Justin Vreeland 794d92
BuildKernel %make_target %kernel_image %{_use_vdso} zfcpdump
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_pae}
Justin Vreeland 794d92
BuildKernel %make_target %kernel_image %{use_vdso} lpae
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_up}
Justin Vreeland 794d92
BuildKernel %make_target %kernel_image %{_use_vdso}
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 1fc083
%ifnarch noarch i686
Justin Vreeland 1fc083
%if !%{with_debug} && !%{with_zfcpdump} && !%{with_up}
Justin Vreeland 1fc083
# If only building the user space tools, then initialize the build environment
Justin Vreeland 1fc083
# and some variables so that the various userspace tools can be built.
Justin Vreeland 1fc083
InitBuildVars
Justin Vreeland 1fc083
%endif
Justin Vreeland 1fc083
%endif
Justin Vreeland 1fc083
Justin Vreeland 794d92
%global perf_make \
Justin Vreeland 1fc083
  %{__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}
Justin Vreeland 794d92
%if %{with_perf}
Justin Vreeland 794d92
# perf
Justin Vreeland 794d92
# make sure check-headers.sh is executable
Justin Vreeland 794d92
chmod +x tools/perf/check-headers.sh
Justin Vreeland 794d92
%{perf_make} DESTDIR=$RPM_BUILD_ROOT all
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%global tools_make \
Justin Vreeland 794d92
  %{make} CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags}" V=1
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_tools}
Justin Vreeland 794d92
%ifarch %{cpupowerarchs}
Justin Vreeland 794d92
# cpupower
Justin Vreeland 794d92
# make sure version-gen.sh is executable.
Justin Vreeland 794d92
chmod +x tools/power/cpupower/utils/version-gen.sh
Justin Vreeland 794d92
%{tools_make} %{?_smp_mflags} -C tools/power/cpupower CPUFREQ_BENCH=false
Justin Vreeland 794d92
%ifarch x86_64
Justin Vreeland 794d92
    pushd tools/power/cpupower/debug/x86_64
Justin Vreeland 794d92
    %{tools_make} %{?_smp_mflags} centrino-decode powernow-k8-decode
Justin Vreeland 794d92
    popd
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
%ifarch x86_64
Justin Vreeland 794d92
   pushd tools/power/x86/x86_energy_perf_policy/
Justin Vreeland 794d92
   %{tools_make}
Justin Vreeland 794d92
   popd
Justin Vreeland 794d92
   pushd tools/power/x86/turbostat
Justin Vreeland 794d92
   %{tools_make}
Justin Vreeland 794d92
   popd
Justin Vreeland 794d92
   pushd tools/power/x86/intel-speed-select
Justin Vreeland 794d92
   %{make}
Justin Vreeland 794d92
   popd
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
pushd tools/thermal/tmon/
Justin Vreeland 794d92
%{tools_make}
Justin Vreeland 794d92
popd
Justin Vreeland 794d92
pushd tools/iio/
Justin Vreeland 1fc083
# Needs to be fixed to pick up CFLAGS
Justin Vreeland 1fc083
%{__make}
Justin Vreeland 794d92
popd
Justin Vreeland 794d92
pushd tools/gpio/
Justin Vreeland 1fc083
# Needs to be fixed to pick up CFLAGS
Justin Vreeland 1fc083
%{__make}
Justin Vreeland 794d92
popd
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%global bpftool_make \
Justin Vreeland 1fc083
  %{__make} EXTRA_CFLAGS="${RPM_OPT_FLAGS}" EXTRA_LDFLAGS="%{__global_ldflags}" DESTDIR=$RPM_BUILD_ROOT V=1
Justin Vreeland 794d92
%if %{with_bpftool}
Justin Vreeland 794d92
pushd tools/bpf/bpftool
Justin Vreeland 794d92
%{bpftool_make}
Justin Vreeland 794d92
popd
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_selftests}
Justin Vreeland d5a02a
# Unfortunately, samples/bpf/Makefile expects that the headers are installed
Justin Vreeland d5a02a
# in the source tree. We installed them previously to $RPM_BUILD_ROOT/usr
Justin Vreeland d5a02a
# but there's no way to tell the Makefile to take them from there.
Justin Vreeland d5a02a
%{make} %{?_smp_mflags} headers_install
Justin Vreeland d5a02a
Justin Vreeland d5a02a
# If we re building only tools without kernel, we need to generate config
Justin Vreeland d5a02a
# headers and prepare tree for modules building. The modules_prepare target
Justin Vreeland d5a02a
# will cover both.
Justin Vreeland d5a02a
if [ ! -f include/generated/autoconf.h ]; then
Justin Vreeland d5a02a
   %{make} %{?_smp_mflags} modules_prepare
Justin Vreeland d5a02a
fi
Justin Vreeland d5a02a
Justin Vreeland d5a02a
%{make} %{?_smp_mflags} ARCH=$Arch V=1 M=samples/bpf/
Justin Vreeland d5a02a
Justin Vreeland d5a02a
# Prevent bpf selftests to build bpftool repeatedly:
Justin Vreeland d5a02a
export BPFTOOL=$(pwd)/tools/bpf/bpftool/bpftool
Justin Vreeland d5a02a
Justin Vreeland 794d92
pushd tools/testing/selftests
Justin Vreeland 794d92
# We need to install here because we need to call make with ARCH set which
Justin Vreeland 794d92
# doesn't seem possible to do in the install section.
Justin Vreeland 1fc083
%{make} -s %{?_smp_mflags} ARCH=$Arch V=1 TARGETS="bpf livepatch net" INSTALL_PATH=%{buildroot}%{_libexecdir}/kselftests install
Justin Vreeland 794d92
popd
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_doc}
Justin Vreeland 794d92
# Make the HTML pages.
Justin Vreeland 1fc083
%{__make} PYTHON=/usr/bin/python3 htmldocs || %{doc_build_fail}
Justin Vreeland 794d92
Justin Vreeland 794d92
# sometimes non-world-readable files sneak into the kernel source tree
Justin Vreeland 794d92
chmod -R a=rX Documentation
Justin Vreeland 794d92
find Documentation -type d | xargs chmod u+w
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# In the modsign case, we do 3 things.  1) We check the "flavour" and hard
Justin Vreeland 794d92
# code the value in the following invocations.  This is somewhat sub-optimal
Justin Vreeland 794d92
# but we're doing this inside of an RPM macro and it isn't as easy as it
Justin Vreeland 794d92
# could be because of that.  2) We restore the .tmp_versions/ directory from
Justin Vreeland 794d92
# the one we saved off in BuildKernel above.  This is to make sure we're
Justin Vreeland 794d92
# signing the modules we actually built/installed in that flavour.  3) We
Justin Vreeland 794d92
# grab the arch and invoke mod-sign.sh command to actually sign the modules.
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# We have to do all of those things _after_ find-debuginfo runs, otherwise
Justin Vreeland 794d92
# that will strip the signature off of the modules.
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# Don't sign modules for the zfcpdump flavour as it is monolithic.
Justin Vreeland 794d92
Justin Vreeland 794d92
%define __modsign_install_post \
Justin Vreeland 794d92
  if [ "%{signmodules}" -eq "1" ]; then \
Justin Vreeland 794d92
    if [ "%{with_pae}" -ne "0" ]; then \
Justin Vreeland 794d92
       %{modsign_cmd} certs/signing_key.pem.sign+lpae certs/signing_key.x509.sign+lpae $RPM_BUILD_ROOT/lib/modules/%{KVERREL}+lpae/ \
Justin Vreeland 794d92
    fi \
Justin Vreeland 794d92
    if [ "%{with_debug}" -ne "0" ]; then \
Justin Vreeland 794d92
      %{modsign_cmd} certs/signing_key.pem.sign+debug certs/signing_key.x509.sign+debug $RPM_BUILD_ROOT/lib/modules/%{KVERREL}+debug/ \
Justin Vreeland 794d92
    fi \
Justin Vreeland 794d92
    if [ "%{with_up}" -ne "0" ]; then \
Justin Vreeland 794d92
      %{modsign_cmd} certs/signing_key.pem.sign certs/signing_key.x509.sign $RPM_BUILD_ROOT/lib/modules/%{KVERREL}/ \
Justin Vreeland 794d92
    fi \
Justin Vreeland 794d92
  fi \
Justin Vreeland 794d92
  if [ "%{zipmodules}" -eq "1" ]; then \
Justin Vreeland 794d92
    find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P%{zcpu} xz; \
Justin Vreeland 794d92
  fi \
Justin Vreeland 794d92
%{nil}
Justin Vreeland 794d92
Justin Vreeland 794d92
###
Justin Vreeland 794d92
### Special hacks for debuginfo subpackages.
Justin Vreeland 794d92
###
Justin Vreeland 794d92
Justin Vreeland 794d92
# This macro is used by %%install, so we must redefine it before that.
Justin Vreeland 794d92
%define debug_package %{nil}
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_debuginfo}
Justin Vreeland 794d92
Justin Vreeland 794d92
%ifnarch noarch
Justin Vreeland 794d92
%global __debug_package 1
Justin Vreeland 794d92
%files -f debugfiles.list debuginfo-common-%{_target_cpu}
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# We don't want to package debuginfo for self-tests and samples but
Justin Vreeland 794d92
# we have to delete them to avoid an error messages about unpackaged
Justin Vreeland 794d92
# files.
Justin Vreeland 1fc083
# Delete the debuginfo for kernel-devel files
Justin Vreeland 794d92
%define __remove_unwanted_dbginfo_install_post \
Justin Vreeland 794d92
  if [ "%{with_selftests}" -ne "0" ]; then \
Justin Vreeland 794d92
    rm -rf $RPM_BUILD_ROOT/usr/lib/debug/usr/libexec/ksamples; \
Justin Vreeland 794d92
    rm -rf $RPM_BUILD_ROOT/usr/lib/debug/usr/libexec/kselftests; \
Justin Vreeland 794d92
  fi \
Justin Vreeland 794d92
  rm -rf $RPM_BUILD_ROOT/usr/lib/debug/usr/src; \
Justin Vreeland 794d92
%{nil}
Justin Vreeland 794d92
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# Disgusting hack alert! We need to ensure we sign modules *after* all
Justin Vreeland 794d92
# invocations of strip occur, which is in __debug_install_post if
Justin Vreeland 794d92
# find-debuginfo.sh runs, and __os_install_post if not.
Justin Vreeland 794d92
#
Justin Vreeland 794d92
%define __spec_install_post \
Justin Vreeland 794d92
  %{?__debug_package:%{__debug_install_post}}\
Justin Vreeland 794d92
  %{__arch_install_post}\
Justin Vreeland 794d92
  %{__os_install_post}\
Justin Vreeland 794d92
  %{__remove_unwanted_dbginfo_install_post}\
Justin Vreeland 794d92
  %{__modsign_install_post}
Justin Vreeland 794d92
Justin Vreeland 794d92
###
Justin Vreeland 794d92
### install
Justin Vreeland 794d92
###
Justin Vreeland 794d92
Justin Vreeland 794d92
%install
Justin Vreeland 794d92
Justin Vreeland 794d92
cd linux-%{KVERREL}
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_doc}
Justin Vreeland 794d92
docdir=$RPM_BUILD_ROOT%{_datadir}/doc/kernel-doc-%{rpmversion}
Justin Vreeland 794d92
Justin Vreeland 794d92
# copy the source over
Justin Vreeland 794d92
mkdir -p $docdir
Justin Vreeland 794d92
tar -h -f - --exclude=man --exclude='.*' -c Documentation | tar xf - -C $docdir
Justin Vreeland 794d92
Justin Vreeland 794d92
# with_doc
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# We have to do the headers install before the tools install because the
Justin Vreeland 794d92
# kernel headers_install will remove any header files in /usr/include that
Justin Vreeland 794d92
# it doesn't install itself.
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_headers}
Justin Vreeland 794d92
# Install kernel headers
Justin Vreeland 1fc083
%{__make} ARCH=%{hdrarch} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr headers_install
Justin Vreeland 794d92
Justin Vreeland 794d92
find $RPM_BUILD_ROOT/usr/include \
Justin Vreeland 794d92
     \( -name .install -o -name .check -o \
Justin Vreeland 794d92
        -name ..install.cmd -o -name ..check.cmd \) -delete
Justin Vreeland 794d92
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_cross_headers}
Justin Vreeland 794d92
%if 0%{?fedora}
Justin Vreeland 794d92
HDR_ARCH_LIST='arm arm64 powerpc s390 x86'
Justin Vreeland 794d92
%else
Justin Vreeland 794d92
HDR_ARCH_LIST='arm64 powerpc s390 x86'
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
mkdir -p $RPM_BUILD_ROOT/usr/tmp-headers
Justin Vreeland 794d92
Justin Vreeland 794d92
for arch in $HDR_ARCH_LIST; do
Justin Vreeland 794d92
	mkdir $RPM_BUILD_ROOT/usr/tmp-headers/arch-${arch}
Justin Vreeland 1fc083
	%{__make} ARCH=${arch} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr/tmp-headers/arch-${arch} headers_install
Justin Vreeland 794d92
done
Justin Vreeland 794d92
Justin Vreeland 794d92
find $RPM_BUILD_ROOT/usr/tmp-headers \
Justin Vreeland 794d92
     \( -name .install -o -name .check -o \
Justin Vreeland 794d92
        -name ..install.cmd -o -name ..check.cmd \) -delete
Justin Vreeland 794d92
Justin Vreeland 794d92
# Copy all the architectures we care about to their respective asm directories
Justin Vreeland 794d92
for arch in $HDR_ARCH_LIST ; do
Justin Vreeland 794d92
	mkdir -p $RPM_BUILD_ROOT/usr/${arch}-linux-gnu/include
Justin Vreeland 794d92
	mv $RPM_BUILD_ROOT/usr/tmp-headers/arch-${arch}/include/* $RPM_BUILD_ROOT/usr/${arch}-linux-gnu/include/
Justin Vreeland 794d92
done
Justin Vreeland 794d92
Justin Vreeland 794d92
rm -rf $RPM_BUILD_ROOT/usr/tmp-headers
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_kernel_abi_whitelists}
Justin Vreeland 794d92
# kabi directory
Justin Vreeland 794d92
INSTALL_KABI_PATH=$RPM_BUILD_ROOT/lib/modules/
Justin Vreeland 794d92
mkdir -p $INSTALL_KABI_PATH
Justin Vreeland 794d92
Justin Vreeland 794d92
# install kabi releases directories
Justin Vreeland 794d92
tar xjvf %{SOURCE300} -C $INSTALL_KABI_PATH
Justin Vreeland 794d92
# with_kernel_abi_whitelists
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_perf}
Justin Vreeland 794d92
# perf tool binary and supporting scripts/binaries
Justin Vreeland 794d92
%{perf_make} DESTDIR=$RPM_BUILD_ROOT lib=%{_lib} install-bin install-traceevent-plugins
Justin Vreeland 794d92
# remove the 'trace' symlink.
Justin Vreeland 794d92
rm -f %{buildroot}%{_bindir}/trace
Justin Vreeland 794d92
Justin Vreeland 794d92
# For both of the below, yes, this should be using a macro but right now
Justin Vreeland 794d92
# it's hard coded and we don't actually want it anyway right now.
Justin Vreeland 794d92
# Whoever wants examples can fix it up!
Justin Vreeland 794d92
Justin Vreeland 794d92
# remove examples
Justin Vreeland 794d92
rm -rf %{buildroot}/usr/lib/perf/examples
Justin Vreeland 794d92
# remove the stray files that somehow got packaged
Justin Vreeland 794d92
rm -rf %{buildroot}/usr/lib/perf/include/bpf/bpf.h
Justin Vreeland 794d92
rm -rf %{buildroot}/usr/lib/perf/include/bpf/stdio.h
Justin Vreeland 794d92
rm -rf %{buildroot}/usr/lib/perf/include/bpf/linux/socket.h
Justin Vreeland 794d92
rm -rf %{buildroot}/usr/lib/perf/include/bpf/pid_filter.h
Justin Vreeland 794d92
rm -rf %{buildroot}/usr/lib/perf/include/bpf/unistd.h
Justin Vreeland 794d92
Justin Vreeland 794d92
# python-perf extension
Justin Vreeland 794d92
%{perf_make} DESTDIR=$RPM_BUILD_ROOT install-python_ext
Justin Vreeland 794d92
Justin Vreeland 794d92
# perf man pages (note: implicit rpm magic compresses them later)
Justin Vreeland 794d92
mkdir -p %{buildroot}/%{_mandir}/man1
Justin Vreeland 794d92
%{perf_make} DESTDIR=$RPM_BUILD_ROOT install-man
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_tools}
Justin Vreeland 794d92
%ifarch %{cpupowerarchs}
Justin Vreeland 794d92
%{make} -C tools/power/cpupower DESTDIR=$RPM_BUILD_ROOT libdir=%{_libdir} mandir=%{_mandir} CPUFREQ_BENCH=false install
Justin Vreeland 794d92
rm -f %{buildroot}%{_libdir}/*.{a,la}
Justin Vreeland 794d92
%find_lang cpupower
Justin Vreeland 794d92
mv cpupower.lang ../
Justin Vreeland 794d92
%ifarch x86_64
Justin Vreeland 794d92
    pushd tools/power/cpupower/debug/x86_64
Justin Vreeland 794d92
    install -m755 centrino-decode %{buildroot}%{_bindir}/centrino-decode
Justin Vreeland 794d92
    install -m755 powernow-k8-decode %{buildroot}%{_bindir}/powernow-k8-decode
Justin Vreeland 794d92
    popd
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
chmod 0755 %{buildroot}%{_libdir}/libcpupower.so*
Justin Vreeland 794d92
mkdir -p %{buildroot}%{_unitdir} %{buildroot}%{_sysconfdir}/sysconfig
Justin Vreeland 794d92
install -m644 %{SOURCE2000} %{buildroot}%{_unitdir}/cpupower.service
Justin Vreeland 794d92
install -m644 %{SOURCE2001} %{buildroot}%{_sysconfdir}/sysconfig/cpupower
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
%ifarch x86_64
Justin Vreeland 794d92
   mkdir -p %{buildroot}%{_mandir}/man8
Justin Vreeland 794d92
   pushd tools/power/x86/x86_energy_perf_policy
Justin Vreeland 794d92
   %{tools_make} DESTDIR=%{buildroot} install
Justin Vreeland 794d92
   popd
Justin Vreeland 794d92
   pushd tools/power/x86/turbostat
Justin Vreeland 794d92
   %{tools_make} DESTDIR=%{buildroot} install
Justin Vreeland 794d92
   popd
Justin Vreeland 794d92
   pushd tools/power/x86/intel-speed-select
Justin Vreeland 794d92
   %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude" DESTDIR=%{buildroot} install
Justin Vreeland 794d92
   popd
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
pushd tools/thermal/tmon
Justin Vreeland 794d92
%{tools_make} INSTALL_ROOT=%{buildroot} install
Justin Vreeland 794d92
popd
Justin Vreeland 794d92
pushd tools/iio
Justin Vreeland 1fc083
%{__make} DESTDIR=%{buildroot} install
Justin Vreeland 794d92
popd
Justin Vreeland 794d92
pushd tools/gpio
Justin Vreeland 1fc083
%{__make} DESTDIR=%{buildroot} install
Justin Vreeland 794d92
popd
Justin Vreeland 794d92
pushd tools/kvm/kvm_stat
Justin Vreeland 1fc083
%{__make} INSTALL_ROOT=%{buildroot} install-tools
Justin Vreeland 1fc083
%{__make} INSTALL_ROOT=%{buildroot} install-man
Justin Vreeland 794d92
popd
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_bpftool}
Justin Vreeland 794d92
pushd tools/bpf/bpftool
Justin Vreeland 794d92
%{bpftool_make} prefix=%{_prefix} bash_compdir=%{_sysconfdir}/bash_completion.d/ mandir=%{_mandir} install doc-install
Justin Vreeland 794d92
popd
Justin Vreeland 1fc083
# man-pages packages this (rhbz #1686954, #1918707)
Justin Vreeland 1fc083
# jvreeland: eh.
Justin Vreeland 1fc083
# rm %{buildroot}%{_mandir}/man7/bpf-helpers.7
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_selftests}
Justin Vreeland 794d92
pushd samples
Justin Vreeland 794d92
install -d %{buildroot}%{_libexecdir}/ksamples
Justin Vreeland 794d92
# install bpf samples
Justin Vreeland 794d92
pushd bpf
Justin Vreeland 794d92
install -d %{buildroot}%{_libexecdir}/ksamples/bpf
Justin Vreeland 794d92
find -type f -executable -exec install -m755 {} %{buildroot}%{_libexecdir}/ksamples/bpf \;
Justin Vreeland 794d92
install -m755 *.sh %{buildroot}%{_libexecdir}/ksamples/bpf
Justin Vreeland 794d92
# test_lwt_bpf.sh compiles test_lwt_bpf.c when run; this works only from the
Justin Vreeland 794d92
# kernel tree. Just remove it.
Justin Vreeland 794d92
rm %{buildroot}%{_libexecdir}/ksamples/bpf/test_lwt_bpf.sh
Justin Vreeland 794d92
install -m644 tcp_bpf.readme %{buildroot}%{_libexecdir}/ksamples/bpf
Justin Vreeland 794d92
popd
Justin Vreeland 794d92
# install pktgen samples
Justin Vreeland 794d92
pushd pktgen
Justin Vreeland 794d92
install -d %{buildroot}%{_libexecdir}/ksamples/pktgen
Justin Vreeland 794d92
find . -type f -executable -exec install -m755 {} %{buildroot}%{_libexecdir}/ksamples/pktgen/{} \;
Justin Vreeland 794d92
find . -type f ! -executable -exec install -m644 {} %{buildroot}%{_libexecdir}/ksamples/pktgen/{} \;
Justin Vreeland 794d92
popd
Justin Vreeland 794d92
popd
Justin Vreeland 794d92
# install drivers/net/mlxsw selftests
Justin Vreeland 794d92
pushd tools/testing/selftests/drivers/net/mlxsw
Justin Vreeland 794d92
find -type d -exec install -d %{buildroot}%{_libexecdir}/kselftests/drivers/net/mlxsw/{} \;
Justin Vreeland 794d92
find -type f -executable -exec install -D -m755 {} %{buildroot}%{_libexecdir}/kselftests/drivers/net/mlxsw/{} \;
Justin Vreeland 794d92
find -type f ! -executable -exec install -D -m644 {} %{buildroot}%{_libexecdir}/kselftests/drivers/net/mlxsw/{} \;
Justin Vreeland 794d92
popd
Justin Vreeland 794d92
# install net/forwarding selftests
Justin Vreeland 794d92
pushd tools/testing/selftests/net/forwarding
Justin Vreeland 794d92
find -type d -exec install -d %{buildroot}%{_libexecdir}/kselftests/net/forwarding/{} \;
Justin Vreeland 794d92
find -type f -executable -exec install -D -m755 {} %{buildroot}%{_libexecdir}/kselftests/net/forwarding/{} \;
Justin Vreeland 794d92
find -type f ! -executable -exec install -D -m644 {} %{buildroot}%{_libexecdir}/kselftests/net/forwarding/{} \;
Justin Vreeland 794d92
popd
Justin Vreeland 794d92
# install tc-testing selftests
Justin Vreeland 794d92
pushd tools/testing/selftests/tc-testing
Justin Vreeland 794d92
find -type d -exec install -d %{buildroot}%{_libexecdir}/kselftests/tc-testing/{} \;
Justin Vreeland 794d92
find -type f -executable -exec install -D -m755 {} %{buildroot}%{_libexecdir}/kselftests/tc-testing/{} \;
Justin Vreeland 794d92
find -type f ! -executable -exec install -D -m644 {} %{buildroot}%{_libexecdir}/kselftests/tc-testing/{} \;
Justin Vreeland 794d92
popd
Justin Vreeland 794d92
# install livepatch selftests
Justin Vreeland 794d92
pushd tools/testing/selftests/livepatch
Justin Vreeland 794d92
find -type d -exec install -d %{buildroot}%{_libexecdir}/kselftests/livepatch/{} \;
Justin Vreeland 794d92
find -type f -executable -exec install -D -m755 {} %{buildroot}%{_libexecdir}/kselftests/livepatch/{} \;
Justin Vreeland 794d92
find -type f ! -executable -exec install -D -m644 {} %{buildroot}%{_libexecdir}/kselftests/livepatch/{} \;
Justin Vreeland 794d92
popd
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# We have to do the headers checksum calculation after the tools install because
Justin Vreeland 794d92
# these might end up installing their own set of headers on top of kernel's
Justin Vreeland 794d92
%if %{with_headers}
Justin Vreeland 794d92
# compute a content hash to export as Provides: kernel-headers-checksum
Justin Vreeland 794d92
HEADERS_CHKSUM=$(export LC_ALL=C; find $RPM_BUILD_ROOT/usr/include -type f -name "*.h" \
Justin Vreeland 794d92
			! -path $RPM_BUILD_ROOT/usr/include/linux/version.h | \
Justin Vreeland 794d92
		 sort | xargs cat | sha1sum - | cut -f 1 -d ' ');
Justin Vreeland 794d92
# export the checksum via usr/include/linux/version.h, so the dynamic
Justin Vreeland 794d92
# find-provides can grab the hash to update it accordingly
Justin Vreeland 794d92
echo "#define KERNEL_HEADERS_CHECKSUM \"$HEADERS_CHKSUM\"" >> $RPM_BUILD_ROOT/usr/include/linux/version.h
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
###
Justin Vreeland 794d92
### clean
Justin Vreeland 794d92
###
Justin Vreeland 794d92
Justin Vreeland 794d92
###
Justin Vreeland 794d92
### scripts
Justin Vreeland 794d92
###
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_tools}
Justin Vreeland 794d92
%post -n kernel-tools-libs
Justin Vreeland 794d92
/sbin/ldconfig
Justin Vreeland 794d92
Justin Vreeland 794d92
%postun -n kernel-tools-libs
Justin Vreeland 794d92
/sbin/ldconfig
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# This macro defines a %%post script for a kernel*-devel package.
Justin Vreeland 794d92
#	%%kernel_devel_post [<subpackage>]
Justin Vreeland 794d92
# Note we don't run hardlink if ostree is in use, as ostree is
Justin Vreeland 794d92
# a far more sophisticated hardlink implementation.
Justin Vreeland 794d92
# https://github.com/projectatomic/rpm-ostree/commit/58a79056a889be8814aa51f507b2c7a4dccee526
Justin Vreeland 794d92
#
Justin Vreeland 794d92
%define kernel_devel_post() \
Justin Vreeland 794d92
%{expand:%%post %{?1:%{1}-}devel}\
Justin Vreeland 794d92
if [ -f /etc/sysconfig/kernel ]\
Justin Vreeland 794d92
then\
Justin Vreeland 794d92
    . /etc/sysconfig/kernel || exit $?\
Justin Vreeland 794d92
fi\
Justin Vreeland 1fc083
if [ "$HARDLINK" != "no" -a -x /usr/bin/hardlink -a ! -e /run/ostree-booted ] \
Justin Vreeland 794d92
then\
Justin Vreeland 794d92
    (cd /usr/src/kernels/%{KVERREL}%{?1:+%{1}} &&\
Justin Vreeland 794d92
     /usr/bin/find . -type f | while read f; do\
Justin Vreeland 794d92
       hardlink -c /usr/src/kernels/*%{?dist}.*/$f $f\
Justin Vreeland 794d92
     done)\
Justin Vreeland 794d92
fi\
Justin Vreeland 794d92
%{nil}
Justin Vreeland 794d92
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# This macro defines a %%post script for a kernel*-modules-extra package.
Justin Vreeland 794d92
# It also defines a %%postun script that does the same thing.
Justin Vreeland 794d92
#	%%kernel_modules_extra_post [<subpackage>]
Justin Vreeland 794d92
#
Justin Vreeland 794d92
%define kernel_modules_extra_post() \
Justin Vreeland 794d92
%{expand:%%post %{?1:%{1}-}modules-extra}\
Justin Vreeland 794d92
/sbin/depmod -a %{KVERREL}%{?1:+%{1}}\
Justin Vreeland 794d92
%{nil}\
Justin Vreeland 794d92
%{expand:%%postun %{?1:%{1}-}modules-extra}\
Justin Vreeland 794d92
/sbin/depmod -a %{KVERREL}%{?1:+%{1}}\
Justin Vreeland 794d92
%{nil}
Justin Vreeland 794d92
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# This macro defines a %%post script for a kernel*-modules-internal package.
Justin Vreeland 794d92
# It also defines a %%postun script that does the same thing.
Justin Vreeland 794d92
#	%%kernel_modules_internal_post [<subpackage>]
Justin Vreeland 794d92
#
Justin Vreeland 794d92
%define kernel_modules_internal_post() \
Justin Vreeland 794d92
%{expand:%%post %{?1:%{1}-}modules-internal}\
Justin Vreeland 794d92
/sbin/depmod -a %{KVERREL}%{?1:+%{1}}\
Justin Vreeland 794d92
%{nil}\
Justin Vreeland 794d92
%{expand:%%postun %{?1:%{1}-}modules-internal}\
Justin Vreeland 794d92
/sbin/depmod -a %{KVERREL}%{?1:+%{1}}\
Justin Vreeland 794d92
%{nil}
Justin Vreeland 794d92
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# This macro defines a %%post script for a kernel*-modules package.
Justin Vreeland 794d92
# It also defines a %%postun script that does the same thing.
Justin Vreeland 794d92
#	%%kernel_modules_post [<subpackage>]
Justin Vreeland 794d92
#
Justin Vreeland 794d92
%define kernel_modules_post() \
Justin Vreeland 794d92
%{expand:%%post %{?1:%{1}-}modules}\
Justin Vreeland 794d92
/sbin/depmod -a %{KVERREL}%{?1:+%{1}}\
Justin Vreeland 794d92
%{nil}\
Justin Vreeland 794d92
%{expand:%%postun %{?1:%{1}-}modules}\
Justin Vreeland 794d92
/sbin/depmod -a %{KVERREL}%{?1:+%{1}}\
Justin Vreeland 794d92
%{nil}
Justin Vreeland 794d92
Justin Vreeland 794d92
# This macro defines a %%posttrans script for a kernel package.
Justin Vreeland 794d92
#	%%kernel_variant_posttrans [<subpackage>]
Justin Vreeland 794d92
# More text can follow to go at the end of this variant's %%post.
Justin Vreeland 794d92
#
Justin Vreeland 794d92
%define kernel_variant_posttrans() \
Justin Vreeland 794d92
%{expand:%%posttrans %{?1:%{1}-}core}\
Justin Vreeland 794d92
%if 0%{!?fedora:1}\
Justin Vreeland 794d92
if [ -x %{_sbindir}/weak-modules ]\
Justin Vreeland 794d92
then\
Justin Vreeland 794d92
    %{_sbindir}/weak-modules --add-kernel %{KVERREL}%{?1:+%{1}} || exit $?\
Justin Vreeland 794d92
fi\
Justin Vreeland 794d92
%endif\
Justin Vreeland 794d92
/bin/kernel-install add %{KVERREL}%{?1:+%{1}} /lib/modules/%{KVERREL}%{?1:+%{1}}/vmlinuz || exit $?\
Justin Vreeland 794d92
%{nil}
Justin Vreeland 794d92
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# This macro defines a %%post script for a kernel package and its devel package.
Justin Vreeland 794d92
#	%%kernel_variant_post [-v <subpackage>] [-r <replace>]
Justin Vreeland 794d92
# More text can follow to go at the end of this variant's %%post.
Justin Vreeland 794d92
#
Justin Vreeland 794d92
%define kernel_variant_post(v:r:) \
Justin Vreeland 794d92
%{expand:%%kernel_devel_post %{?-v*}}\
Justin Vreeland 794d92
%{expand:%%kernel_modules_post %{?-v*}}\
Justin Vreeland 794d92
%{expand:%%kernel_modules_extra_post %{?-v*}}\
Justin Vreeland 794d92
%{expand:%%kernel_modules_internal_post %{?-v*}}\
Justin Vreeland 794d92
%{expand:%%kernel_variant_posttrans %{?-v*}}\
Justin Vreeland 794d92
%{expand:%%post %{?-v*:%{-v*}-}core}\
Justin Vreeland 794d92
%{-r:\
Justin Vreeland 794d92
if [ `uname -i` == "x86_64" -o `uname -i` == "i386" ] &&\
Justin Vreeland 794d92
   [ -f /etc/sysconfig/kernel ]; then\
Justin Vreeland 794d92
  /bin/sed -r -i -e 's/^DEFAULTKERNEL=%{-r*}$/DEFAULTKERNEL=kernel%{?-v:-%{-v*}}/' /etc/sysconfig/kernel || exit $?\
Justin Vreeland 794d92
fi}\
Justin Vreeland 794d92
%{nil}
Justin Vreeland 794d92
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# This macro defines a %%preun script for a kernel package.
Justin Vreeland 794d92
#	%%kernel_variant_preun <subpackage>
Justin Vreeland 794d92
#
Justin Vreeland 794d92
%define kernel_variant_preun() \
Justin Vreeland 794d92
%{expand:%%preun %{?1:%{1}-}core}\
Justin Vreeland 794d92
/bin/kernel-install remove %{KVERREL}%{?1:+%{1}} /lib/modules/%{KVERREL}%{?1:+%{1}}/vmlinuz || exit $?\
Justin Vreeland 794d92
if [ -x %{_sbindir}/weak-modules ]\
Justin Vreeland 794d92
then\
Justin Vreeland 794d92
    %{_sbindir}/weak-modules --remove-kernel %{KVERREL}%{?1:+%{1}} || exit $?\
Justin Vreeland 794d92
fi\
Justin Vreeland 794d92
%{nil}
Justin Vreeland 794d92
Justin Vreeland 794d92
%kernel_variant_preun
Justin Vreeland 794d92
%kernel_variant_post -r kernel-smp
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_pae}
Justin Vreeland 794d92
%kernel_variant_preun lpae
Justin Vreeland 794d92
%kernel_variant_post -v lpae -r (kernel|kernel-smp)
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%kernel_variant_preun debug
Justin Vreeland 794d92
%kernel_variant_post -v debug
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_zfcpdump}
Justin Vreeland 794d92
%kernel_variant_preun zfcpdump
Justin Vreeland 794d92
%kernel_variant_post -v zfcpdump
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
if [ -x /sbin/ldconfig ]
Justin Vreeland 794d92
then
Justin Vreeland 794d92
    /sbin/ldconfig -X || exit $?
Justin Vreeland 794d92
fi
Justin Vreeland 794d92
Justin Vreeland 794d92
###
Justin Vreeland 794d92
### file lists
Justin Vreeland 794d92
###
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_headers}
Justin Vreeland 794d92
%files headers
Justin Vreeland 794d92
/usr/include/*
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_cross_headers}
Justin Vreeland 794d92
%files cross-headers
Justin Vreeland 794d92
/usr/*-linux-gnu/include/*
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_kernel_abi_whitelists}
Justin Vreeland 794d92
%files -n kernel-abi-whitelists
Justin Vreeland 794d92
/lib/modules/kabi-*
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_kabidw_base}
Justin Vreeland 794d92
%ifarch x86_64 s390x ppc64 ppc64le aarch64
Justin Vreeland 794d92
%files kabidw-base
Justin Vreeland 794d92
%defattr(-,root,root)
Justin Vreeland 794d92
/kabidw-base/%{_target_cpu}/*
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# only some architecture builds need kernel-doc
Justin Vreeland 794d92
%if %{with_doc}
Justin Vreeland 794d92
%files doc
Justin Vreeland 794d92
%defattr(-,root,root)
Justin Vreeland 794d92
%{_datadir}/doc/kernel-doc-%{rpmversion}/Documentation/*
Justin Vreeland 794d92
%dir %{_datadir}/doc/kernel-doc-%{rpmversion}/Documentation
Justin Vreeland 794d92
%dir %{_datadir}/doc/kernel-doc-%{rpmversion}
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_perf}
Justin Vreeland 794d92
%files -n perf
Justin Vreeland 794d92
%{_bindir}/perf
Justin Vreeland 794d92
%{_libdir}/libperf-jvmti.so
Justin Vreeland 794d92
%dir %{_libdir}/traceevent/plugins
Justin Vreeland 794d92
%{_libdir}/traceevent/plugins/*
Justin Vreeland 794d92
%dir %{_libexecdir}/perf-core
Justin Vreeland 794d92
%{_libexecdir}/perf-core/*
Justin Vreeland 794d92
%{_datadir}/perf-core/*
Justin Vreeland 794d92
%{_mandir}/man[1-8]/perf*
Justin Vreeland 794d92
%{_sysconfdir}/bash_completion.d/perf
Justin Vreeland 794d92
%doc linux-%{KVERREL}/tools/perf/Documentation/examples.txt
Justin Vreeland 794d92
%{_docdir}/perf-tip/tips.txt
Justin Vreeland 794d92
Justin Vreeland 794d92
%files -n python3-perf
Justin Vreeland 794d92
%{python3_sitearch}/*
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_debuginfo}
Justin Vreeland 794d92
%files -f perf-debuginfo.list -n perf-debuginfo
Justin Vreeland 794d92
Justin Vreeland 794d92
%files -f python3-perf-debuginfo.list -n python3-perf-debuginfo
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
# with_perf
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_tools}
Justin Vreeland 794d92
%ifnarch %{cpupowerarchs}
Justin Vreeland 794d92
%files -n kernel-tools
Justin Vreeland 794d92
%else
Justin Vreeland 794d92
%files -n kernel-tools -f cpupower.lang
Justin Vreeland 794d92
%{_bindir}/cpupower
Justin Vreeland 794d92
%{_datadir}/bash-completion/completions/cpupower
Justin Vreeland 794d92
%ifarch x86_64
Justin Vreeland 794d92
%{_bindir}/centrino-decode
Justin Vreeland 794d92
%{_bindir}/powernow-k8-decode
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
%{_unitdir}/cpupower.service
Justin Vreeland 794d92
%{_mandir}/man[1-8]/cpupower*
Justin Vreeland 794d92
%config(noreplace) %{_sysconfdir}/sysconfig/cpupower
Justin Vreeland 794d92
%ifarch x86_64
Justin Vreeland 794d92
%{_bindir}/x86_energy_perf_policy
Justin Vreeland 794d92
%{_mandir}/man8/x86_energy_perf_policy*
Justin Vreeland 794d92
%{_bindir}/turbostat
Justin Vreeland 794d92
%{_mandir}/man8/turbostat*
Justin Vreeland 794d92
%{_bindir}/intel-speed-select
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
# cpupowerarchs
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
%{_bindir}/tmon
Justin Vreeland 794d92
%{_bindir}/iio_event_monitor
Justin Vreeland 794d92
%{_bindir}/iio_generic_buffer
Justin Vreeland 794d92
%{_bindir}/lsiio
Justin Vreeland 794d92
%{_bindir}/lsgpio
Justin Vreeland 794d92
%{_bindir}/gpio-hammer
Justin Vreeland 794d92
%{_bindir}/gpio-event-mon
Justin Vreeland 794d92
%{_bindir}/gpio-watch
Justin Vreeland 794d92
%{_mandir}/man1/kvm_stat*
Justin Vreeland 794d92
%{_bindir}/kvm_stat
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_debuginfo}
Justin Vreeland 794d92
%files -f kernel-tools-debuginfo.list -n kernel-tools-debuginfo
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%ifarch %{cpupowerarchs}
Justin Vreeland 794d92
%files -n kernel-tools-libs
Justin Vreeland 794d92
%{_libdir}/libcpupower.so.0
Justin Vreeland 794d92
%{_libdir}/libcpupower.so.0.0.1
Justin Vreeland 794d92
Justin Vreeland 794d92
%files -n kernel-tools-libs-devel
Justin Vreeland 794d92
%{_libdir}/libcpupower.so
Justin Vreeland 794d92
%{_includedir}/cpufreq.h
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
# with_tools
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_bpftool}
Justin Vreeland 794d92
%files -n bpftool
Justin Vreeland 794d92
%{_sbindir}/bpftool
Justin Vreeland 794d92
%{_sysconfdir}/bash_completion.d/bpftool
Justin Vreeland 794d92
%{_mandir}/man8/bpftool-cgroup.8.gz
Justin Vreeland 1fc083
%{_mandir}/man8/bpftool-gen.8.gz
Justin Vreeland 794d92
%{_mandir}/man8/bpftool-iter.8.gz
Justin Vreeland 794d92
%{_mandir}/man8/bpftool-link.8.gz
Justin Vreeland 794d92
%{_mandir}/man8/bpftool-map.8.gz
Justin Vreeland 794d92
%{_mandir}/man8/bpftool-prog.8.gz
Justin Vreeland 794d92
%{_mandir}/man8/bpftool-perf.8.gz
Justin Vreeland 794d92
%{_mandir}/man8/bpftool.8.gz
Justin Vreeland 794d92
%{_mandir}/man8/bpftool-net.8.gz
Justin Vreeland 794d92
%{_mandir}/man8/bpftool-feature.8.gz
Justin Vreeland 794d92
%{_mandir}/man8/bpftool-btf.8.gz
Justin Vreeland 1fc083
%{_mandir}/man8/bpftool-struct_ops.8.gz
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_debuginfo}
Justin Vreeland 794d92
%files -f bpftool-debuginfo.list -n bpftool-debuginfo
Justin Vreeland 794d92
%defattr(-,root,root)
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_selftests}
Justin Vreeland 794d92
%files selftests-internal
Justin Vreeland 794d92
%{_libexecdir}/ksamples
Justin Vreeland 794d92
%{_libexecdir}/kselftests
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# empty meta-package
Justin Vreeland 794d92
%ifnarch %nobuildarches noarch
Justin Vreeland 794d92
%files
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
%if %{with_gcov}
Justin Vreeland 794d92
%ifarch x86_64 s390x ppc64le aarch64
Justin Vreeland 794d92
%files gcov
Justin Vreeland 794d92
%{_builddir}
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
%endif
Justin Vreeland 794d92
Justin Vreeland 794d92
# This is %%{image_install_path} on an arch where that includes ELF files,
Justin Vreeland 794d92
# or empty otherwise.
Justin Vreeland 794d92
%define elf_image_install_path %{?kernel_image_elf:%{image_install_path}}
Justin Vreeland 794d92
Justin Vreeland 794d92
#
Justin Vreeland 794d92
# This macro defines the %%files sections for a kernel package
Justin Vreeland 794d92
# and its devel and debuginfo packages.
Justin Vreeland 794d92
#	%%kernel_variant_files [-k vmlinux] <condition> <subpackage> <without_modules>
Justin Vreeland 794d92
#
Justin Vreeland 794d92
%define kernel_variant_files(k:) \
Justin Vreeland 794d92
%if %{2}\
Justin Vreeland 794d92
%{expand:%%files -f kernel-%{?3:%{3}-}core.list %{?1:-f kernel-%{?3:%{3}-}ldsoconf.list} %{?3:%{3}-}core}\
Justin Vreeland 794d92
%{!?_licensedir:%global license %%doc}\
Justin Vreeland 794d92
%license linux-%{KVERREL}/COPYING-%{version}-%{release}\
Justin Vreeland 794d92
/lib/modules/%{KVERREL}%{?3:+%{3}}/%{?-k:%{-k*}}%{!?-k:vmlinuz}\
Justin Vreeland 794d92
%ghost /%{image_install_path}/%{?-k:%{-k*}}%{!?-k:vmlinuz}-%{KVERREL}%{?3:+%{3}}\
Justin Vreeland 794d92
/lib/modules/%{KVERREL}%{?3:+%{3}}/.vmlinuz.hmac \
Justin Vreeland 794d92
%ghost /%{image_install_path}/.vmlinuz-%{KVERREL}%{?3:+%{3}}.hmac \
Justin Vreeland 794d92
%ifarch %{arm} aarch64\
Justin Vreeland 794d92
/lib/modules/%{KVERREL}%{?3:+%{3}}/dtb \
Justin Vreeland 794d92
%ghost /%{image_install_path}/dtb-%{KVERREL}%{?3:+%{3}} \
Justin Vreeland 794d92
%endif\
Justin Vreeland 794d92
%attr(600,root,root) /lib/modules/%{KVERREL}%{?3:+%{3}}/System.map\
Justin Vreeland 794d92
%ghost /boot/System.map-%{KVERREL}%{?3:+%{3}}\
Justin Vreeland 794d92
/lib/modules/%{KVERREL}%{?3:+%{3}}/symvers.gz\
Justin Vreeland 794d92
/lib/modules/%{KVERREL}%{?3:+%{3}}/config\
Justin Vreeland 794d92
%ghost /boot/symvers-%{KVERREL}%{?3:+%{3}}.gz\
Justin Vreeland 794d92
%ghost /boot/config-%{KVERREL}%{?3:+%{3}}\
Justin Vreeland 794d92
%ghost /boot/initramfs-%{KVERREL}%{?3:+%{3}}.img\
Justin Vreeland 794d92
%dir /lib/modules\
Justin Vreeland 794d92
%dir /lib/modules/%{KVERREL}%{?3:+%{3}}\
Justin Vreeland 794d92
%dir /lib/modules/%{KVERREL}%{?3:+%{3}}/kernel\
Justin Vreeland 794d92
/lib/modules/%{KVERREL}%{?3:+%{3}}/build\
Justin Vreeland 794d92
/lib/modules/%{KVERREL}%{?3:+%{3}}/source\
Justin Vreeland 794d92
/lib/modules/%{KVERREL}%{?3:+%{3}}/updates\
Justin Vreeland 794d92
/lib/modules/%{KVERREL}%{?3:+%{3}}/bls.conf\
Justin Vreeland 794d92
/lib/modules/%{KVERREL}%{?3:+%{3}}/weak-updates\
Justin Vreeland 1fc083
%{_datadir}/doc/kernel-keys/%{KVERREL}%{?3:+%{3}}\
Justin Vreeland 794d92
%if %{1}\
Justin Vreeland 794d92
/lib/modules/%{KVERREL}%{?3:+%{3}}/vdso\
Justin Vreeland 794d92
%endif\
Justin Vreeland 794d92
/lib/modules/%{KVERREL}%{?3:+%{3}}/modules.*\
Justin Vreeland 794d92
%{expand:%%files -f kernel-%{?3:%{3}-}modules.list %{?3:%{3}-}modules}\
Justin Vreeland 794d92
%{expand:%%files %{?3:%{3}-}devel}\
Justin Vreeland 794d92
%defverify(not mtime)\
Justin Vreeland 794d92
/usr/src/kernels/%{KVERREL}%{?3:+%{3}}\
Justin Vreeland 1fc083
%{expand:%%files -f kernel-%{?3:%{3}-}modules-extra.list %{?3:%{3}-}modules-extra}\
Justin Vreeland 794d92
%config(noreplace) /etc/modprobe.d/*-blacklist.conf\
Justin Vreeland 1fc083
%{expand:%%files -f kernel-%{?3:%{3}-}modules-internal.list %{?3:%{3}-}modules-internal}\
Justin Vreeland 794d92
%if %{with_debuginfo}\
Justin Vreeland 794d92
%ifnarch noarch\
Justin Vreeland 794d92
%{expand:%%files -f debuginfo%{?3}.list %{?3:%{3}-}debuginfo}\
Justin Vreeland 794d92
%endif\
Justin Vreeland 794d92
%endif\
Justin Vreeland 794d92
%if %{?3:1} %{!?3:0}\
Justin Vreeland 794d92
%{expand:%%files %{3}}\
Justin Vreeland 794d92
%endif\
Justin Vreeland 794d92
%endif\
Justin Vreeland 794d92
%{nil}
Justin Vreeland 794d92
Justin Vreeland 794d92
%kernel_variant_files %{_use_vdso} %{with_up}
Justin Vreeland 794d92
%kernel_variant_files %{_use_vdso} %{with_debug} debug
Justin Vreeland 794d92
%kernel_variant_files %{use_vdso} %{with_pae} lpae
Justin Vreeland 794d92
%kernel_variant_files %{_use_vdso} %{with_zfcpdump} zfcpdump 1
Justin Vreeland 794d92
Justin Vreeland 794d92
%define kernel_variant_ipaclones(k:) \
Justin Vreeland 794d92
%if %{1}\
Justin Vreeland 794d92
%if %{with_ipaclones}\
Justin Vreeland 794d92
%{expand:%%files %{?2:%{2}-}ipaclones-internal}\
Justin Vreeland 794d92
%defattr(-,root,root)\
Justin Vreeland 794d92
%defverify(not mtime)\
Justin Vreeland 794d92
/usr/src/kernels/%{KVERREL}%{?2:+%{2}}-ipaclones\
Justin Vreeland 794d92
%endif\
Justin Vreeland 794d92
%endif\
Justin Vreeland 794d92
%{nil}
Justin Vreeland 794d92
Justin Vreeland 794d92
%kernel_variant_ipaclones %{with_up}
Justin Vreeland 794d92
Justin Vreeland 794d92
# plz don't put in a version string unless you're going to tag
Justin Vreeland 794d92
# and build.
Justin Vreeland 794d92
#
Justin Vreeland 794d92
#
Justin Vreeland 794d92
%changelog
16261a
* Wed Jul 06 2022 Davide Cavalca <dcavalca@centosproject.org> - 5.14.0-76.hs2.el8
16261a
- Hotfix build
16261a
- Drop perl dependency for perf on el8 to avoid modularity issues
16261a
Justin Vreeland d5a02a
* Tue May 10 2022 Justin Vreeland <jvreeland@centosproject.org> - 5.14.0-76.hs1.el8
Justin Vreeland 61e3fc
- redhat/: cherry pick build artifacts needed for CentOS 8 ark-style builds (Justin Vreeland)
Justin Vreeland 1fc083
Justin Vreeland d5a02a
* Wed Mar 30 2022 Neal Gompa <ngompa@centosproject.org> [5.14.0-76.hs1.el9]
Justin Vreeland 1fc083
- redhat/configs: Disable fbdev drivers and use simpledrm instead (Javier Martinez Canillas) [1986223]
Justin Vreeland d5a02a
- drm/simpledrm: Add "panel orientation" property on non-upright mounted LCD panels (Javier Martinez Canillas) [1986223]
Justin Vreeland d5a02a
- drm/simpledrm: Request memory region in driver (Javier Martinez Canillas) [1986223]
Justin Vreeland d5a02a
- drm/simpledrm: Add [AX]RGB2101010 formats (Javier Martinez Canillas) [1986223]
Justin Vreeland 1fc083
- drm: simpledrm: fix wrong unit with pixel clock (Javier Martinez Canillas) [1986223]
Justin Vreeland d5a02a
- drm/simpledrm: Support virtual screen sizes (Javier Martinez Canillas) [1986223]
Justin Vreeland d5a02a
- drm/fb-helper: Allocate shadow buffer of surface height (Javier Martinez Canillas) [1986223]
Justin Vreeland 1fc083
- drm: fb_helper: improve CONFIG_FB dependency (Javier Martinez Canillas) [1986223]
Justin Vreeland 1fc083
- drm: fb_helper: fix CONFIG_FB dependency (Javier Martinez Canillas) [1986223]
Justin Vreeland d5a02a
- efi: sysfb_efi: fix build when EFI is not set (Javier Martinez Canillas) [1986223]
Justin Vreeland d5a02a
- drivers/firmware: Don't mark as busy the simple-framebuffer IO resource (Javier Martinez Canillas) [1986223]
Justin Vreeland d5a02a
- drivers/firmware: Add missing platform_device_put() in sysfb_create_simplefb (Javier Martinez Canillas) [1986223]
Justin Vreeland 1fc083
- drivers/firmware: fix SYSFB depends to prevent build failures (Javier Martinez Canillas) [1986223]
Justin Vreeland 1fc083
- drivers/firmware: consolidate EFI framebuffer setup for all arches (Javier Martinez Canillas) [1986223]
Justin Vreeland 1fc083
- drivers/firmware: move x86 Generic System Framebuffers support (Javier Martinez Canillas) [1986223]
Justin Vreeland d5a02a
- redhat: Fix "make dist-release-finish" to use the correct NVR variables (Neal Gompa) [2053836]
Justin Vreeland 1fc083
- redhat/configs: Enable the Btrfs file system (Neal Gompa)
Justin Vreeland 1fc083
Justin Vreeland d5a02a
* Wed Mar 30 2022 Patrick Talbert <ptalbert@redhat.com> [5.14.0-76.el9]
Justin Vreeland d5a02a
- vdpa/mlx5: Fix tracking of current number of VQs (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa/mlx5: Fix is_index_valid() to refer to features (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: Protect vdpa reset with cf_mutex (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: Avoid taking cf_mutex lock on get status (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa/vdpa_sim_net: Report max device capabilities (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: Use BIT_ULL for bit operations (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa/vdpa_sim: Configure max supported virtqueues (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa/mlx5: Report max device capabilities (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: Support reporting max device capabilities (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa/mlx5: Restore cur_num_vqs in case of failure in change_num_qps() (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: Add support for returning device configuration information (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa/mlx5: Support configuring max data virtqueue (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa/mlx5: Fix config_attr_mask assignment (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: Allow to configure max data virtqueues (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: Read device configuration only if FEATURES_OK (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: Sync calls set/get config/status with cf_mutex (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa/mlx5: Distribute RX virtqueues in RQT object (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: Provide interface to read driver features (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: clean up get_config_size ret value handling (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa/mlx5: Fix wrong configuration of virtio_version_1_0 (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: Mark vdpa_config_ops.get_vq_notification as optional (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: Avoid duplicate call to vp_vdpa get_status (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- net/mlx5_vdpa: Offer VIRTIO_NET_F_MTU when setting MTU (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: add driver_override support (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- docs: document sysfs ABI for vDPA bus (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- ifcvf/vDPA: fix misuse virtio-net device config size for blk dev (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: Consider device id larger than 31 (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- virtio: always enter drivers/virtio/ (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: check that offsets are within bounds (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa_sim: avoid putting an uninitialized iova_domain (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vhost-vdpa: clean irqs before reseting vdpa device (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa/mlx5: Forward only packets with allowed MAC address (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa/mlx5: Support configuration of MAC (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa/mlx5: Fix clearing of VIRTIO_NET_F_MAC feature bit (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa_sim_net: Enable user to set mac address and mtu (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: Enable user to set mac and mtu of vdpa device (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: Use kernel coding style for structure comments (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: Introduce query of device config layout (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: Introduce and use vdpa device get, set config helpers (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa/mlx5: Propagate link status from device to vdpa driver (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa/mlx5: Rename control VQ workqueue to vdpa wq (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa/mlx5: Remove mtu field from vdpa net device (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: add new attribute VDPA_ATTR_DEV_MIN_VQ_SIZE (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- virtio_vdpa: setup correct vq size with callbacks get_vq_num_{max,min} (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: min vq num of vdpa device cannot be greater than max vq num (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: add new callback get_vq_num_min in vdpa_config_ops (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vp_vdpa: add vq irq offloading support (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: fix typo (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vhost-vdpa: Fix the wrong input in config_cb (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vhost_vdpa: unset vq irq before freeing irq (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: potential uninitialized return in vhost_vdpa_va_map() (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa/mlx5: Avoid executing set_vq_ready() if device is reset (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa/mlx5: Clear ready indication for control VQ (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: Support transferring virtual addressing during DMA mapping (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: factor out vhost_vdpa_pa_map() and vhost_vdpa_pa_unmap() (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: Add an opaque pointer for vdpa_config_ops.dma_map() (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vhost-iotlb: Add an opaque pointer for vhost IOTLB (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vhost-vdpa: Handle the failure of vdpa_reset() (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: Add reset callback in vdpa_config_ops (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: Fix some coding style issues (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa: Make use of PFN_PHYS/PFN_UP/PFN_DOWN helper macro (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa/mlx5: Add multiqueue support (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa/mlx5: Add support for control VQ and MAC setting (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa/mlx5: Ensure valid indices are provided (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa/mlx5: Decouple virtqueue callback from struct mlx5_vdpa_virtqueue (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa/mlx5: function prototype modifications in preparation to control VQ (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vdpa/mlx5: Remove redundant header file inclusion (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vDPA/ifcvf: enable multiqueue and control vq (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vDPA/ifcvf: detect and use the onboard number of queues directly (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vDPA/ifcvf: implement management netlink framework for ifcvf (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- vDPA/ifcvf: introduce get_dev_type() which returns virtio dev id (Cindy Lu) [2055451]
Justin Vreeland d5a02a
- x86/hyperv: Output host build info as normal Windows version number (Vitaly Kuznetsov) [2060708]
Justin Vreeland d5a02a
- lib/irq_poll: Declare IRQ_POLL softirq vector as ksoftirqd-parking safe (Desnes A. Nunes do Rosario) [2059555]
Justin Vreeland d5a02a
- tick/rcu: Stop allowing RCU_SOFTIRQ in idle (Desnes A. Nunes do Rosario) [2059555]
Justin Vreeland d5a02a
- tick/rcu: Remove obsolete rcu_needs_cpu() parameters (Desnes A. Nunes do Rosario) [2059555]
Justin Vreeland d5a02a
- tick: Detect and fix jiffies update stall (Desnes A. Nunes do Rosario) [2059555]
Justin Vreeland d5a02a
- rcu: Move rcu_needs_cpu() to tree.c (Desnes A. Nunes do Rosario) [2059555]
Justin Vreeland d5a02a
- rcu: Remove the RCU_FAST_NO_HZ Kconfig option (Desnes A. Nunes do Rosario) [2059555]
Justin Vreeland d5a02a
- torture: Remove RCU_FAST_NO_HZ from rcu scenarios (Desnes A. Nunes do Rosario) [2059555]
Justin Vreeland d5a02a
- torture: Remove RCU_FAST_NO_HZ from rcuscale and refscale scenarios (Desnes A. Nunes do Rosario) [2059555]
Justin Vreeland d5a02a
- copy_process(): Move fd_install() out of sighand->siglock critical section (Waiman Long) [2051855]
Justin Vreeland d5a02a
- redhat/configs: enable CONFIG_INTEL_VSEC for x86 (David Arcari) [2058806]
Justin Vreeland d5a02a
- platform/x86/intel: Move intel_pmt from MFD to Auxiliary Bus (David Arcari) [2058806]
Justin Vreeland d5a02a
- platform/x86: intel_pmt_telemetry: Ignore zero sized entries (David Arcari) [2058806]
Justin Vreeland d5a02a
- platform/x86/intel: Move Intel PMT drivers to new subfolder (David Arcari) [2058806]
Justin Vreeland d5a02a
- driver core: auxiliary bus: Add driver data helpers (David Arcari) [2058806]
Justin Vreeland d5a02a
- PCI: Add #defines for accessing PCIe DVSEC fields (David Arcari) [2058806]
Justin Vreeland d5a02a
- tools headers UAPI: Sync powerpc syscall table file changed by new futex_waitv syscall (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- tools headers UAPI: Sync s390 syscall table file changed by new futex_waitv syscall (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- futex: Wireup futex_waitv syscall (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- tools headers UAPI: Sync MIPS syscall table file changed by new futex_waitv syscall (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- parisc: Wire up futex_waitv (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- s390: wire up sys_futex_waitv system call (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- MIPS: syscalls: Wire up futex_waitv syscall (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- tools headers UAPI: Sync files changed by new futex_waitv syscall (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- futex2: Documentation: Document sys_futex_waitv() uAPI (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- selftests: futex: Test sys_futex_waitv() wouldblock (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- selftests: futex: Test sys_futex_waitv() timeout (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- selftests: futex: Add sys_futex_waitv() test (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- futex,arm: Wire up sys_futex_waitv() (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- futex,x86: Wire up sys_futex_waitv() (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- futex: Implement sys_futex_waitv() (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- futex: Simplify double_lock_hb() (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- futex: Split out wait/wake (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- futex: Split out requeue (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- futex: Rename mark_wake_futex() (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- futex: Rename: match_futex() (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- futex: Rename: hb_waiter_{inc,dec,pending}() (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- futex: Split out PI futex (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- futex: Rename: {get,cmpxchg}_futex_value_locked() (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- futex: Rename hash_futex() (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- futex: Rename __unqueue_futex() (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- futex: Rename: queue_{,un}lock() (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- futex: Rename futex_wait_queue_me() (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- futex: Rename {,__}{,un}queue_me() (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- futex: Split out syscalls (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- futex: Move to kernel/futex/ (Joel Savitz) [2038794]
Justin Vreeland d5a02a
- cifs: fix double free race when mount fails in cifs_get_root() (Ronnie Sahlberg) [1979175]
Justin Vreeland d5a02a
Justin Vreeland d5a02a
* Fri Mar 25 2022 Patrick Talbert <ptalbert@redhat.com> [5.14.0-75.el9]
Justin Vreeland d5a02a
- ipv6: fix skb drops in igmp6_event_query() and igmp6_event_report() (Hangbin Liu) [2059308] {CVE-2022-0742}
Justin Vreeland d5a02a
- redhat/configs: aarch64: Fix PAC/BTI config settings (Mark Salter) [2063215]
Justin Vreeland d5a02a
- RHEL9.0: arch_hw Update CONFIG_MOUSE_VSXXXAA=m (Tony Camuso) [2062909]
Justin Vreeland d5a02a
- redhat/configs: Disable KVM on POWER (Laurent Vivier) [2052898]
Justin Vreeland d5a02a
- drm/ast: Create threshold values for AST2600 (Jocelyn Falempe) [2062560]
Justin Vreeland d5a02a
- mm: gup: make fault_in_safe_writeable() use fixup_user_fault() (Andreas Gruenbacher) [2062797]
Justin Vreeland d5a02a
- drm/vmwgfx: Fix stale file descriptors on failed usercopy (David Airlie) [2047613] {CVE-2022-22942}
Justin Vreeland d5a02a
- netfilter: nf_queue: handle socket prefetch (Florian Westphal) [2060092]
Justin Vreeland d5a02a
- netfilter: nf_queue: fix possible use-after-free (Florian Westphal) [2060092]
Justin Vreeland d5a02a
- selftests: netfilter: add nfqueue TCP_NEW_SYN_RECV socket race test (Florian Westphal) [2060092]
Justin Vreeland d5a02a
- netfilter: nf_queue: don't assume sk is full socket (Florian Westphal) [2060092]
Justin Vreeland d5a02a
- scsi: mpi3mr: Fix flushing !WQ_MEM_RECLAIM events warning (Tomas Henzl) [2056626]
Justin Vreeland d5a02a
- scsi: mpi3mr: Fix memory leaks (Tomas Henzl) [2056626]
Justin Vreeland d5a02a
- scsi: mpi3mr: Fix reporting of actual data transfer size (Tomas Henzl) [2056626]
Justin Vreeland d5a02a
- scsi: mpi3mr: Fix cmnd getting marked as in use forever (Tomas Henzl) [2056626]
Justin Vreeland d5a02a
- scsi: mpi3mr: Fix hibernation issue (Tomas Henzl) [2056626]
Justin Vreeland d5a02a
- scsi: mpi3mr: Fix printing of pending I/O count (Tomas Henzl) [2056626]
Justin Vreeland d5a02a
- scsi: mpi3mr: Fix deadlock while canceling the fw event (Tomas Henzl) [2056626]
Justin Vreeland d5a02a
- scsi: mpi3mr: Fixes around reply request queues (Tomas Henzl) [2056626]
Justin Vreeland d5a02a
- scsi: mpi3mr: Enhanced Task Management Support Reply handling (Tomas Henzl) [2056626]
Justin Vreeland d5a02a
- scsi: mpi3mr: Use TM response codes from MPI3 headers (Tomas Henzl) [2056626]
Justin Vreeland d5a02a
- scsi: mpi3mr: Increase internal cmnds timeout to 60s (Tomas Henzl) [2056626]
Justin Vreeland d5a02a
- scsi: mpi3mr: Do access status validation before adding devices (Tomas Henzl) [2056626]
Justin Vreeland d5a02a
- scsi: mpi3mr: Update MPI3 headers - part2 (Tomas Henzl) [2056626]
Justin Vreeland d5a02a
- scsi: mpi3mr: Update MPI3 headers - part1 (Tomas Henzl) [2056626]
Justin Vreeland d5a02a
- scsi: mpi3mr: Don't reset IOC if cmnds flush with reset status (Tomas Henzl) [2056626]
Justin Vreeland d5a02a
- scsi: mpi3mr: Replace spin_lock() with spin_lock_irqsave() (Tomas Henzl) [2056626]
Justin Vreeland d5a02a
- scsi: mpi3mr: Add debug APIs based on logging_level bits (Tomas Henzl) [2056626]
Justin Vreeland d5a02a
- x86/kvm/fpu: Remove kvm_vcpu_arch.guest_supported_xcr0 (Leonardo Bras) [2043545]
Justin Vreeland d5a02a
- x86/kvm/fpu: Limit guest user_xfeatures to supported bits of XCR0 (Leonardo Bras) [2043545]
Justin Vreeland d5a02a
- KVM: x86: Move CPUID.(EAX=0x12,ECX=1) mangling to __kvm_update_cpuid_runtime() (Leonardo Bras) [2043545]
Justin Vreeland d5a02a
- KVM: x86: Do runtime CPUID update before updating vcpu->arch.cpuid_entries (Leonardo Bras) [2043545]
Justin Vreeland d5a02a
- x86/fpu: Fix inline prefix warnings (Leonardo Bras) [2043545]
Justin Vreeland d5a02a
- kvm: x86: Emulate IA32_XFD_ERR for guest (Leonardo Bras) [2043545]
Justin Vreeland d5a02a
- x86/fpu: Prepare xfd_err in struct fpu_guest (Leonardo Bras) [2043545]
Justin Vreeland d5a02a
- kvm: x86: Add emulation for IA32_XFD (Leonardo Bras) [2043545]
Justin Vreeland d5a02a
- x86/fpu: Provide fpu_update_guest_xfd() for IA32_XFD emulation (Leonardo Bras) [2043545]
Justin Vreeland d5a02a
- kvm: x86: Enable dynamic xfeatures at KVM_SET_CPUID2 (Leonardo Bras) [2043545]
Justin Vreeland d5a02a
- x86/fpu: Provide fpu_enable_guest_xfd_features() for KVM (Leonardo Bras) [2043545]
Justin Vreeland d5a02a
- x86/fpu: Add guest support to xfd_enable_feature() (Leonardo Bras) [2043545]
Justin Vreeland d5a02a
- x86/fpu: Prepare guest FPU for dynamically enabled FPU features (Leonardo Bras) [2043545]
Justin Vreeland d5a02a
- x86/fpu: Extend fpu_xstate_prctl() with guest permissions (Leonardo Bras) [2043545]
Justin Vreeland d5a02a
- cpuid: kvm_find_kvm_cpuid_features() should be declared 'static' (Leonardo Bras) [2043545]
Justin Vreeland d5a02a
- KVM: x86: Make sure KVM_CPUID_FEATURES really are KVM_CPUID_FEATURES (Leonardo Bras) [2043545]
Justin Vreeland d5a02a
- KVM: x86: Add helper to consolidate core logic of SET_CPUID{2} flows (Leonardo Bras) [2043545]
Justin Vreeland d5a02a
- redhat/configs: Disable watchdog components (Prarit Bhargava) [2060117]
Justin Vreeland d5a02a
- sched: Fix yet more sched_fork() races (Phil Auld) [2062836]
Justin Vreeland d5a02a
- sched/fair: Fix fault in reweight_entity (Phil Auld) [2062836]
Justin Vreeland d5a02a
- x86/cpu: Add Xeon Icelake-D to list of CPUs that support PPIN (David Arcari) [2043225]
Justin Vreeland d5a02a
- powerpc/pseries/ddw: Revert "Extend upper limit for huge DMA window for persistent memory" (Steve Best) [2056057]
Justin Vreeland d5a02a
- drivers/char: permit access to the RTAS user buffer under lockdown (Desnes A. Nunes do Rosario) [2046472]
Justin Vreeland d5a02a
Justin Vreeland d5a02a
* Tue Mar 22 2022 Patrick Talbert <ptalbert@redhat.com> [5.14.0-74.el9]
Justin Vreeland d5a02a
- redhat: rpminspect: disable 'patches' check for known empty patch files (Patrick Talbert)
Justin Vreeland d5a02a
- KVM: x86/mmu: Don't advance iterator after restart due to yielding (Nico Pache) [2055725]
Justin Vreeland d5a02a
- ibmvnic: don't release napi in __ibmvnic_open() (Diego Domingos) [2055981]
Justin Vreeland d5a02a
Justin Vreeland d5a02a
* Sun Mar 20 2022 Patrick Talbert <ptalbert@redhat.com> [5.14.0-73.el9]
Justin Vreeland d5a02a
- CI: Use 9.0-rt branch for rhel-9 realtime_check (Juri Lelli)
Justin Vreeland d5a02a
- redhat: enable zstream release numbering for rhel 9.0 (Herton R. Krzesinski)
Justin Vreeland d5a02a
- redhat: change kabi tarballs to use the package release (Herton R. Krzesinski)
Justin Vreeland d5a02a
- redhat: generate distgit changelog in genspec.sh as well (Herton R. Krzesinski)
Justin Vreeland d5a02a
- redhat: make genspec prefer metadata from git notes (Herton R. Krzesinski)
Justin Vreeland d5a02a
- redhat: use tags from git notes for zstream to generate changelog (Herton R. Krzesinski)
Justin Vreeland d5a02a
- CI: Add disttag setting (Veronika Kabatova)
Justin Vreeland d5a02a
- CI: Drop c9s config (Veronika Kabatova)
Justin Vreeland d5a02a
- virtio-net: fix pages leaking when building skb in big mode (Laurent Vivier) [2042559]
Justin Vreeland d5a02a
- lib/iov_iter: initialize "flags" in new pipe_buffer (Carlos Maiolino) [2060869] {CVE-2022-0847}
Justin Vreeland d5a02a
- redhat/configs: Make CRYPTO_ECDH algos built-in (Simo Sorce) [2062199]
Justin Vreeland d5a02a
- crypto: api - Move cryptomgr soft dependency into algapi (Vladis Dronov) [2062199]
Justin Vreeland d5a02a
- crypto: api - Fix boot-up crash when crypto manager is disabled (Vladis Dronov) [2062199]
Justin Vreeland d5a02a
- crypto: api - Do not create test larvals if manager is disabled (Vladis Dronov) [2062199]
Justin Vreeland d5a02a
- crypto: api - Export crypto_boot_test_finished (Vladis Dronov) [2062199]
Justin Vreeland d5a02a
- crypto: api - Fix built-in testing dependency failures (Vladis Dronov) [2062199]
Justin Vreeland d5a02a
- redhat/configs: Add CRYPTO_AES_ARM64 config explicitly (Vladis Dronov) [2062199]
Justin Vreeland d5a02a
- crypto: arm64/aes-ce - stop using SIMD helper for skciphers (Vladis Dronov) [2062199]
Justin Vreeland d5a02a
- crypto: arm64/aes-neonbs - stop using SIMD helper for skciphers (Vladis Dronov) [2062199]
Justin Vreeland d5a02a
- redhat: change default dist suffix for RHEL 9.0 (Herton R. Krzesinski)
Justin Vreeland d5a02a
- selftests: kvm: Check whether SIDA memop fails for normal guests (Thomas Huth) [2050813]
Justin Vreeland d5a02a
- KVM: s390: Return error on SIDA memop on normal guest (Thomas Huth) [2050813]
Justin Vreeland d5a02a
- block: kabi: reserve space for block layer public structure (Ming Lei) [2057238]
Justin Vreeland d5a02a
- block: kabi: reserve space for blk-mq related structure (Ming Lei) [2057238]
Justin Vreeland d5a02a
- block: kabi: reserve space for bsg related structure (Ming Lei) [2057238]
Justin Vreeland d5a02a
- block: kabi: reserve space for integrity related structure (Ming Lei) [2057238]
Justin Vreeland d5a02a
- scsi: lpfc: Fix pt2pt NVMe PRLI reject LOGO loop (Dick Kennedy) [2054866]
Justin Vreeland d5a02a
- x86/MCE/AMD, EDAC/mce_amd: Support non-uniform MCA bank type enumeration (Aristeu Rozanski) [1898165 2047430 2047446]
Justin Vreeland d5a02a
- x86/MCE/AMD, EDAC/mce_amd: Add new SMCA bank types (Aristeu Rozanski) [1898165 2047430 2047446]
Justin Vreeland d5a02a
- EDAC/amd64: Add support for AMD Family 19h Models 10h-1Fh and A0h-AFh (Aristeu Rozanski) [1898165 2047430 2047446]
Justin Vreeland d5a02a
- EDAC: Add RDDR5 and LRDDR5 memory types (Aristeu Rozanski) [1898165 2047430 2047446]
Justin Vreeland d5a02a
- drm/amdgpu: Register MCE notifier for Aldebaran RAS (Aristeu Rozanski) [1898165 2047430 2047446]
Justin Vreeland d5a02a
- x86/MCE/AMD: Export smca_get_bank_type symbol (Aristeu Rozanski) [1898165 2047430 2047446]
Justin Vreeland d5a02a
- PCI/ACPI: Fix acpi_pci_osc_control_set() kernel-doc comment (Mark Langsdorf) [2049635]
Justin Vreeland d5a02a
- PCI/ACPI: Check for _OSC support in acpi_pci_osc_control_set() (Mark Langsdorf) [2049635]
Justin Vreeland d5a02a
- PCI/ACPI: Move _OSC query checks to separate function (Mark Langsdorf) [2049635]
Justin Vreeland d5a02a
- PCI/ACPI: Move supported and control calculations to separate functions (Mark Langsdorf) [2049635]
Justin Vreeland d5a02a
- PCI/ACPI: Remove OSC_PCI_SUPPORT_MASKS and OSC_PCI_CONTROL_MASKS (Mark Langsdorf) [2049635]
Justin Vreeland d5a02a
- nvmet-tcp: fix missing unmainted messages (Chris Leech) [2054441]
Justin Vreeland d5a02a
- dm stats: fix too short end duration_ns when using precise_timestamps (Benjamin Marzinski) [2051798]
Justin Vreeland d5a02a
- dm: fix double accounting of flush with data (Benjamin Marzinski) [2051798]
Justin Vreeland d5a02a
- dm: interlock pending dm_io and dm_wait_for_bios_completion (Benjamin Marzinski) [2051798]
Justin Vreeland d5a02a
- dm: properly fix redundant bio-based IO accounting (Benjamin Marzinski) [2051798]
Justin Vreeland d5a02a
- dm: revert partial fix for redundant bio-based IO accounting (Benjamin Marzinski) [2051798]
Justin Vreeland d5a02a
- block: add bio_start_io_acct_time() to control start_time (Benjamin Marzinski) [2051798]
Justin Vreeland d5a02a
- scsi: mpt3sas: Fix incorrect system timestamp (Tomas Henzl) [2049631]
Justin Vreeland d5a02a
- scsi: mpt3sas: Fix system going into read-only mode (Tomas Henzl) [2049631]
Justin Vreeland d5a02a
- scsi: mpt3sas: Fix kernel panic during drive powercycle test (Tomas Henzl) [2049631]
Justin Vreeland d5a02a
- redhat/configs: enable mellanox platform drivers to support LED, fan & watchdog devices (Ivan Vecera) [2057491]
Justin Vreeland d5a02a
- x86/cpu: Drop spurious underscore from RAPTOR_LAKE #define (David Arcari) [2040022]
Justin Vreeland d5a02a
- x86/cpu: Add Raptor Lake to Intel family (David Arcari) [2040022]
Justin Vreeland d5a02a
- powerpc/64: Move paca allocation later in boot (Desnes A. Nunes do Rosario) [2055566]
Justin Vreeland d5a02a
- powerpc: Set crashkernel offset to mid of RMA region (Desnes A. Nunes do Rosario) [2055566]
Justin Vreeland d5a02a
- selftests: kvm: Check whether SIDA memop fails for normal guests (Thomas Huth) [2060814]
Justin Vreeland d5a02a
- KVM: s390: Return error on SIDA memop on normal guest (Thomas Huth) [2060814]
Justin Vreeland d5a02a
- igb: refactor XDP registration (Corinna Vinschen) [2054379]
Justin Vreeland d5a02a
- igc: avoid kernel warning when changing RX ring parameters (Corinna Vinschen) [2054379]
Justin Vreeland d5a02a
- redhat/configs: Enable CONFIG_ACER_WIRELESS (Peter Georg) [2025985]
Justin Vreeland d5a02a
Justin Vreeland d5a02a
* Tue Mar 15 2022 Patrick Talbert <ptalbert@redhat.com> [5.14.0-72.el9]
Justin Vreeland d5a02a
- spec: Fix separate tools build (Jiri Olsa) [2054579]
Justin Vreeland d5a02a
- redhat: use centos x509.genkey file if building under centos (Herton R. Krzesinski) [2029952]
Justin Vreeland d5a02a
Justin Vreeland d5a02a
* Tue Mar 08 2022 Patrick Talbert <ptalbert@redhat.com> [5.14.0-71.el9]
Justin Vreeland d5a02a
- CI: Build coverage RPMs on c9s environment (Veronika Kabatova)
Justin Vreeland d5a02a
- md: use default_groups in kobj_type (Nigel Croxon) [2042797]
Justin Vreeland d5a02a
- md: Move alloc/free acct bioset in to personality (Nigel Croxon) [2042797]
Justin Vreeland d5a02a
- md: fix spelling of "its" (Nigel Croxon) [2042797]
Justin Vreeland d5a02a
- md: raid456 add nowait support (Nigel Croxon) [2042797]
Justin Vreeland d5a02a
- md: raid10 add nowait support (Nigel Croxon) [2042797]
Justin Vreeland d5a02a
- md: raid1 add nowait support (Nigel Croxon) [2042797]
Justin Vreeland d5a02a
- md: add support for REQ_NOWAIT (Nigel Croxon) [2042797]
Justin Vreeland d5a02a
- md: drop queue limitation for RAID1 and RAID10 (Nigel Croxon) [2042797]
Justin Vreeland d5a02a
- md/raid5: play nice with PREEMPT_RT (Nigel Croxon) [2042797]
Justin Vreeland d5a02a
- md/raid1: fix missing bitmap update w/o WriteMostly devices (Nigel Croxon) [2042797]
Justin Vreeland d5a02a
- md: fix double free of mddev->private in autorun_array() (Nigel Croxon) [2042797]
Justin Vreeland d5a02a
- md: fix update super 1.0 on rdev size change (Nigel Croxon) [2042797]
Justin Vreeland d5a02a
- raid5-ppl: use swap() to make code cleaner (Nigel Croxon) [2042797]
Justin Vreeland d5a02a
- md/bitmap: don't set max_write_behind if there is no write mostly device (Nigel Croxon) [2042797]
Justin Vreeland d5a02a
- md: update superblock after changing rdev flags in state_store (Nigel Croxon) [2042797]
Justin Vreeland d5a02a
- md: remove unused argument from md_new_event (Nigel Croxon) [2042797]
Justin Vreeland d5a02a
- md/raid5: call roundup_pow_of_two in raid5_run (Nigel Croxon) [2042797]
Justin Vreeland d5a02a
- md/raid1: use rdev in raid1_write_request directly (Nigel Croxon) [2042797]
Justin Vreeland d5a02a
- md/raid1: only allocate write behind bio fof WriteMostly device (Nigel Croxon) [2042797]
Justin Vreeland d5a02a
- md: properly unwind when failing to add the kobject in md_alloc (Nigel Croxon) [2042797]
Justin Vreeland d5a02a
- md: extend disks_mutex coverage (Nigel Croxon) [2042797]
Justin Vreeland d5a02a
- md: add the bitmap group to the default groups for the md kobject (Nigel Croxon) [2042797]
Justin Vreeland d5a02a
- md: add error handling support for add_disk() (Nigel Croxon) [2042797]
Justin Vreeland d5a02a
- redhat: Bump RHEL_MINOR for 9.1 (Patrick Talbert)
Justin Vreeland d5a02a
Justin Vreeland d5a02a
* Tue Mar 08 2022 Herton R. Krzesinski <herton@redhat.com> [5.14.0-70.1.1.el9_0]
Justin Vreeland d5a02a
- Revert 8dffe2b6 "Merge: kabi: add lib ACKed symbols" (Čestmír Kalina) [2059972]
Justin Vreeland d5a02a
- include/linux/kernel.h: fix function name for mark_hardware_unmaintained() if !CONFIG_RHEL_DIFFERENCES (Ewan D. Milne) [2059687]
Justin Vreeland d5a02a
- scsi: sd: Mark ZBC host-managed SCSI disks as unmaintained (Ewan D. Milne) [2059687]
Justin Vreeland d5a02a
- spec: make linux-firmware weak(er) dependency (Jan Stancek) [2031113]
Justin Vreeland d5a02a
- redhat/configs: Enable CONFIG_INTEL_PCH_THERMAL for x86 (David Arcari) [2058186]
Justin Vreeland d5a02a
- redhat/configs: Disable CONFIG_SURFACE_PLATFORMS (David Arcari) [2056609]
Justin Vreeland d5a02a
Justin Vreeland d5a02a
* Thu Feb 24 2022 Herton R. Krzesinski <herton@redhat.com> [5.14.0-70.el9]
Justin Vreeland d5a02a
- stmmac/intel: mark driver as tech preview (Mark Salter) [2045594]
Justin Vreeland d5a02a
- net: stmmac: Add GFP_DMA32 for rx buffers if no 64 capability (Mark Salter) [2045594]
Justin Vreeland d5a02a
- mm: fix invalid page pointer returned with FOLL_PIN gups (Peter Xu) [2037300]
Justin Vreeland d5a02a
- tipc: improve size validations for received domain records (Xin Long) [2048972] {CVE-2022-0435}
Justin Vreeland d5a02a
- cgroup-v1: Require capabilities to set release_agent (Waiman Long) [2052168] {CVE-2022-0492}
Justin Vreeland d5a02a
- bpf, arm64: Use emit_addr_mov_i64() for BPF_PSEUDO_FUNC (Yauheni Kaliuta) [2033596]
Justin Vreeland d5a02a
- bpf: Stop caching subprog index in the bpf_pseudo_func insn (Yauheni Kaliuta) [2033596]
Justin Vreeland d5a02a
- ucount: Make get_ucount a safe get_user replacement (Alexey Gladkov) [2049040] {CVE-2022-24122}
Justin Vreeland d5a02a
- ucounts: Add get_ucounts_or_wrap for clarity (Alexey Gladkov) [2049040]
Justin Vreeland d5a02a
- ucounts: Remove unnecessary test for NULL ucount in get_ucounts (Alexey Gladkov) [2049040]
Justin Vreeland d5a02a
- ucounts: Use atomic_long_sub_return for clarity (Alexey Gladkov) [2049040]
Justin Vreeland d5a02a
- ucounts: Fix rlimit max values check (Alexey Gladkov) [2049040]
Justin Vreeland d5a02a
Justin Vreeland d5a02a
* Wed Feb 23 2022 Herton R. Krzesinski <herton@redhat.com> [5.14.0-69.el9]
Justin Vreeland d5a02a
- config: mt76: set CONFIG_MT7921S to not set, like in ark (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- config: rtw89: enable driver and device RTL8852AE (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- rtw89: 8852a: correct bit definition of dfs_en (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- rtw89: coex: Update COEX to 5.5.8 (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- rtw89: coex: Cancel PS leaving while C2H comes (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- rtw89: coex: Update BT counters while receiving report (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- rtw89: coex: Define LPS state for BTC using (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- rtw89: coex: Add MAC API to get BT polluted counter (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- rtw89: coex: Not to send H2C when WL not ready and count H2C (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- rtw89: coex: correct C2H header length (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- rtw89: don't kick off TX DMA if failed to write skb (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- rtw89: remove cch_by_bw which is not used (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- rtw89: fix sending wrong rtwsta->mac_id to firmware to fill address CAM (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- rtw89: fix incorrect channel info during scan (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- rtw89: update scan_mac_addr during scanning period (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- rtw89: use inline function instead macro to set H2C and CAM (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- rtw89: add const in the cast of le32_get_bits() (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- rtw89: add AXIDMA and TX FIFO dump in mac_mem_dump (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- rtw89: fix potentially access out of range of RF register array (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- rtw89: remove unneeded variable (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- rtw89: remove unnecessary conditional operators (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- rtw89: update rtw89_regulatory map to R58-R31 (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- rtw89: update tx power limit/limit_ru tables to R54 (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- rtw89: update rtw89 regulation definition to R58-R31 (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- rtw89: fill regd field of limit/limit_ru tables by enum (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- iwlwifi: pcie: add killer devices to the driver (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- iwlwifi: add support for BNJ HW (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- iwlwifi: Read the correct addresses when getting the crf id (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- iwlwifi: pcie: add jacket bit to device configuration parsing (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- iwlwifi: add new ax1650 killer device (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- iwlwifi: add new Qu-Hr device (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- iwlwifi: add missing entries for Gf4 with So and SoF (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- iwlwifi: remove unused iwlax210_2ax_cfg_so_hr_a0 structure (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- iwlwifi: support 4-bits in MAC step value (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- iwlwifi: mvm: Increase the scan timeout guard to 30 seconds (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- wilc1000: fix double free error in probe() (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- wilc1000: Fix spurious "FW not responding" error (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- wilc1000: Fix missing newline in error message (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- wilc1000: Fix copy-and-paste typo in wilc_set_mac_address (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- iwlwifi: mvm: Use div_s64 instead of do_div in iwl_mvm_ftm_rtt_smoothing() (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- mt76: mt7921: fix a possible race enabling/disabling runtime-pm (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- ath11k: Fix unexpected return buffer manager error for QCA6390 (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- ath11k: Fix napi related hang (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- iwlwifi: yoyo: fix issue with new DBGI_SRAM region read. (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- iwlwifi: pcie: make sure prph_info is set when treating wakeup IRQ (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- iwlwifi: mvm: fix AUX ROC removal (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- iwlwifi: mvm: set protected flag only for NDP ranging (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- iwlwifi: mvm: perform 6GHz passive scan after suspend (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- iwlwifi: mvm: Fix calculation of frame length (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- iwlwifi: mvm: test roc running status bits before removing the sta (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- iwlwifi: don't pass actual WGDS revision number in table_revision (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- iwlwifi: fix leaks/bad data after failed firmware load (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- iwlwifi: fix debug TLV parsing (Íñigo Huguet) [2043454]
Justin Vreeland d5a02a
- iwlwifi: mvm: fix 32-bit build in FTM (Íñigo Huguet) [2043454]
Justin Vreeland