From a6bf624e71c7d84dd8bcb397a0d725aef7f87601 Mon Sep 17 00:00:00 2001 From: Michael Young Date: Oct 13 2011 23:00:23 +0000 Subject: make pygrub work better with GPT partitions and grub2 on guest --- diff --git a/pygrubfix2.patch b/pygrubfix2.patch new file mode 100644 index 0000000..8bd40c7 --- /dev/null +++ b/pygrubfix2.patch @@ -0,0 +1,82 @@ +--- xen-4.1.2/tools/pygrub/src/pygrub.orig 2011-10-13 18:56:41.000000000 +0100 ++++ xen-4.1.2/tools/pygrub/src/pygrub 2011-10-13 20:46:58.000000000 +0100 +@@ -78,9 +78,17 @@ + def get_fs_offset_gpt(file): + fd = os.open(file, os.O_RDONLY) + # assume the first partition is an EFI system partition. +- os.lseek(fd, SECTOR_SIZE * 2, 0) ++ os.lseek(fd, SECTOR_SIZE, 0) + buf = os.read(fd, 512) +- return struct.unpack("0: ++ buf = os.read(fd, partsize) ++ offsets.append(struct.unpack(" 0: ++ menu_level -= 1 ++ continue ++ else: ++ raise RuntimeError, "syntax error: closing brace without menuentry" + + self.add_image(Grub2Image(title, img)) + img = None diff --git a/xen.spec b/xen.spec index 18c7e99..1cd2666 100644 --- a/xen.spec +++ b/xen.spec @@ -6,7 +6,7 @@ Summary: Xen is a virtual machine monitor Name: xen Version: 4.1.1 -Release: 6%{?dist} +Release: 7%{?dist} Group: Development/Libraries License: GPLv2+ and LGPLv2+ and BSD URL: http://xen.org/ @@ -48,6 +48,7 @@ Patch26: localgcc46fix.patch Patch28: pygrubfix.patch Patch29: xen-4.1-testing.23104.patch Patch30: xen-4.1-testing.23112.patch +Patch31: pygrubfix2.patch Patch100: xen-configure-xend.patch @@ -175,6 +176,7 @@ to build the xen packages. %patch28 -p1 %patch29 -p1 %patch30 -p1 +%patch31 -p1 %patch100 -p1 @@ -562,6 +564,9 @@ rm -rf %{buildroot} %doc licensedir/* %changelog +* Thu Oct 13 2011 Michael Young - 4.1.1-7 +- make pygrub work better with GPT partitions and grub2 on guest + * Thu Sep 29 2011 Michael Young - 4.1.1-5 4.1.1-6 - improve systemd functionality