%{?debug:%define with_verbose 1}
%define _basever 3.2
-%define _postver .16
+%define _postver .43
%define _rel 1
%define _enable_debug_packages 0
Epoch: 3
License: GPL v2
Group: Base/Kernel
-Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%{_basever}.tar.bz2
-# Source0-md5: 7ceb61f87c097fc17509844b71268935
+Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%{_basever}.tar.xz
+# Source0-md5: 364066fa18767ec0ae5f4e4abcf9dc51
%if "%{_postver}" != "%{nil}"
Source1: http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.bz2
-# Source1-md5: 1179d169e0ec15ada29cfa9066777a7f
+# Source1-md5: c7fb90a2d200f0baf281c54884415e79
%endif
Source2: kernel-vanilla-autoconf.h
Source3: kernel-vanilla-config.h
Source4: kernel-vanilla-module-build.pl
+Source5: kernel.sysconfig
Source10: kernel-vanilla-x86.config
Source11: kernel-vanilla-x86_64.config
BuildRequires: rpmbuild(macros) >= 1.217
Autoreqprov: no
Requires(post): coreutils
-Requires(post): geninitrd >= 10000-3
+Requires(post): geninitrd >= 12639-1
Requires(post): virtual(module-tools)
Requires: /sbin/depmod
Requires: coreutils
-Requires: geninitrd >= 10000-3
+Requires: geninitrd >= 12639-1
Requires: virtual(module-tools)
Obsoletes: kernel%{_alt_kernel}-firmware
Obsoletes: kernel%{_alt_kernel}-isdn-mISDN
Conflicts: udev < 1:071
Conflicts: util-linux < 2.10o
Conflicts: xfsprogs < 2.6.0
-ExclusiveArch: i586 i686 x86_64
+ExclusiveArch: i686 x86_64
ExclusiveOS: Linux
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%ifarch i586 i686 x86_64
+%ifarch i686 x86_64
%define target_arch_dir x86
%else
%define target_arch_dir %{_target_base_arch}
%endif
-%ifarch i586 i686
+%ifarch i686
%define kernel_config x86
%else
%define kernel_config %{_target_base_arch}
%define _kernelsrcdir /usr/src/linux-%{version}-%{alt_kernel}
%if "%{_target_base_arch}" != "%{_arch}"
- %define CrossOpts ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-pld-linux-
+ %define CrossOpts ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-tld-linux-
%define DepMod /bin/true
%if "%{_arch}" == "x86_64" && "%{_target_base_arch}" == "i386"
find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -f
%build
-TuneUpConfigForIX86 () {
- set -x
-%ifarch i586 i686
- %ifarch i586
- sed -i "s:# CONFIG_HIGHMEM4G is not set:CONFIG_HIGHMEM4G=y:" $1
- sed -i "s:CONFIG_HIGHMEM64G=y:# CONFIG_HIGHMEM64G is not set:" $1
- sed -i ":CONFIG_X86_PAE=y:d" $1
- echo "# CONFIG_OLPC is not set" >> $1
- echo "CONFIG_CRYPTO_DEV_HIFN_795X=m" >> $1
- echo "# CONFIG_CRYPTO_DEV_HIFN_795X_RNG is not set" >> $1
- %else
- sed -i 's:CONFIG_M586=y# CONFIG_M586 is not set::' $1
- sed -i 's:# CONFIG_M686 is not set:CONFIG_M686=y:' $1
- %endif
- return 0
-%endif
-}
-
BuildConfig() {
%{?debug:set -x}
# is this a special kernel we want to build?
KernelVer=%{kernel_release}
echo "Building config file using $Config.conf..."
cat $RPM_SOURCE_DIR/kernel-vanilla-$Config.config > %{defconfig}
- TuneUpConfigForIX86 %{defconfig}
%{?debug:sed -i "s:# CONFIG_DEBUG_SLAB is not set:CONFIG_DEBUG_SLAB=y:" %{defconfig}}
%{?debug:sed -i "s:# CONFIG_DEBUG_PREEMPT is not set:CONFIG_DEBUG_PREEMPT=y:" %{defconfig}}
perl %{SOURCE4} %{_kernelsrcdir} $KERNEL_BUILD_DIR
# ghosted initrd
-touch $RPM_BUILD_ROOT%{initrd_dir}/initrd-%{kernel_release}.gz
+touch $RPM_BUILD_ROOT%{initrd_dir}/initrd-%{kernel_release}.img
+touch $RPM_BUILD_ROOT%{initrd_dir}/initramfs-%{kernel_release}.img
# rpm obeys filelinkto checks for ghosted symlinks, convert to files
rm -f $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/{build,source}
# remove unnecessary dir with dead symlink
rm -rf $RPM_BUILD_ROOT/arch/i386
+install -d $RPM_BUILD_ROOT/etc/sysconfig
+install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/kernel
+
%clean
rm -rf $RPM_BUILD_ROOT
fi
%post
-mv -f /boot/vmlinuz-%{alt_kernel} /boot/vmlinuz-%{alt_kernel}.old 2> /dev/null > /dev/null
-ln -sf vmlinuz-%{kernel_release} /boot/vmlinuz-%{alt_kernel}
-mv -f /boot/System.map-%{alt_kernel} /boot/System.map-%{alt_kernel}.old 2> /dev/null > /dev/null
-ln -sf System.map-%{kernel_release} /boot/System.map-%{alt_kernel}
-
%depmod %{kernel_release}
-/sbin/geninitrd -f --initrdfs=rom %{initrd_dir}/initrd-%{kernel_release}.gz %{kernel_release}
-mv -f %{initrd_dir}/initrd-%{alt_kernel} %{initrd_dir}/initrd-%{alt_kernel}.old 2> /dev/null > /dev/null
-ln -sf initrd-%{kernel_release}.gz %{initrd_dir}/initrd-%{alt_kernel}
+[ -f /etc/sysconfig/kernel ] && . /etc/sysconfig/kernel
+if [[ "$USE_GENINITRD" != [Nn][Oo] ]]; then
+ # generate initrd after all dependant modules are installed
+ /sbin/geninitrd -f %{initrd_dir}/initrd-%{kernel_release}.img %{kernel_release}
+fi
-if [ -x /sbin/new-kernel-pkg ]; then
- if [ -f /etc/pld-release ]; then
- title=$(sed 's/^[0-9.]\+ //' < /etc/pld-release)
- else
- title='PLD Linux'
+# if dracut is present then generate full-featured initramfs
+if [[ "$USE_DRACUT" != [Nn][Oo] ]] && [ -x /sbin/dracut ]; then
+ /sbin/dracut --force --quiet /boot/initramfs-%{kernel_release}.img %{kernel_release}
+fi
+
+# update boot loaders when old package files are gone from filesystem
+if [ -x /sbin/update-grub -a -f /etc/sysconfig/grub ]; then
+ if [ "$(. /etc/sysconfig/grub; echo ${UPDATE_GRUB:-no})" = "yes" ]; then
+ /sbin/update-grub >/dev/null
fi
+fi
- title="$title %{alt_kernel}"
+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}"
+fi
- /sbin/new-kernel-pkg --initrdfile=%{initrd_dir}/initrd-%{kernel_release}.gz --install %{kernel_release} --banner "$title"
-elif [ -x /sbin/rc-boot ]; then
+if [ -x /sbin/rc-boot ]; then
/sbin/rc-boot 1>&2 || :
fi
-%post vmlinux
-mv -f /boot/vmlinux-%{alt_kernel} /boot/vmlinux-%{alt_kernel}.old 2> /dev/null > /dev/null
-ln -sf vmlinux-%{kernel_release} /boot/vmlinux-%{alt_kernel}
-
%post drm
%depmod %{kernel_release}
%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}
-%ghost %{initrd_dir}/initrd-%{kernel_release}.gz
+%ghost %{initrd_dir}/initrd-%{kernel_release}.img
+%ghost %{initrd_dir}/initramfs-%{kernel_release}.img
/lib/firmware/%{kernel_release}
%dir /lib/modules/%{kernel_release}
%dir /lib/modules/%{kernel_release}/kernel
%exclude /lib/modules/%{kernel_release}/kernel/drivers/gpu/drm
/lib/modules/%{kernel_release}/kernel/fs
-# this directory will be removed after disabling rcutorture mod. in 2.6.20.
/lib/modules/%{kernel_release}/kernel/kernel
/lib/modules/%{kernel_release}/kernel/lib
-%ifarch x86_64
-/lib/modules/%{kernel_release}/kernel/mm
-%endif
-
/lib/modules/%{kernel_release}/kernel/net
%dir /lib/modules/%{kernel_release}/kernel/sound