X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fporterbox%2Ffiles%2Fsetup-dchroot;h=46b28b9adb3185df68260e4e2dc2acfbb33bf9bb;hb=e7e3307d608ac23a46f535631138bce33c6e8432;hp=61d91b2d4c9dc79b33022e6f70ae8f1f0e8912ff;hpb=d37c6d0845a3ac4f6ca58294bb8acf4a3bed605f;p=mirror%2Fdsa-puppet.git diff --git a/modules/porterbox/files/setup-dchroot b/modules/porterbox/files/setup-dchroot index 61d91b2d4..46b28b9ad 100755 --- a/modules/porterbox/files/setup-dchroot +++ b/modules/porterbox/files/setup-dchroot @@ -39,6 +39,7 @@ OPTIONS: -a ARCH debootstrap arch [$arch] -m MIRROR http mirror to use [$mirror] -b basedir place where to put the tarball [$basedir] + -B install less stuff into chroot -c write config only -d dir place where to build the chroot [${builddir:-$basedir}] -f overwrite config and target tarball @@ -152,10 +153,11 @@ sbuildnames="" ubuntu="" groupuser="Debian,guest" grouproot="" +bare="" declare -a cleanup trap do_cleanup EXIT -while getopts "a:b:cd:fg:hk:m:p:r:su" OPTION +while getopts "a:b:Bcd:fg:hk:m:p:r:su" OPTION do case $OPTION in a) @@ -164,6 +166,9 @@ do b) basedir="$OPTARG" ;; + B) + bare="1" + ;; c) configonly="1" ;; @@ -276,7 +281,8 @@ done EOF chmod +x "$rootdir/usr/local/sbin/policy-rc.d" [ -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 zsh build-essential less vim fakeroot devscripts gdb +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 rm -f "$rootdir/etc/apt/sources.list" "$rootdir/etc/apt/sources.list.d/*" chroot "$rootdir" apt-get clean umount "$rootdir/sys" || true