X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fschroot%2Ffiles%2Fsetup-dchroot;h=7f372fe9eb79d5f65fce639dea85b34a77d550e4;hb=51c79070603003701cef47513835b6d3e41e64fc;hp=b91a249363ce4bbf0fa397ed7ee44b1ed80fc9df;hpb=f2610eb3cfce4a4b0ed63b80c69668c862446853;p=mirror%2Fdsa-puppet.git diff --git a/modules/schroot/files/setup-dchroot b/modules/schroot/files/setup-dchroot index b91a24936..7f372fe9e 100755 --- a/modules/schroot/files/setup-dchroot +++ b/modules/schroot/files/setup-dchroot @@ -185,6 +185,7 @@ if [ -e /etc/schroot/dsa/default-mirror ]; then mirror=$(cat /etc/schroot/dsa/default-mirror ) fi mirror="${mirror:-https://deb.debian.org/debian}" +smirror="https://deb.debian.org/debian-security" configonly="" force="" basedir="/srv/chroot" @@ -195,7 +196,7 @@ sbuildnames="" ubuntu="" groupuser="Debian,guest,d-i" grouproot="" -include="apt,fakeroot" +include="apt,fakeroot,ca-certificates" users="" usersroot="" bare="" @@ -352,8 +353,17 @@ case "$suite" in ;; esac +bindir=$(mktemp -d) +cleanup+=("rm -r $bindir") +cat > "$bindir/wget" << 'EOF' +#!/bin/sh +exec /usr/bin/wget --ca-directory=/etc/ssl/ca-global "$@" +EOF +chmod +x "$bindir/wget" + set -x -debootstrap \ +PATH="$bindir:$PATH" \ + debootstrap \ --keyring "$keyring" \ --include="$include" \ --variant=buildd \ @@ -398,6 +408,13 @@ done EOF chmod +x "$rootdir/usr/local/sbin/policy-rc.d" +case "$suite" in + jessie) # LTS updates + echo "deb ${smirror} ${suite}/updates main" >> "$rootdir/etc/apt/sources.list" + chroot "$rootdir" apt-get update + chroot "$rootdir" apt-get dist-upgrade -y + ;; +esac if [ -n "$ubuntu" ]; then echo "deb $mirror ${suite}-updates main" >> "$rootdir/etc/apt/sources.list" echo "deb $mirror ${suite}-security main" >> "$rootdir/etc/apt/sources.list"