summaryrefslogtreecommitdiff
path: root/dev-util/schroot
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/schroot')
-rw-r--r--dev-util/schroot/Manifest11
-rw-r--r--dev-util/schroot/files/schroot-1.6.10-cmake-add-additional-regex-tests.patch70
-rw-r--r--dev-util/schroot/files/schroot.confd9
-rw-r--r--dev-util/schroot/files/schroot.initd41
-rw-r--r--dev-util/schroot/metadata.xml10
-rw-r--r--dev-util/schroot/schroot-1.6.10-r3.ebuild129
-rw-r--r--dev-util/schroot/schroot-1.6.10-r4.ebuild146
7 files changed, 416 insertions, 0 deletions
diff --git a/dev-util/schroot/Manifest b/dev-util/schroot/Manifest
new file mode 100644
index 000000000000..464b9e3093cb
--- /dev/null
+++ b/dev-util/schroot/Manifest
@@ -0,0 +1,11 @@
+AUX schroot-1.6.10-cmake-add-additional-regex-tests.patch 2283 SHA256 8effe0d973d51b52e030b3b686847e6029c750bcac5893fa5f6a0d2a07d64b9b SHA512 e68698dbace2e79c9e89525f22314fb75a42568cbeeac570334956b14051ed8dddbdffb3bdd769f77a6609159377a64df7de5041aff7512d100bbdd72aa6d4c0 WHIRLPOOL 3ecad5858d87068c26ab7808b0e2009eca7204359cdbbb41ce1afbe07b95282fb819fd7a3233833d2380ab1b92ad05b48070fdf1e6ebf2fa7459666712cebb7d
+AUX schroot.confd 371 SHA256 68efa89cd4b358c6de050ebb5b973c87ee514fe5e5d888f63aa0af85aa4736c8 SHA512 b86944ee7fb2622ef0bd9c9252a51724916427c6bffa1dc0623a40190e4866ffda48f8999790365f4a589ea647e3695077b6cd7ec8a1d1ab6bd026a5c7480c98 WHIRLPOOL 921b6677f8400e94d8f5714e24d8c8cf1375fa4b79dac1fe4f67ef338f7c8ad3d8ee072ef64d70473f86c27f93e4b413d4fd3c69968be88f46a6ca87a9fbbc58
+AUX schroot.initd 706 SHA256 44bffc141c13c7a5d724606de9b906d93ffec280bfa2c6cdfe3a9b1114b83a92 SHA512 8ce31a67cb4a6064875eed2d5cf3f11ce13f322b19df6b51dc08df2de42447f09124d725d70b1c4ff906644ef52a1f1b5b295575f795a96438bad3dea52f3d15 WHIRLPOOL 787facd9830c91289cd9f8f1fdd9dca1c0818dd70dc8d6b6acb360b3e294711ad625d14a6a807374f908561b0f37127def0b899d6425ca1e332eb72785d7f110
+DIST schroot_1.6.10-1.debian.tar.xz 27108 SHA256 d93a7acc4b6c06a024b6bb0bfc1867a144193aadbb09cab454373c2983120cd9 SHA512 2b989054485f397c7de4f9d5e625f2bb2d4738ecb087ff83903a247696a2c98dea611e9743d4ae6bee401b122c21aac4f5e220b5e544f9968f94d6f326fadfa6 WHIRLPOOL 7f9a1b782093321b0dc236098688dacd93f608725bd551ef848262049da3f08b12b2ec34188413ec5b16070753acdc0a07af8d723599581340ecd9cfc6493b67
+DIST schroot_1.6.10-2.debian.tar.xz 34296 SHA256 71ed5b264029bd62226337a29f7ec926c29724c9540b24f7ccccfbef81c2391a SHA512 ea980199b90a2cffc36348e01e2de229c5cb4321f10bcde4b593eeaaa18f34ab9187cc9c717e6043c477819fefbd793cc707e1e77a5bae1c1815a668956cd84c WHIRLPOOL b6de6552c78418cde8ffc201017d3665a85a161d2417648b8213a37979889ae54380da051c59f1643d28989ae3f905976493b860002e1a4ded3aaea1434d3673
+DIST schroot_1.6.10.orig.tar.xz 797328 SHA256 3ce8dfd9cb97b099e4b6d4ccec421d6cc8c9ef84574681e928a12badb5643d0b SHA512 25155989c7811ab4c7bf3cdceaa8d0ffb12f08388143891def96fcd205f1cc401dad9a74f0e9a9ef8610d50174ff8319a8368401431dc87e1a11c0241e61fcbe WHIRLPOOL 91c4682101c6eeb1f56d3e5c583a55af1164abd6853a822ac5c5f1c6820140fb1049765877e97985a90264f4e9d898886487fac794a794904f98210494974090
+EBUILD schroot-1.6.10-r3.ebuild 2930 SHA256 26fdc60b8824c184422ffe60446cba7fcb3b1439355ab41a032e352378075c9a SHA512 cbec9893b42377c72674632b4bc4774c4def3ee0834d863c82ea27435822805b5d52c07f845bf27946377f23e3f79471321ad2258c61fb932ea8d24ae493157f WHIRLPOOL 25fc59e8b7a759a12879feeb171d33ea03034955792eee0c902f7d522db738511c88ac184efdaf1ab8d761bf8f96ad12b8f3b378918131dfccefa4b65ed3c533
+EBUILD schroot-1.6.10-r4.ebuild 3762 SHA256 6113c606de65af8e9eefc5fcab0c01fb1a0054061ce0312cfc17e2d05e4e53a7 SHA512 0bf878ab01c421189efcada441fac7aa815f9e729e080355fac5f5bbb35f939b4452bbea09c933583758b3206264c51d9a67d53e616e27785b357ec7654ea408 WHIRLPOOL 55c46ed60157bc8f81e8765315c3a1e171bb2e98d43f34067f0829ae0d2ae518e0790ebdd2f419d7fe87cfa560d184134d2866b186a1be0182fb672ca41bd3ca
+MISC ChangeLog 3406 SHA256 435c4af915fb13df057bcbd5e236759bd05fd08bbb79a5715813dc960b43a076 SHA512 1e86626fec5928fd70bad7fdf37c16fccb4f803bd8f007d0c276c3bc4a085db734c8c8c4f765bd79bfe0b13fbb07c30aed8a0e56d56181c44e5f9125adeda159 WHIRLPOOL e47c44a7900ba0bc21a2001aa9b6d73dd410ac783b715805aed75890a47f920ed01e848e3be11112dd9dd4b702e6841d009054d0dc4403335c8da50b41508ebf
+MISC ChangeLog-2015 8070 SHA256 3f91afa740b3945c3439d3c8d207dd7e6fb6b3666488e98469e7fb17037637fb SHA512 936ba7ba19e5a11b4be82b2bc7ad95ca6bf5d97145e97941e4291458cb2665495566a29edd71e0ec66b7391dceed84b8452286590011318c540e42e1932d94c3 WHIRLPOOL ec5c029225e0417f6fac0d5668a8d77a91683e7f2650cdd0276980ef3305dc44829f70a10521df06638069129b7edda15a7115fc728b71cf6ebd9f15ddb310bd
+MISC metadata.xml 451 SHA256 3dc528c94c8ba05d3a20cefb5372df9259c69baf205807b9e275ca173be49aaf SHA512 372b1bc77d13fde4eff8f5e45bab2a3c75152d05c7fbc272e5bb119e2edf9f8931acb426ca06b413cbcd7b4476424fdbc9eec49b865dd9cd2990bed88201d40a WHIRLPOOL 4870bd45c2f1ca1e29d13bcea1b5930b9b1719f41bd719c3d582051ded243e3f30fd0e1961c5c1f7b8654d764fcd3fc9812d07736fa4efad4301a2624d72f262
diff --git a/dev-util/schroot/files/schroot-1.6.10-cmake-add-additional-regex-tests.patch b/dev-util/schroot/files/schroot-1.6.10-cmake-add-additional-regex-tests.patch
new file mode 100644
index 000000000000..1660f18ae4b8
--- /dev/null
+++ b/dev-util/schroot/files/schroot-1.6.10-cmake-add-additional-regex-tests.patch
@@ -0,0 +1,70 @@
+From 8c9139249689570ff2f4d058ed1031f0cbb6c084 Mon Sep 17 00:00:00 2001
+From: Roger Leigh <rleigh@codelibre.net>
+Date: Sun, 26 Jul 2015 14:00:13 +0100
+Subject: [PATCH] cmake: Add additional regex tests and corresponding unit
+ tests
+
+---
+ cmake/regex-checks.cmake | 10 ++++++++++
+ test/sbuild-regex.cc | 20 ++++++++++++++++++++
+ 2 files changed, 30 insertions(+)
+
+diff --git a/cmake/regex-checks.cmake b/cmake/regex-checks.cmake
+index d0bb211..60507ec 100644
+--- a/cmake/regex-checks.cmake
++++ b/cmake/regex-checks.cmake
+@@ -30,6 +30,16 @@ int main() {
+ if (${namespace}_match(fail, bar)) return 11;
+ if (${namespace}_match(fail, chk)) return 12;
+
++ // Checks for broken support in GCC 4.9 and 5.1
++ ${namespace} range1(\"^[a-z0-9][a-z0-9-]*\$\", ${namespace}::extended);
++ ${namespace} range2(\"^[a-z0-9][-a-z0-9]*\$\", ${namespace}::extended);
++ if (!${namespace}_match(test, range1)) return 13;
++ if (!${namespace}_match(test, range2)) return 14;
++ if (!${namespace}_match(\"a-\", range1)) return 15;
++ if (!${namespace}_match(\"a-\", range2)) return 16;
++ if (${namespace}_match(\"-a\", range1)) return 17;
++ if (${namespace}_match(\"-a\", range2)) return 18;
++
+ return 0;
+ }"
+ ${outvar})
+diff --git a/test/sbuild-regex.cc b/test/sbuild-regex.cc
+index 915e915..a8520c5 100644
+--- a/test/sbuild-regex.cc
++++ b/test/sbuild-regex.cc
+@@ -33,6 +33,8 @@ class test_regex : public TestCase
+ CPPUNIT_TEST(test_output);
+ CPPUNIT_TEST(test_input);
+ CPPUNIT_TEST(test_match);
++ CPPUNIT_TEST(test_match_bracket1);
++ CPPUNIT_TEST(test_match_bracket2);
+ CPPUNIT_TEST_EXCEPTION(test_input_fail, std::regex_error);
+ CPPUNIT_TEST_SUITE_END();
+
+@@ -88,6 +90,24 @@ class test_regex : public TestCase
+ }
+
+ void
++ test_match_bracket1()
++ {
++ sbuild::regex r("^[a-z0-9][a-z0-9-]*$");
++ CPPUNIT_ASSERT(sbuild::regex_search("foobar", r));
++ CPPUNIT_ASSERT(sbuild::regex_search("a-", r));
++ CPPUNIT_ASSERT(!sbuild::regex_search("-a", r));
++ }
++
++ void
++ test_match_bracket2()
++ {
++ sbuild::regex r("^[a-z0-9][-a-z0-9]*$");
++ CPPUNIT_ASSERT(sbuild::regex_search("foobar", r));
++ CPPUNIT_ASSERT(sbuild::regex_search("a-", r));
++ CPPUNIT_ASSERT(!sbuild::regex_search("-a", r));
++ }
++
++ void
+ test_input_fail()
+ {
+ sbuild::regex r;
diff --git a/dev-util/schroot/files/schroot.confd b/dev-util/schroot/files/schroot.confd
new file mode 100644
index 000000000000..b62263175721
--- /dev/null
+++ b/dev-util/schroot/files/schroot.confd
@@ -0,0 +1,9 @@
+# This is a configuration file for /etc/init.d/schroot; it allows you
+# to perform common modifications to the behavior of schroot
+# initialization without editing the init script.
+
+# What do we want to do with "orphan" sessions when starting or
+# restarting? Recover them (leave empty or set to "recover") or just
+# end them (set to "end")?
+SESSIONS_RECOVER="recover"
+
diff --git a/dev-util/schroot/files/schroot.initd b/dev-util/schroot/files/schroot.initd
new file mode 100644
index 000000000000..be58c3a0f2d0
--- /dev/null
+++ b/dev-util/schroot/files/schroot.initd
@@ -0,0 +1,41 @@
+#!/sbin/openrc-run
+
+depend() {
+ need localmount
+ after net netmount
+}
+
+start() {
+ local msg param
+ case "${SESSIONS_RECOVER}" in
+ end)
+ msg="Ending"
+ param="--end-session"
+ ;;
+ recover|"")
+ msg="Recovering"
+ param="--recover-session"
+ ;;
+ *)
+ ewarn "Invalid value \"$SESSIONS_RECOVER\" for \$SESSIONS_RECOVER, using \"recover\""
+ msg="Recovering"
+ param="--recover-session"
+ ;;
+ esac
+
+ einfo "$msg schroot sessions"
+ eindent
+ local chroot
+ local chroots="$(schroot --all-sessions --list --quiet)"
+ if [ -n "$chroots" ]; then
+ for chroot in $chroots; do
+ ebegin "$chroot"
+ schroot --chroot=$chroot $param
+ eend $?
+ done
+ else
+ einfo "(none)"
+ fi
+ eoutdent
+ einfo "...done"
+}
diff --git a/dev-util/schroot/metadata.xml b/dev-util/schroot/metadata.xml
new file mode 100644
index 000000000000..cc3f6c238b48
--- /dev/null
+++ b/dev-util/schroot/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+<use>
+ <flag name="btrfs">Enable support for chroots using btrfs snapshots.</flag>
+ <flag name="dchroot">Enables the building of a wrapper named "dchroot", replacing <pkg>sys-apps/dchroot</pkg>.</flag>
+ <flag name="lvm">Enable support for chroots using LVM snapshots.</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-util/schroot/schroot-1.6.10-r3.ebuild b/dev-util/schroot/schroot-1.6.10-r3.ebuild
new file mode 100644
index 000000000000..003cb75a0647
--- /dev/null
+++ b/dev-util/schroot/schroot-1.6.10-r3.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit cmake-utils eutils pam versionator bash-completion-r1
+
+MY_P=${PN}_${PV}
+DEB_REL=1
+
+DESCRIPTION="Utility to execute commands in a chroot environment"
+HOMEPAGE="http://packages.debian.org/source/sid/schroot"
+SRC_URI="mirror://debian/pool/main/${PN::1}/${PN}/${MY_P}.orig.tar.xz
+ mirror://debian/pool/main/${PN::1}/${PN}/${MY_P}-${DEB_REL}.debian.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="amd64 ~arm x86"
+IUSE="btrfs +dchroot debug doc lvm nls pam test"
+
+COMMON_DEPEND="
+ >=dev-libs/boost-1.42.0
+ >=sys-apps/util-linux-2.16
+ btrfs? ( >=sys-fs/btrfs-progs-0.19-r2 )
+ lvm? ( sys-fs/lvm2 )
+ pam? ( sys-libs/pam )
+"
+
+DEPEND="${COMMON_DEPEND}
+ app-arch/xz-utils
+ sys-apps/groff
+ doc? (
+ app-doc/doxygen
+ media-gfx/graphviz
+ )
+ nls? (
+ >=app-text/po4a-0.40
+ sys-devel/gettext
+ )
+ test? ( >=dev-util/cppunit-1.10.0 )
+"
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/debianutils
+ dchroot? ( !sys-apps/dchroot )
+ nls? ( virtual/libintl )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.6.10-cmake-add-additional-regex-tests.patch"
+)
+
+src_unpack() {
+ unpack ${MY_P}.orig.tar.xz
+ cd "${S}"
+ unpack ${MY_P}-${DEB_REL}.debian.tar.xz
+}
+
+src_prepare() {
+ sed -i -e 's/warn(/message(WARNING /' man/CMakeLists.txt || die
+ sed -i -e '/^have schroot/d' etc/bash_completion/schroot || die
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use btrfs btrfs-snapshot)
+ $(cmake-utils_use dchroot dchroot)
+ $(cmake-utils_use dchroot dchroot-dsa)
+ $(cmake-utils_use debug debug)
+ $(cmake-utils_use doc doxygen)
+ $(cmake-utils_use lvm lvm-snapshot)
+ $(cmake-utils_use nls nls)
+ $(cmake-utils_use pam pam)
+ $(cmake-utils_use test test)
+ -Dbash_completion_dir="$(get_bashcompdir)"
+ -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
+ -DCMAKE_INSTALL_LOCALSTATEDIR="${EPREFIX}/var"
+ )
+ if ! use nls; then
+ mycmakeargs+=(-DPO4A_EXECUTABLE=NOTFOUND)
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile all $(usev doc)
+}
+
+src_test() {
+ if [[ $EUID -ne 0 ]]; then
+ ewarn "Disabling tests because you are not root"
+ return 0
+ fi
+
+ cmake-utils_src_test
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ insinto /usr/share/doc/${PF}/contrib/setup.d
+ doins contrib/setup.d/05customdir contrib/setup.d/09fsck contrib/setup.d/10mount-ssh
+
+ newdoc debian/schroot.NEWS NEWS.debian
+
+ newinitd "${FILESDIR}"/schroot.initd schroot
+ newconfd "${FILESDIR}"/schroot.confd schroot
+
+ if use doc; then
+ docinto html/sbuild
+ dohtml "${BUILD_DIR}"/doc/sbuild/html/*
+ docinto html/schroot
+ dohtml "${BUILD_DIR}"/doc/schroot/html/*
+ fi
+
+ if use pam; then
+ rm -f "${ED}"etc/pam.d/schroot
+ pamd_mimic_system schroot auth account session
+ fi
+}
+
+pkg_postinst() {
+ if [[ ${REPLACING_VERSIONS} == 1.[24]* ]]; then
+ elog "Please read /usr/share/doc/${PF}/NEWS.debian* for important"
+ elog "upgrade information."
+ fi
+}
diff --git a/dev-util/schroot/schroot-1.6.10-r4.ebuild b/dev-util/schroot/schroot-1.6.10-r4.ebuild
new file mode 100644
index 000000000000..280d789e5202
--- /dev/null
+++ b/dev-util/schroot/schroot-1.6.10-r4.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit cmake-utils eutils pam versionator bash-completion-r1
+
+MY_P=${PN}_${PV}
+DEB_REL=2
+
+DESCRIPTION="Utility to execute commands in a chroot environment"
+HOMEPAGE="http://packages.debian.org/source/sid/schroot"
+SRC_URI="mirror://debian/pool/main/${PN::1}/${PN}/${MY_P}.orig.tar.xz
+ mirror://debian/pool/main/${PN::1}/${PN}/${MY_P}-${DEB_REL}.debian.tar.xz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="btrfs +dchroot debug doc lvm nls pam test"
+
+COMMON_DEPEND="
+ >=dev-libs/boost-1.42.0
+ >=sys-apps/util-linux-2.16
+ btrfs? ( >=sys-fs/btrfs-progs-0.19-r2 )
+ lvm? ( sys-fs/lvm2 )
+ pam? ( sys-libs/pam )
+"
+
+DEPEND="${COMMON_DEPEND}
+ app-arch/xz-utils
+ sys-apps/groff
+ doc? (
+ app-doc/doxygen
+ media-gfx/graphviz
+ )
+ nls? (
+ >=app-text/po4a-0.40
+ sys-devel/gettext
+ )
+ test? ( >=dev-util/cppunit-1.10.0 )
+"
+RDEPEND="${COMMON_DEPEND}
+ sys-apps/debianutils
+ dchroot? ( !sys-apps/dchroot )
+ nls? ( virtual/libintl )
+"
+
+PATCHES=(
+ "${S}/debian/patches/Add-support-for-more-compression-formats.patch"
+ "${S}/debian/patches/Add-SESSION_SOURCE-and-CHROOT_SESSION_SOURCE.patch"
+ "${S}/debian/patches/10mount-Move-mount-directory-to-var-run.patch"
+ "${S}/debian/patches/Support-union-mounts-with-overlay-as-in-Linux-4.0.patch"
+ "${S}/debian/patches/GCC5-fixes-on-regexes.patch"
+)
+
+src_unpack() {
+ unpack ${MY_P}.orig.tar.xz
+ cd "${S}"
+ unpack ${MY_P}-${DEB_REL}.debian.tar.xz
+}
+
+src_prepare() {
+ sed -i -e 's/warn(/message(WARNING /' man/CMakeLists.txt || die
+ sed -i -e '/^have schroot/d' etc/bash_completion/schroot || die
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -Dbtrfs-snapshot=$(usex btrfs)
+ -Ddchroot=$(usex dchroot)
+ -Ddchroot-dsa=$(usex dchroot)
+ -Ddebug=$(usex debug)
+ -Ddoxygen=$(usex doc)
+ -Dlvm-snapshot=$(usex lvm)
+ -Dnls=$(usex nls)
+ -Dpam=$(usex pam)
+ -Dtest=$(usex test)
+ -Dbash_completion_dir="$(get_bashcompdir)"
+ -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}/etc"
+ -DCMAKE_INSTALL_LOCALSTATEDIR="${EPREFIX}/var"
+ )
+ if ! use nls; then
+ mycmakeargs+=(-DPO4A_EXECUTABLE=NOTFOUND)
+ fi
+
+ cmake-utils_src_configure
+}
+
+src_compile() {
+ cmake-utils_src_compile all $(usev doc)
+}
+
+src_test() {
+ if [[ $EUID -ne 0 ]]; then
+ ewarn "Disabling tests because you are not root"
+ return 0
+ fi
+
+ cmake-utils_src_test
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ insinto /usr/share/doc/${PF}/contrib/setup.d
+ doins contrib/setup.d/05customdir contrib/setup.d/09fsck contrib/setup.d/10mount-ssh
+
+ newdoc debian/schroot.NEWS NEWS.debian
+
+ newinitd "${FILESDIR}"/schroot.initd schroot
+ newconfd "${FILESDIR}"/schroot.confd schroot
+
+ if use doc; then
+ docinto html/sbuild
+ dohtml "${BUILD_DIR}"/doc/sbuild/html/*
+ docinto html/schroot
+ dohtml "${BUILD_DIR}"/doc/schroot/html/*
+ fi
+
+ if use pam; then
+ rm -f "${ED}"etc/pam.d/schroot
+ pamd_mimic_system schroot auth account session
+ fi
+}
+
+pkg_postinst() {
+ if [[ ${REPLACING_VERSIONS} == 1.[24]* ]]; then
+ elog "Please read /usr/share/doc/${PF}/NEWS.debian* for important"
+ elog "upgrade information."
+ fi
+ # If installing to a running system, upgrading from <=1.6.10-r3, then
+ # make sure that the runtime dirs are still visible to the new install
+ if [[ ${ROOT} == / && ${REPLACING_VERSIONS} ]] && ! version_is_at_least 1.6.10-r4 ${REPLACING_VERSIONS}; then
+ ln -s "${EPREFIX}"/var/lib/schroot "${EPREFIX}"/var/run/schroot
+ fi
+}
+
+pkg_postrm() {
+ if [[ -z ${REPLACED_BY_VERSION} ]]; then
+ for dir in $(find "${EROOT}"/var/lib/schroot/mount -maxdepth 1 -type d | tac); do
+ rmdir "$dir" || elog "Failed to remove session mount directory $dir: Please check for any stray mounts or data under this directory and remove by hand."
+ done
+ fi
+}