From 3e87d778079a08e6d5adcdf026015565f7587151 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 14 Sep 2011 16:08:42 -0400 Subject: [PATCH 1/2] Use mv not cp to try to avoid moving disk blocks around for -5 fix Related: rhbz#735259 handle initramfs on xen better (patch from Marko Ristola) Resolves: rhbz#728775 --- grub2-handle-initramfs-on-xen.patch | 16 ++++++++++++++++ grub2.spec | 11 +++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 grub2-handle-initramfs-on-xen.patch diff --git a/grub2-handle-initramfs-on-xen.patch b/grub2-handle-initramfs-on-xen.patch new file mode 100644 index 0000000..38a7df9 --- /dev/null +++ b/grub2-handle-initramfs-on-xen.patch @@ -0,0 +1,16 @@ +From: Marko Ristola +Date: 2011-08-07 07:43:01 EDT +Subject: [PATCH] Xen also uses initramfs not initrd filename + +diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in +--- a/util/grub.d/20_linux_xen.in 2011-05-17 17:10:29 +0000 ++++ b/util/grub.d/20_linux_xen.in 2011-09-14 19:02:23 +0000 +@@ -154,6 +154,7 @@ + for i in "initrd.img-${version}" "initrd-${version}.img" \ + "initrd-${version}" "initrd.img-${alt_version}" \ + "initrd-${alt_version}.img" "initrd-${alt_version}" \ ++ "initramfs-${version}.img" "initramfs-${alt_version}" \ + "initramfs-genkernel-${version}" \ + "initramfs-genkernel-${alt_version}" ; do + if test -e "${dirname}/${i}" ; then + diff --git a/grub2.spec b/grub2.spec index 3c9629e..289856f 100644 --- a/grub2.spec +++ b/grub2.spec @@ -18,7 +18,7 @@ Name: grub2 Epoch: 1 Version: 1.99 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Bootloader with support for Linux, Multiboot and more Group: System Environment/Base @@ -32,6 +32,7 @@ Patch0: grub-1.99-handle-fwrite-return.patch Patch1: grub-1.99-grub_test_assert_printf.patch Patch2: grub-1.99-just-say-linux.patch Patch3: grub-1.99-Workaround-for-variable-set-but-not-used-issue.patch +Patch4: grub2-handle-initramfs-on-xen.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -229,7 +230,7 @@ fi %triggerun -- grub2 < 1:1.99-4 # Back up the files before uninstalling old grub2 mkdir -p /boot/grub2.tmp && -cp -a /boot/grub2/*.mod \ +mv -f /boot/grub2/*.mod \ /boot/grub2/*.img \ /boot/grub2/*.lst \ /boot/grub2/device.map \ @@ -352,6 +353,12 @@ fi %endif %changelog +* Wed Sep 14 2011 Peter Jones - 1.99-6 +- Use mv not cp to try to avoid moving disk blocks around for -5 fix + Related: rhbz#735259 +- handle initramfs on xen better (patch from Marko Ristola) + Resolves: rhbz#728775 + * Sat Sep 03 2011 Kalev Lember - 1.99-5 - Fix upgrades from grub2 < 1.99-4 (#735259) From 7c419b815b57574150081f0e99879fbf083c6286 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Wed, 19 Oct 2011 13:41:11 -0700 Subject: [PATCH 2/2] mark /etc/default/grub as config(noreplace) --- grub2.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/grub2.spec b/grub2.spec index 3d97cf3..7bc2c68 100644 --- a/grub2.spec +++ b/grub2.spec @@ -18,7 +18,7 @@ Name: grub2 Epoch: 1 Version: 1.99 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Bootloader with support for Linux, Multiboot and more Group: System Environment/Base @@ -292,7 +292,7 @@ fi %config %{_sysconfdir}/grub.d/??_* %{_sysconfdir}/grub.d/README %{_sysconfdir}/%{name}.cfg -%{_sysconfdir}/default/grub +%config(noreplace) %{_sysconfdir}/default/grub %dir /boot/%{name} # Actually, this is replaced by update-grub from scriptlets, # but it takes care of modified persistent part @@ -341,7 +341,7 @@ fi %config %{_sysconfdir}/grub.d/??_* %{_sysconfdir}/grub.d/README %{_sysconfdir}/grub2-efi.cfg -%{_sysconfdir}/default/grub +%config(noreplace) %{_sysconfdir}/default/grub %dir /boot/grub2-efi # Actually, this is replaced by update-grub from scriptlets, # but it takes care of modified persistent part @@ -354,6 +354,10 @@ fi %endif %changelog +* Wed Oct 19 2011 Adam Williamson - 1.99-10 +- /etc/default/grub is explicitly intended for user customization, so + mark it as config(noreplace) + * Tue Oct 11 2011 Peter Jones - 1.99-9 - grub has an epoch, so we need that expressed in the obsolete as well. Today isn't my day.