From f4a6715a61751eac66b645df60780ec37e685645 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Mon, 3 Aug 2015 12:03:40 +0000 Subject: [PATCH] - geninitrd is no longer supported --- kernel-vanilla.spec | 39 +++++++++------------------------------ 1 file changed, 9 insertions(+), 30 deletions(-) diff --git a/kernel-vanilla.spec b/kernel-vanilla.spec index bc028ba..47836f5 100644 --- a/kernel-vanilla.spec +++ b/kernel-vanilla.spec @@ -33,9 +33,8 @@ Source1: http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.xz # Source1-md5: da30776bede27f901ba73a0eb148a26f %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 @@ -52,17 +51,16 @@ BuildRequires: perl-base 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 @@ -352,8 +350,8 @@ Pakiet zawiera dokumentację do jądra Linuksa pochodzącą z katalogu %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}" != "0" @@ -443,7 +441,6 @@ cp -a %{objdir}/arch/%{target_arch_dir}/boot/bzImage $RPM_BUILD_ROOT/boot/vmlinu 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}" @@ -453,9 +450,6 @@ touch $RPM_BUILD_ROOT/lib/modules/%{kernel_release}/modules.dep # /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} @@ -525,29 +519,16 @@ fi %depmod %{kernel_release} %posttrans -[ -f /etc/sysconfig/kernel ] && . /etc/sysconfig/kernel -# generate simple initramfs/initrd image -if [[ "$USE_GENINITRD" != [Nn][Oo] ]]; then - /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 +# 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 -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 || : -fi %post drm %depmod %{kernel_release} @@ -596,11 +577,9 @@ fi %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} -- 2.46.0