diff options
Diffstat (limited to 'kernel.spec')
-rw-r--r-- | kernel.spec | 116 |
1 files changed, 91 insertions, 25 deletions
diff --git a/kernel.spec b/kernel.spec index 71e7d91a4..7148e933e 100644 --- a/kernel.spec +++ b/kernel.spec @@ -73,7 +73,7 @@ Summary: The Linux kernel # For non-released -rc kernels, this will be appended after the rcX and # gitX tags, so a 3 here would become part of release "0.rcX.gitX.3" # -%global baserelease 2 +%global baserelease 3 %global fedora_build %{baserelease} # base_sublevel is the kernel version we're starting with and patching @@ -130,6 +130,8 @@ Summary: The Linux kernel %define with_debuginfo %{?_without_debuginfo: 0} %{?!_without_debuginfo: 1} # Want to build a the vsdo directories installed %define with_vdso_install %{?_without_vdso_install: 0} %{?!_without_vdso_install: 1} +# kernel-zfcpdump (s390 specific kernel for zfcpdump) +%define with_zfcpdump %{?_without_zfcpdump: 0} %{?!_without_zfcpdump: 1} # kernel-abi-whitelists %define with_kernel_abi_whitelists %{?_without_kernel_abi_whitelists: 0} %{?!_without_kernel_abi_whitelists: 1} # internal samples and selftests @@ -182,7 +184,6 @@ Summary: The Linux kernel # Want to build a vanilla kernel build without any non-upstream patches? %define with_vanilla %{?_with_vanilla: 1} %{?!_with_vanilla: 0} - # 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'. @@ -327,6 +328,7 @@ Summary: The Linux kernel %define use_vdso 1 %endif + %ifnarch noarch %define with_kernel_abi_whitelists 0 %endif @@ -361,6 +363,16 @@ Summary: The Linux kernel %define with_sparse 0 %endif +# zfcpdump mechanism is s390 only +%ifnarch s390x +%define with_zfcpdump 0 +%endif + +%if 0%{?fedora} +# This is not for Fedora +%define with_zfcpdump 0 +%endif + # Per-arch tweaks %ifarch i686 @@ -467,7 +479,6 @@ Summary: The Linux kernel %define _use_vdso 0 %endif - # # Packages that need to be installed before the kernel is, because the %%post # scripts use them. @@ -501,7 +512,7 @@ Requires: kernel-modules-uname-r = %{KVERREL}%{?variant} BuildRequires: kmod, patch, bash, tar, git-core BuildRequires: bzip2, xz, findutils, gzip, m4, perl-interpreter, perl-Carp, perl-devel, perl-generators, make, diffutils, gawk BuildRequires: gcc, binutils, redhat-rpm-config, hmaccalc, bison, flex -BuildRequires: net-tools, hostname, bc, elfutils-devel +BuildRequires: net-tools, hostname, bc, elfutils-devel, dwarves %if 0%{?fedora} # Used to mangle unversioned shebangs to be Python 3 BuildRequires: /usr/bin/pathfix.py @@ -530,6 +541,7 @@ BuildConflicts: rhbuildsys(DiskFree) < 500Mb %if %{with_debuginfo} BuildRequires: rpm-build, elfutils BuildConflicts: rpm < 4.13.0.1-19 +BuildConflicts: dwarves < 1.13 # Most of these should be enabled after more investigation %undefine _include_minidebuginfo %undefine _find_debuginfo_dwz_opts @@ -549,9 +561,12 @@ BuildRequires: kabi-dw %if %{signkernel}%{signmodules} BuildRequires: openssl openssl-devel %if %{signkernel} +%ifarch x86_64 aarch64 +BuildRequires: nss-tools BuildRequires: pesign >= 0.10-4 %endif %endif +%endif %if %{with_cross} BuildRequires: binutils-%{_build_arch}-linux-gnu, gcc-%{_build_arch}-linux-gnu @@ -678,6 +693,8 @@ Patch322: mfd-max77620-Do-not-allocate-IRQs-upfront.patch Patch323: gpio-max77620-Use-correct-unit-for-debounce-times.patch # https://www.spinics.net/lists/linux-tegra/msg44216.html Patch324: arm64-tegra186-enable-USB-on-Jetson-TX2.patch +# https://patchwork.kernel.org/patch/11224177/ +Patch325: arm64-usb-host-xhci-tegra-set-MODULE_FIRMWARE-for-tegra186.patch # https://www.spinics.net/lists/arm-kernel/msg761152.html Patch342: efi-libstub-arm-account-for-firmware-reserved-memory-at-the-base-of-RAM.patch @@ -739,6 +756,7 @@ AutoReq: no\ AutoProv: yes\ %{nil} + %package doc Summary: Various documentation bits found in the kernel source Group: Documentation @@ -750,6 +768,7 @@ device drivers shipped with it are documented in these files. You'll want to install this package if you need a reference to the options that can be passed to Linux kernel modules at load time. + %package headers Summary: Header files for the Linux kernel for use by glibc Obsoletes: glibc-kernheaders < 3.0-46 @@ -825,7 +844,6 @@ The kabidw-base package contains data describing the current ABI of the Red Hat Enterprise Linux kernel, suitable for the kabi-dw tool. %endif - # # This macro creates a kernel-<subpackage>-debuginfo package. # %%kernel_debuginfo_package <subpackage> @@ -983,6 +1001,14 @@ This package includes a version of the Linux kernel with support for Cortex-A15 devices with LPAE and HW virtualisation support %endif +%if %{with_zfcpdump} +%define variant_summary The Linux kernel compiled for zfcpdump usage +%kernel_variant_package zfcpdump +%description zfcpdump-core +The kernel package contains the Linux kernel (vmlinuz) for use by the +zfcpdump infrastructure. +%endif # with_zfcpdump + %define variant_summary The Linux kernel compiled with extra debugging enabled %kernel_variant_package debug %description debug-core @@ -1033,6 +1059,42 @@ if [ "%{patches}" != "%%{patches}" ] ; then done fi 2>/dev/null +patch_command='patch -p1 -F1 -s' +ApplyPatch() +{ + local patch=$1 + shift + if [ ! -f $RPM_SOURCE_DIR/$patch ]; then + exit 1 + fi + if ! grep -E "^Patch[0-9]+: $patch\$" %{_specdir}/${RPM_PACKAGE_NAME%%%%%{?variant}}.spec ; then + if [ "${patch:0:8}" != "patch-5." ] ; then + echo "ERROR: Patch $patch not listed as a source patch in specfile" + exit 1 + fi + fi 2>/dev/null + case "$patch" in + *.bz2) bunzip2 < "$RPM_SOURCE_DIR/$patch" | $patch_command ${1+"$@"} ;; + *.gz) gunzip < "$RPM_SOURCE_DIR/$patch" | $patch_command ${1+"$@"} ;; + *.xz) unxz < "$RPM_SOURCE_DIR/$patch" | $patch_command ${1+"$@"} ;; + *) $patch_command ${1+"$@"} < "$RPM_SOURCE_DIR/$patch" ;; + esac +} + +# don't apply patch if it's empty +ApplyOptionalPatch() +{ + local patch=$1 + shift + if [ ! -f $RPM_SOURCE_DIR/$patch ]; then + exit 1 + fi + local C=$(wc -l $RPM_SOURCE_DIR/$patch | awk '{print $1}') + if [ "$C" -gt 9 ]; then + ApplyPatch $patch ${1+"$@"} + fi +} + # First we unpack the kernel tarball. # If this isn't the first make prep, we use links to the existing clean tarball # which speeds things up quite a bit. @@ -1219,8 +1281,6 @@ pathfix.py -i "%{__python3} %{py3_shbang_opts}" -p -n \ scripts/show_delta \ scripts/diffconfig \ scripts/bloat-o-meter \ - scripts/tracing/draw_functrace.py \ - scripts/spdxcheck.py \ tools/perf/tests/attr.py \ tools/perf/scripts/python/stat-cpi.py \ tools/perf/scripts/python/sched-migration.py \ @@ -1293,7 +1353,7 @@ OPTS="" %endif cd .. -# End of Configs stuff +# # End of Configs stuff # get rid of unwanted files resulting from patch fuzz find . \( -name "*.orig" -o -name "*~" \) -delete >/dev/null @@ -1349,6 +1409,9 @@ BuildKernel() { InstallName=${5:-vmlinuz} DoModules=1 + if [ "$Flavour" = "zfcpdump" ]; then + DoModules=0 + fi # Pick the right config file for the kernel we're building Config=kernel-%{version}-%{_target_cpu}${Flavour:+-${Flavour}}.config @@ -1433,7 +1496,6 @@ BuildKernel() { cp arch/$Arch/boot/zImage.stub $RPM_BUILD_ROOT/lib/modules/$KernelVer/zImage.stub-$KernelVer || : fi - %if %{signkernel} if [ "$KernelImage" = vmlinux ]; then # We can't strip and sign $KernelImage in place, because @@ -1491,7 +1553,6 @@ BuildKernel() { sha512hmac $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer | sed -e "s,$RPM_BUILD_ROOT,," > $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 # 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 @@ -1515,6 +1576,7 @@ BuildKernel() { $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernel-$KernelVer.conf echo /etc/ld.so.conf.d/kernel-$KernelVer.conf >> ../kernel${Flavour:+-${Flavour}}-ldsoconf.list fi + rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/vdso/.build-id fi @@ -1627,18 +1689,10 @@ BuildKernel() { rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include cp .config $RPM_BUILD_ROOT/lib/modules/$KernelVer/build cp -a scripts $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/tracing + rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/spdxcheck.py if [ -f tools/objtool/objtool ]; then cp -a tools/objtool/objtool $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/tools/objtool/ || : - # these are a few files associated with objtool - cp -a --parents tools/build/Build.include $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ - cp -a --parents tools/build/Build $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ - cp -a --parents tools/build/fixdep.c $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ - cp -a --parents tools/scripts/utilities.mak $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ - # also more than necessary but it's not that many more files - cp -a --parents tools/objtool/* $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ - cp -a --parents tools/lib/str_error_r.c $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ - cp -a --parents tools/lib/string.c $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ - cp -a --parents tools/lib/subcmd/* $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ fi if [ -d arch/$Arch/scripts ]; then cp -a arch/$Arch/scripts $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/%{_arch} || : @@ -1674,7 +1728,7 @@ BuildKernel() { %endif cp -a include $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include -%ifarch %{ix86} x86_64 +%ifarch i686 x86_64 # files for 'make prepare' to succeed with kernel-devel cp -a --parents arch/x86/entry/syscalls/syscall_32.tbl $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ cp -a --parents arch/x86/entry/syscalls/syscalltbl.sh $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ @@ -1685,9 +1739,7 @@ BuildKernel() { cp -a --parents arch/x86/tools/relocs.c $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ cp -a --parents arch/x86/tools/relocs_common.c $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ cp -a --parents arch/x86/tools/relocs.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ - # Yes this is more includes than we probably need. Feel free to sort out - # dependencies if you so choose. - cp -a --parents tools/include/* $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ + cp -a --parents tools/include/tools/le_byteshift.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ cp -a --parents arch/x86/purgatory/purgatory.c $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ cp -a --parents arch/x86/purgatory/stack.S $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ cp -a --parents arch/x86/purgatory/setup-x86_64.S $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/ @@ -1898,6 +1950,10 @@ cd linux-%{KVERREL} BuildKernel %make_target %kernel_image %{_use_vdso} debug %endif +%if %{with_zfcpdump} +BuildKernel %make_target %kernel_image %{_use_vdso} zfcpdump +%endif + %if %{with_pae} BuildKernel %make_target %kernel_image %{use_vdso} lpae %endif @@ -1934,6 +1990,8 @@ find Documentation -type d | xargs chmod u+w # # We have to do all of those things _after_ find-debuginfo runs, otherwise # that will strip the signature off of the modules. +# +# Don't sign modules for the zfcpdump flavour as it is monolithic. %define __modsign_install_post \ if [ "%{signmodules}" -eq "1" ]; then \ @@ -2154,7 +2212,6 @@ fi\ /sbin/depmod -a %{KVERREL}%{?1:+%{1}}\ %{nil} - # # This macro defines a %%post script for a kernel*-modules package. # It also defines a %%postun script that does the same thing. @@ -2216,6 +2273,11 @@ fi}\ %kernel_variant_preun debug %kernel_variant_post -v debug +%if %{with_zfcpdump} +%kernel_variant_preun zfcpdump +%kernel_variant_post -v zfcpdump +%endif + if [ -x /sbin/ldconfig ] then /sbin/ldconfig -X || exit $? @@ -2338,6 +2400,7 @@ fi %kernel_variant_files %{_use_vdso} %{with_up} %kernel_variant_files %{_use_vdso} %{with_debug} debug %kernel_variant_files %{use_vdso} %{with_pae} lpae +%kernel_variant_files %{_use_vdso} %{with_zfcpdump} zfcpdump %define kernel_variant_ipaclones(k:) \ %if %{1}\ @@ -2357,6 +2420,9 @@ fi # # %changelog +* Fri Nov 01 2019 Laura Abbott <labbott@redhat.com> - 5.4.0-0.rc5.git1.3 +- bump and build again + * Thu Oct 31 2019 Laura Abbott <labbott@redhat.com> - 5.4.0-0.rc5.git1.2 - bump and build to fix broken weak-updates |