# - with_grsec_minimal
# - with_grsec_full
#
+# LATEST VERSION CHECKER:
+# # curl -s http://www.kernel.org/kdist/finger_banner
+#
# TODO:
# - benchmark NO_HZ & HZ=1000 vs HZ=300 on i686
-# - add a subpackage (kernel-firmware?) for ~35 firmware files
-# - update or remove tahoe9xx patch2
+# - update or remove tahoe9xx patch2
# - update or remove mpt-fusion patch90
# - update grsec_minimal patch1000:
# fs/proc/base.c:1484: error: 'struct task_struct' has no member named 'uid'
%endif
%define basever 2.6.32
-%define postver .3
+%define postver .58
%define rel 1
%define _enable_debug_packages 0
%define alt_kernel myown
%endif
%else
-%if %{without rescuecd}
%define __alt_kernel %{?with_pax:pax}%{!?with_grsec_full:nogrsecurity}%{!?with_apparmor:noaa}%{?with_pae:pae}
%if "%{__alt_kernel}" != ""
%define alt_kernel %{__alt_kernel}
%endif
-%else
-%define alt_kernel rescuecd
%endif
+
+%if %{with rescuecd}
+%define alt_kernel rescuecd
%endif
# kernel release (used in filesystem and eventually in uname -r)
Source0: http://www.kernel.org/pub/linux/kernel/v2.6/linux-%{basever}.tar.bz2
# Source0-md5: 260551284ac224c3a43c4adac7df4879
%if "%{postver}" != "%{nil}"
-Source1: http://www.kernel.org/pub/linux/kernel/v2.6/patch-%{version}.bz2
-# Source1-md5: 6bd3c5fea1e88bb4d0948ec3688bd8f6
+Source1: http://www.kernel.org/pub/linux/kernel/v2.6/longterm/v%{basever}/patch-%{version}.bz2
+# Source1-md5: a32385ccb645eea5bb33e88adb4af5b8
%endif
Source3: kernel-autoconf.h
# netfilter related stuff mostly based on patch-o-matic-ng
# snapshot 20070806 with some fixes. Some modules
-# were ported to nf_conntrack.
+# were ported to nf_conntrack.
Patch10: kernel-pom-ng-IPV4OPTSSTRIP.patch
Patch11: kernel-pom-ng-ipv4options.patch
# http://zph.bratcheda.org/linux-2.6.26.3-zph.patch
Patch49: kernel-zph.patch
-# based on http://www.linuximq.net/patchs/linux-2.6.29.1-imq-test2.diff
+# http://www.linuximq.net/patchs/linux-2.6.32-imq-test2.diff
Patch50: kernel-imq.patch
# http://www.kernel.org/pub/linux/kernel/people/edward/reiser4/reiser4-for-2.6/reiser4-for-2.6.28.patch.bz2
# Taken from http://download.opensuse.org/factory/repo/src-oss/suse/src/kernel-source-2.6.30-10.3.src.rpm
Patch90: kernel-mpt-fusion.patch
-# based on http://vserver.13thfloor.at/Experimental/patch-2.6.32.2-vs2.3.0.36.28.diff
+# based on http://vserver.13thfloor.at/Experimental/patch-2.6.32.8-vs2.3.0.36.29.1.diff
Patch100: kernel-vserver-2.3.patch
Patch101: kernel-vserver-fixes.patch
# based on http://ftp.leg.uct.ac.za/pub/linux/rip/inittmpfs-2.6.14.diff.gz
Patch7000: kernel-inittmpfs.patch
-# based on http://www.grsecurity.net/~spender/grsecurity-2.1.14-2.6.32.1-200912151746.patch kernel-grsec_full.patch
+# based on http://www.grsecurity.net/~spender/grsecurity-2.1.14-2.6.32.7-201001291848.patch kernel-grsec_full.patch
# NOTE: put raw upstream patches on kernel-grsec_full.patch:GRSECURITY_RAW for reference
# (since upstream deletes older patches)
Patch9999: kernel-grsec_full.patch
%ifarch ppc
BuildRequires: uboot-mkimage
%endif
-AutoReqProv: no
BuildRequires: /sbin/depmod
+##BuildRequires: gcc < 6:4.6
BuildRequires: gcc >= 5:3.2
BuildRequires: xz >= 1:4.999.7
+AutoReqProv: no
# for hostname command
BuildRequires: net-tools
BuildRequires: perl-base
Provides: %{name}(netfilter) = %{netfilter_snap}
Provides: %{name}(vermagic) = %{kernel_release}
Obsoletes: kernel%{_alt_kernel}-isdn-mISDN
+Obsoletes: kernel-firmware
Obsoletes: kernel-misc-acer_acpi
Obsoletes: kernel-misc-fuse
Obsoletes: kernel-misc-uvc
# Now we have to check MAC system integration. Grsecurity (full) uses PAX_HAVE_ACL_FLAGS
# setting (direct acces). grsec_minimal probably have no idea about PaX so we probably
# could use PAX_NO_ACL_FLAGS, but for testing the hooks setting will be used
- # PAX_HOOK_ACL_FLAGS.
+ # PAX_HOOK_ACL_FLAGS.
%if %{with grsec_full}
# Hardening grsec options if with pax
ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd
%{?alt_kernel:ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd%{_alt_kernel}}
+if [ -x /sbin/update-grub ]; then
+ /sbin/update-grub >/dev/null 2>&1
+fi
if [ -x /sbin/new-kernel-pkg ]; then
/sbin/new-kernel-pkg --initrdfile=%{initrd_dir}/initrd-%{kernel_release}.gz --install %{kernel_release} --banner "PLD Linux (%{pld_release})%{?alt_kernel: / %{alt_kernel}}"
-elif [ -x /sbin/rc-boot ]; then
+fi
+if [ -x /sbin/rc-boot ]; then
/sbin/rc-boot 1>&2 || :
fi