[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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

tags 485637 + fixed-upstream pending

Petr Salinger <Petr.Salinger@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:



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
- 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.


  .''`.  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.

Attachment: pgpzjVs_3zKxW.pgp
Description: PGP signature

Reply to: