[grub2: 8/11] Use Fix-tests-of-zeroed-partition patch by Mark Hamzy

Peter Jones pjones at fedoraproject.org
Thu Mar 29 17:46:22 UTC 2012


commit 3eacc8828d161277e5ca8b40c4116ed1eaf1fcc4
Author: Dan Horák <dan at danny.cz>
Date:   Tue Mar 27 21:03:12 2012 +0200

    Use Fix-tests-of-zeroed-partition patch by Mark Hamzy

 grub-1.99-Fix-tests-of-zeroed-partition.patch |   25 +++++++++++++++++++++++++
 grub2.spec                                    |    6 +++++-
 2 files changed, 30 insertions(+), 1 deletions(-)
---
diff --git a/grub-1.99-Fix-tests-of-zeroed-partition.patch b/grub-1.99-Fix-tests-of-zeroed-partition.patch
new file mode 100644
index 0000000..ad5a770
--- /dev/null
+++ b/grub-1.99-Fix-tests-of-zeroed-partition.patch
@@ -0,0 +1,25 @@
+From c8f67c2ee40815c075f1d6e5b3d6b504fbe204f5 Mon Sep 17 00:00:00 2001
+From: Fedora Ninjas <pjones at fedoraproject.org>
+Date: Sun, 25 Mar 2012 09:22:34 -0500
+Subject: [PATCH] Fix tests of zeroed partition
+
+---
+ util/grub-install.in |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/util/grub-install.in b/util/grub-install.in
+index 9c1d133..e8638af 100644
+--- a/util/grub-install.in
++++ b/util/grub-install.in
+@@ -750,7 +750,7 @@ elif [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = "i386-ieee1275" ]
+ 		exit 1
+             fi
+ 
+-            if [ "$(file -s "${install_device}" -b | awk '{ print $1 }')" = ELF ] || [ $(cmp /dev/zero "${install_device}" &>/dev/null) ]; then
++            if [ "$(file -s "${install_device}" -b | awk '{ print $1 }')" != ELF ] && ( cmp -s -n $(blockdev --getsize64 ${install_device}) /dev/zero "${install_device}" &>/dev/null ); then
+             # Change boot device to the harddisk root
+ 		boot_device="$ofpath"
+ 		dd if="${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform/core.${imgext}" of="${install_device}" status=noxfer || {
+-- 
+1.7.7.2
+
diff --git a/grub2.spec b/grub2.spec
index 10aaa40..b3666b5 100644
--- a/grub2.spec
+++ b/grub2.spec
@@ -22,7 +22,7 @@
 Name:           grub2
 Epoch:          1
 Version:        1.99
-Release:        19%{?dist}
+Release:        19%{?dist}.1
 Summary:        Bootloader with support for Linux, Multiboot and more
 
 Group:          System Environment/Base
@@ -38,6 +38,7 @@ Patch1:		grub-1.99-grub_test_assert_printf.patch
 Patch2:		grub-1.99-just-say-linux.patch
 Patch3:		grub2-handle-initramfs-on-xen.patch
 Patch9:		grub-1.99-gcc-4.7.0.patch
+Patch10:	grub-1.99-Fix-tests-of-zeroed-partition.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -383,6 +384,9 @@ fi
 %attr(0755,root,root)/%{_datarootdir}/grub/
 
 %changelog
+* Sun Mar 25 2012 Dan Horák <dan[at]danny.cz> - 1.99-19.1
+- Use Fix-tests-of-zeroed-partition patch by Mark Hamzy
+
 * Thu Mar 15 2012 Peter Jones <pjones at redhat.com> - 1.99-19
 - Use --with-grubdir= on configure to make it behave like -17 did.
 


More information about the scm-commits mailing list