Package: schroot
Version: 1.4.23-1+broder1
Severity: wishlist
Tags: patch
overlayfs is the newest in the long line of union filesystems, and
seems to be currying favor at the moment. Ubuntu is planning to pull
aufs in favor of overlayfs during the Precise development cycle.
This fairly straightforward patch adds overlayfs to the set of union
filesystems that schroot supports.
-- System Information:
Debian Release: wheezy/sid
APT prefers oneiric-updates
APT policy: (500, 'oneiric-updates'), (500, 'oneiric-security'), (500,
'oneiric'), (100, 'oneiric-backports')
Architecture: amd64 (x86_64)
Kernel: Linux 3.0.0-12-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages schroot depends on:
ii libboost-filesystem1.46 1.46.1-5ubuntu2 filesystem operations (portable pa
ii libboost-program-option 1.46.1-5ubuntu2 program options library for C++
ii libboost-regex1.46.1 1.46.1-5ubuntu2 regular expression library for C++
ii libboost-system1.46.1 1.46.1-5ubuntu2 Operating system (e.g. diagnostics
ii libc6 2.13-20ubuntu5 Embedded GNU C Library: Shared lib
ii libgcc1 1:4.6.1-9ubuntu3 GCC support library
ii liblockdev1 1.0.3-1.4build1 Run-time shared library for lockin
ii libpam0g 1.1.3-2ubuntu2.1 Pluggable Authentication Modules l
ii libstdc++6 4.6.1-9ubuntu3 GNU Standard C++ Library v3
ii libuuid1 2.19.1-2ubuntu3 Universally Unique ID library
ii schroot-common 1.4.23-1+broder1 common files for schroot
schroot recommends no packages.
Versions of packages schroot suggests:
pn aufs-modules | unionfs-modu <none> (no description available)
pn btrfs-tools <none> (no description available)
ii debootstrap 1.0.37 Bootstrap a basic Debian system
pn lvm2 <none> (no description available)
ii unzip 6.0-4ubuntu1 De-archiver for .zip files
-- Configuration Files:
/etc/default/schroot changed [not included]
-- no debconf information
diff --git a/etc/setup.d/10mount b/etc/setup.d/10mount
index 29636d1..db793fb 100755
--- a/etc/setup.d/10mount
+++ b/etc/setup.d/10mount
@@ -92,6 +92,9 @@ do_mount_fs_union()
aufs)
CHROOT_UNION_MOUNT_OPTIONS="br:${CHROOT_UNION_OVERLAY_DIRECTORY}:${CHROOT_UNION_UNDERLAY_DIRECTORY}=ro"
;;
+ overlayfs)
+ CHROOT_UNION_MOUNT_OPTIONS="lowerdir=${CHROOT_UNION_UNDERLAY_DIRECTORY},upperdir=${CHROOT_UNION_OVERLAY_DIRECTORY}"
+ ;;
esac
fi
diff --git a/man/schroot.conf.5.in b/man/schroot.conf.5.in
index 28c625a..f3e1325 100644
--- a/man/schroot.conf.5.in
+++ b/man/schroot.conf.5.in
@@ -372,15 +372,15 @@ optional.
.TP
\f[CBI]union\-type=\fP\f[CI]type\fP
Set the union filesystem type. Currently supported filesystems are
-\[oq]aufs\[cq] and \[oq]unionfs\[cq]. The default is \[oq]none\[cq], which
-disables this feature.
+\[oq]overlayfs\[cq], \[oq]aufs\[cq], and \[oq]unionfs\[cq]. The default is
+\[oq]none\[cq], which disables this feature.
.TP
\f[CBI]union\-mount\-options=\fP\f[CI]options\fP
Union filesystem mount options (branch configuration), used for mounting the
union filesystem specified with \fIunion\-type\fP. This replaces the complete
\[lq]\-o\[rq] string for mount and allows for the creation of complex
-filesystem unions. Note that \[oq]aufs\[cq] and \[oq]unionfs\[cq] have
-different supported mount options.
+filesystem unions. Note that \[oq]overlayfs\[cq], \[oq]aufs\[cq], and
+\[oq]unionfs\[cq] each have different supported mount options.
.B Note:
One can use the variables \[lq]${CHROOT_UNION_OVERLAY_DIRECTORY}\[rq] and
\[lq]${CHROOT_UNION_UNDERLAY_DIRECTORY}\[rq] to refer to the writable overlay
diff --git a/sbuild/sbuild-chroot-facet-union.cc b/sbuild/sbuild-chroot-facet-union.cc
index 8120024..c3f446d 100644
--- a/sbuild/sbuild-chroot-facet-union.cc
+++ b/sbuild/sbuild-chroot-facet-union.cc
@@ -149,7 +149,8 @@ chroot_facet_union::get_union_type () const
void
chroot_facet_union::set_union_type (std::string const& type)
{
- if (type == "aufs" ||
+ if (type == "overlayfs" ||
+ type == "aufs" ||
type == "unionfs" ||
type == "none")
this->union_type = type;