From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Katz Subject: RE: [PATCH] reiserfs module for pygrub Date: Mon, 23 May 2005 19:57:30 -0400 Message-ID: <1116892650.4292.41.camel@bree.local.net> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-q5Xno0ulfHMWyl2Zm5tC" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Pratt Cc: xen-devel List-Id: xen-devel@lists.xenproject.org --=-q5Xno0ulfHMWyl2Zm5tC Content-Type: text/plain Content-Transfer-Encoding: 7bit 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 Jeremy --=-q5Xno0ulfHMWyl2Zm5tC Content-Disposition: attachment; filename=xen-pygrub-fsys-detect.patch Content-Type: text/x-patch; name=xen-pygrub-fsys-detect.patch; charset=UTF-8 Content-Transfer-Encoding: 7bit ===== 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 ) --=-q5Xno0ulfHMWyl2Zm5tC Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-q5Xno0ulfHMWyl2Zm5tC--