All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Katz <katzj@redhat.com>
To: Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>
Cc: xen-devel <xen-devel@lists.xensource.com>
Subject: RE: [PATCH] reiserfs module for pygrub
Date: Mon, 23 May 2005 19:57:30 -0400	[thread overview]
Message-ID: <1116892650.4292.41.camel@bree.local.net> (raw)
In-Reply-To: <A95E2296287EAD4EB592B5DEEFCE0E9D1E40C6@liverpoolst.ad.cl.cam.ac.uk>

[-- Attachment #1: Type: text/plain, Size: 1058 bytes --]

On Wed, 2005-05-18 at 20:37 +0100, Ian Pratt wrote: 
> > here is a patch to add reiserfs (version 2,3) support to 
> > pygrub in -unstable (against cset 1.1434)
> 
> Does Fedora have a reiserfs tools devel package?

Not at present.

> Please can you add something to the tools/check directory that checks
> the appropriate headers are installed. 

What if we check instead for the headers being present and only building
the filesystem modules that there's support for on the system?  Then
distributors can ensure they have the right things in their buildsystem
and anyone else can do the same.  The attached patch should implement
that for libext2fs.

> Also, at runtime, are there
> issues with libraries being present? Can you load the library
> dynamically if required?

The libraries get linked dynamically into the python module.  If at
runtime, the library isn't present, it won't cause a fatal error (you
won't be able to access those types of filesystems, but it won't fall
over on the import)

Signed-off-by: Jeremy Katz <katzj@redhat.com>

Jeremy

[-- Attachment #2: xen-pygrub-fsys-detect.patch --]
[-- Type: text/x-patch, Size: 1424 bytes --]

===== tools/pygrub/setup.py 1.2 vs edited =====
--- 1.2/tools/pygrub/setup.py	2005-04-28 08:27:46 -04:00
+++ edited/tools/pygrub/setup.py	2005-05-23 19:49:51 -04:00
@@ -3,14 +3,19 @@
 
 extra_compile_args  = [ "-fno-strict-aliasing", "-Wall", "-Werror" ]
 
-# in a perfect world, we'd figure out the fsys modules dynamically
-ext2 = Extension("grub.fsys.ext2._pyext2",
-                 extra_compile_args = extra_compile_args,
-                 libraries = ["ext2fs"],
-                 sources = ["src/fsys/ext2/ext2module.c"])
+fsys_mods = []
+fsys_pkgs = []
+
+if os.path.exists("/usr/include/ext2fs/ext2_fs.h"):
+    ext2 = Extension("grub.fsys.ext2._pyext2",
+                     extra_compile_args = extra_compile_args,
+                     libraries = ["ext2fs"],
+                     sources = ["src/fsys/ext2/ext2module.c"])
+    fsys_mods.append(ext2)
+    fsys_pkgs.append("grub.fsys.ext2")
 
 setup(name='pygrub',
-      version='0.1',
+      version='0.2',
       description='Boot loader that looks a lot like grub for Xen',
       author='Jeremy Katz',
       author_email='katzj@redhat.com',
@@ -18,8 +23,7 @@
       package_dir={'grub': 'src'},
       scripts = ["src/pygrub"],
       packages=['grub',
-                'grub.fsys',
-                'grub.fsys.ext2'],
-      ext_modules = [ext2]
+                'grub.fsys'].extend(fsys_pkgs),
+      ext_modules = fsys_mods
       )
                

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

  parent reply	other threads:[~2005-05-23 23:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-18 19:37 [PATCH] reiserfs module for pygrub Ian Pratt
2005-05-19  1:15 ` aq
2005-05-23 23:57 ` Jeremy Katz [this message]
2005-05-24  1:04   ` aq
  -- strict thread matches above, loose matches on Subject: below --
2005-05-24  1:27 Ian Pratt
2005-05-24  3:17 ` Jeremy Katz
2005-05-24  4:09   ` aq
2005-05-24  4:15   ` aq
2005-05-24 19:34     ` Jeremy Katz
2005-05-25 21:57       ` aq
2005-05-24  0:14 Ian Pratt
2005-05-24  3:17 ` Jeremy Katz
2005-05-19  1:32 Ian Pratt
2005-05-19  2:43 ` aq
2005-05-18 18:46 aq
2005-05-23 23:57 ` Jeremy Katz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1116892650.4292.41.camel@bree.local.net \
    --to=katzj@redhat.com \
    --cc=m+Ian.Pratt@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.