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

Julian Andres Klode jak at debian.org
Mon Dec 27 15:02:06 UTC 2010


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.

diff --git a/schroot/setup.d/10mount b/schroot/setup.d/10mount
index 29636d1..01810e6 100755
--- a/schroot/setup.d/10mount
+++ b/schroot/setup.d/10mount
@@ -95,10 +95,16 @@ do_mount_fs_union()
        esac
     fi
 
-    info "Using '$CHROOT_UNION_TYPE' for filesystem union"
-
-    # Try mounting fs
-    mount -t "$CHROOT_UNION_TYPE" -o "$CHROOT_UNION_MOUNT_OPTIONS" "$CHROOT_NAME" "$1"
+    if modinfo "$CHROOT_UNION_TYPE" 2>/dev/null >/dev/null ||
+       grep "\<$CHROOT_UNION_TYPE\>" /proc/filesystems; then
+       info "Using '$CHROOT_UNION_TYPE' for filesystem union"
+       mount -t "$CHROOT_UNION_TYPE" -o "$CHROOT_UNION_MOUNT_OPTIONS" "$CHROOT_NAME" "$1"
+    else
+       info "Using 'unionfs-fuse' instead of '$CHROOT_UNION_TYPE' for filesystem union"
+       unionfs-fuse -o cow,allow_other,suid,dev \
+                     ${CHROOT_UNION_OVERLAY_DIRECTORY}=RW:${CHROOT_UNION_UNDERLAY_DIRECTORY}=RO \
+                     "$1"
+    fi
 }
 
 if [ "$VERBOSE" = "verbose" ]; then

-- System Information:
Debian Release: 6.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (350, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.37-rc5-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages schroot depends on:
ii  libboost-filesystem1.42.0     1.42.0-4   filesystem operations (portable pa
ii  libboost-program-options1.42. 1.42.0-4   program options library for C++
ii  libboost-regex1.42.0          1.42.0-4   regular expression library for C++
ii  libboost-system1.42.0         1.42.0-4   Operating system (e.g. diagnostics
ii  libc6                         2.11.2-7   Embedded GNU C Library: Shared lib
ii  libgcc1                       1:4.5.2-1  GCC support library
ii  liblockdev1                   1.0.3-1.4  Run-time shared library for lockin
ii  libpam0g                      1.1.1-6.1  Pluggable Authentication Modules l
ii  libstdc++6                    4.5.2-1    The GNU Standard C++ Library v3
ii  libuuid1                      2.17.2-3.3 Universally Unique ID library
ii  schroot-common                1.4.16-1   common files for schroot

schroot recommends no packages.

Versions of packages schroot suggests:
pn  aufs-modules | unionfs-m <none>          (no description available)
ii  btrfs-tools              0.19+20100601-3 Checksumming Copy on Write Filesys
ii  debootstrap              1.0.26          Bootstrap a basic Debian system
pn  lvm2                     <none>          (no description available)
ii  unzip                    6.0-4           De-archiver for .zip files

-- Configuration Files:
/etc/schroot/default/nssdatabases changed [not included]
/etc/schroot/desktop/nssdatabases changed [not included]
/etc/schroot/minimal/nssdatabases changed [not included]
/etc/schroot/sbuild/nssdatabases changed [not included]
/etc/schroot/schroot.conf changed [not included]
/etc/schroot/setup.d/10mount changed [not included]

-- no debconf information

-- 
Julian Andres Klode  - Debian Developer, Ubuntu Member

See http://wiki.debian.org/JulianAndresKlode and http://jak-linux.org/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20101227/766222d9/attachment.pgp>


More information about the Buildd-tools-devel mailing list