WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Re-enable the pygrub build and fix the build with older

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Re-enable the pygrub build and fix the build with older
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 07 Oct 2005 22:32:22 +0000
Delivery-date: Fri, 07 Oct 2005 22:29:54 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 18f765da27259e2adfc89e157685360909a36265
# Parent  1b4ad6eb6968ce2258a7c2338d5ff9dab37388e4
Re-enable the pygrub build and fix the build with older
e2fsprogs (tested on RHEL4 with e2fsprogs-1.35 and rawhide
with e2fsprogs-1.38)

Signed-off-by: Jeremy Katz <katzj@xxxxxxxxxx>

diff -r 1b4ad6eb6968 -r 18f765da2725 tools/Makefile
--- a/tools/Makefile    Fri Oct  7 22:17:24 2005
+++ b/tools/Makefile    Fri Oct  7 22:21:23 2005
@@ -22,7 +22,7 @@
 # These don't cross-compile
 ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
 SUBDIRS += python
-#SUBDIRS += pygrub
+SUBDIRS += pygrub
 endif
 
 .PHONY: all install clean check check_clean ioemu eioemuinstall ioemuclean
diff -r 1b4ad6eb6968 -r 18f765da2725 tools/pygrub/Makefile
--- a/tools/pygrub/Makefile     Fri Oct  7 22:17:24 2005
+++ b/tools/pygrub/Makefile     Fri Oct  7 22:21:23 2005
@@ -15,4 +15,4 @@
 endif
 
 clean:
-       rm -rf build *.pyc *.pyo *.o *.a *~
+       rm -rf build tmp *.pyc *.pyo *.o *.a *~
diff -r 1b4ad6eb6968 -r 18f765da2725 tools/pygrub/setup.py
--- a/tools/pygrub/setup.py     Fri Oct  7 22:17:24 2005
+++ b/tools/pygrub/setup.py     Fri Oct  7 22:21:23 2005
@@ -1,5 +1,7 @@
 from distutils.core import setup, Extension
+from distutils.ccompiler import new_compiler
 import os
+import sys
 
 extra_compile_args  = [ "-fno-strict-aliasing", "-Wall", "-Werror" ]
 
@@ -7,9 +9,19 @@
 fsys_pkgs = []
 
 if os.path.exists("/usr/include/ext2fs/ext2_fs.h"):
+    ext2defines = []
+    cc = new_compiler()
+    cc.add_library("ext2fs")
+    if cc.has_function("ext2fs_open2"):
+        ext2defines.append( ("HAVE_EXT2FS_OPEN2", None) )
+    else:
+        sys.stderr.write("WARNING: older version of e2fsprogs installed, not 
building full\n")
+        sys.stderr.write("         disk support for ext2.\n")
+        
     ext2 = Extension("grub.fsys.ext2._pyext2",
                      extra_compile_args = extra_compile_args,
                      libraries = ["ext2fs"],
+                     define_macros = ext2defines,
                      sources = ["src/fsys/ext2/ext2module.c"])
     fsys_mods.append(ext2)
     fsys_pkgs.append("grub.fsys.ext2")
diff -r 1b4ad6eb6968 -r 18f765da2725 tools/pygrub/src/fsys/ext2/ext2module.c
--- a/tools/pygrub/src/fsys/ext2/ext2module.c   Fri Oct  7 22:17:24 2005
+++ b/tools/pygrub/src/fsys/ext2/ext2module.c   Fri Oct  7 22:21:23 2005
@@ -229,8 +229,13 @@
         snprintf(offsetopt, 29, "offset=%d", offset);
     }
 
+#ifdef HAVE_EXT2FS_OPEN2
     err = ext2fs_open2(name, offsetopt, flags, superblock, block_size, 
                        unix_io_manager, &efs);
+#else
+    err = ext2fs_open(name, flags, superblock, block_size,
+                      unix_io_manager, &efs);
+#endif
     if (err) {
         PyErr_SetString(PyExc_ValueError, "unable to open file");
         return NULL;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Re-enable the pygrub build and fix the build with older, Xen patchbot -unstable <=