%bcond_without ipv6 # ipv6 support
%bcond_without aufs # aufs4 support
-%bcond_without apparmor # UBUNTU SAUCE apparmor patches
%bcond_with vserver # support for VServer
%endif
%define rel 1
-%define basever 4.16
-%define postver .1
+%define basever 5.2
+%define postver .0
# define this to '-%{basever}' for longterm branch
%define versuffix %{nil}
%define localversion %{rel}
%define kernel_release %{version}%{?alt_kernel:.%{alt_kernel}}-%{localversion}
+%define kmod_ver 26-2
+
Summary: The Linux kernel (the core of the Linux operating system)
Summary(de.UTF-8): Der Linux-Kernel (Kern des Linux-Betriebssystems)
Summary(et.UTF-8): Linuxi kernel (ehk operatsioonisüsteemi tuum)
Epoch: 3
License: GPL v2
Group: Base/Kernel
-Source0: https://www.kernel.org/pub/linux/kernel/v4.x/linux-%{basever}.tar.xz
-# Source0-md5: 1357fb4ee7c288fdeac5d4e0048f5c18
+Source0: https://www.kernel.org/pub/linux/kernel/v5.x/linux-%{basever}.tar.xz
+# Source0-md5: ddf994de00d7b18395886dd9b30b9262
%if "%{postver}" != ".0"
-Patch0: https://www.kernel.org/pub/linux/kernel/v4.x/patch-%{version}.xz
-# Patch0-md5: bade764e616e8283b6a620f268337651
+Patch0: https://www.kernel.org/pub/linux/kernel/v5.x/patch-%{version}.xz
+# Patch0-md5: aed4686410e23561f67f5c512d0a6245
%endif
Source1: kernel.sysconfig
Patch100: kernel-vserver-2.3.patch
Patch101: kernel-vserver-fixes.patch
-# git://github.com/sfjro/aufs4-standalone.git, read README
+# git://github.com/sfjro/aufs5-standalone.git, read README
# Patch creation:
-# git clone git://github.com/sfjro/aufs4-standalone.git
-# cd aufs4-standalone
-# git checkout -b aufs4.14 origin/aufs4.14
-# cat aufs4-kbuild.patch aufs4-base.patch aufs4-mmap.patch aufs4-standalone.patch > ~/rpm/packages/kernel/kernel-aufs4.patch
+# git clone git://github.com/sfjro/aufs5-standalone.git
+# cd aufs5-standalone
+# git checkout -b aufs5.2 origin/aufs5.2
+# cat aufs5-kbuild.patch aufs5-base.patch aufs5-mmap.patch aufs5-standalone.patch > ~/rpm/packages/kernel/kernel-aufs5.patch
# rm -rf linux && mkdir linux; cp -a Documentation fs include linux
-# diff -urN /usr/share/empty linux | filterdiff -x linux/include/uapi/linux/Kbuild >> ~/rpm/packages/kernel/kernel-aufs4.patch
-# cat aufs4-loopback.patch >> ~/rpm/packages/kernel/kernel-aufs4.patch
+# diff -urN /usr/share/empty linux | filterdiff -x linux/include/uapi/linux/Kbuild >> ~/rpm/packages/kernel/kernel-aufs5.patch
+# cat aufs5-loopback.patch >> ~/rpm/packages/kernel/kernel-aufs5.patch
#
-Patch145: kernel-aufs4.patch
-Patch146: kernel-aufs4+vserver.patch
+Patch145: kernel-aufs5.patch
+Patch146: kernel-aufs+vserver.patch
# Show normal colors in menuconfig with ncurses ABI 6
Patch250: kernel-fix_256colors_menuconfig.patch
Patch2000: kernel-small_fixes.patch
Patch2001: kernel-pwc-uncompress.patch
Patch2003: kernel-regressions.patch
-
-# https://gitlab.com/apparmor/apparmor/tree/master/kernel-patches/v4.15
-Patch5001: 0001-apparmor-add-base-infastructure-for-socket-mediation.patch
-Patch5002: 0002-apparmor-af_unix-mediation.patch
+Patch2004: xfs-reclaim-hack.patch
# for rescuecd
# based on ftp://ftp.leg.uct.ac.za/pub/linux/rip/tmpfs_root-2.6.30.diff.gz
BuildRequires: /sbin/depmod
BuildRequires: bc
BuildRequires: binutils >= 3:2.18
+BuildRequires: bison
%ifarch sparc sparc64
BuildRequires: elftoaout
%endif
BuildRequires: elfutils-devel
+BuildRequires: flex
BuildRequires: gcc >= 6:7.2.0-6
+BuildRequires: gcc-c++
BuildRequires: gcc-plugin-devel
BuildRequires: hostname
-BuildRequires: kmod >= 12-2
+BuildRequires: kmod >= %{kmod_ver}
+BuildRequires: libstdc++-devel
BuildRequires: openssl-devel
BuildRequires: perl-base
BuildRequires: rpm-build >= 4.5-24
-BuildRequires: rpmbuild(macros) >= 1.707
+BuildRequires: rpmbuild(macros) >= 1.743
%ifarch ppc
BuildRequires: uboot-mkimage
%endif
BuildRequires: xz >= 1:4.999.7
Requires(post): coreutils
-Requires(post): geninitrd >= 12749
-Requires(post): kmod >= 12-2
+Requires(post): geninitrd >= 12757-8
+Requires(post): kmod >= %{kmod_ver}
Requires: /sbin/depmod
Requires: coreutils
-Requires: geninitrd >= 12749
-Requires: kmod >= 12-2
+Requires: geninitrd >= 12757-8
+Requires: kmod >= %{kmod_ver}
%if %{with pae}
%ifarch i686 athlon pentium3 pentium4
Requires: cpuinfo(pae)
rm -f localversion-rt
%endif
-# apparmor
-%if %{with apparmor}
-%patch5001 -p1
-%patch5002 -p1
-%endif
-
%patch250 -p1
%endif # vanilla
%patch2000 -p1
%patch2001 -p1
#%patch2003 -p1
+%patch2004 -p1
# Do not remove this, please!
#%%patch50000 -p1
touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.dep
%endif
-# /etc/modrobe.d
-install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{kernel_release}
+# /etc/depmod.d /etc/modrobe.d
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/{depmod.d,modprobe.d}/%{kernel_release}
install -d $RPM_BUILD_ROOT/etc/sysconfig
install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/kernel
/lib/modules/%{kernel_release}/kernel/security
/lib/modules/%{kernel_release}/kernel/virt
+%dir %{_sysconfdir}/depmod.d/%{kernel_release}
%dir %{_sysconfdir}/modprobe.d/%{kernel_release}
# provided by build
%{_kernelsrcdir}/kernel/bounds.c
%{_kernelsrcdir}/scripts/basic/*.c
%attr(755,root,root) %{_kernelsrcdir}/scripts/kconfig/*.sh
-%{_kernelsrcdir}/scripts/kconfig/*.in
%{_kernelsrcdir}/scripts/kconfig/*.pl
%{_kernelsrcdir}/scripts/kconfig/*.glade
%{_kernelsrcdir}/scripts/kconfig/*.cc
%{_kernelsrcdir}/scripts/kconfig/[c-k]*.c
%{_kernelsrcdir}/scripts/kconfig/[c-k]*.h
%{_kernelsrcdir}/scripts/kconfig/l*.h
-%{_kernelsrcdir}/scripts/kconfig/[m-u]*.c
-%{_kernelsrcdir}/scripts/kconfig/[m-u]*.h
+%{_kernelsrcdir}/scripts/kconfig/[m-o]*.c
+%{_kernelsrcdir}/scripts/kconfig/[m-o]*.h
+%{_kernelsrcdir}/scripts/kconfig/preprocess.c
+%{_kernelsrcdir}/scripts/kconfig/[q-u]*.c
+%{_kernelsrcdir}/scripts/kconfig/[q-u]*.h
%{_kernelsrcdir}/scripts/kconfig/lxdialog
%{_kernelsrcdir}/scripts/mod/*.c
%{_kernelsrcdir}/scripts/mod/modpost.h
%{_kernelsrcdir}/scripts/mkmakefile
%{_kernelsrcdir}/scripts/module-common.lds
%attr(755,root,root) %{_kernelsrcdir}/scripts/setlocalversion
+%{_kernelsrcdir}/scripts/subarch.include
%{_kernelsrcdir}/scripts/*.c
%{_kernelsrcdir}/scripts/*.h
%attr(755,root,root) %{_kernelsrcdir}/scripts/*.sh
%{_kernelsrcdir}/certs
%{_kernelsrcdir}/crypto
%{_kernelsrcdir}/drivers
-%{_kernelsrcdir}/firmware
%{_kernelsrcdir}/fs
%{_kernelsrcdir}/init
%{_kernelsrcdir}/ipc
%exclude %{_kernelsrcdir}/scripts/mod
%exclude %{_kernelsrcdir}/scripts/module-common.lds
%exclude %{_kernelsrcdir}/scripts/setlocalversion
+%exclude %{_kernelsrcdir}/scripts/subarch.include
%exclude %{_kernelsrcdir}/scripts/*.c
%exclude %{_kernelsrcdir}/scripts/*.h
%exclude %{_kernelsrcdir}/scripts/*.sh