[Buildd-tools-devel] Bug#485637: Bug#485637: schroot: does not work on GNU/kFreeBSD

Roger Leigh rleigh at whinlatter.ukfsn.org
Sun Jun 29 16:06:42 UTC 2008


tags 485637 + fixed-upstream pending
thanks

Petr Salinger <Petr.Salinger at seznam.cz> writes:

> the current version does not work on GNU/kFreeBSD.
> It is due to different order of elements in "struct flock"
> on Linux and on GNU/kFreeBSD.
>
> The POSIX does not mandate any order of elements, it only lists
> mandatory members (l_type, l_whence, l_start, l_len, l_pid).
> http://www.opengroup.org/onlinepubs/009695399/basedefs/fcntl.h.html
>
> I tried to use ISO C99 initializer, but it does not work in C++.
> http://gcc.gnu.org/onlinedocs/gcc-4.3.0/gcc/Designated-Inits.html
>
> So please, use attached patch or something similar.

Done, thanks for the patch!  A (very slightly) modified version of
your patch was committed into our git repository, and will be in the
next stable and development releases:

http://git.debian.org/?p=buildd-tools/schroot.git;a=commitdiff;h=2ab6a0b16f7526df8574db7b0792989047baa70e

http://git.debian.org/?p=buildd-tools/schroot.git;a=commitdiff;h=48a24ea4e5a893a1f3404cad2b89d90e5d01232f


Regarding GNU/kFreeBSD compatibility: So far, schroot /has/ been
written with portability in mind, but has as yet only run on
*-linux-gnu platforms, though someone did try to port to Interix (!).
Once it compiles cleanly, there are some Linux-isms which still need
to be addressed.  The setup scripts in bin/schroot/setup might need
some special-casing or reworking for specific platforms.  Specific
examples include:

- use of /proc/mounts in scripts and
  bin/schroot-listmounts/schroot-listmounts-main.cc.
- use of LVM
- use of (recursive) bind mounts
- copying of specific files in /etc
- there may be more; it needs testing

Some of these are simple packaging issues.  Ideally, only setup
scripts which make sense on a given platform should be installed.  The
same applies to chroot types such as lvm-snapshot which might not
work; these need checking in configure.ac and conditionally compiling
and installing.  For features such as kernel personalities, the logic
is already there.  The same applies to use of /proc/mounts, which
needs a fallback to /etc/mtab or any more appropriate equivalent.

None of this should be particularly difficult to do, but schroot won't
work optimally on GNU/kFreeBSD without an hour or so of ironing out
the minor Linux-isms which are undoubtedly present.  At this point,
it should work quite nicely.


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: 196 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20080629/98c5582a/attachment.pgp 


More information about the Buildd-tools-devel mailing list