summaryrefslogtreecommitdiffstats
path: root/kernel.spec
diff options
context:
space:
mode:
authorThorsten Leemhuis <fedora@leemhuis.info>2020-02-26 07:15:55 +0100
committerThorsten Leemhuis <fedora@leemhuis.info>2020-02-26 07:15:55 +0100
commitd068cda92ed741ba7fa9542cf09dcce58f075b84 (patch)
tree39df08878932ecaf47f1205aeae9614f4e0d1226 /kernel.spec
parent281b0c016996618caf6513e9def4a64abc47b8c6 (diff)
parent7eb97f8090869a87498b9c84c3d6210be7e31523 (diff)
downloadkernel-d068cda92ed741ba7fa9542cf09dcce58f075b84.tar.gz
kernel-d068cda92ed741ba7fa9542cf09dcce58f075b84.tar.xz
kernel-d068cda92ed741ba7fa9542cf09dcce58f075b84.zip
Merge remote-tracking branch 'origin/master' into rawhide-user-thl-vanilla-fedora
Diffstat (limited to 'kernel.spec')
-rw-r--r--kernel.spec121
1 files changed, 92 insertions, 29 deletions
diff --git a/kernel.spec b/kernel.spec
index 1c158dae2..66591bb5a 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -115,7 +115,7 @@ Summary: The Linux kernel
# The rc snapshot level
%global rcrev 3
# The git snapshot level
-%define gitrev 0
+%define gitrev 1
# Set rpm version accordingly
%define rpmversion 5.%{upstream_sublevel}.0
%endif
@@ -196,7 +196,7 @@ Summary: The Linux kernel
#
# gcov support
-%define with_gcov %{?_with_gcov: 1} %{?!_with_gcov: 0}
+%define with_gcov %{?_with_gcov:1}%{?!_with_gcov:0}
#
# ipa_clone support
@@ -208,7 +208,7 @@ Summary: The Linux kernel
# Set debugbuildsenabled to 1 for production (build separate debug kernels)
# and 0 for rawhide (all kernels are debug kernels).
# See also 'make debug' and 'make release'.
-%define debugbuildsenabled 1
+%define debugbuildsenabled 0
%if 0%{?fedora}
# Kernel headers are being split out into a separate package
@@ -669,7 +669,8 @@ Source15: secureboot_ppc.cer
%define pesign_name redhatsecureboot303
%endif
-%else # released_kernel
+# released_kernel
+%else
Source12: redhatsecurebootca2.cer
Source13: redhatsecureboot003.cer
@@ -678,7 +679,8 @@ Source13: redhatsecureboot003.cer
%define secureboot_key %{SOURCE13}
%define pesign_name redhatsecureboot003
-%endif # released_kernel
+# released_kernel
+%endif
Source22: mod-extra.list.rhel
Source16: mod-extra.list.fedora
@@ -999,8 +1001,8 @@ This package provides debug information for the perf python bindings.
# the python_sitearch macro should already be defined from above
%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%%{python3_sitearch}/perf.*so(\.debug)?|XXX' -o python3-perf-debuginfo.list}
-
-%endif # with_perf
+# with_perf
+%endif
%if %{with_tools}
%package -n kernel-tools
@@ -1055,7 +1057,8 @@ This package provides debug information for package kernel-tools.
# of matching the pattern against the symlinks file.
%{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}/iio_event_monitor(\.debug)?|.*%%{_bindir}/iio_generic_buffer(\.debug)?|.*%%{_bindir}/lsiio(\.debug)?|XXX' -o kernel-tools-debuginfo.list}
-%endif # with_tools
+# with_tools
+%endif
%if %{with_bpftool}
@@ -1076,9 +1079,11 @@ This package provides debug information for the bpftool package.
%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%%{_sbindir}/bpftool(\.debug)?|XXX' -o bpftool-debuginfo.list}
-%endif # with_bpftool
+# with_bpftool
+%endif
%if %{with_selftests}
+
%package selftests-internal
Summary: Kernel samples and selftests
License: GPLv2
@@ -1086,12 +1091,14 @@ Requires: binutils, bpftool, iproute-tc, nmap-ncat
Requires: kernel-modules-internal = %{version}-%{release}
%description selftests-internal
Kernel sample programs and selftests.
-%{nil}
+
# Note that this pattern only works right to match the .build-id
# symlinks because of the trailing nonmatching alternation and
# the leading .*, because of find-debuginfo.sh's buggy handling
# of matching the pattern against the symlinks file.
%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%%{_libexecdir}/(ksamples|kselftests)/.*|XXX' -o selftests-debuginfo.list}
+
+# with_selftests
%endif
%if %{with_gcov}
@@ -1289,6 +1296,7 @@ Cortex-A15 devices with LPAE and HW virtualisation support
%description zfcpdump-core
The kernel package contains the Linux kernel (vmlinuz) for use by the
zfcpdump infrastructure.
+# with_zfcpdump
%endif
%define variant_summary The Linux kernel compiled with extra debugging enabled
@@ -1813,7 +1821,9 @@ BuildKernel() {
if [ "$KernelExtension" == "gz" ]; then
gzip -f9 $SignImage
fi
+ # signkernel
%endif
+
$CopyKernel $KernelImage \
$RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer
chmod 755 $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer
@@ -1828,7 +1838,7 @@ BuildKernel() {
if [ $DoModules -eq 1 ]; then
# 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} ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT %{?_smp_mflags} modules_install KERNELRELEASE=$KernelVer mod-fw=
+ %{make} %{?_smp_mflags} ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT %{?_smp_mflags} modules_install KERNELRELEASE=$KernelVer mod-fw=
fi
%if %{with_gcov}
@@ -1867,6 +1877,7 @@ BuildKernel() {
mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/extra
mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/internal
mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/updates
+ mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/weak-updates
# CONFIG_KERNEL_HEADER_TEST generates some extra files in the process of
# testing so just delete
find . -name *.h.s -delete
@@ -1887,13 +1898,15 @@ BuildKernel() {
echo "**** GENERATING kernel ABI metadata ****"
gzip -c9 < Module.symvers > $RPM_BUILD_ROOT/boot/symvers-$KernelVer.gz
cp $RPM_BUILD_ROOT/boot/symvers-$KernelVer.gz $RPM_BUILD_ROOT/lib/modules/$KernelVer/symvers.gz
+
%if %{with_kabichk}
echo "**** kABI checking is enabled in kernel SPEC file. ****"
chmod 0755 $RPM_SOURCE_DIR/check-kabi
if [ -e $RPM_SOURCE_DIR/Module.kabi_%{_target_cpu}$Flavour ]; then
cp $RPM_SOURCE_DIR/Module.kabi_%{_target_cpu}$Flavour $RPM_BUILD_ROOT/Module.kabi
$RPM_SOURCE_DIR/check-kabi -k $RPM_BUILD_ROOT/Module.kabi -s Module.symvers || exit 1
- rm $RPM_BUILD_ROOT/Module.kabi # for now, don't keep it around.
+ # for now, don't keep it around.
+ rm $RPM_BUILD_ROOT/Module.kabi
else
echo "**** NOTE: Cannot find reference Module.kabi file. ****"
fi
@@ -1904,7 +1917,8 @@ BuildKernel() {
if [ -e $RPM_SOURCE_DIR/Module.kabi_dup_%{_target_cpu}$Flavour ]; then
cp $RPM_SOURCE_DIR/Module.kabi_dup_%{_target_cpu}$Flavour $RPM_BUILD_ROOT/Module.kabi
$RPM_SOURCE_DIR/check-kabi -k $RPM_BUILD_ROOT/Module.kabi -s Module.symvers || exit 1
- rm $RPM_BUILD_ROOT/Module.kabi # for now, don't keep it around.
+ # for now, don't keep it around.
+ rm $RPM_BUILD_ROOT/Module.kabi
else
echo "**** NOTE: Cannot find DUP reference Module.kabi file. ****"
fi
@@ -1959,6 +1973,7 @@ BuildKernel() {
%endif
# then drop all but the needed Makefiles/Kconfig files
+ rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/Documentation
rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts
rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
cp .config $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
@@ -2095,10 +2110,9 @@ BuildKernel() {
mkdir restore
cp -r lib/modules/$KernelVer/* restore/.
- # don't include anything going into k-m-e in the file lists
+ # don't include anything going into k-m-e and k-m-i in the file lists
rm -rf lib/modules/$KernelVer/{extra,internal}
-
if [ $DoModules -eq 1 ]; then
# Find all the module files and filter them out into the core and
# modules lists. This actually removes anything going into -modules
@@ -2243,28 +2257,34 @@ chmod +x tools/perf/check-headers.sh
%{perf_make} DESTDIR=$RPM_BUILD_ROOT all
%endif
+%global tools_make \
+ %{make} CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags}" V=1
+
%if %{with_tools}
%ifarch %{cpupowerarchs}
# cpupower
# make sure version-gen.sh is executable.
chmod +x tools/power/cpupower/utils/version-gen.sh
-%{make} %{?_smp_mflags} -C tools/power/cpupower CPUFREQ_BENCH=false
+%{tools_make} %{?_smp_mflags} -C tools/power/cpupower CPUFREQ_BENCH=false
%ifarch x86_64
pushd tools/power/cpupower/debug/x86_64
- %{make} %{?_smp_mflags} 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/
- %{make}
+ %{tools_make}
popd
pushd tools/power/x86/turbostat
+ %{tools_make}
+ popd
+ pushd tools/power/x86/intel-speed-select
%{make}
popd
-%endif #turbostat/x86_energy_perf_policy
+%endif
%endif
pushd tools/thermal/tmon/
-%{make}
+%{tools_make}
popd
pushd tools/iio/
%{make}
@@ -2293,7 +2313,7 @@ popd
%if %{with_doc}
# Make the HTML pages.
-make htmldocs || %{doc_build_fail}
+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
@@ -2385,6 +2405,7 @@ docdir=$RPM_BUILD_ROOT%{_datadir}/doc/kernel-doc-%{rpmversion}
mkdir -p $docdir
tar -h -f - --exclude=man --exclude='.*' -c Documentation | tar xf - -C $docdir
+# with_doc
%endif
# We have to do the headers install before the tools install because the
@@ -2427,8 +2448,10 @@ rm -rf $RPM_BUILD_ROOT/usr/tmp-headers
# kabi directory
INSTALL_KABI_PATH=$RPM_BUILD_ROOT/lib/modules/
mkdir -p $INSTALL_KABI_PATH
+
# install kabi releases directories
tar xjvf %{SOURCE300} -C $INSTALL_KABI_PATH
+# with_kernel_abi_whitelists
%endif
%if %{with_perf}
@@ -2478,14 +2501,17 @@ install -m644 %{SOURCE2001} %{buildroot}%{_sysconfdir}/sysconfig/cpupower
%ifarch x86_64
mkdir -p %{buildroot}%{_mandir}/man8
pushd tools/power/x86/x86_energy_perf_policy
- make DESTDIR=%{buildroot} install
+ %{tools_make} DESTDIR=%{buildroot} install
popd
pushd tools/power/x86/turbostat
- make DESTDIR=%{buildroot} install
+ %{tools_make} DESTDIR=%{buildroot} install
+ popd
+ pushd tools/power/x86/intel-speed-select
+ %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude" DESTDIR=%{buildroot} install
popd
-%endif #turbostat/x86_energy_perf_policy
+%endif
pushd tools/thermal/tmon
-make INSTALL_ROOT=%{buildroot} install
+%{tools_make} INSTALL_ROOT=%{buildroot} install
popd
pushd tools/iio
make DESTDIR=%{buildroot} install
@@ -2551,6 +2577,18 @@ find -type f ! -executable -exec install -D -m644 {} %{buildroot}%{_libexecdir}/
popd
%endif
+# We have to do the headers checksum calculation after the tools install because
+# these might end up installing their own set of headers on top of kernel's
+%if %{with_headers}
+# compute a content hash to export as Provides: kernel-headers-checksum
+HEADERS_CHKSUM=$(export LC_ALL=C; find $RPM_BUILD_ROOT/usr/include -type f -name "*.h" \
+ ! -path $RPM_BUILD_ROOT/usr/include/linux/version.h | \
+ sort | xargs cat | sha1sum - | cut -f 1 -d ' ');
+# export the checksum via usr/include/linux/version.h, so the dynamic
+# find-provides can grab the hash to update it accordingly
+echo "#define KERNEL_HEADERS_CHECKSUM \"$HEADERS_CHKSUM\"" >> $RPM_BUILD_ROOT/usr/include/linux/version.h
+%endif
+
###
### clean
###
@@ -2634,6 +2672,10 @@ fi\
#
%define kernel_variant_posttrans() \
%{expand:%%posttrans %{?1:%{1}-}core}\
+if [ -x %{_sbindir}/weak-modules ]\
+then\
+ %{_sbindir}/weak-modules --add-kernel %{KVERREL}%{?1:+%{1}} || exit $?\
+fi\
/bin/kernel-install add %{KVERREL}%{?1:+%{1}} /lib/modules/%{KVERREL}%{?1:+%{1}}/vmlinuz || exit $?\
%{nil}
@@ -2663,6 +2705,10 @@ fi}\
%define kernel_variant_preun() \
%{expand:%%preun %{?1:%{1}-}core}\
/bin/kernel-install remove %{KVERREL}%{?1:+%{1}} /lib/modules/%{KVERREL}%{?1:+%{1}}/vmlinuz || exit $?\
+if [ -x %{_sbindir}/weak-modules ]\
+then\
+ %{_sbindir}/weak-modules --remove-kernel %{KVERREL}%{?1:+%{1}} || exit $?\
+fi\
%{nil}
%kernel_variant_preun
@@ -2744,7 +2790,8 @@ fi
%files -f python3-perf-debuginfo.list -n python3-perf-debuginfo
%endif
-%endif # with_perf
+# with_perf
+%endif
%if %{with_tools}
%files -n kernel-tools
@@ -2764,8 +2811,10 @@ fi
%{_mandir}/man8/x86_energy_perf_policy*
%{_bindir}/turbostat
%{_mandir}/man8/turbostat*
+%{_bindir}/intel-speed-select
+%endif
+# cpupowerarchs
%endif
-%endif # cpupowerarchs
%{_bindir}/tmon
%{_bindir}/iio_event_monitor
%{_bindir}/iio_generic_buffer
@@ -2789,13 +2838,15 @@ fi
%{_libdir}/libcpupower.so
%{_includedir}/cpufreq.h
%endif
-%endif # with_tools
+# with_tools
+%endif
%if %{with_bpftool}
%files -n bpftool
%{_sbindir}/bpftool
%{_sysconfdir}/bash_completion.d/bpftool
%{_mandir}/man8/bpftool-cgroup.8.gz
+%{_mandir}/man8/bpftool-gen.8.gz
%{_mandir}/man8/bpftool-map.8.gz
%{_mandir}/man8/bpftool-prog.8.gz
%{_mandir}/man8/bpftool-perf.8.gz
@@ -2865,7 +2916,13 @@ fi
/lib/modules/%{KVERREL}%{?3:+%{3}}/source\
/lib/modules/%{KVERREL}%{?3:+%{3}}/updates\
/lib/modules/%{KVERREL}%{?3:+%{3}}/bls.conf\
-%{_datadir}/doc/kernel-keys/%{KVERREL}%{?3:+%{3}}\
+/lib/modules/%{KVERREL}%{?3:+%{3}}/weak-updates\
+%{_datadir}/doc/kernel-keys/%{KVERREL}%{?3:+%{3}}/kernel-signing-ca.cer\
+%ifarch s390x ppc64le\
+%if 0%{!?4:1}\
+%{_datadir}/doc/kernel-keys/%{KVERREL}%{?3:+%{3}}/%{signing_key_filename} \
+%endif\
+%endif\
%if %{1}\
/lib/modules/%{KVERREL}%{?3:+%{3}}/vdso\
%endif\
@@ -2913,6 +2970,12 @@ fi
#
#
%changelog
+* Tue Feb 25 2020 Jeremy Cline <jcline@redhat.com> - 5.6.0-0.rc3.git1.1
+- Linux v5.6-rc3-26-g63623fd44972
+
+* Tue Feb 25 2020 Jeremy Cline <jcline@redhat.com>
+- Reenable debugging options.
+
* Mon Feb 24 2020 Jeremy Cline <jcline@redhat.com> - 5.6.0-0.rc3.git0.1
- Linux v5.6-rc3