hello, here is a patch to add reiserfs (version 2,3) support to pygrub in -unstable (against cset 1.1434) list of changes: - update tools/pygrub/README about packages needed to compile pygrub - tools/pygrub/setup.py to support reiserfs module - toolspygrub/src/fsys/reiserfs/ directory with 2 files __init__.py and reisermodule.c to provide reiserfs support to pygrub. Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com> $ diffstat reiser_pygrub.patch README | 16 + setup.py | 10 - src/fsys/reiser/__init__.py | 39 ++++ src/fsys/reiser/reisermodule.c | 345 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 407 insertions(+), 3 deletions(-) -- regards, aq _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> 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? Please can you add something to the tools/check directory that checks the appropriate headers are installed. Also, at runtime, are there issues with libraries being present? Can you load the library dynamically if required? Thanks, Ian> list of changes: > - update tools/pygrub/README about packages needed to compile pygrub > - tools/pygrub/setup.py to support reiserfs module > - toolspygrub/src/fsys/reiserfs/ directory with 2 files > __init__.py and reisermodule.c to provide reiserfs support to pygrub. > > Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com> > > $ diffstat reiser_pygrub.patch > README | 16 + > setup.py | 10 - > src/fsys/reiser/__init__.py | 39 ++++ > src/fsys/reiser/reisermodule.c | 345 > +++++++++++++++++++++++++++++++++++++++++ > 4 files changed, 407 insertions(+), 3 deletions(-) > > -- > regards, > aq >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 5/19/05, Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk> 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? >actually i dont run FC, and i asked a friend check this package for me on his FC. anybody could please confirm this?> Please can you add something to the tools/check directory that checks > the appropriate headers are installed.yes, that is easy.>Also, at runtime, are there > issues with libraries being present?what kind of issues do you want to mention?>Can you load the library > dynamically if required? >i dont understand why you want to load libs "dynamically"? regards, aq _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> > Please can you add something to the tools/check directory > that checks > > the appropriate headers are installed. > > yes, that is easy. > > >Also, at runtime, are there > > issues with libraries being present? > > what kind of issues do you want to mention?Well, what happens if you build the tools on a box that does have the reiserfs header files and shared libraries, but then try running them on a box without. The desired behaviour would be that the tools work fine until you try to access a reiserfs partition, whereupon they report an error gracefully. Undesirable behaviour would be refusing to run at all, or crashing if presented with a resierfs patition.> >Can you load the library > > dynamically if required? > > > > i dont understand why you want to load libs "dynamically"?To be able to work without the reiserfs present we may need to load it dynamically. (same for ext3, but that''s more widely installed). Best, Ian _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 5/19/05, Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk> wrote:> > > Please can you add something to the tools/check directory > > that checks > > > the appropriate headers are installed. > > > > yes, that is easy. > > > > >Also, at runtime, are there > > > issues with libraries being present? > > > > what kind of issues do you want to mention? > > Well, what happens if you build the tools on a box that does have the > reiserfs header files and shared libraries, but then try running them on > a box without. > > The desired behaviour would be that the tools work fine until you try to > access a reiserfs partition, whereupon they report an error gracefully. > > Undesirable behaviour would be refusing to run at all, or crashing if > presented with a resierfs patition. > > > >Can you load the library > > > dynamically if required? > > > > > > > i dont understand why you want to load libs "dynamically"? > > To be able to work without the reiserfs present we may need to load it > dynamically. (same for ext3, but that''s more widely installed).i see the point. this should be in TODO list, and solve later. regards, aq _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
(As I catch up on mail... sorry about the lag) On Thu, 2005-05-19 at 03:46 +0900, aq wrote:> here is a patch to add reiserfs (version 2,3) support to pygrub in > -unstable (against cset 1.1434)This looks good to me in general. I agree with Ian that we probably want to detect at build-time which filesystem libraries are available instead of requiring everyone building to install everything. See the patch that I have sitting ready to hit send on for how makes sense to me for libext2fs. Doing the same for reiserfs should be fairly trivial. Jeremy _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> 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.Seems a sensible approach to me. Some people will no doubt hate the fact that the output will depend on the build host. Perhaps have an environment variable that can be set to overide the autodetect? (and hence cause a build failure)> > 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)Given that the libext2fs is 90KB, I wander if we should just staticaly link? Not sure. Ian _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 5/24/05, Jeremy Katz <katzj@redhat.com> wrote:> 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) >yes, this trick could be easily adapted to reiserfs and others. but what if the user keeps the needed libraries, but removes those headers ( like /usr/include/ext2fs/ext2_fs.h )after building (for example to make the system more compact)? then the check would fail. actually we should check for those need to present at runtime, not things at compile time. i propose checking /usr/lib/libext2fs.so instead of header files (incase we use dynamic libs) regards, aq _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> > 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) > > > > yes, this trick could be easily adapted to reiserfs and > others. but what if the user keeps the needed libraries, but > removes those headers ( like /usr/include/ext2fs/ext2_fs.h > )after building (for example to make the system more > compact)? then the check would fail.As I understand it, it''s a build-time check for the header file (setup.py) Ian> actually we should check for those need to present at > runtime, not things at compile time. i propose checking > /usr/lib/libext2fs.so instead of header files (incase we use > dynamic libs)_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Tue, 2005-05-24 at 01:14 +0100, Ian Pratt wrote:> > 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. > > Seems a sensible approach to me. Some people will no doubt hate the fact > that the output will depend on the build host. Perhaps have an > environment variable that can be set to overide the autodetect? (and > hence cause a build failure)I guess it''s easy enough to do something like this. I wish distutils had a standardized way of doing things like this similar to autoconf (... and this even with how much I hate autoconf ;-)> > > 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) > > Given that the libext2fs is 90KB, I wander if we should just staticaly > link? Not sure.I''m not sure there''s a way to do static linking in distutils without completely reinventing the wheel. When you start thinking about lib vs lib64 differences, this is less than fun. Jeremy _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Tue, 2005-05-24 at 02:27 +0100, Ian Pratt wrote:> > > 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) > > > > yes, this trick could be easily adapted to reiserfs and > > others. but what if the user keeps the needed libraries, but > > removes those headers ( like /usr/include/ext2fs/ext2_fs.h > > )after building (for example to make the system more > > compact)? then the check would fail. > > As I understand it, it''s a build-time check for the header file > (setup.py)Exactly. Jeremy _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 5/24/05, Jeremy Katz <katzj@redhat.com> wrote:> On Tue, 2005-05-24 at 02:27 +0100, Ian Pratt wrote: > > > > 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) > > > > > > yes, this trick could be easily adapted to reiserfs and > > > others. but what if the user keeps the needed libraries, but > > > removes those headers ( like /usr/include/ext2fs/ext2_fs.h > > > )after building (for example to make the system more > > > compact)? then the check would fail. > > > > As I understand it, it''s a build-time check for the header file > > (setup.py) > > Exactly. >ah yes. this is setup.py, my bad mistake. thanks, aq _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 5/24/05, Jeremy Katz <katzj@redhat.com> wrote:> On Tue, 2005-05-24 at 02:27 +0100, Ian Pratt wrote: > > > > 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) > > > > > > yes, this trick could be easily adapted to reiserfs and > > > others. but what if the user keeps the needed libraries, but > > > removes those headers ( like /usr/include/ext2fs/ext2_fs.h > > > )after building (for example to make the system more > > > compact)? then the check would fail. > > > > As I understand it, it''s a build-time check for the header file > > (setup.py) > > Exactly. >anyway, i sent in a check file for ext2 and reiserfs tools/check/ check_fslibs_devel (which is filtered by accident, and i dont see it to be approved to the list yet?). so i doubt that we need to check (again) for header files in setup.py. regards, aq _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On Tue, 2005-05-24 at 13:15 +0900, aq wrote:> On 5/24/05, Jeremy Katz <katzj@redhat.com> wrote: > > On Tue, 2005-05-24 at 02:27 +0100, Ian Pratt wrote: > > > > > 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) > > > > > > > > yes, this trick could be easily adapted to reiserfs and > > > > others. but what if the user keeps the needed libraries, but > > > > removes those headers ( like /usr/include/ext2fs/ext2_fs.h > > > > )after building (for example to make the system more > > > > compact)? then the check would fail. > > > > > > As I understand it, it''s a build-time check for the header file > > > (setup.py) > > > > Exactly. > > > > anyway, i sent in a check file for ext2 and reiserfs tools/check/ > check_fslibs_devel (which is filtered by accident, and i dont see it > to be approved to the list yet?). so i doubt that we need to check > (again) for header files in setup.py.The question is whether we want all of the libraries to be mandatory or not. I''d lean towards them not being mandatory (ie, we build what you have unless you specify an environment variable) instead of having them all be required. Jeremy _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
hello, after some discussions with Ian and Jeremy, i put out the new patch for reiserfs module. please consider applying/rejecting. list of changes: - pygrub/README provides information on packages needed to compile pygrub - support reiserfs {2,3} filesystem - dynamically build modules based on which filesystem libraries the system has (proposed by Jeremy) - pump up pygrub to version 0.2 Signed-off-by: Jeremy Katz <katzj@redhat.com> Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com> $ diffstat pygrub_reiserfs.patch README | 16 + setup.py | 30 ++- src/fsys/reiser/__init__.py | 39 ++++ src/fsys/reiser/reisermodule.c | 345 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 420 insertions(+), 10 deletions(-) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel