%bcond_without doc # don't build kernel-doc package
%bcond_with verbose # verbose build (V=1)
-%define basever 3.8
-%define postver .8
+%define basever 3.12
+%define postver 20
%define rel 1
-%define alt_kernel 3.8-vanilla
+%define alt_kernel 3.12-vanilla
# kernel release (used in filesystem and eventually in uname -r)
# modules will be looked from /lib/modules/%{kernel_release}
# localversion is just that without version for "> localversion"
%define localversion %{rel}
-%define kernel_release %{version}%{?alt_kernel:.%{alt_kernel}}-%{localversion}
+%define kernel_release %{version}%{?alt_kernel:-%{alt_kernel}}-%{localversion}
Summary: The Linux kernel (the core of the Linux operating system)
Summary(de.UTF-8): Der Linux-Kernel (Kern des Linux-Betriebssystems)
Summary(fr.UTF-8): Le Kernel-Linux (La partie centrale du systeme)
Summary(pl.UTF-8): JÄ…dro Linuksa
Name: kernel%{_alt_kernel}
-Version: %{basever}%{postver}
+Version: %{basever}.%{postver}
Release: %{rel}
Epoch: 3
License: GPL v2
Group: Base/Kernel
Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%{basever}.tar.xz
-# Source0-md5: 1c738edfc54e7c65faeb90c436104e2f
-%if "%{_postver}" != "%{nil}"
-Source1: http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.bz2
-# Source1-md5: 95224572ecb1f4c7089683c1f06ef2b4
+# Source0-md5: cc6ee608854e0da4b64f6c1ff8b6398c
+%if "%{postver}" != "0"
+Source1: http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.xz
+# Source1-md5: 26a24b7274665e0ff2e7dd4e860eec91
%endif
Source2: kernel.sysconfig
BuildRequires: hostname
BuildRequires: kmod
BuildRequires: perl-base
-BuildRequires: rpm-build >= 4.5-24
+BuildRequires: rpm >= 4.5-74
BuildRequires: rpmbuild(macros) >= 1.652
Requires(post): coreutils
Requires(post): geninitrd >= 12639-1
ln -s %{SOURCE4} Makefile
cd linux-%{basever}
-%if "%{_postver}" != "%{nil}"
-%{__bzip2} -dc %{SOURCE1} | patch -p1 -s
+%if "%{postver}" != "0"
+%{__xz} -dc %{SOURCE1} | patch -p1 -s
%endif
# Fix EXTRAVERSION in main Makefile
-sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{?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
cd %{objdir}
install -d arch/%{target_arch_dir}
%ifarch i686
- cat $RPM_SOURCE_DIR/%{SOURCE10} > %{defconfig}
+ cat %{SOURCE10} > %{defconfig}
%endif
%ifarch x86_64
- cat $RPM_SOURCE_DIR/%{SOURCE11} > %{defconfig}
+ cat %{SOURCE11} > %{defconfig}
%endif
+sed -i "s:CONFIG_LOCALVERSION=\"\":CONFIG_LOCALVERSION=\"-%{localversion}\":" %{defconfig}
ln -sf %{defconfig} .config
cd -
%posttrans
[ -f /etc/sysconfig/kernel ] && . /etc/sysconfig/kernel
+# generate simple initramfs/initrd image
if [[ "$USE_GENINITRD" != [Nn][Oo] ]]; then
- # generate initrd after all dependant modules are installed
/sbin/geninitrd -f --initrdfs=initramfs %{initrd_dir}/initrd-%{kernel_release}.img %{kernel_release}
fi
fi
# update boot loaders
-[ -x /sbin/update-grub -a -f /etc/sysconfig/grub ] && . /etc/sysconfig/grub
-if [[ "$UPDATE_GRUB" != [Nn][Oo] ]]; then
- /sbin/update-grub
+if [ -x /sbin/update-grub -a -f /etc/sysconfig/grub ]; then
+ if [ "$(. /etc/sysconfig/grub; echo ${UPDATE_GRUB:-yes})" = "yes" ]; then
+ /sbin/update-grub >/dev/null
+ fi
fi
if [ -x /sbin/new-kernel-pkg ]; then
/sbin/new-kernel-pkg --initrdfile=%{initrd_dir}/initrd-%{kernel_release}.img --install %{kernel_release} --banner "TLD Linux%{?alt_kernel: %{alt_kernel}}"
%{_kernelsrcdir}/arch/m68k/install.sh
%{_kernelsrcdir}/arch/parisc/install.sh
%{_kernelsrcdir}/arch/x86/ia32/[!M]*
+%{_kernelsrcdir}/arch/arm/kvm
+%{_kernelsrcdir}/arch/arm64/kvm
%{_kernelsrcdir}/arch/ia64/kvm
+%{_kernelsrcdir}/arch/mips/kvm
%{_kernelsrcdir}/arch/powerpc/kvm
%{_kernelsrcdir}/arch/s390/kvm
%{_kernelsrcdir}/arch/x86/kvm