%endif
%define rel 1
-%define basever 5.15
-%define postver .3
+%define basever 6.1
+%define postver .23
# define this to '-%{basever}' for longterm branch
-%define versuffix %{nil}
+%define versuffix -%{basever}
# __alt_kernel is list of features, empty string if none set
# _alt kernel is defined as: %{nil}%{?alt_kernel:-%{?alt_kernel}} (defined in rpm.macros)
Epoch: 3
License: GPL v2
Group: Base/Kernel
-Source0: https://www.kernel.org/pub/linux/kernel/v5.x/linux-%{basever}.tar.xz
-# Source0-md5: 071d49ff4e020d58c04f9f3f76d3b594
+Source0: https://www.kernel.org/pub/linux/kernel/v6.x/linux-%{basever}.tar.xz
+# Source0-md5: 475320de08f16c9fa486fc4edfe98b30
%if "%{postver}" != ".0"
-Patch0: https://www.kernel.org/pub/linux/kernel/v5.x/patch-%{version}.xz
-# Patch0-md5: a8e84cda01b70e193fa11b7e992439f2
+Patch0: https://www.kernel.org/pub/linux/kernel/v6.x/patch-%{version}.xz
+# Patch0-md5: 9b11dcd6b46a58f455dd25867a3f5e06
%endif
Source1: kernel.sysconfig
Source23: kernel-alpha.config
Source24: kernel-powerpc.config
Source25: kernel-ia64.config
+Source26: kernel-arm.config
+Source27: kernel-arm64.config
Source41: kernel-patches.config
Source43: kernel-vserver.config
Source58: kernel-inittmpfs.config
+Patch2: android-enable-building-binder-as-module.patch
# http://dev.gentoo.org/~spock/projects/fbcondecor/archive/fbcondecor-0.9.4-2.6.25-rc6.patch
Patch3: kernel-fbcondecor.patch
Patch6: linux-wistron-nx.patch
# http://ftp.linux-vserver.org/pub/people/dhozac/p/k/delta-owner-xid-feat02.diff
Patch37: kernel-owner-xid.patch
-# based on kernel-2.6.25-layer7-2.20.patch from
-# http://switch.dl.sourceforge.net/sourceforge/l7-filter/netfilter-layer7-v2.20.tar.gz
-Patch40: kernel-layer7.patch
-
### End netfilter
# http://www.linuximq.net
Patch101: kernel-vserver-fixes.patch
# see update-source.sh
-Patch145: kernel-aufs5.patch
+Patch145: kernel-aufs.patch
Patch146: kernel-aufs+vserver.patch
# Show normal colors in menuconfig with ncurses ABI 6
Patch2000: kernel-small_fixes.patch
Patch2001: kernel-pwc-uncompress.patch
Patch2003: kernel-regressions.patch
-Patch2004: Revert-ath-add-support-for-special-0x0-regulatory-domain.patch
# for rescuecd
# based on ftp://ftp.leg.uct.ac.za/pub/linux/rip/tmpfs_root-2.6.30.diff.gz
Patch7000: kernel-inittmpfs.patch
# ARM only
-Patch8000: rpi-wm8804.patch
+Patch8000: rpi-sound.patch
Patch8001: kernel-pinebook-pro.patch
Patch8002: atheros-disallow-retrain-nongen1-pcie.patch
+Patch8003: odroid-n2-fan.patch
# Do not remove this line, please. It is easier for me to uncomment two lines, then patch
# kernel.spec every time.
URL: https://www.kernel.org/
AutoReqProv: no
BuildRequires: /sbin/depmod
-BuildRequires: bc
-BuildRequires: binutils >= 3:2.18
-BuildRequires: bison
+BuildRequires: bc >= 1.06.95
+BuildRequires: binutils >= 3:2.23
+BuildRequires: bison >= 2.0
%ifarch sparc sparc64
BuildRequires: elftoaout
%endif
BuildRequires: elfutils-devel
-BuildRequires: flex
+BuildRequires: flex >= 2.5.35
BuildRequires: gcc >= 6:7.2.0-6
BuildRequires: gcc-c++
BuildRequires: gcc-plugin-devel
BuildRequires: hostname
BuildRequires: kmod >= %{kmod_ver}
BuildRequires: libstdc++-devel
-BuildRequires: openssl-devel
-BuildRequires: openssl-tools
-BuildRequires: perl-base
+BuildRequires: make >= 1:3.81
+BuildRequires: openssl-devel >= 1.0.0
+BuildRequires: openssl-tools >= 1.0.0
+BuildRequires: perl-base >= 5
BuildRequires: rpm-build >= 4.5-24
-BuildRequires: rpmbuild(macros) >= 1.752
+BuildRequires: rpmbuild(macros) >= 2.019
BuildRequires: tar >= 1:1.22
%ifarch ppc
BuildRequires: uboot-mkimage
%endif
BuildRequires: xz >= 1:4.999.7
+BuildConflicts: dwarves < 1.16
Requires(post): coreutils
Requires(post): geninitrd >= 12787-6
Requires(post): kmod >= %{kmod_ver}
Requires: %{name}-headers = %{epoch}:%{version}-%{release}
Requires: elfutils-devel
Requires: make
-Conflicts: rpmbuild(macros) < 1.704
+Conflicts: rpmbuild(macros) < 2.019
AutoReqProv: no
%description module-build
%endif
%if %{without vanilla}
+%patch2 -p1
%if %{with fbcondecor}
%patch3 -p1
%patch37 -p1
%endif
-# kernel-layer7.patch
-%patch40 -p1
-
##
# end of netfilter
%patch8000 -p1
%patch8001 -p1
%patch8002 -p1
+%patch8003 -p1
%endif
%if %{with rt}
%patch2000 -p1
%patch2001 -p1
#%patch2003 -p1
-%patch2004 -p1
# Do not remove this, please!
#%%patch50000 -p1
drivers/staging/greybus/tools/lbtest \
scripts/bloat-o-meter \
scripts/diffconfig \
+ scripts/dtc/dt-extract-compatibles \
scripts/jobserver-exec \
scripts/show_delta \
tools/hv/vmbus_testing \
tools/kvm/kvm_stat/kvm_stat \
- tools/testing/selftests/exec/binfmt_script
+ tools/testing/selftests/exec/binfmt_script.py
find -name '*.pl' -print0 | \
xargs -0 %{__sed} -i -e '1s,/usr/bin/env perl,%{__perl},' \
%{__sed} -i -e '1s,/usr/bin/env bash,%{__bash},' \
tools/testing/selftests/powerpc/security/mitigation-patching.sh \
- scripts/config
+ scripts/config \
+ scripts/check-local-export
%build
install -d %{objdir}
%ifarch x32
CONFIG_BPF_PRELOAD=n
%endif
+%if %{_ver_ge %(rpm -q --qf='%%{VERSION}' gcc) 12}
+ CONFIG_INIT_STACK_ALL_ZERO=y
+ CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL=n
+%else
+ CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL=y
+%endif
EOCONFIG
%if %{with rescuecd}
%{__awk} %{?debug:-v dieOnError=1} -v infile=%{objdir}/%{defconfig} -f %{SOURCE8} %{objdir}/.config
+%{__make} \
+ TARGETOBJ=%{targetobj} \
+ %{?with_verbose:V=1} \
+ scripts
+
# build kernel
export DTC_FLAGS=-@
+ICECC_EXTRAFILES="${ICECC_EXTRAFILES:+$ICECC_EXTRAFILES:}$(test -d %{objdir}/scripts/gcc-plugins && find %{objdir}/scripts/gcc-plugins -name '*.so' | paste -s -d :)"
%{__make} \
TARGETOBJ=%{targetobj} \
%{?with_verbose:V=1} \
%install
rm -rf $RPM_BUILD_ROOT
-%{__make} %{MakeOpts} -j1 %{!?with_verbose:-s} modules_install \
+%{__make} %{MakeOpts} %{!?with_verbose:-s} modules_install \
-C %{objdir} \
%{?with_verbose:V=1} \
DEPMOD=%{DepMod} \
ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz
ln -sf System.map-%{kernel_release} /boot/System.map
%ifarch %{arm} aarch64
- mv -f /boot/dtb{,.old} 2> /dev/null
+ test -L /boot/dtb.old && rm /boot/dtb.old
+ test ! -e /boot/dtb.old && mv -f /boot/dtb{,.old} 2> /dev/null
ln -sf dtb-%{kernel_release} /boot/dtb
%endif
%if 0%{?alt_kernel:1}
%dir %{_kernelsrcdir}/security
%dir %{_kernelsrcdir}/security/selinux
%{_kernelsrcdir}/security/selinux/include
+%dir %{_kernelsrcdir}/tools
+%{_kernelsrcdir}/tools/include
%dir %{_kernelsrcdir}/usr
%dir %{_kernelsrcdir}/usr/include
%{_kernelsrcdir}/.config
%{_kernelsrcdir}/scripts/kconfig/lxdialog
%{_kernelsrcdir}/scripts/mod/*.c
%{_kernelsrcdir}/scripts/mod/modpost.h
+%attr(755,root,root) %{_kernelsrcdir}/scripts/check-local-export
%attr(755,root,root) %{_kernelsrcdir}/scripts/mkcompile_h
%attr(755,root,root) %{_kernelsrcdir}/scripts/setlocalversion
%{_kernelsrcdir}/scripts/subarch.include
%{_kernelsrcdir}/arch/x86/ia32/[!M]*
%{_kernelsrcdir}/arch/powerpc/kexec
%{_kernelsrcdir}/arch/powerpc/kvm
+%{_kernelsrcdir}/arch/riscv/kvm
%ifarch ppc ppc64
%exclude %{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
%endif
%{_kernelsrcdir}/drivers
%{_kernelsrcdir}/fs
%{_kernelsrcdir}/init
+%{_kernelsrcdir}/io_uring
%{_kernelsrcdir}/ipc
%{_kernelsrcdir}/kernel
%exclude %{_kernelsrcdir}/kernel/bounds.c
%{_kernelsrcdir}/mm
%{_kernelsrcdir}/net
%{_kernelsrcdir}/virt
+%{_kernelsrcdir}/rust
%{_kernelsrcdir}/samples
%{_kernelsrcdir}/scripts/*
%exclude %{_kernelsrcdir}/scripts/Kbuild.include
%exclude %{_kernelsrcdir}/scripts/Makefile*
%exclude %{_kernelsrcdir}/scripts/basic
+%exclude %{_kernelsrcdir}/scripts/check-local-export
%exclude %{_kernelsrcdir}/scripts/kconfig
%exclude %{_kernelsrcdir}/scripts/mkcompile_h
%exclude %{_kernelsrcdir}/scripts/mod
%{_kernelsrcdir}/security
%exclude %{_kernelsrcdir}/security/selinux/include
%{_kernelsrcdir}/tools/*
+%exclude %{_kernelsrcdir}/tools/include
%ifarch %{x8664} x32
%exclude %{_kernelsrcdir}/tools/objtool/fixdep
%exclude %{_kernelsrcdir}/tools/objtool/objtool