kernel-6.8.0-0.rc6.20240229git805d849d7c3c.51
* Thu Feb 29 2024 Fedora Kernel Team <kernel-team@fedoraproject.org> [6.8.0-0.rc6.805d849d7c3c.51] - gitlab-ci: fix merge tree URL for gating pipelines (Michael Hofmann) - Revert "net: bump CONFIG_MAX_SKB_FRAGS to 45" (Marcelo Ricardo Leitner) - uki: use systemd-pcrphase dracut module (Gerd Hoffmann) - Add libperf-debuginfo subpackage (Justin M. Forbes) - redhat/kernel.spec.template: Add log_msg macro (Prarit Bhargava) - Linux v6.8.0-0.rc6.805d849d7c3c Resolves: Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org>
This commit is contained in:
parent
af24b5dbb7
commit
b9352d952c
@ -12,7 +12,7 @@ dracutmodules+=" base systemd systemd-initrd dracut-systemd dbus dbus-broker usr
|
||||
dracutmodules+=" dm lvm rootfs-block fs-lib "
|
||||
|
||||
# modules: tpm and crypto
|
||||
dracutmodules+=" crypt crypt-loop tpm2-tss "
|
||||
dracutmodules+=" crypt crypt-loop tpm2-tss systemd-pcrphase "
|
||||
|
||||
# modules: support root on virtiofs
|
||||
dracutmodules+=" virtiofs "
|
||||
@ -36,6 +36,3 @@ drivers+=" dm_crypt "
|
||||
|
||||
# filesystems
|
||||
filesystems+=" vfat ext4 xfs overlay "
|
||||
|
||||
# systemd-pcrphase
|
||||
install_items+=" /lib/systemd/system/systemd-pcrphase-initrd.service /usr/lib/systemd/systemd-pcrphase /usr/lib/systemd/system/initrd.target.wants/systemd-pcrphase-initrd.service "
|
||||
|
@ -1,6 +1,10 @@
|
||||
* Wed Feb 28 2024 Fedora Kernel Team <kernel-team@fedoraproject.org> [6.8.0-0.rc6.cf1182944c7c.51]
|
||||
* Thu Feb 29 2024 Fedora Kernel Team <kernel-team@fedoraproject.org> [6.8.0-0.rc6.805d849d7c3c.51]
|
||||
- gitlab-ci: fix merge tree URL for gating pipelines (Michael Hofmann)
|
||||
- Revert "net: bump CONFIG_MAX_SKB_FRAGS to 45" (Marcelo Ricardo Leitner)
|
||||
- uki: use systemd-pcrphase dracut module (Gerd Hoffmann)
|
||||
- Add libperf-debuginfo subpackage (Justin M. Forbes)
|
||||
- redhat/kernel.spec.template: Add log_msg macro (Prarit Bhargava)
|
||||
- Linux v6.8.0-0.rc6.805d849d7c3c
|
||||
Resolves:
|
||||
|
||||
* Wed Feb 28 2024 Fedora Kernel Team <kernel-team@fedoraproject.org> [6.8.0-0.rc6.cf1182944c7c.50]
|
||||
|
175
kernel.spec
175
kernel.spec
@ -163,13 +163,13 @@ Summary: The Linux kernel
|
||||
%define specrpmversion 6.8.0
|
||||
%define specversion 6.8.0
|
||||
%define patchversion 6.8
|
||||
%define pkgrelease 0.rc6.20240228gitcf1182944c7c.51
|
||||
%define pkgrelease 0.rc6.20240229git805d849d7c3c.51
|
||||
%define kversion 6
|
||||
%define tarfile_release 6.8-rc6-21-gcf1182944c7c
|
||||
%define tarfile_release 6.8-rc6-37-g805d849d7c3c
|
||||
# This is needed to do merge window version magic
|
||||
%define patchlevel 8
|
||||
# This allows pkg_release to have configurable %%{?dist} tag
|
||||
%define specrelease 0.rc6.20240228gitcf1182944c7c.51%{?buildid}%{?dist}
|
||||
%define specrelease 0.rc6.20240229git805d849d7c3c.51%{?buildid}%{?dist}
|
||||
# This defines the kabi tarball version
|
||||
%define kabiversion 6.8.0
|
||||
|
||||
@ -1724,11 +1724,20 @@ Prebuilt 64k unified kernel image for virtual machines.
|
||||
%kernel_ipaclones_package
|
||||
%endif
|
||||
|
||||
%define log_msg() set +x \
|
||||
_log_msglineno=$(grep -n %{*} %{_specdir}/${RPM_PACKAGE_NAME}.spec | grep log_msg | cut -d":" -f1) \
|
||||
echo "kernel.spec:${_log_msglineno}: %{*}" \
|
||||
set -x
|
||||
|
||||
%prep
|
||||
%{log_msg "Start of prep stage"}
|
||||
|
||||
%{log_msg "Sanity checks"}
|
||||
|
||||
# do a few sanity-checks for --with *only builds
|
||||
%if %{with_baseonly}
|
||||
%if !%{with_up}
|
||||
echo "Cannot build --with baseonly, up build is disabled"
|
||||
%{log_msg "Cannot build --with baseonly, up build is disabled"}
|
||||
exit 1
|
||||
%endif
|
||||
%endif
|
||||
@ -1737,7 +1746,7 @@ exit 1
|
||||
if [ "%{patches}" != "%%{patches}" ] ; then
|
||||
for patch in %{patches} ; do
|
||||
if [ ! -f $patch ] ; then
|
||||
echo "ERROR: Patch ${patch##/*/} listed in specfile but is missing"
|
||||
%{log_msg "ERROR: Patch ${patch##/*/} listed in specfile but is missing"}
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
@ -1753,7 +1762,7 @@ ApplyPatch()
|
||||
fi
|
||||
if ! grep -E "^Patch[0-9]+: $patch\$" %{_specdir}/${RPM_PACKAGE_NAME}.spec ; then
|
||||
if [ "${patch:0:8}" != "patch-%{kversion}." ] ; then
|
||||
echo "ERROR: Patch $patch not listed as a source patch in specfile"
|
||||
%{log_msg "ERROR: Patch $patch not listed as a source patch in specfile"}
|
||||
exit 1
|
||||
fi
|
||||
fi 2>/dev/null
|
||||
@ -1770,6 +1779,7 @@ ApplyOptionalPatch()
|
||||
{
|
||||
local patch=$1
|
||||
shift
|
||||
%{log_msg "ApplyOptionalPatch: $1"}
|
||||
if [ ! -f $RPM_SOURCE_DIR/$patch ]; then
|
||||
exit 1
|
||||
fi
|
||||
@ -1779,12 +1789,14 @@ ApplyOptionalPatch()
|
||||
fi
|
||||
}
|
||||
|
||||
%{log_msg "Untar kernel tarball"}
|
||||
%setup -q -n kernel-%{tarfile_release} -c
|
||||
mv linux-%{tarfile_release} linux-%{KVERREL}
|
||||
|
||||
cd linux-%{KVERREL}
|
||||
cp -a %{SOURCE1} .
|
||||
|
||||
%{log_msg "Start of patch applications"}
|
||||
%if !%{nopatches}
|
||||
|
||||
ApplyOptionalPatch patch-%{patchversion}-redhat.patch
|
||||
@ -1792,10 +1804,11 @@ ApplyOptionalPatch patch-%{patchversion}-redhat.patch
|
||||
|
||||
ApplyOptionalPatch linux-kernel-test.patch
|
||||
|
||||
%{log_msg "End of patch applications"}
|
||||
# END OF PATCH APPLICATIONS
|
||||
|
||||
# Any further pre-build tree manipulations happen here.
|
||||
|
||||
%{log_msg "Pre-build tree manipulations"}
|
||||
chmod +x scripts/checkpatch.pl
|
||||
mv COPYING COPYING-%{specrpmversion}-%{release}
|
||||
|
||||
@ -1810,7 +1823,7 @@ rm -f localversion-next
|
||||
# This fixes errors such as
|
||||
# *** ERROR: ambiguous python shebang in /usr/bin/kvm_stat: #!/usr/bin/python. Change it to python3 (or python2) explicitly.
|
||||
# We patch all sources below for which we got a report/error.
|
||||
echo "Fixing Python shebangs..."
|
||||
%{log_msg "Fixing Python shebangs..."}
|
||||
%py3_shebang_fix \
|
||||
tools/kvm/kvm_stat/kvm_stat \
|
||||
scripts/show_delta \
|
||||
@ -1830,6 +1843,7 @@ fi
|
||||
mkdir configs
|
||||
cd configs
|
||||
|
||||
%{log_msg "Copy additional source files into buildroot"}
|
||||
# Drop some necessary files from the source dir into the buildroot
|
||||
cp $RPM_SOURCE_DIR/%{name}-*.config .
|
||||
cp %{SOURCE80} .
|
||||
@ -1841,6 +1855,7 @@ cp %{SOURCE3001} partial-kernel-local-debug-snip.config
|
||||
FLAVOR=%{primary_target} SPECPACKAGE_NAME=%{name} SPECVERSION=%{specversion} SPECRPMVERSION=%{specrpmversion} ./generate_all_configs.sh %{debugbuildsenabled}
|
||||
|
||||
# Collect custom defined config options
|
||||
%{log_msg "Collect custom defined config options"}
|
||||
PARTIAL_CONFIGS=""
|
||||
%if %{with_gcov}
|
||||
PARTIAL_CONFIGS="$PARTIAL_CONFIGS %{SOURCE70} %{SOURCE71}"
|
||||
@ -1866,6 +1881,7 @@ GetArch()
|
||||
}
|
||||
|
||||
# Merge in any user-provided local config option changes
|
||||
%{log_msg "Merge in any user-provided local config option changes"}
|
||||
%ifnarch %nobuildarches
|
||||
for i in %{all_configs}
|
||||
do
|
||||
@ -1890,6 +1906,7 @@ done
|
||||
|
||||
# Add DUP and kpatch certificates to system trusted keys for RHEL
|
||||
%if 0%{?rhel}
|
||||
%{log_msg "Add DUP and kpatch certificates to system trusted keys for RHEL"}
|
||||
%if %{signkernel}%{signmodules}
|
||||
openssl x509 -inform der -in %{SOURCE100} -out rheldup3.pem
|
||||
openssl x509 -inform der -in %{SOURCE101} -out rhelkpatch1.pem
|
||||
@ -1907,11 +1924,13 @@ done
|
||||
|
||||
# Adjust FIPS module name for RHEL
|
||||
%if 0%{?rhel}
|
||||
%{log_msg "Adjust FIPS module name for RHEL"}
|
||||
for i in *.config; do
|
||||
sed -i 's/CONFIG_CRYPTO_FIPS_NAME=.*/CONFIG_CRYPTO_FIPS_NAME="Red Hat Enterprise Linux %{rhel} - Kernel Cryptographic API"/' $i
|
||||
done
|
||||
%endif
|
||||
|
||||
%{log_msg "Set process_configs.sh $OPTS"}
|
||||
cp %{SOURCE81} .
|
||||
OPTS=""
|
||||
%if %{with_configchecks}
|
||||
@ -1922,6 +1941,7 @@ for opt in %{clang_make_opts}; do
|
||||
OPTS="$OPTS -m $opt"
|
||||
done
|
||||
%endif
|
||||
%{log_msg "Generate redhat configs"}
|
||||
RHJOBS=$RPM_BUILD_NCPUS SPECPACKAGE_NAME=%{name} ./process_configs.sh $OPTS %{specrpmversion}
|
||||
|
||||
# We may want to override files from the primary target in case of building
|
||||
@ -1936,20 +1956,21 @@ update_scripts() {
|
||||
done
|
||||
}
|
||||
|
||||
%{log_msg "Set scripts/SOURCES targets"}
|
||||
update_target=%{primary_target}
|
||||
if [ "%{primary_target}" == "rhel" ]; then
|
||||
: # no-op to avoid empty if-fi error
|
||||
%if 0%{?centos}
|
||||
update_scripts $update_target
|
||||
echo "Updating scripts/sources to centos version"
|
||||
%{log_msg "Updating scripts/sources to centos version"}
|
||||
update_target=centos
|
||||
%endif
|
||||
fi
|
||||
update_scripts $update_target
|
||||
|
||||
# end of kernel config
|
||||
%endif
|
||||
|
||||
%{log_msg "End of kernel config"}
|
||||
cd ..
|
||||
# # End of Configs stuff
|
||||
|
||||
@ -1965,7 +1986,9 @@ cd ..
|
||||
### build
|
||||
###
|
||||
%build
|
||||
%{log_msg "Start of build stage"}
|
||||
|
||||
%{log_msg "General arch build configuration"}
|
||||
rm -rf %{buildroot_unstripped} || true
|
||||
mkdir -p %{buildroot_unstripped}
|
||||
|
||||
@ -1989,6 +2012,9 @@ cp_vmlinux()
|
||||
%define make %{__make} %{?cross_opts} %{?make_opts} HOSTCFLAGS="%{?build_hostcflags}" HOSTLDFLAGS="%{?build_hostldflags}"
|
||||
|
||||
InitBuildVars() {
|
||||
%{log_msg "InitBuildVars for $1"}
|
||||
|
||||
%{log_msg "InitBuildVars: Initialize build variables"}
|
||||
# Initialize the kernel .config file and create some variables that are
|
||||
# needed for the actual build process.
|
||||
|
||||
@ -2000,6 +2026,7 @@ InitBuildVars() {
|
||||
|
||||
KernelVer=%{specversion}-%{release}.%{_target_cpu}${Variant:++${Variant}}
|
||||
|
||||
%{log_msg "InitBuildVars: Update Makefile"}
|
||||
# make sure EXTRAVERSION says what we want it to say
|
||||
# Trim the release if this is a CI build, since KERNELVERSION is limited to 64 characters
|
||||
ShortRel=$(perl -e "print \"%{release}\" =~ s/\.pr\.[0-9A-Fa-f]{32}//r")
|
||||
@ -2009,6 +2036,7 @@ InitBuildVars() {
|
||||
# if we are post rc1 this should match anyway so this won't matter
|
||||
perl -p -i -e 's/^PATCHLEVEL.*/PATCHLEVEL = %{patchlevel}/' Makefile
|
||||
|
||||
%{log_msg "InitBuildVars: Copy files"}
|
||||
%{make} %{?_smp_mflags} mrproper
|
||||
cp configs/$Config .config
|
||||
|
||||
@ -2017,23 +2045,26 @@ InitBuildVars() {
|
||||
%endif
|
||||
|
||||
Arch=`head -1 .config | cut -b 3-`
|
||||
echo USING ARCH=$Arch
|
||||
%{log_msg "InitBuildVars: USING ARCH=$Arch"}
|
||||
|
||||
KCFLAGS="%{?kcflags}"
|
||||
|
||||
# add kpatch flags for base kernel
|
||||
%{log_msg "InitBuildVars: Configure KCFLAGS"}
|
||||
if [ "$Variant" == "" ]; then
|
||||
KCFLAGS="$KCFLAGS %{?kpatch_kcflags}"
|
||||
fi
|
||||
}
|
||||
|
||||
BuildKernel() {
|
||||
%{log_msg "BuildKernel for $4"}
|
||||
MakeTarget=$1
|
||||
KernelImage=$2
|
||||
DoVDSO=$3
|
||||
Variant=$4
|
||||
InstallName=${5:-vmlinuz}
|
||||
|
||||
%{log_msg "Setup variables"}
|
||||
DoModules=1
|
||||
if [ "$Variant" = "zfcpdump" ]; then
|
||||
DoModules=0
|
||||
@ -2048,22 +2079,25 @@ BuildKernel() {
|
||||
fi
|
||||
|
||||
%if %{with_gcov}
|
||||
%{log_msg "Setup build directories"}
|
||||
# Make build directory unique for each variant, so that gcno symlinks
|
||||
# are also unique for each variant.
|
||||
if [ -n "$Variant" ]; then
|
||||
ln -s $(pwd) ../linux-%{KVERREL}-${Variant}
|
||||
fi
|
||||
echo "GCOV - continuing build in: $(pwd)"
|
||||
%{log_msg "GCOV - continuing build in: $(pwd)"}
|
||||
pushd ../linux-%{KVERREL}${Variant:+-${Variant}}
|
||||
pwd > ../kernel${Variant:+-${Variant}}-gcov.list
|
||||
%endif
|
||||
|
||||
%{log_msg "Calling InitBuildVars for $Variant"}
|
||||
InitBuildVars $Variant
|
||||
|
||||
echo BUILDING A KERNEL FOR ${Variant} %{_target_cpu}...
|
||||
%{log_msg "BUILDING A KERNEL FOR ${Variant} %{_target_cpu}..."}
|
||||
|
||||
%{make} ARCH=$Arch olddefconfig >/dev/null
|
||||
|
||||
%{log_msg "Setup build-ids"}
|
||||
# This ensures build-ids are unique to allow parallel debuginfo
|
||||
perl -p -i -e "s/^CONFIG_BUILD_SALT.*/CONFIG_BUILD_SALT=\"%{KVERREL}\"/" .config
|
||||
%{make} ARCH=$Arch KCFLAGS="$KCFLAGS" WITH_GCOV="%{?with_gcov}" %{?_smp_mflags} $MakeTarget %{?sparse_mflags} %{?kernel_mflags}
|
||||
@ -2071,6 +2105,7 @@ BuildKernel() {
|
||||
%{make} ARCH=$Arch KCFLAGS="$KCFLAGS" WITH_GCOV="%{?with_gcov}" %{?_smp_mflags} modules %{?sparse_mflags} || exit 1
|
||||
fi
|
||||
|
||||
%{log_msg "Setup RPM_BUILD_ROOT directories"}
|
||||
mkdir -p $RPM_BUILD_ROOT/%{image_install_path}
|
||||
mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer
|
||||
mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/systemtap
|
||||
@ -2079,32 +2114,38 @@ BuildKernel() {
|
||||
%endif
|
||||
|
||||
%ifarch aarch64
|
||||
%{log_msg "Build dtb kernel"}
|
||||
%{make} ARCH=$Arch dtbs INSTALL_DTBS_PATH=$RPM_BUILD_ROOT/%{image_install_path}/dtb-$KernelVer
|
||||
%{make} ARCH=$Arch dtbs_install INSTALL_DTBS_PATH=$RPM_BUILD_ROOT/%{image_install_path}/dtb-$KernelVer
|
||||
cp -r $RPM_BUILD_ROOT/%{image_install_path}/dtb-$KernelVer $RPM_BUILD_ROOT/lib/modules/$KernelVer/dtb
|
||||
find arch/$Arch/boot/dts -name '*.dtb' -type f -delete
|
||||
%endif
|
||||
|
||||
%{log_msg "Cleanup temp btf files"}
|
||||
# Remove large intermediate files we no longer need to save space
|
||||
# (-f required for zfcpdump builds that do not enable BTF)
|
||||
rm -f vmlinux.o .tmp_vmlinux.btf
|
||||
|
||||
%{log_msg "Install files to RPM_BUILD_ROOT"}
|
||||
# Start installing the results
|
||||
install -m 644 .config $RPM_BUILD_ROOT/boot/config-$KernelVer
|
||||
install -m 644 .config $RPM_BUILD_ROOT/lib/modules/$KernelVer/config
|
||||
install -m 644 System.map $RPM_BUILD_ROOT/boot/System.map-$KernelVer
|
||||
install -m 644 System.map $RPM_BUILD_ROOT/lib/modules/$KernelVer/System.map
|
||||
|
||||
%{log_msg "Create initrfamfs"}
|
||||
# We estimate the size of the initramfs because rpm needs to take this size
|
||||
# into consideration when performing disk space calculations. (See bz #530778)
|
||||
dd if=/dev/zero of=$RPM_BUILD_ROOT/boot/initramfs-$KernelVer.img bs=1M count=20
|
||||
|
||||
if [ -f arch/$Arch/boot/zImage.stub ]; then
|
||||
%{log_msg "Copy zImage.stub to RPM_BUILD_ROOT"}
|
||||
cp arch/$Arch/boot/zImage.stub $RPM_BUILD_ROOT/%{image_install_path}/zImage.stub-$KernelVer || :
|
||||
cp arch/$Arch/boot/zImage.stub $RPM_BUILD_ROOT/lib/modules/$KernelVer/zImage.stub-$KernelVer || :
|
||||
fi
|
||||
|
||||
%if %{signkernel}
|
||||
%{log_msg "Copy kernel for signing"}
|
||||
if [ "$KernelImage" = vmlinux ]; then
|
||||
# We can't strip and sign $KernelImage in place, because
|
||||
# we need to preserve original vmlinux for debuginfo.
|
||||
@ -2117,6 +2158,7 @@ BuildKernel() {
|
||||
SignImage=$KernelImage
|
||||
|
||||
%ifarch x86_64 aarch64
|
||||
%{log_msg "Sign kernel image"}
|
||||
%pesign -s -i $SignImage -o vmlinuz.tmp -a %{secureboot_ca_0} -c %{secureboot_key_0} -n %{pesign_name_0}
|
||||
%pesign -s -i vmlinuz.tmp -o vmlinuz.signed -a %{secureboot_ca_1} -c %{secureboot_key_1} -n %{pesign_name_1}
|
||||
rm vmlinuz.tmp
|
||||
@ -2133,31 +2175,35 @@ BuildKernel() {
|
||||
%endif
|
||||
|
||||
if [ ! -s vmlinuz.signed ]; then
|
||||
echo "pesigning failed"
|
||||
%{log_msg "pesigning failed"}
|
||||
exit 1
|
||||
fi
|
||||
mv vmlinuz.signed $SignImage
|
||||
# signkernel
|
||||
%endif
|
||||
|
||||
%{log_msg "copy signed kernel"}
|
||||
$CopyKernel $KernelImage \
|
||||
$RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer
|
||||
chmod 755 $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer
|
||||
cp $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer $RPM_BUILD_ROOT/lib/modules/$KernelVer/$InstallName
|
||||
|
||||
# hmac sign the kernel for FIPS
|
||||
echo "Creating hmac file: $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac"
|
||||
%{log_msg "hmac sign the kernel for FIPS"}
|
||||
%{log_msg "Creating hmac file: $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac"}
|
||||
ls -l $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer
|
||||
(cd $RPM_BUILD_ROOT/%{image_install_path} && sha512hmac $InstallName-$KernelVer) > $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac;
|
||||
cp $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac $RPM_BUILD_ROOT/lib/modules/$KernelVer/.vmlinuz.hmac
|
||||
|
||||
if [ $DoModules -eq 1 ]; then
|
||||
%{log_msg "Install modules in RPM_BUILD_ROOT"}
|
||||
# Override $(mod-fw) because we don't want it to install any firmware
|
||||
# we'll get it from the linux-firmware package and we don't want conflicts
|
||||
%{make} %{?_smp_mflags} ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT %{?_smp_mflags} modules_install KERNELRELEASE=$KernelVer mod-fw=
|
||||
fi
|
||||
|
||||
%if %{with_gcov}
|
||||
%{log_msg "install gcov-needed files to $BUILDROOT/$BUILD/"}
|
||||
# install gcov-needed files to $BUILDROOT/$BUILD/...:
|
||||
# gcov_info->filename is absolute path
|
||||
# gcno references to sources can use absolute paths (e.g. in out-of-tree builds)
|
||||
@ -2165,6 +2211,7 @@ BuildKernel() {
|
||||
find . \( -name '*.gcno' -o -name '*.[chS]' \) -exec install -D '{}' "$RPM_BUILD_ROOT/$(pwd)/{}" \;
|
||||
%endif
|
||||
|
||||
%{log_msg "Add VDSO files"}
|
||||
# add an a noop %%defattr statement 'cause rpm doesn't like empty file list files
|
||||
echo '%%defattr(-,-,-)' > ../kernel${Variant:+-${Variant}}-ldsoconf.list
|
||||
if [ $DoVDSO -ne 0 ]; then
|
||||
@ -2178,6 +2225,7 @@ BuildKernel() {
|
||||
rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/vdso/.build-id
|
||||
fi
|
||||
|
||||
%{log_msg "Save headers/makefiles, etc. for kernel-headers"}
|
||||
# And save the headers/makefiles etc for building modules against
|
||||
#
|
||||
# This all looks scary, but the end result is supposed to be:
|
||||
@ -2212,12 +2260,12 @@ BuildKernel() {
|
||||
# NOTENOTE: script which dynamically adds exported kernel symbol
|
||||
# NOTENOTE: checksums to the rpm metadata provides list.
|
||||
# NOTENOTE: if you change the symvers name, update the backend too
|
||||
echo "**** GENERATING kernel ABI metadata ****"
|
||||
%{log_msg "GENERATING kernel ABI metadata"}
|
||||
%compression --stdout %compression_flags < Module.symvers > $RPM_BUILD_ROOT/boot/symvers-$KernelVer.%compext
|
||||
cp $RPM_BUILD_ROOT/boot/symvers-$KernelVer.%compext $RPM_BUILD_ROOT/lib/modules/$KernelVer/symvers.%compext
|
||||
|
||||
%if %{with_kabichk}
|
||||
echo "**** kABI checking is enabled in kernel SPEC file. ****"
|
||||
%{log_msg "kABI checking is enabled in kernel SPEC file."}
|
||||
chmod 0755 $RPM_SOURCE_DIR/check-kabi
|
||||
if [ -e $RPM_SOURCE_DIR/Module.kabi_%{_target_cpu}$Variant ]; then
|
||||
cp $RPM_SOURCE_DIR/Module.kabi_%{_target_cpu}$Variant $RPM_BUILD_ROOT/Module.kabi
|
||||
@ -2225,19 +2273,19 @@ BuildKernel() {
|
||||
# for now, don't keep it around.
|
||||
rm $RPM_BUILD_ROOT/Module.kabi
|
||||
else
|
||||
echo "**** NOTE: Cannot find reference Module.kabi file. ****"
|
||||
%{log_msg "NOTE: Cannot find reference Module.kabi file."}
|
||||
fi
|
||||
%endif
|
||||
|
||||
%if %{with_kabidupchk}
|
||||
echo "**** kABI DUP checking is enabled in kernel SPEC file. ****"
|
||||
%{log_msg "kABI DUP checking is enabled in kernel SPEC file."}
|
||||
if [ -e $RPM_SOURCE_DIR/Module.kabi_dup_%{_target_cpu}$Variant ]; then
|
||||
cp $RPM_SOURCE_DIR/Module.kabi_dup_%{_target_cpu}$Variant $RPM_BUILD_ROOT/Module.kabi
|
||||
$RPM_SOURCE_DIR/check-kabi -k $RPM_BUILD_ROOT/Module.kabi -s Module.symvers || exit 1
|
||||
# for now, don't keep it around.
|
||||
rm $RPM_BUILD_ROOT/Module.kabi
|
||||
else
|
||||
echo "**** NOTE: Cannot find DUP reference Module.kabi file. ****"
|
||||
%{log_msg "NOTE: Cannot find DUP reference Module.kabi file."}
|
||||
fi
|
||||
%endif
|
||||
|
||||
@ -2250,7 +2298,7 @@ BuildKernel() {
|
||||
mkdir -p $RPM_BUILD_ROOT/kabi-dwarf/stablelists
|
||||
tar -xvf %{SOURCE300} -C $RPM_BUILD_ROOT/kabi-dwarf/stablelists
|
||||
|
||||
echo "**** GENERATING DWARF-based kABI baseline dataset ****"
|
||||
%{log_msg "GENERATING DWARF-based kABI baseline dataset"}
|
||||
chmod 0755 $RPM_BUILD_ROOT/kabi-dwarf/run_kabi-dw.sh
|
||||
$RPM_BUILD_ROOT/kabi-dwarf/run_kabi-dw.sh generate \
|
||||
"$RPM_BUILD_ROOT/kabi-dwarf/stablelists/kabi-current/kabi_stablelist_%{_target_cpu}" \
|
||||
@ -2269,26 +2317,27 @@ BuildKernel() {
|
||||
mkdir -p $RPM_BUILD_ROOT/kabi-dwarf/stablelists
|
||||
tar -xvf %{SOURCE300} -C $RPM_BUILD_ROOT/kabi-dwarf/stablelists
|
||||
|
||||
echo "**** GENERATING DWARF-based kABI dataset ****"
|
||||
%{log_msg "GENERATING DWARF-based kABI dataset"}
|
||||
chmod 0755 $RPM_BUILD_ROOT/kabi-dwarf/run_kabi-dw.sh
|
||||
$RPM_BUILD_ROOT/kabi-dwarf/run_kabi-dw.sh generate \
|
||||
"$RPM_BUILD_ROOT/kabi-dwarf/stablelists/kabi-current/kabi_stablelist_%{_target_cpu}" \
|
||||
"$(pwd)" \
|
||||
"$RPM_BUILD_ROOT/kabi-dwarf/base/%{_target_cpu}${Variant:+.${Variant}}.tmp" || :
|
||||
|
||||
echo "**** kABI DWARF-based comparison report ****"
|
||||
%{log_msg "kABI DWARF-based comparison report"}
|
||||
$RPM_BUILD_ROOT/kabi-dwarf/run_kabi-dw.sh compare \
|
||||
"$RPM_BUILD_ROOT/kabi-dwarf/base/%{_target_cpu}${Variant:+.${Variant}}" \
|
||||
"$RPM_BUILD_ROOT/kabi-dwarf/base/%{_target_cpu}${Variant:+.${Variant}}.tmp" || :
|
||||
echo "**** End of kABI DWARF-based comparison report ****"
|
||||
%{log_msg "End of kABI DWARF-based comparison report"}
|
||||
else
|
||||
echo "**** Baseline dataset for kABI DWARF-BASED comparison report not found ****"
|
||||
%{log_msg "Baseline dataset for kABI DWARF-BASED comparison report not found"}
|
||||
fi
|
||||
|
||||
rm -rf $RPM_BUILD_ROOT/kabi-dwarf
|
||||
fi
|
||||
%endif
|
||||
|
||||
%{log_msg "Cleanup Makefiles/Kconfig files"}
|
||||
# then drop all but the needed Makefiles/Kconfig files
|
||||
rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts
|
||||
rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
|
||||
@ -2300,11 +2349,13 @@ BuildKernel() {
|
||||
%ifarch s390x
|
||||
# CONFIG_EXPOLINE_EXTERN=y produces arch/s390/lib/expoline/expoline.o
|
||||
# which is needed during external module build.
|
||||
%{log_msg "Copy expoline.o"}
|
||||
if [ -f arch/s390/lib/expoline/expoline.o ]; then
|
||||
cp -a --parents arch/s390/lib/expoline/expoline.o $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
|
||||
fi
|
||||
%endif
|
||||
|
||||
%{log_msg "Copy additional files for make targets"}
|
||||
# Files for 'make scripts' to succeed with kernel-devel.
|
||||
mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/security/selinux/include
|
||||
cp -a --parents security/selinux/include/classmap.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
|
||||
@ -2398,6 +2449,7 @@ BuildKernel() {
|
||||
cp -a --parents tools/objtool/arch/x86/ $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
|
||||
|
||||
%endif
|
||||
%{log_msg "Clean up intermediate tools files"}
|
||||
# Clean up intermediate tools files
|
||||
find $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/tools \( -iname "*.o" -o -iname "*.cmd" \) -exec rm -f {} +
|
||||
|
||||
@ -2411,6 +2463,7 @@ BuildKernel() {
|
||||
eu-readelf -n vmlinux | grep "Build ID" | awk '{print $NF}' > vmlinux.id
|
||||
cp vmlinux.id $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/vmlinux.id
|
||||
|
||||
%{log_msg "Copy additional files for kernel-debuginfo rpm"}
|
||||
#
|
||||
# save the vmlinux file for kernel debugging into the kernel-debuginfo rpm
|
||||
# (use mv + symlink instead of cp to reduce disk space requirements)
|
||||
@ -2437,13 +2490,14 @@ BuildKernel() {
|
||||
%py_byte_compile %{python3} $RPM_BUILD_ROOT%{debuginfodir}/lib/modules/$KernelVer/scripts/gdb
|
||||
%endif
|
||||
|
||||
%{log_msg "Create modnames"}
|
||||
find $RPM_BUILD_ROOT/lib/modules/$KernelVer -name "*.ko" -type f >modnames
|
||||
|
||||
# mark modules executable so that strip-to-file can strip them
|
||||
xargs --no-run-if-empty chmod u+x < modnames
|
||||
|
||||
# Generate a list of modules for block and networking.
|
||||
|
||||
%{log_msg "Generate a list of modules for block and networking"}
|
||||
grep -F /drivers/ modnames | xargs --no-run-if-empty nm -upA |
|
||||
sed -n 's,^.*/\([^/]*\.ko\): *U \(.*\)$,\1 \2,p' > drivers.undef
|
||||
|
||||
@ -2465,6 +2519,7 @@ BuildKernel() {
|
||||
collect_modules_list modesetting \
|
||||
'drm_crtc_init'
|
||||
|
||||
%{log_msg "detect missing or incorrect license tags"}
|
||||
# detect missing or incorrect license tags
|
||||
( find $RPM_BUILD_ROOT/lib/modules/$KernelVer -name '*.ko' | xargs /sbin/modinfo -l | \
|
||||
grep -E -v 'GPL( v2)?$|Dual BSD/GPL$|Dual MPL/GPL$|GPL and additional rights$' ) && exit 1
|
||||
@ -2480,8 +2535,10 @@ BuildKernel() {
|
||||
popd
|
||||
}
|
||||
|
||||
%{log_msg "Remove depmod files"}
|
||||
remove_depmod_files
|
||||
|
||||
%{log_msg "Identify modules in kenrel-modules-* packages"}
|
||||
# Identify modules in the kernel-modules-extras package
|
||||
%{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer $(realpath configs/mod-extra.list)
|
||||
# Identify modules in the kernel-modules-internal package
|
||||
@ -2498,6 +2555,7 @@ BuildKernel() {
|
||||
#
|
||||
# Generate the kernel-core and kernel-modules files lists
|
||||
#
|
||||
%{log_msg "Gemerate the kernel-core and kernel-modules files lists"}
|
||||
|
||||
# Copy the System.map file for depmod to use, and create a backup of the
|
||||
# full module tree so we can restore it after we're done filtering
|
||||
@ -2507,6 +2565,7 @@ BuildKernel() {
|
||||
mkdir restore
|
||||
cp -r lib/modules/$KernelVer/* restore/.
|
||||
|
||||
%{log_msg "Remove files in the kernel-modules-* file lists"}
|
||||
# don't include anything going into kernel-modules-extra in the file lists
|
||||
xargs rm -rf < mod-extra.list
|
||||
# don't include anything going into kernel-modules-internal in the file lists
|
||||
@ -2521,6 +2580,7 @@ BuildKernel() {
|
||||
fi
|
||||
|
||||
if [ $DoModules -eq 1 ]; then
|
||||
%{log_msg "Filter files into core and modules lists"}
|
||||
# Find all the module files and filter them out into the core and
|
||||
# modules lists. This actually removes anything going into -modules
|
||||
# from the dir.
|
||||
@ -2531,13 +2591,14 @@ BuildKernel() {
|
||||
# Run depmod on the resulting module tree and make sure it isn't broken
|
||||
depmod -b . -aeF ./System.map $KernelVer &> depmod.out
|
||||
if [ -s depmod.out ]; then
|
||||
echo "Depmod failure"
|
||||
%{log_msg "Depmod failure"}
|
||||
cat depmod.out
|
||||
exit 1
|
||||
else
|
||||
rm depmod.out
|
||||
fi
|
||||
else
|
||||
%{log_msg "Create empty files for RPM packaging"}
|
||||
# Ensure important files/directories exist to let the packaging succeed
|
||||
echo '%%defattr(-,-,-)' > modules.list
|
||||
echo '%%defattr(-,-,-)' > k-d.list
|
||||
@ -2549,9 +2610,10 @@ BuildKernel() {
|
||||
fi
|
||||
|
||||
if [[ "$Variant" == "rt" || "$Variant" == "rt-debug" ]]; then
|
||||
echo "Skipping efiuki build"
|
||||
%{log_msg "Skipping efiuki build"}
|
||||
else
|
||||
%if %{with_efiuki}
|
||||
%{log_msg "Setup the EFI UKI kernel"}
|
||||
popd
|
||||
|
||||
KernelUnifiedImageDir="$RPM_BUILD_ROOT/lib/modules/$KernelVer"
|
||||
@ -2571,13 +2633,13 @@ BuildKernel() {
|
||||
$KernelUnifiedImage
|
||||
|
||||
%if %{signkernel}
|
||||
|
||||
%{log_msg "Sign the EFI UKI kernel"}
|
||||
%pesign -s -i $KernelUnifiedImage -o $KernelUnifiedImage.tmp -a %{secureboot_ca_0} -c %{secureboot_key_0} -n %{pesign_name_0}
|
||||
%pesign -s -i $KernelUnifiedImage.tmp -o $KernelUnifiedImage.signed -a %{secureboot_ca_1} -c %{secureboot_key_1} -n %{pesign_name_1}
|
||||
rm -f $KernelUnifiedImage.tmp
|
||||
|
||||
if [ ! -s $KernelUnifiedImage.signed ]; then
|
||||
echo "pesigning failed"
|
||||
%{log_msg "pesigning failed"}
|
||||
exit 1
|
||||
fi
|
||||
mv $KernelUnifiedImage.signed $KernelUnifiedImage
|
||||
@ -2599,6 +2661,7 @@ BuildKernel() {
|
||||
find lib/modules/$KernelVer/kernel -mindepth 1 -type d | sort -n > module-dirs.list
|
||||
|
||||
# Cleanup
|
||||
%{log_msg "Cleanup build files"}
|
||||
rm System.map
|
||||
# Just "cp -r" can be very slow: here, it rewrites _existing files_
|
||||
# with open(O_TRUNC). Many filesystems synchronously wait for metadata
|
||||
@ -2613,6 +2676,7 @@ BuildKernel() {
|
||||
|
||||
# Make sure the files lists start with absolute paths or rpmbuild fails.
|
||||
# Also add in the dir entries
|
||||
%{log_msg "Create module list files for all kernel variants"}
|
||||
sed -e 's/^lib*/\/lib/' %{?zipsed} $RPM_BUILD_ROOT/k-d.list > ../kernel${Variant:+-${Variant}}-modules.list
|
||||
sed -e 's/^lib*/%dir \/lib/' %{?zipsed} $RPM_BUILD_ROOT/module-dirs.list > ../kernel${Variant:+-${Variant}}-modules-core.list
|
||||
sed -e 's/^lib*/\/lib/' %{?zipsed} $RPM_BUILD_ROOT/modules.list >> ../kernel${Variant:+-${Variant}}-modules-core.list
|
||||
@ -2621,7 +2685,8 @@ BuildKernel() {
|
||||
sed -e 's/^lib*/\/lib/' %{?zipsed} $RPM_BUILD_ROOT/mod-kvm.list >> ../kernel${Variant:+-${Variant}}-kvm.list
|
||||
fi
|
||||
|
||||
# Cleanup
|
||||
# Cleanup kernel variant module lists
|
||||
%{log_msg "Clean up kernel variant module lists"}
|
||||
rm -f $RPM_BUILD_ROOT/k-d.list
|
||||
rm -f $RPM_BUILD_ROOT/modules.list
|
||||
rm -f $RPM_BUILD_ROOT/module-dirs.list
|
||||
@ -2636,6 +2701,7 @@ BuildKernel() {
|
||||
|
||||
%if %{signmodules}
|
||||
if [ $DoModules -eq 1 ]; then
|
||||
%{log_msg "Save the signing keys for modules"}
|
||||
# Save the signing keys so we can sign the modules in __modsign_install_post
|
||||
cp certs/signing_key.pem certs/signing_key.pem.sign${Variant:++${Variant}}
|
||||
cp certs/signing_key.x509 certs/signing_key.x509.sign${Variant:++${Variant}}
|
||||
@ -2643,6 +2709,7 @@ BuildKernel() {
|
||||
%endif
|
||||
|
||||
# Move the devel headers out of the root file system
|
||||
%{log_msg "Move the devel headers to RPM_BUILD_ROOT"}
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/src/kernels
|
||||
mv $RPM_BUILD_ROOT/lib/modules/$KernelVer/build $RPM_BUILD_ROOT/$DevelDir
|
||||
|
||||
@ -2655,6 +2722,7 @@ BuildKernel() {
|
||||
# Generate vmlinux.h and put it to kernel-devel path
|
||||
# zfcpdump build does not have btf anymore
|
||||
if [ "$Variant" != "zfcpdump" ]; then
|
||||
%{log_msg "Build the bootstrap bpftool to generate vmlinux.h"}
|
||||
# Build the bootstrap bpftool to generate vmlinux.h
|
||||
export BPFBOOTSTRAP_CFLAGS=$(echo "%{__global_compiler_flags}" | sed -r "s/\-specs=[^\ ]+\/redhat-annobin-cc1//")
|
||||
export BPFBOOTSTRAP_LDFLAGS=$(echo "%{__global_ldflags}" | sed -r "s/\-specs=[^\ ]+\/redhat-annobin-cc1//")
|
||||
@ -2663,12 +2731,14 @@ BuildKernel() {
|
||||
tools/bpf/bpftool/bootstrap/bpftool btf dump file vmlinux format c > $RPM_BUILD_ROOT/$DevelDir/vmlinux.h
|
||||
fi
|
||||
|
||||
%{log_msg "Cleanup kernel-devel and kernel-debuginfo files"}
|
||||
# prune junk from kernel-devel
|
||||
find $RPM_BUILD_ROOT/usr/src/kernels -name ".*.cmd" -delete
|
||||
# prune junk from kernel-debuginfo
|
||||
find $RPM_BUILD_ROOT/usr/src/kernels -name "*.mod.c" -delete
|
||||
|
||||
# Red Hat UEFI Secure Boot CA cert, which can be used to authenticate the kernel
|
||||
%{log_msg "Install certs"}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/doc/kernel-keys/$KernelVer
|
||||
%ifarch x86_64 aarch64
|
||||
install -m 0644 %{secureboot_ca_0} $RPM_BUILD_ROOT%{_datadir}/doc/kernel-keys/$KernelVer/kernel-signing-ca-20200609.cer
|
||||
@ -2690,6 +2760,7 @@ BuildKernel() {
|
||||
%endif
|
||||
|
||||
%if %{with_ipaclones}
|
||||
%{log_msg "install IPA clones"}
|
||||
MAXPROCS=$(echo %{?_smp_mflags} | sed -n 's/-j\s*\([0-9]\+\)/\1/p')
|
||||
if [ -z "$MAXPROCS" ]; then
|
||||
MAXPROCS=1
|
||||
@ -2718,7 +2789,6 @@ cd linux-%{KVERREL}
|
||||
|
||||
%if %{with_debug}
|
||||
%if %{with_realtime}
|
||||
echo "building rt-debug"
|
||||
BuildKernel %make_target %kernel_image %{_use_vdso} rt-debug
|
||||
%endif
|
||||
|
||||
@ -2731,7 +2801,6 @@ BuildKernel %make_target %kernel_image %{_use_vdso} 64k-debug
|
||||
%endif
|
||||
|
||||
%if %{with_up}
|
||||
echo "building main debug package"
|
||||
BuildKernel %make_target %kernel_image %{_use_vdso} debug
|
||||
%endif
|
||||
%endif
|
||||
@ -2760,6 +2829,7 @@ BuildKernel %make_target %kernel_image %{_use_vdso}
|
||||
%if !%{with_debug} && !%{with_zfcpdump} && !%{with_up} && !%{with_arm64_16k} && !%{with_arm64_64k} && !%{with_realtime}
|
||||
# If only building the user space tools, then initialize the build environment
|
||||
# and some variables so that the various userspace tools can be built.
|
||||
%{log_msg "Initialize userspace tools build environment"}
|
||||
InitBuildVars
|
||||
%endif
|
||||
%endif
|
||||
@ -2770,6 +2840,7 @@ InitBuildVars
|
||||
%global perf_make \
|
||||
%{__make} %{?make_opts} EXTRA_CFLAGS="${RPM_OPT_FLAGS}" EXTRA_CXXFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags} -Wl,-E" %{?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 LIBBPF_DYNAMIC=1 LIBTRACEEVENT_DYNAMIC=1 %{?perf_build_extra_opts} prefix=%{_prefix} PYTHON=%{__python3}
|
||||
%if %{with_perf}
|
||||
%{log_msg "Build perf"}
|
||||
# perf
|
||||
# make sure check-headers.sh is executable
|
||||
chmod +x tools/perf/check-headers.sh
|
||||
@ -2779,6 +2850,7 @@ chmod +x tools/perf/check-headers.sh
|
||||
%if %{with_libperf}
|
||||
%global libperf_make \
|
||||
%{__make} %{?make_opts} EXTRA_CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags}" %{?cross_opts} -C tools/lib/perf V=1
|
||||
%{log_msg "build libperf"}
|
||||
%{libperf_make} DESTDIR=$RPM_BUILD_ROOT
|
||||
%endif
|
||||
|
||||
@ -2790,44 +2862,56 @@ chmod +x tools/perf/check-headers.sh
|
||||
# cpupower
|
||||
# make sure version-gen.sh is executable.
|
||||
chmod +x tools/power/cpupower/utils/version-gen.sh
|
||||
%{log_msg "build cpupower"}
|
||||
%{tools_make} %{?_smp_mflags} -C tools/power/cpupower CPUFREQ_BENCH=false DEBUG=false
|
||||
%ifarch x86_64
|
||||
pushd tools/power/cpupower/debug/x86_64
|
||||
%{log_msg "build centrino-decode powernow-k8-decode"}
|
||||
%{tools_make} %{?_smp_mflags} centrino-decode powernow-k8-decode
|
||||
popd
|
||||
%endif
|
||||
%ifarch x86_64
|
||||
pushd tools/power/x86/x86_energy_perf_policy/
|
||||
%{log_msg "build x86_energy_perf_policy"}
|
||||
%{tools_make}
|
||||
popd
|
||||
pushd tools/power/x86/turbostat
|
||||
%{log_msg "build turbostat"}
|
||||
%{tools_make}
|
||||
popd
|
||||
pushd tools/power/x86/intel-speed-select
|
||||
%{log_msg "build intel-speed-select"}
|
||||
%{tools_make}
|
||||
popd
|
||||
pushd tools/arch/x86/intel_sdsi
|
||||
%{log_msg "build intel_sdsi"}
|
||||
%{tools_make} CFLAGS="${RPM_OPT_FLAGS}"
|
||||
popd
|
||||
%endif
|
||||
%endif
|
||||
pushd tools/thermal/tmon/
|
||||
%{log_msg "build tmon"}
|
||||
%{tools_make}
|
||||
popd
|
||||
pushd tools/iio/
|
||||
%{log_msg "build iio"}
|
||||
%{tools_make}
|
||||
popd
|
||||
pushd tools/gpio/
|
||||
%{log_msg "build gpio"}
|
||||
%{tools_make}
|
||||
popd
|
||||
# build VM tools
|
||||
pushd tools/mm/
|
||||
%{log_msg "build slabinfo page_owner_sort"}
|
||||
%{tools_make} slabinfo page_owner_sort
|
||||
popd
|
||||
pushd tools/verification/rv/
|
||||
%{log_msg "build rv"}
|
||||
%{tools_make}
|
||||
popd
|
||||
pushd tools/tracing/rtla
|
||||
%{log_msg "build rtla"}
|
||||
%{tools_make}
|
||||
popd
|
||||
%endif
|
||||
@ -2839,26 +2923,31 @@ fi
|
||||
%if %{with_bpftool}
|
||||
%global bpftool_make \
|
||||
%{__make} EXTRA_CFLAGS="${RPM_OPT_FLAGS}" EXTRA_LDFLAGS="%{__global_ldflags}" DESTDIR=$RPM_BUILD_ROOT %{?make_opts} VMLINUX_H="${RPM_VMLINUX_H}" V=1
|
||||
%{log_msg "build bpftool"}
|
||||
pushd tools/bpf/bpftool
|
||||
%{bpftool_make}
|
||||
popd
|
||||
%else
|
||||
echo "bpftools disabled ... disabling selftests"
|
||||
%{log_msg "bpftools disabled ... disabling selftests"}
|
||||
%endif
|
||||
|
||||
%if %{with_selftests}
|
||||
%{log_msg "start build selftests"}
|
||||
# Unfortunately, samples/bpf/Makefile expects that the headers are installed
|
||||
# in the source tree. We installed them previously to $RPM_BUILD_ROOT/usr
|
||||
# but there's no way to tell the Makefile to take them from there.
|
||||
%{log_msg "install headers for selftests"}
|
||||
%{make} %{?_smp_mflags} headers_install
|
||||
|
||||
# If we re building only tools without kernel, we need to generate config
|
||||
# headers and prepare tree for modules building. The modules_prepare target
|
||||
# will cover both.
|
||||
if [ ! -f include/generated/autoconf.h ]; then
|
||||
%{log_msg "modules_prepare for selftests"}
|
||||
%{make} %{?_smp_mflags} modules_prepare
|
||||
fi
|
||||
|
||||
%{log_msg "build samples/bpf"}
|
||||
%{make} %{?_smp_mflags} ARCH=$Arch V=1 M=samples/bpf/ VMLINUX_H="${RPM_VMLINUX_H}" || true
|
||||
|
||||
# Prevent bpf selftests to build bpftool repeatedly:
|
||||
@ -2873,10 +2962,12 @@ pushd tools/testing/selftests
|
||||
force_targets=""
|
||||
%endif
|
||||
|
||||
%{log_msg "main selftests compile"}
|
||||
%{make} %{?_smp_mflags} ARCH=$Arch V=1 TARGETS="bpf mm livepatch net net/forwarding net/mptcp netfilter tc-testing memfd drivers/net/bonding" SKIP_TARGETS="" $force_targets INSTALL_PATH=%{buildroot}%{_libexecdir}/kselftests VMLINUX_H="${RPM_VMLINUX_H}" install
|
||||
|
||||
# 'make install' for bpf is broken and upstream refuses to fix it.
|
||||
# Install the needed files manually.
|
||||
%{log_msg "install selftests"}
|
||||
for dir in bpf bpf/no_alu32 bpf/progs; do
|
||||
# In ARK, the rpm build continues even if some of the selftests
|
||||
# cannot be built. It's not always possible to build selftests,
|
||||
@ -2893,15 +2984,19 @@ done
|
||||
%buildroot_save_unstripped "usr/libexec/kselftests/bpf/test_progs-no_alu32"
|
||||
popd
|
||||
export -n BPFTOOL
|
||||
%{log_msg "end build selftests"}
|
||||
%endif
|
||||
|
||||
%if %{with_doc}
|
||||
%{log_msg "start install docs"}
|
||||
# Make the HTML pages.
|
||||
%{log_msg "build html docs"}
|
||||
%{__make} PYTHON=/usr/bin/python3 htmldocs || %{doc_build_fail}
|
||||
|
||||
# sometimes non-world-readable files sneak into the kernel source tree
|
||||
chmod -R a=rX Documentation
|
||||
find Documentation -type d | xargs chmod u+w
|
||||
%{log_msg "end install docs"}
|
||||
%endif
|
||||
|
||||
# Module signing (modsign)
|
||||
@ -2913,17 +3008,17 @@ find Documentation -type d | xargs chmod u+w
|
||||
|
||||
%define __modsign_install_post \
|
||||
if [ "%{signmodules}" -eq "1" ]; then \
|
||||
echo "Signing kernel modules ..." \
|
||||
%{log_msg "Signing kernel modules ..."} \
|
||||
modules_dirs="$(shopt -s nullglob; echo $RPM_BUILD_ROOT/lib/modules/%{KVERREL}*)" \
|
||||
for modules_dir in $modules_dirs; do \
|
||||
variant_suffix="${modules_dir#$RPM_BUILD_ROOT/lib/modules/%{KVERREL}}" \
|
||||
[ "$variant_suffix" == "+zfcpdump" ] && continue \
|
||||
echo "Signing modules for %{KVERREL}${variant_suffix}" \
|
||||
%{log_msg "Signing modules for %{KVERREL}${variant_suffix}"} \
|
||||
%{modsign_cmd} certs/signing_key.pem.sign${variant_suffix} certs/signing_key.x509.sign${variant_suffix} $modules_dir/ \
|
||||
done \
|
||||
fi \
|
||||
if [ "%{zipmodules}" -eq "1" ]; then \
|
||||
echo "Compressing kernel modules ..." \
|
||||
%{log_msg "Compressing kernel modules ..."} \
|
||||
find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -n 16 -P${RPM_BUILD_NCPUS} -r %compression %compression_flags; \
|
||||
fi \
|
||||
%{nil}
|
||||
@ -3865,9 +3960,13 @@ fi\
|
||||
#
|
||||
#
|
||||
%changelog
|
||||
* Wed Feb 28 2024 Fedora Kernel Team <kernel-team@fedoraproject.org> [6.8.0-0.rc6.cf1182944c7c.51]
|
||||
* Thu Feb 29 2024 Fedora Kernel Team <kernel-team@fedoraproject.org> [6.8.0-0.rc6.805d849d7c3c.51]
|
||||
- gitlab-ci: fix merge tree URL for gating pipelines (Michael Hofmann)
|
||||
- Revert "net: bump CONFIG_MAX_SKB_FRAGS to 45" (Marcelo Ricardo Leitner)
|
||||
- uki: use systemd-pcrphase dracut module (Gerd Hoffmann)
|
||||
- Add libperf-debuginfo subpackage (Justin M. Forbes)
|
||||
- redhat/kernel.spec.template: Add log_msg macro (Prarit Bhargava)
|
||||
- Linux v6.8.0-0.rc6.805d849d7c3c
|
||||
|
||||
* Wed Feb 28 2024 Fedora Kernel Team <kernel-team@fedoraproject.org> [6.8.0-0.rc6.cf1182944c7c.50]
|
||||
- Linux v6.8.0-0.rc6.cf1182944c7c
|
||||
|
6
sources
6
sources
@ -1,5 +1,5 @@
|
||||
SHA512 (kernel-abi-stablelists-6.6.0.tar.bz2) = 4f917598056dee5e23814621ec96ff2e4a411c8c4ba9d56ecb01b23cb96431825bedbecfcbaac9338efbf5cb21694d85497fa0bf43e7c80d9cd10bc6dd144dbd
|
||||
SHA512 (kernel-kabi-dw-6.6.0.tar.bz2) = 19308cd976031d05e18ef7f5d093218acdb89446418bab0cd956ff12cf66369915b9e64bb66fa9f20939428a60e81884fec5be3529c6c7461738d6540d3cc5c6
|
||||
SHA512 (linux-6.8-rc6-21-gcf1182944c7c.tar.xz) = 4e849dfad1eae9176110c8ec5885fda15cb61d885dbb9daa77611d0d2d850cbec392996754ee52ae798c17e6ef873320ff1816e146182ab574e5f98b14cc53ca
|
||||
SHA512 (kernel-abi-stablelists-6.8.0.tar.xz) = dc55b68f991a9e45aa2f71c67caf4c9243555d06e56f0e2b8be02ddccaf13a8b6fddf7bdc734354de795834df33bbc165b25a227d5ea7e8c0b29e3212845f5b4
|
||||
SHA512 (kernel-kabi-dw-6.8.0.tar.xz) = 418af894e6c26a48a7ef2e87f5755a3135206a8e709cb035363b2789470f68429f336661d674f4233791f24c315d35036b72ecfeede337abf4d7a02604bb8fd9
|
||||
SHA512 (linux-6.8-rc6-37-g805d849d7c3c.tar.xz) = 363aac713f74b3f07f9a3119b7cc179f9d3cd4bb94b9e2fbaea4deced2f2aa56c645d5dc232c95aa1211e152e072549c2fa0a9842cb16deed294257dc68699c8
|
||||
SHA512 (kernel-abi-stablelists-6.8.0.tar.xz) = e54f08d19c84cf1fb11ea7935a392678944f8276b4af58436fcf58913e9d49fd4b9ae9f4bdfcf57aa4454b3ac341a9ed5ec5d85ceacfa26b6920aabf5ee76379
|
||||
SHA512 (kernel-kabi-dw-6.8.0.tar.xz) = f5d293151e220344e2f54c6ec84d2ae5b317b83b25c148409e275f1b06133c1d7b0671f57831b2d01a4012038479c326a9b076f98672316da5439b17b9a46191
|
||||
|
Loading…
Reference in New Issue
Block a user