%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.10
+%define postver 102
%define rel 1
-%define alt_kernel 3.8-vanilla
+%define alt_kernel 3.10-vanilla
# kernel release (used in filesystem and eventually in uname -r)
# modules will be looked from /lib/modules/%{kernel_release}
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: 4f25cd5bec5f8d5a7d935b3f2ccb8481
+%if "%{postver}" != "0"
+Source1: http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.xz
+# Source1-md5: 2f5cb949c4484972bfbb47e4382dfbcf
%endif
-Source2: kernel.sysconfig
-Source3: kernel-module-build.pl
-Source4: kernel.make
+Source2: kernel-module-build.pl
+Source3: kernel.make
Source10: kernel-vanilla-x86.config
Source11: kernel-vanilla-x86_64.config
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
+Requires(post): dracut
Requires(post): kmod >= 12-2
Requires: /sbin/depmod
Requires: coreutils
-Requires: geninitrd >= 12639-1
+Requires: dracut
Requires: kmod >= 12-2
%ifarch i686
Requires: cpuinfo(pae)
%endif
Suggests: crda
-Suggests: dracut
Suggests: keyutils
Suggests: linux-firmware
Provides: %{name}(netfilter) = 20070806
%prep
%setup -qc
-ln -s %{SOURCE3} kernel-module-build.pl
-ln -s %{SOURCE4} Makefile
+ln -s %{SOURCE2} kernel-module-build.pl
+ln -s %{SOURCE3} 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
%ifarch x86_64
cat %{SOURCE11} > %{defconfig}
%endif
+sed -i "s:CONFIG_LOCALVERSION=\"\":CONFIG_LOCALVERSION=\"-%{localversion}\":" %{defconfig}
ln -sf %{defconfig} .config
cd -
install -p %{objdir}/vmlinux $RPM_BUILD_ROOT/boot/vmlinux-%{kernel_release}
# ghosted initrd
-touch $RPM_BUILD_ROOT%{initrd_dir}/initrd-%{kernel_release}.img
touch $RPM_BUILD_ROOT%{initrd_dir}/initramfs-%{kernel_release}.img
%if "%{_target_base_arch}" != "%{_host_base_arch}"
# /etc/modrobe.d
install -d $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/%{kernel_release}
-install -d $RPM_BUILD_ROOT/etc/sysconfig
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/kernel
-
# /usr/src/linux
install -d $RPM_BUILD_ROOT%{_kernelsrcdir}
%depmod %{kernel_release}
%posttrans
-[ -f /etc/sysconfig/kernel ] && . /etc/sysconfig/kernel
-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
-
-# if dracut is present then generate full-featured initramfs
-if [[ "$USE_DRACUT" != [Nn][Oo] ]] && [ -x /sbin/dracut ]; then
+# generate initramfs
+if [ -x /sbin/dracut ]; then
/sbin/dracut --force --quiet /boot/initramfs-%{kernel_release}.img %{kernel_release}
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
-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}}"
-fi
-if [ -x /sbin/rc-boot ]; then
- /sbin/rc-boot 1>&2 || :
+# update boot loader
+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
%post drm
%files
%defattr(644,root,root,755)
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/kernel
/boot/vmlinuz-%{kernel_release}
/boot/System.map-%{kernel_release}
/boot/config-%{kernel_release}
-%ghost %{initrd_dir}/initrd-%{kernel_release}.img
%ghost %{initrd_dir}/initramfs-%{kernel_release}.img
/lib/firmware/%{kernel_release}
%{_kernelsrcdir}/scripts/kconfig/[m-u]*.h
%{_kernelsrcdir}/scripts/kconfig/lxdialog
%{_kernelsrcdir}/scripts/mod/*.c
-%{_kernelsrcdir}/scripts/mod/[^e]*.h
+%{_kernelsrcdir}/scripts/mod/modpost.h
%attr(755,root,root) %{_kernelsrcdir}/scripts/mkcompile_h
%{_kernelsrcdir}/scripts/mkmakefile
%{_kernelsrcdir}/scripts/module-common.lds
%attr(755,root,root) %{_kernelsrcdir}/scripts/setlocalversion
%{_kernelsrcdir}/scripts/*.c
+%{_kernelsrcdir}/scripts/*.h
%attr(755,root,root) %{_kernelsrcdir}/scripts/*.sh
%{_kernelsrcdir}/scripts/selinux/genheaders/*.c
%{_kernelsrcdir}/scripts/selinux/mdp/*.c
%{_kernelsrcdir}/arch/m68k/install.sh
%{_kernelsrcdir}/arch/parisc/install.sh
%{_kernelsrcdir}/arch/x86/ia32/[!M]*
+%{_kernelsrcdir}/arch/arm/kvm
%{_kernelsrcdir}/arch/ia64/kvm
+%{_kernelsrcdir}/arch/mips/kvm
%{_kernelsrcdir}/arch/powerpc/kvm
%{_kernelsrcdir}/arch/s390/kvm
%{_kernelsrcdir}/arch/x86/kvm
%exclude %{_kernelsrcdir}/scripts/module-common.lds
%exclude %{_kernelsrcdir}/scripts/setlocalversion
%exclude %{_kernelsrcdir}/scripts/*.c
+%exclude %{_kernelsrcdir}/scripts/*.h
%exclude %{_kernelsrcdir}/scripts/*.sh
%exclude %dir %{_kernelsrcdir}/scripts/selinux
%exclude %{_kernelsrcdir}/scripts/selinux/Makefile