rpms/qemu/devel qemu-fix-extboot-signrom.patch, NONE, 1.1 qemu.spec, 1.116, 1.117

Mark McLoughlin markmc at fedoraproject.org
Tue Aug 4 14:36:21 UTC 2009


Author: markmc

Update of /cvs/pkgs/rpms/qemu/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv5288

Modified Files:
	qemu.spec 
Added Files:
	qemu-fix-extboot-signrom.patch 
Log Message:
* Tue Aug  4 2009 Mark McLoughlin <markmc at redhat.com> - 2:0.10.91-0.3.rc1.rc0
- Fix extboot checksum (bug #514899)


qemu-fix-extboot-signrom.patch:
 signrom.sh |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- NEW FILE qemu-fix-extboot-signrom.patch ---
>From 6fb154d7d16b25d70615d33dc30927ded148dd32 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf at suse.de>
Date: Sat, 1 Aug 2009 11:48:31 +0200
Subject: [PATCH] Fix checksum writing in signboot.sh

The printf command takes an octal value after \, so we have to convert
our decimal representation to octal first and then write it.

This unbreaks extboot signing. Multiboot wasn't affected yet because
the checksum was < 8.

Spotted and first patch by Glauber Costa <glommer at redhat.com>.
Printf idea by Paolo Bonzini <bonzini at gnu.org>.

(cherry picked from commit d8b69b34761f7b3fb8f476712b631d1dd3f1b2a5)

Signed-off-by: Alexander Graf <agraf at suse.de>
CC: Glauber Costa <glommer at redhat.com>
CC: Paolo Bonzini <bonzini at gnu.org>
CC: Jan Ondrej <ondrejj at salstar.sk>
Signed-off-by: Anthony Liguori <aliguori at us.ibm.com>
Signed-off-by: Mark McLoughlin <markmc at redhat.com>
Fedora-patch: qemu-fix-extboot-signrom.patch
---
 pc-bios/optionrom/signrom.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/pc-bios/optionrom/signrom.sh b/pc-bios/optionrom/signrom.sh
index 4322811..975b27d 100755
--- a/pc-bios/optionrom/signrom.sh
+++ b/pc-bios/optionrom/signrom.sh
@@ -39,7 +39,8 @@ done
 
 sum=$(( $sum % 256 ))
 sum=$(( 256 - $sum ))
+sum_octal=$( printf "%o" $sum )
 
 # and write the output file
 cp "$1" "$2"
-printf "\\$sum" | dd of="$2" bs=1 count=1 seek=$size conv=notrunc 2>/dev/null
+printf "\\$sum_octal" | dd of="$2" bs=1 count=1 seek=$size conv=notrunc 2>/dev/null
-- 
1.6.2.5



Index: qemu.spec
===================================================================
RCS file: /cvs/pkgs/rpms/qemu/devel/qemu.spec,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -p -r1.116 -r1.117
--- qemu.spec	31 Jul 2009 15:12:00 -0000	1.116
+++ qemu.spec	4 Aug 2009 14:36:21 -0000	1.117
@@ -4,7 +4,7 @@
 Summary: QEMU is a FAST! processor emulator
 Name: qemu
 Version: 0.10.91
-Release: 0.2.%{kvmvertag}%{?dist}
+Release: 0.3.%{kvmvertag}%{?dist}
 # Epoch because we pushed a qemu-1.0 package
 Epoch: 2
 License: GPLv2+ and LGPLv2+ and BSD
@@ -29,6 +29,9 @@ Patch03: qemu-fix-optionrom-install.patc
 # Add KSM support - see https://fedoraproject.org/wiki/Features/KSM
 Patch04: qemu-add-ksm-support.patch
 
+# Fix extboot checksum (bug #514899)
+Patch05: qemu-fix-extboot-signrom.patch
+
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: SDL-devel zlib-devel which texi2html gnutls-devel cyrus-sasl-devel
 BuildRequires: rsync dev86 iasl
@@ -213,6 +216,7 @@ such as kvmtrace and kvm_stat.
 %patch02 -p1
 %patch03 -p1
 %patch04 -p1
+%patch05 -p1
 
 %build
 # systems like rhel build system does not have a recent enough linker so
@@ -477,6 +481,9 @@ getent passwd qemu >/dev/null || \
 %{_mandir}/man1/qemu-img.1*
 
 %changelog
+* Tue Aug  4 2009 Mark McLoughlin <markmc at redhat.com> - 2:0.10.91-0.3.rc1.rc0
+- Fix extboot checksum (bug #514899)
+
 * Fri Jul 31 2009 Mark McLoughlin <markmc at redhat.com> - 2:0.10.91-0.2.rc1.rc0
 - Add KSM support
 - Require bochs-bios >= 2.3.8-0.8 for latest kvm bios updates




More information about the fedora-extras-commits mailing list