mk-sbuild,doc/mk-sbuild.1: aufs may still be used if overlayfs isn't

available (as is the case on Debian).
This commit is contained in:
Stefano Rivera 2011-11-16 13:52:18 +02:00
parent 08afc2a0a9
commit c85373f911
3 changed files with 20 additions and 3 deletions

5
debian/changelog vendored
View File

@ -1,8 +1,13 @@
ubuntu-dev-tools (0.136) UNRELEASED; urgency=low
[ Marc Deslauriers ]
* mk-sbuild,doc/mk-sbuild.1: switch from aufs to overlayfs, as aufs is no
longer in the Precise kernel.
[ Stefano Rivera ]
* mk-sbuild,doc/mk-sbuild.1: aufs may still be used if overlayfs isn't
available (as is the case on Debian).
-- Marc Deslauriers <marc.deslauriers@ubuntu.com> Tue, 15 Nov 2011 16:01:32 -0500
ubuntu-dev-tools (0.135) unstable; urgency=low

View File

@ -54,7 +54,8 @@ Currently known distros: "\fBdebian\fR" and "\fBubuntu\fR".
.TP
.B \-\-vg\fR=\fIVOLUME_GROUP
Specify a volume group, and subsequently use a default \fBSCHROOT_TYPE\fR of
"\fBlvm-snapshot\fR" rather than "\fBdirectory\fR" (via overlayfs) mounts.
"\fBlvm-snapshot\fR" rather than "\fBdirectory\fR" (via overlayfs or
aufs) mounts.
.TP
.B \-\-type\fR=\fISHROOT_TYPE
Specify a \fBSCHROOT_TYPE\fR. Supported values are "\fBdirectory\fR"

View File

@ -24,7 +24,7 @@
# ##################################################################
#
# This script creates chroots designed to be used in a snapshot mode
# (either with LVM or overlayfs) with schroot and sbuild.
# (with LVM, btrfs, overlayfs, or aufs) with schroot and sbuild.
# Much love to "man sbuild-setup", https://wiki.ubuntu.com/PbuilderHowto,
# and https://help.ubuntu.com/community/SbuildLVMHowto.
#
@ -536,6 +536,17 @@ case "$SCHROOT_TYPE" in
MNT=`mktemp -d -t schroot-XXXXXX`
esac
# Debian doesn't have overlayfs yet
case "$SCHROOT_TYPE" in
directory|file)
if grep -q '\soverlayfs$' /proc/filesystems \
|| (/sbin/modprobe -l | grep -Fq '/overlayfs.ko'); then
OVERLAY_FS=overlayfs
else
OVERLAY_FS=aufs
fi
esac
# work around apt's GPG invocation that fails without root's .gnupg directory
sudo mkdir -p -m 0700 "$MNT"/root/.gnupg
@ -619,7 +630,7 @@ EOM
;;
directory|file)
cat >> "${TEMP_SCHROOTCONF}" <<EOM
union-type=overlayfs
union-type=$OVERLAY_FS
${SCHROOT_TYPE}=CHROOT_PATH
EOM
;;