X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fschroot%2Ffiles%2Fsetup-dchroot;h=ab76466a67cf1ce18a27d91d3b27d8c8e4d89511;hb=e139f887e18db02af9d83eca0ed3f38811ce3d94;hp=24a1857a71c03e7c8bb6008db33701b189ddeb24;hpb=faae8324a9f4f9aebf94ea891a769e5b73496587;p=mirror%2Fdsa-puppet.git diff --git a/modules/schroot/files/setup-dchroot b/modules/schroot/files/setup-dchroot index 24a1857a7..ab76466a6 100755 --- a/modules/schroot/files/setup-dchroot +++ b/modules/schroot/files/setup-dchroot @@ -116,7 +116,6 @@ EOF sid) genschrootconf "experimental" "$arch" "$target" ;; - #experimental|jessie) experimental) : ;; @@ -159,7 +158,7 @@ keyring=/usr/share/keyrings/debian-archive-keyring.gpg personality="dsa" sbuildnames="" ubuntu="" -groupuser="Debian,guest" +groupuser="Debian,guest,d-i" grouproot="" users="" usersroot="" @@ -255,7 +254,17 @@ fi suite="$1"; shift tuple="${suite}_${arch}" -builddir=${builddir:-$basedir} +if [ -z "${builddir:-}" ]; then + builddir=${builddir:-$basedir} + for u in schroot-unpack unpack; do + # if one of these directories exists and is on a different filesystem, prefer it. + candidate="$builddir/$u" + if [ -e "$candidate" ] && + [ "$(stat -f --printf '%i\n' "$builddir" )" != "$(stat -f --printf '%i\n' "$candidate")" ]; then + builddir="$candidate" + fi + done +fi [ -d "$basedir" ] || die "Error: $basedir does not exist (or is not a directory)." [ -d "$builddir" ] || die "Error: $builddir does not exist (or is not a directory)." @@ -312,7 +321,7 @@ esac chroot "$rootdir" apt-get update -chroot "$rootdir" apt-get install -y --force-yes --no-install-recommends policyrcd-script-zg2 +chroot "$rootdir" apt-get install -y --no-install-recommends policyrcd-script-zg2 cat > "$rootdir/usr/local/sbin/policy-rc.d" << 'EOF' #!/bin/sh @@ -331,9 +340,9 @@ while true; do done EOF chmod +x "$rootdir/usr/local/sbin/policy-rc.d" -[ -z "$bare" ] && [ -z "$ubuntu" ] && chroot "$rootdir" apt-get install -y --force-yes --no-install-recommends locales-all -chroot "$rootdir" apt-get install -y --force-yes --no-install-recommends build-essential -[ -z "$bare" ] && chroot "$rootdir" apt-get install -y --force-yes --no-install-recommends zsh less vim fakeroot devscripts gdb +[ -z "$bare" ] && [ -z "$ubuntu" ] && chroot "$rootdir" apt-get install -y --no-install-recommends locales-all +chroot "$rootdir" apt-get install -y --no-install-recommends build-essential +[ -z "$bare" ] && chroot "$rootdir" apt-get install -y --no-install-recommends zsh less vim fakeroot devscripts gdb rm -f "$rootdir/etc/apt/sources.list" "$rootdir/etc/apt/sources.list.d/*" chroot "$rootdir" apt-get clean umount "$rootdir/dev" 2>/dev/null || true