[buildd-tools-devel] Bug#608121: Bug#608121: schroot: Add support for unionfs-fuse

Julian Andres Klode jak at debian.org
Wed Dec 29 16:55:39 UTC 2010


On Mi, 2010-12-29 at 16:16 +0000, Roger Leigh wrote:
> On Mon, Dec 27, 2010 at 04:02:06PM +0100, Julian Andres Klode wrote:
> > Package: schroot
> > Version: 1.4.16-1
> > Severity: wishlist
> > 
> > Since the kernels in experimental do not ship aufs, it would be
> > great if you could add support for unionfs-fuse as well. I have
> > the following patch applied in my setup.d script to automatically
> > fall back to unionfs-fuse if the native solution is not available,
> > as that allows me to build fast when running under 2.6.32 and use
> > the slower FUSE-based way when running newer kernels.
> 
> Thanks for the patch.  While it's a neat way to use the fallback,
> I'm not happy with the hardcoding in the setup script, which goes
> against the general design of the scripts (they are configured
> using environment variables passed in from the schroot executable;
> they don't dictate much policy themselves).
How about making union-type a list instead and passing the first
available one to the scripts? This way, we can have a wonderful fallback
solution, and no policy in the script.

> We can support it natively with "union-type=unionfs-fuse" in the
> configuration file providing that we can update the mount options
> to use fuse.  As a non-fuse user, is it possible to do the mount
> with mount(8) rather than running "unionfs-fuse" directly?

It is possible to set the fs type to fuse and mount like that (d1 + d2
on d):
  mount -t fuse -o cow,suid,dev,allow_other "unionfs-fuse#d1=RW:d2=RO" d

In theory, it would be easier if unionfs-fuse installed something like
the following mount helper:

        #!/bin/bash
        label=$1
        mpoint=$2
        shift 3
        dirs=${@##*,dirs=}
        dirs=${dirs/,/:}
        mount.fuse "unionfs-fuse#$dirs" "$mpoint" -o ${@%%,dirs=*}

then you could just mount it like unionfs (perhaps with +allow_other
option):
   mount -t unionfs-fuse -o allow_other,dirs=d1=rw,d2=ro label mpoint


-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.







More information about the Buildd-tools-devel mailing list