[Buildd-tools-devel] porting schroot to CentOS4

Roger Leigh rleigh at whinlatter.ukfsn.org
Sun Sep 16 00:24:20 UTC 2007


Dennis van Dok <dennisvd at nikhef.nl> writes:

> Roger Leigh schreef:
>> Dennis van Dok <dennisvd at nikhef.nl> writes:
>> 
>>> just a short note to let you know I managed to port schroot to CentOS 4.
>>> The porting was not entirely smooth, so I had to use some CentOS
>>> specific patches; for details see
>>> http://www.nikhef.nl/~dennisvd/chroot.html.
>> 
>> Do you have any diffs of the changes?  If you would like anything
>> applying, please feel free to post patches to this list.  
>
> I'll get to that later...

That would be great, thanks.

>> Regarding lockdev: The access(2) thing looks like a nasty bug.  Could
>> you report a bug about it in CentOS/Fedora.
> Done! It's #288461 [https://bugzilla.redhat.com/show_bug.cgi?id=288461]
> and I've inspected it a little closer: the access call is in a Red Hat
> specific patch (can you believe it). Has been there since 2001.

Fantastic.  Judging by the other bug, it looks like they bodged around
the problem with effective/real UIDs in the other suid-root package.
I'd rather not do that, and wait for a correct fix.

>> Also note that (AFAICT)
>> Debian is the de-facto upstream of lockdev since the upstream went
>> away (I'm one of the part-time comaintainers as it happens).  You
>> might want to ask them to update to the latest Debian version (1.0.3).
>
> I hope they at least just drop the access(2) call.

Yes.  However, note that LVM device locking won't work without 1.0.2
at the very least, because older versions don't support devices in
subdirectories of /dev.  I added support to lockdev so that we could
do just this:


2005-10-03  Roger Leigh  <rleigh at debian.org>

        * Version 1.0.2.
[...]
        * src/lockdev.c:
        (General) Replace the use of __linux__ with __GNU_LIBRARY__, and
        use the GNU libc gnu_dev_major() and gnu_dev_minor() functions
        rather than kernel macros.
        (General) Convert K&R C into ISO C89 C.
        (_dl_filename_1): Remove special casing for CUA devices on Linux
        systems; these devices have long been deprecated and are no longer
        available in current kernels.
        (_dl_filename_2): If a device name has '/' separators in its name,
        replace them with ':'s.  This is to support devices in
        subdirectories.
        (_dl_check_devname): If a device pathname starts with DEV_PATH,
        e.g. "/dev/", strip off only "/dev/", rather than the entire path.
        This is to support devices in subdirectories under /dev,
        e.g. DevFS, udev, devpts and LVM.


>> Regarding the setup scripts: We can detect the locations of the
>> binaries at configure time to improve portability here.
> H'm, I wonder how to do that? Surely you wouldn't want to introduce a
> build dependency on lvm... The simplest solution may be something like:
>
> if test -x /sbin/lvcreate; then
>   LVPATH=/sbin
> elif test -x /usr/sbin/lvcreate; then
>   LVPATH=/usr/sbin
> else
>   exit -1
> fi

The problem with this is that it might also be in /usr/local, or
somewhere else.  We should really check with configure, and otherwise
fall back to /sbin as a sensible default.  Adding to the build-deps is
not a big deal--if not installed it will use the fallback, and it will
also check with "test -x" at runtime.

> in the 05lvm script itself.
>
>> 
>> 
>> BTW, there's a public SVN repo if you want to track development.  And,
>> I'll be converting it to GIT over the next week, so you'll be able to
>> clone your own repository and branch off it if you want to maintain
>> your own changes. 
> Wow. I just listened to a podcast about GIT the other day, and voilá,
> there's a reason to start using it ;-)

This is now done, so you can if you wish clone a copy of the
repository from git://git.debian.org/git/buildd-tools/schroot.git

http://lists.alioth.debian.org/pipermail/buildd-tools-devel/2007-September/001815.html

Try "git clone git://git.debian.org/git/buildd-tools/schroot.git
schroot" as a starting point.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20070916/b7cfdca8/attachment.pgp 


More information about the Buildd-tools-devel mailing list