summaryrefslogtreecommitdiffstats
path: root/vagrant/provision
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2015-01-19 11:49:26 +0000
committerTails developers <amnesia@boum.org>2015-01-19 11:49:26 +0000
commitf9e8b0aabf9b2188dfe3401637c46f9f157dfd49 (patch)
tree30f1b32d9a8c49ae7d233bedcd6254d8d83fe86e /vagrant/provision
parent8396593bb6babe6af931e419cbe3a470273c1887 (diff)
When provisioning a Vagrant build VM, remove all local live-build mirrors configuration.
We want everybody to use the mirrors configured in auto/config.
Diffstat (limited to 'vagrant/provision')
-rwxr-xr-xvagrant/provision/setup-tails-builder22
1 files changed, 14 insertions, 8 deletions
diff --git a/vagrant/provision/setup-tails-builder b/vagrant/provision/setup-tails-builder
index 528925f..32bad35 100755
--- a/vagrant/provision/setup-tails-builder
+++ b/vagrant/provision/setup-tails-builder
@@ -90,17 +90,23 @@ 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