summaryrefslogtreecommitdiffstats
path: root/vagrant/provision
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2015-01-26 14:23:37 +0100
committerTails developers <amnesia@boum.org>2015-01-26 14:24:13 +0100
commit4477221cbe686f07a2a1e273cee62a440b7cff1a (patch)
treedb4016aeafcbfbf8b7f51e5fd37135b1d83642bc /vagrant/provision
parent50cd9a5ea10e01d80171640e6d2851146a62bcc7 (diff)
parent822a918a4063444ddcb79053186d9ae142d05eea (diff)
Merge branch 'feature/8726-use-homogenous-Debian-mirrors-at-build-time' into devel
Fix-committed: #8726
Diffstat (limited to 'vagrant/provision')
-rwxr-xr-xvagrant/provision/setup-tails-builder24
1 files changed, 16 insertions, 8 deletions
diff --git a/vagrant/provision/setup-tails-builder b/vagrant/provision/setup-tails-builder
index 528925f..6063ea3 100755
--- a/vagrant/provision/setup-tails-builder
+++ b/vagrant/provision/setup-tails-builder
@@ -90,17 +90,25 @@ apt-get -y --no-install-recommends install \
# Add build script
install -o root -g root -m 755 /vagrant/provision/assets/build-tails /usr/local/bin
-update_live_build_conf()
+disable_live_build_conf()
{
local var="$1"
- local value="$2"
- mkdir -p /etc/live
- touch /etc/live/build.conf
+ [ -e /etc/live/build.conf ] || return 0
sed -e "/^[[:space:]]*$var=/d" -i /etc/live/build.conf
- echo "$var='$value'" >> /etc/live/build.conf
}
-# Force APT repositories to a fixed mirror
-update_live_build_conf LB_MIRROR_BINARY "http://ftp.us.debian.org/debian/"
-update_live_build_conf LB_PARENT_MIRROR_BINARY "http://ftp.us.debian.org/debian/"
+# Force live-build to use the mirrors configured in auto/config
+for prefix in MIRROR PARENT_MIRROR ; do
+ for target in BOOTSTRAP BINARY CHROOT ; do
+ for archive in '' BACKPORTS SECURITY UPDATES VOLATILE ; do
+ if [ -z "$archive" ] ; then
+ archive_suffix=''
+ else
+ archive_suffix="_${archive}"
+ fi
+ var="LB_${prefix}_${target}${archive_suffix}"
+ disable_live_build_conf "$var"
+ done
+ done
+done