[28292] in Source-Commits
reactivate commit: Add setup.d to umount -l /afs
daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Sat Jul 5 11:57:51 2014
Date: Sat, 5 Jul 2014 11:57:44 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201407051557.s65FviHP032137@drugstore.mit.edu>
To: source-commits@MIT.EDU
https://github.com/mit-athena/reactivate/commit/929d139164f72496dfd3dddf6938873373241a83
commit 929d139164f72496dfd3dddf6938873373241a83
Author: Jonathan Reed <jdreed@mit.edu>
Date: Mon Jun 23 16:56:18 2014 -0400
Add setup.d to umount -l /afs
Lazily umount /afs inside the chroot, before attempting the
normal umount. gvfs can leave something hanging around such that
a normal umount returns EBUSY. (Trac: #1500)
debian/11umount-afs | 28 ++++++++++++++++++++++++++++
debian/changelog | 5 ++++-
debian/debathena-reactivate.install | 1 +
3 files changed, 33 insertions(+), 1 deletions(-)
diff --git a/debian/11umount-afs b/debian/11umount-afs
new file mode 100755
index 0000000..fbe5f4c
--- /dev/null
+++ b/debian/11umount-afs
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+set -e
+
+. "$SETUP_DATA_DIR/common-data"
+. "$SETUP_DATA_DIR/common-functions"
+
+# schroot 1.6 deprecates script-config. Once we stop building
+# for precise, we can drop this entire conditional block and simply
+# source $SETUP_DATA_DIR/common-config
+if [ -f "$SETUP_DATA_DIR/common-config" ]; then
+ . "$SETUP_DATA_DIR/common-config"
+elif [ -n "$CHROOT_SCRIPT_CONFIG" ] && \
+ [ -f "$CHROOT_SCRIPT_CONFIG" ]; then
+ . "$CHROOT_SCRIPT_CONFIG"
+elif [ "$STATUS" = "ok" ]; then
+ fatal "Debathena has no idea how to deal with this schroot configuration."
+fi
+
+if [ $STAGE = "setup-stop" ]; then
+ # We're un-bind-mounting /afs with -l, we don't need the
+ # flock(1) code from 10mount
+ if [ -e "${CHROOT_MOUNT_LOCATION}/afs" ]; then
+ info "Attempting lazy unmount of ${CHROOT_MOUNT_LOCATION}/afs"
+ umount -l "${CHROOT_MOUNT_LOCATION}/afs" || \
+ warn "Couldn't umount /afs in chroot."
+ fi
+fi
diff --git a/debian/changelog b/debian/changelog
index 96d7a6f..bca4eaf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,8 +4,11 @@ debathena-reactivate (2.0.47) UNRELEASED; urgency=low
(Ending stale chroots will cause the file to stick around)
(Trac: #1497)
* bind-mount /sys with rbind (Trac: #1499)
+ * Add a setup.d script (11umount-afs) to lazily unmount /afs inside the
+ chroot, because gvfs keeps something open that causes the regular
+ umount to return EBUSY. (Trac: #1500)
- -- Jonathan Reed <jdreed@mit.edu> Mon, 23 Jun 2014 16:43:35 -0400
+ -- Jonathan Reed <jdreed@mit.edu> Mon, 23 Jun 2014 16:56:11 -0400
debathena-reactivate (2.0.46) unstable; urgency=low
diff --git a/debian/debathena-reactivate.install b/debian/debathena-reactivate.install
index 4d0a6fd..ab88ad5 100644
--- a/debian/debathena-reactivate.install
+++ b/debian/debathena-reactivate.install
@@ -16,6 +16,7 @@ debian/reactivate usr/lib/debathena-reactivate
debian/dbus-daemon-launch-helper lib/debathena-reactivate
debian/90debathena-reactivate etc/schroot/setup.d
debian/16killprocs-no-really etc/schroot/setup.d
+debian/11umount-afs etc/schroot/setup.d
debian/dbus-daemon-launch-helper-blacklist usr/share/debathena-reactivate
debian/debathena-reactivate-sudoers etc/sudoers.d
command-not-found.mo usr/share/locale/en/LC_MESSAGES