%bcond_with pax # build pax and grsecurity (ie. grsecurity && pax)
%bcond_with fbcondecor # build fbcondecor (disable FB_TILEBLITTING and affected fb modules)
-%bcond_with pae # build PAE (HIGHMEM64G) support on uniprocessor
+%bcond_without pae # build PAE (HIGHMEM64G) support on 32bit i686 athlon pentium3 pentium4
%bcond_with nfsroot # build with root on NFS support
%bcond_without imq # imq support
%bcond_without ipv6 # ipv6 support
%bcond_without vserver # support for VServer (enabled by default)
-%bcond_without tuxonice # support for tuxonice (ex-suspend2) (enabled by default)
%bcond_with vanilla # don't include any patches
%bcond_with rescuecd # build kernel for our rescue
%define have_pcmcia 1
%if %{with rescuecd}
-%unglobal with_tuxonice
%unglobal with_grsecurity
%unglobal with_pax
%unglobal with_vserver
%define have_pcmcia 0
%endif
-%define basever 2.6.39
-%define postver .2
%define rel 0.1
+%define basever 3.2
+%define postver .1
-%define _enable_debug_packages 0
+# __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)
+# alt_kernel should be defined if __alt_kernel has non-empty value (for %{?alt_kernel:foo} constructs)
+%define __alt_kernel %{?with_pax:pax}%{!?with_grsecurity:nogrsecurity}
-%define tuxonice_version 3.2
-%define netfilter_snap 20070806
+%if "%{__alt_kernel}" != ""
+%define alt_kernel %{__alt_kernel}
+%endif
-%if %{with myown}
-%if "%{_alt_kernel}" == ""
+# these override whatever name was picked from bconds
+%if %{with myown} && "%{_alt_kernel}" == ""
%define alt_kernel myown
%endif
-%else # not myown:
-%if %{with vanilla}
-%define alt_kernel vanilla
-%else # not vanilla:
%if %{with rescuecd}
%define alt_kernel rescuecd
-%else # not rescuecd:
-%define __alt_kernel %{?with_pax:pax}%{!?with_grsecurity:nogrsecurity}%{?with_pae:pae}
-%if "%{__alt_kernel}" != ""
-%define alt_kernel %{__alt_kernel}
%endif
-%endif # not rescuecd
-%endif # not vanilla
-%endif # not myown
+%if %{with vanilla}
+%define alt_kernel vanilla
+%endif
# kernel release (used in filesystem and eventually in uname -r)
# modules will be looked from /lib/modules/%{kernel_release}
Epoch: 3
License: GPL v2
Group: Base/Kernel
-Source0: http://www.kernel.org/pub/linux/kernel/v2.6/linux-%{basever}.tar.bz2
-# Source0-md5: 1aab7a741abe08d42e8eccf20de61e05
-%if "%{postver}" != "%{nil}"
-Source1: http://www.kernel.org/pub/linux/kernel/v2.6/patch-%{version}.bz2
-# Source1-md5: 6f81e64e790eb7847773eec4f7cbf207
+Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%{basever}.tar.xz
+# Source0-md5: 364066fa18767ec0ae5f4e4abcf9dc51
+%if "%{postver}" != ".0"
+Patch0: http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.bz2
+# Patch0-md5: 31fc34340f11118873463a1d59d47b7f
%endif
Source3: kernel-autoconf.h
Source24: kernel-powerpc.config
Source25: kernel-ia64.config
-Source40: kernel-netfilter.config
Source41: kernel-patches.config
-Source42: kernel-tuxonice.config
Source43: kernel-vserver.config
Source45: kernel-grsec.config
Source57: kernel-wrr.config
Source58: kernel-inittmpfs.config
-Source59: kernel-bzip2-lzma.config
# http://dev.gentoo.org/~spock/projects/fbcondecor/archive/fbcondecor-0.9.4-2.6.25-rc6.patch
Patch3: kernel-fbcondecor.patch
# were ported to nf_conntrack.
Patch10: kernel-pom-ng-IPV4OPTSSTRIP.patch
-Patch11: kernel-pom-ng-ipv4options.patch
Patch16: kernel-pom-ng-mms-conntrack-nat.patch
Patch22: kernel-pom-ng-rsh.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.39-imq-multiqueue-test1.diff.bz2
+# based on http://www.linuximq.net/patchs/patch-imqmq-3.1.diff.bz2
Patch50: kernel-imq.patch
# http://www.kernel.org/pub/linux/kernel/people/edward/reiser4/reiser4-for-2.6/reiser4-for-2.6.35.patch.bz2
# http://fatooh.org/esfq-2.6/sfq-2.6.24.1.tar.bz2
Patch53: kernel-esfq.patch
-# http://memebeam.org/free-software/toshiba_acpi/toshiba_acpi-dev_toshiba_test5-linux_2.6.26.patch
-Patch54: kernel-toshiba_acpi.patch
-
# by Baggins request:
# derived from ftp://ftp.cmf.nrl.navy.mil/pub/chas/linux-atm/vbr/vbr-kernel-diffs
Patch55: kernel-atm-vbr.patch
# http://synce.svn.sourceforge.net/svnroot/synce/trunk/patches/linux-2.6.22-rndis_host-wm5.patch
Patch59: kernel-rndis_host-wm5.patch
-# Project suspend2 renamed to tuxonice
-# http://tuxonice.net/files/current-tuxonice-for-2.6.37.patch_0.bz2
-# NOTE: currently using own diff from tuxonice git tree until official patch is released
-Patch69: kernel-tuxonice.patch
-Patch70: kernel-tuxonice-headers.patch
-
# adds some ids for hostap suported cards and monitor_enable from/for aircrack-ng
# http://patches.aircrack-ng.org/hostap-kernel-2.6.18.patch
Patch85: kernel-hostap.patch
-# http://vserver.13thfloor.at/Experimental/patch-2.6.38.6-vs2.3.0.37-rc15.diff
+# http://vserver.13thfloor.at/Experimental/patch-3.1.1-vs2.3.2.diff
Patch100: kernel-vserver-2.3.patch
Patch101: kernel-vserver-fixes.patch
-# Wake-On-Lan fix for nForce drivers; using http://atlas.et.tudelft.nl/verwei90/nforce2/wol.html
-# Fix verified for that kernel version.
-Patch130: kernel-forcedeth-WON.patch
-
-# http://download.filesystems.org/unionfs/unionfs-2.x/unionfs-2.5.8_for_2.6.38-rc7.diff.gz
+# http://download.filesystems.org/unionfs/unionfs-2.x/unionfs-2.5.10_for_3.1.0-rc4.diff.gz
Patch140: kernel-unionfs.patch
-# http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git, read README
+# git://aufs.git.sourceforge.net/gitroot/aufs/aufs3-standalone.git, read README
# Patch creation:
-# git clone http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git
-# cd aufs2-standalone
-# git checkout -b aufs2.1 origin/aufs2.1
-# cat aufs2-kbuild.patch aufs2-base.patch aufs2-standalone.patch > ~/rpm/packages/kernel/kernel-aufs2.patch
+# git clone git://aufs.git.sourceforge.net/gitroot/aufs/aufs3-standalone.git
+# cd aufs3-standalone
+# git checkout -b aufs3.0 origin/aufs3.0
+# cat aufs3-kbuild.patch aufs3-base.patch aufs3-standalone.patch > ~/rpm/packages/kernel/kernel-aufs3.patch
# mkdir linux
# cp -a Documentation fs include linux
-# diff -urN /usr/share/empty linux >> ~/rpm/packages/kernel/kernel-aufs2.patch
+# diff -urN /usr/share/empty linux >> ~/rpm/packages/kernel/kernel-aufs3.patch
#
-Patch145: kernel-aufs2.patch
+Patch145: kernel-aufs3.patch
Patch146: kernel-aufs2-unionfs.patch
Patch147: kernel-aufs2-no-const-grsec.patch
Patch148: kernel-aufs2-reiser4.patch
# Show normal colors in menuconfig with ncurses ABI 6
Patch250: kernel-fix_256colors_menuconfig.patch
-# The following patch extend the routing functionality in Linux
-# to support static routes (defined by user), new way to use the
-# alternative routes, the reverse path protection (rp_filter),
-# the NAT processing to use correctly the routing when multiple
-# gateways are used.
-# http://www.ssi.bg/~ja/routes-2.6.38-16.diff
-Patch300: kernel-routes.patch
-
# https://patchwork.kernel.org/patch/236261/
Patch400: kernel-virtio-gl-accel.patch
+Patch2000: kernel-small_fixes.patch
Patch2001: kernel-pwc-uncompress.patch
Patch2003: kernel-regressions.patch
-Patch2200: kernel-xfs-delaylog.patch
-
# 0001-AppArmor-compatibility-patch-for-v5-network-controll.patch
# 0002-AppArmor-compatibility-patch-for-v5-interface.patch
# from http://kernel.org/pub/linux/security/apparmor/apparmor-2.6.36-patches.tgz
# based on ftp://ftp.leg.uct.ac.za/pub/linux/rip/tmpfs_root-2.6.30.diff.gz
Patch7000: kernel-inittmpfs.patch
-# based on http://grsecurity.net/~spender/grsecurity-2.2.2-2.6.38.6-201105171931.patch
+# based on http://grsecurity.net/~spender/grsecurity-2.2.2-3.1.1-201111181902.patch
# NOTE: put raw upstream patches on kernel-grsec_full.patch:GRSECURITY_RAW for reference
# (since upstream deletes older patches)
+# NOTE: mirror of old grsecurity patches:
+# https://github.com/slashbeast/grsecurity-scrape/tree/master/test
Patch9999: kernel-grsec_full.patch
Patch10000: kernel-grsec-caps.patch
Patch10001: kernel-grsec-common.patch
BuildRequires: gcc >= 5:3.2
BuildRequires: xz >= 1:4.999.7
AutoReqProv: no
-# for hostname command
-BuildRequires: module-init-tools >= 3.5
-BuildRequires: net-tools
+BuildRequires: hostname
+BuildRequires: virtual(module-tools)
BuildRequires: perl-base
BuildRequires: rpm-build >= 4.5-24
BuildRequires: rpmbuild(macros) >= 1.217
Requires(post): coreutils
Requires(post): geninitrd >= 10000-3
-Requires(post): module-init-tools >= 0.9.9
+Requires(post): virtual(module-tools)
Requires: /sbin/depmod
Requires: coreutils
Requires: geninitrd >= 10000-3
-Requires: module-init-tools >= 0.9.9
+Requires: virtual(module-tools)
+%if %{with pae}
+%ifarch i686 athlon pentium3 pentium4
+Requires: cpuinfo(pae)
+%endif
+%endif
Suggests: keyutils
-Provides: %{name}(netfilter) = %{netfilter_snap}
+Suggests: linux-firmware
+Provides: %{name}(netfilter) = 20070806
Provides: %{name}(vermagic) = %{kernel_release}
+Obsoletes: kernel%{_alt_kernel}-char-lirc-ene0100
+Obsoletes: kernel%{_alt_kernel}-char-lirc-it87
+Obsoletes: kernel%{_alt_kernel}-char-lirc-ite8709
+Obsoletes: kernel%{_alt_kernel}-char-lirc-mceusb
+Obsoletes: kernel%{_alt_kernel}-char-lirc-streamzap
Obsoletes: kernel%{_alt_kernel}-isdn-mISDN
Obsoletes: kernel-firmware
Obsoletes: kernel-misc-acer_acpi
Conflicts: isdn4k-utils < 3.1pre1
Conflicts: jfsutils < 1.1.3
Conflicts: lvm2 < 2.02.40
-Conflicts: module-init-tools < 0.9.10
+Conflicts: module-init-tools < 3.16
Conflicts: nfs-utils < 1.0.5
Conflicts: oprofile < 0.9
Conflicts: ppp < 1:2.4.0
Conflicts: util-linux < 2.10o
Conflicts: util-vserver < 0.30.216
Conflicts: xfsprogs < 2.6.0
-%if %{with pae}
-ExcludeArch: i386 i486 i586
-%else
ExclusiveArch: %{ix86} %{x8664} alpha arm ia64 ppc ppc64 sparc sparc64
-%endif
ExclusiveOS: Linux
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
# No ELF objects there to strip (skips processing 27k files)
%define _noautostrip \\(.*%{_kernelsrcdir}/.*\\|.*/vmlinux.*\\)
%define _noautochrpath .*%{_kernelsrcdir}/.*
+%define _enable_debug_packages 0
%ifarch ia64
%define initrd_dir /boot/efi
%endif
%define MakeOpts %{CrossOpts} HOSTCC="%{__cc}"
-%define __features Netfilter module dated: %{netfilter_snap}\
+%define __features \
%{?with_grsecurity:Grsecurity support - enabled}\
%{?with_pax:PaX support - enabled}\
%{?with_fbcondecor:Fbsplash/fbcondecor - enabled }\
Summary(de.UTF-8): Header Dateien für den Linux-Kernel
Summary(pl.UTF-8): Pliki nagłówkowe jądra Linuksa
Group: Development/Building
-Provides: %{name}-headers(netfilter) = %{netfilter_snap}
+Provides: %{name}-headers(netfilter) = 20070806
AutoReqProv: no
%description headers
Summary(pl.UTF-8): Pliki służące do budowania modułów jądra
Group: Development/Building
Requires: %{name}-headers = %{epoch}:%{version}-%{release}
-Conflicts: rpmbuild(macros) < 1.550
+Conflicts: rpmbuild(macros) < 1.619
AutoReqProv: no
%description module-build
# hack against warning in pax/grsec
sed -i 's/-Werror//' arch/alpha/kernel/Makefile
-%if "%{postver}" != "%{nil}"
-%{__bzip2} -dc %{SOURCE1} | patch -p1 -s
+
+%if "%{postver}" != ".0"
+%patch0 -p1
%endif
%if %{without vanilla}
-# tuxonice:
-%if %{with tuxonice}
-%patch69 -p1
-%patch70 -p1
-%endif
-
%if %{with fbcondecor}
%patch3 -p1
%endif
# kernel-pom-ng-IPV4OPTSSTRIP.patch
%patch10 -p1
-# kernel-pom-ng-ipv4options.patch
-%patch11 -p1
-
# kernel-pom-ng-mms-conntrack-nat.patch
%patch16 -p1
%patch52 -p1
%endif
-# toshiba_acpi
-%patch54 -p1
-
%patch55 -p1
%patch56 -p1
%patch101 -p1
%endif
-# forcedeth
-%patch130 -p1
-
# aufs2
%if %{with reiser4}
%patch148 -p1
# unionfs
%patch140 -p1
-%patch2200 -p1
-
%if %{with rescuecd}
%patch7000 -p1
%endif
# grsecurity & pax stuff
#
-
+exit 0
%if %{with grsecurity}
%patch9999 -p1
-# aufs2 needs to modify those pointers
+# aufs needs this
%patch147 -p1
%{?with_vserver:%patch10000 -p1}
%{?with_vserver:%patch10001 -p1}
%patch250 -p1
-# routes
-%patch300 -p1
-
# virtio-gl
%patch400 -p1
%endif # vanilla
# Small fixes:
+%patch2000 -p1
%patch2001 -p1
#%patch2003 -p1
#%patch50000 -p1
# Fix EXTRAVERSION in main Makefile
-sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{postver}%{?alt_kernel:_%{alt_kernel}}#g' Makefile
+sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{?alt_kernel:_%{alt_kernel}}#g' Makefile
# cleanup backups after patching
find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -f
%if %{without vanilla}
%if %{with rescuecd}
%{SOURCE58} \
- %{SOURCE59} \
rescue.config \
%endif
\
%endif
%if %{with vserver}
%{SOURCE43} \
-%endif
-%if %{with tuxonice}
-%ifarch %{ix86} %{x8664} ia64 ppc ppc64
- %{SOURCE42} \
-%endif
%endif
%{SOURCE41} %{?0:patches} \
%endif
- %{SOURCE40} %{?0:netfilter} \
%{SOURCE20} \
$RPM_SOURCE_DIR/$Config
}
for a in \
dep{,.bin} \
alias{,.bin} \
+ devname \
+ softdep \
symbols{,.bin} \
{pci,usb,ccw,isapnp,input,ieee1394,serio,of}map \
; do
install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{kernel_release}
# /usr/src/linux
-install -d $RPM_BUILD_ROOT%{_kernelsrcdir}/include/generated
+install -d $RPM_BUILD_ROOT%{_kernelsrcdir}
+
# test if we can hardlink -- %{_builddir} and $RPM_BUILD_ROOT on same partition
if cp -al %{srcdir}/COPYING $RPM_BUILD_ROOT/COPYING 2>/dev/null; then
l=l
cp -a$l %{srcdir}/* $RPM_BUILD_ROOT%{_kernelsrcdir}
cp -a %{objdir}/Module.symvers $RPM_BUILD_ROOT%{_kernelsrcdir}/Module.symvers-dist
cp -aL %{objdir}/.config $RPM_BUILD_ROOT%{_kernelsrcdir}/config-dist
-cp -a %{objdir}/include/generated/autoconf.h $RPM_BUILD_ROOT%{_kernelsrcdir}/include/generated/autoconf-dist.h
-cp -a %{objdir}/include/generated/utsrelease.h $RPM_BUILD_ROOT%{_kernelsrcdir}/include/generated
+cp -a %{objdir}/include/generated $RPM_BUILD_ROOT%{_kernelsrcdir}/include
+mv $RPM_BUILD_ROOT%{_kernelsrcdir}/include/generated/autoconf{,-dist}.h
cp -a %{objdir}/include/linux/version.h $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux
cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/generated/autoconf.h
cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_kernelsrcdir}/include/linux/config.h
%posttrans
# generate initrd after all dependant modules are installed
-/sbin/geninitrd -f --initrdfs=rom %{initrd_dir}/initrd-%{kernel_release}.gz %{kernel_release}
+/sbin/geninitrd -f --initrdfs=initramfs %{initrd_dir}/initrd-%{kernel_release}.gz %{kernel_release}
mv -f %{initrd_dir}/initrd{,.old} 2> /dev/null
%{?alt_kernel:mv -f %{initrd_dir}/initrd%{_alt_kernel}{,.old} 2> /dev/null}
ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd
# provided by build
/lib/modules/%{kernel_release}/modules.order
-/lib/modules/%{kernel_release}/modules.builtin
+/lib/modules/%{kernel_release}/modules.builtin*
# rest modules.* are ghost (regenerated by post depmod -a invocation)
%ghost /lib/modules/%{kernel_release}/modules.alias
%ghost /lib/modules/%{kernel_release}/modules.ccwmap
%ghost /lib/modules/%{kernel_release}/modules.dep
%ghost /lib/modules/%{kernel_release}/modules.dep.bin
+%ghost /lib/modules/%{kernel_release}/modules.devname
%ghost /lib/modules/%{kernel_release}/modules.ieee1394map
%ghost /lib/modules/%{kernel_release}/modules.inputmap
%ghost /lib/modules/%{kernel_release}/modules.isapnpmap
%ghost /lib/modules/%{kernel_release}/modules.ofmap
%ghost /lib/modules/%{kernel_release}/modules.pcimap
%ghost /lib/modules/%{kernel_release}/modules.seriomap
+%ghost /lib/modules/%{kernel_release}/modules.softdep
%ghost /lib/modules/%{kernel_release}/modules.symbols
%ghost /lib/modules/%{kernel_release}/modules.symbols.bin
%ghost /lib/modules/%{kernel_release}/modules.usbmap
%ifarch ppc ppc64
%{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
%endif
-%exclude %dir %{_kernelsrcdir}/arch/m68knommu
%exclude %dir %{_kernelsrcdir}/arch/um
%{_kernelsrcdir}/arch/*/kernel/asm-offsets*
%{_kernelsrcdir}/arch/*/kernel/sigframe*.h
%{_kernelsrcdir}/drivers/lguest/lg.h
+%{_kernelsrcdir}/drivers/media/video/bt8xx/bttv.h
%{_kernelsrcdir}/kernel/bounds.c
%dir %{_kernelsrcdir}/scripts
%{_kernelsrcdir}/scripts/Kbuild.include
%{_kernelsrcdir}/scripts/selinux/mdp/*.c
%exclude %dir %{_kernelsrcdir}/security
%exclude %dir %{_kernelsrcdir}/security/selinux
+%if %{with grsecurity}
+%{_kernelsrcdir}/tools/gcc/*.c
+%endif
%if %{with doc}
%files doc
%{_docdir}/%{name}-%{version}/[jkz]*.txt
%{_docdir}/%{name}-%{version}/kbuild
%{_docdir}/%{name}-%{version}/kdump
-%{_docdir}/%{name}-%{version}/kvm
%lang(ja) %{_docdir}/%{name}-%{version}/ja_JP
%lang(ko) %{_docdir}/%{name}-%{version}/ko_KR
%lang(zh_CN) %{_docdir}/%{name}-%{version}/zh_CN
%exclude %{_kernelsrcdir}/arch/*/kernel/asm-offsets*
%exclude %{_kernelsrcdir}/arch/*/kernel/sigframe*.h
%exclude %{_kernelsrcdir}/drivers/lguest/lg.h
+%exclude %{_kernelsrcdir}/drivers/media/video/bt8xx/bttv.h
%{_kernelsrcdir}/block
%{_kernelsrcdir}/crypto
%{_kernelsrcdir}/drivers
%{_kernelsrcdir}/sound
%{_kernelsrcdir}/security
%exclude %{_kernelsrcdir}/security/selinux/include
-%{_kernelsrcdir}/tools
+%{_kernelsrcdir}/tools/*
+%if %{with grsecurity}
+%exclude %{_kernelsrcdir}/tools/gcc/*.c
+%endif
%{_kernelsrcdir}/usr
%{_kernelsrcdir}/COPYING
%{_kernelsrcdir}/CREDITS