%bcond_without imq # imq support
%bcond_without ipv6 # ipv6 support
-%bcond_with vserver # support for VServer
+%bcond_without aufs # aufs4 support
+
+%bcond_without vserver # support for VServer
+
+%bcond_with rt # real-time kernel (CONFIG_PREEMPT_RT) for low latencies
%bcond_with vanilla # don't include any patches
%bcond_with rescuecd # build kernel for our rescue
%define have_pcmcia 0
%endif
-%define rel 2
-%define basever 4.8
-%define postver .1
+%define rel 1
+%define basever 4.9
+%define postver .79
# 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)
%if %{without pae}
%define alt_kernel nopae
%endif
+%if %{with rt}
+%define alt_kernel rt
+%endif
# kernel release (used in filesystem and eventually in uname -r)
# modules will be looked from /lib/modules/%{kernel_release}
License: GPL v2
Group: Base/Kernel
Source0: https://www.kernel.org/pub/linux/kernel/v4.x/linux-%{basever}.tar.xz
-# Source0-md5: c1af0afbd3df35c1ccdc7a5118cd2d07
+# Source0-md5: 0a68ef3615c64bd5ee54a3320e46667d
%if "%{postver}" != ".0"
Patch0: https://www.kernel.org/pub/linux/kernel/v4.x/patch-%{version}.xz
-# Patch0-md5: 349734be5387f1605074515ad7207627
+# Patch0-md5: 9985e0b21eee7ff8d364308172c50ead
%endif
Source1: kernel.sysconfig
Source41: kernel-patches.config
Source43: kernel-vserver.config
+Source44: kernel-rt.config
Source55: kernel-imq.config
# http://patches.aircrack-ng.org/hostap-kernel-2.6.18.patch
Patch85: kernel-hostap.patch
-%define vserver_patch 3.18.5-vs2.3.7.3
-# http://vserver.13thfloor.at/Experimental/patch-3.18.5-vs2.3.7.3.diff
+%define vserver_patch 4.9.76-vs2.3.9.6
+# http://vserver.13thfloor.at/Experimental/patch-4.9.78-vs2.3.9.6.diff
# note there are additional patches from above url:
# - *fix* are real fixes (we want these)
# - *feat* are new features/tests (we don't want these)
# Patch creation:
# git clone git://github.com/sfjro/aufs4-standalone.git
# cd aufs4-standalone
-# git checkout -b aufs4.8 origin/aufs4.8
+# git checkout -b aufs4.9 origin/aufs4.9
# cat aufs4-kbuild.patch aufs4-base.patch aufs4-mmap.patch aufs4-standalone.patch > ~/rpm/packages/kernel/kernel-aufs4.patch
# rm -rf linux && mkdir linux
# cp -a Documentation fs include linux
-# diff -urN /usr/share/empty linux >> ~/rpm/packages/kernel/kernel-aufs4.patch
-# drop hunk at the end of patch (hunk is patching include/linux/Kbuild with single line change)
+# 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
#
Patch145: kernel-aufs4.patch
# Show normal colors in menuconfig with ncurses ABI 6
Patch250: kernel-fix_256colors_menuconfig.patch
+# https://rt.wiki.kernel.org/
+# http://www.kernel.org/pub/linux/kernel/projects/rt/4.9/patch-4.9.68-rt60.patch.xz
+Patch500: kernel-rt.patch
+
Patch2000: kernel-small_fixes.patch
Patch2001: kernel-pwc-uncompress.patch
Patch2003: kernel-regressions.patch
BuildRequires: elftoaout
%endif
BuildRequires: elfutils-devel
-BuildRequires: gcc >= 5:3.2
+BuildRequires: gcc >= 6:7.2.0-6
BuildRequires: hostname
BuildRequires: kmod >= 12-2
BuildRequires: openssl-devel
Conflicts: rpm < 4.4.2-0.2
Conflicts: udev < 1:081
Conflicts: util-linux < 2.10o
-Conflicts: util-vserver < 0.30.216
+Conflicts: util-vserver < 0.30.216-1.pre3126.3
Conflicts: xfsprogs < 2.6.0
%if %{without pae}
ExclusiveArch: i686 pentium3 pentium4 athlon
%{?with_fbcondecor:Fbsplash/fbcondecor - enabled }\
%{?with_nfsroot:Root on NFS - enabled}\
%{?with_vserver:Linux-VServer - %{vserver_patch}}\
+%{?with_rt:CONFIG_PREEMPT_RT - enabled}\
%define Features %(echo "%{__features}" | sed '/^$/d')
%patch101 -p1
%endif
-# aufs3
+%if %{with aufs}
+# aufs4
%patch145 -p1
%if %{with vserver}
%patch146 -p1
%endif
+%endif
%if %{with rescuecd}
%patch7000 -p1
%endif
+%if %{with rt}
+%patch500 -p1
+rm -f localversion-rt
+%endif
+
# apparmor
%patch5000 -p1
RescueConfig() {
set -x
- cat <<-EOCONFIG > $1
# CONFIG_SOUND is not set
# CONFIG_AUDIT is not set
# CONFIG_TR is not set
%endif
%if %{with vserver}
%{SOURCE43} \
+%endif
+%if %{with rt}
+ %{SOURCE44} \
%endif
%{SOURCE41} %{?0:patches} \
%endif