summaryrefslogtreecommitdiffstats
path: root/vagrant
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2019-07-09 09:27:40 +0000
committerintrigeri <intrigeri@boum.org>2019-10-19 07:03:17 +0000
commit6c7e91d1b96dedc671c2046ff90049fcc98cb75c (patch)
tree6e1a836053ae0813c583dc90f7e819afdb8c970e /vagrant
parentb2559c50ba6c3f839da89d475964160889f8fbad (diff)
Update Vagrant box to Buster.
While I'm at it: - Cleaning up obsolete bits - Installing gnupg, otherwise apt-key fails.
Diffstat (limited to 'vagrant')
-rwxr-xr-xvagrant/definitions/tails-builder/postinstall.sh30
-rw-r--r--vagrant/lib/tails_build_settings.rb4
-rwxr-xr-xvagrant/provision/setup-tails-builder2
3 files changed, 10 insertions, 26 deletions
diff --git a/vagrant/definitions/tails-builder/postinstall.sh b/vagrant/definitions/tails-builder/postinstall.sh
index b8d0e4a..345658f 100755
--- a/vagrant/definitions/tails-builder/postinstall.sh
+++ b/vagrant/definitions/tails-builder/postinstall.sh
@@ -38,15 +38,16 @@ APT::Periodic::Enable "0";
EOF
echo "I: Installing Tails APT repo signing key..."
+apt-get -y install gnupg
apt-key add /tmp/tails.binary.gpg
echo "I: Adding standard APT suites..."
cat "/etc/apt/sources.list" | \
- sed -e 's/stretch/stretch-updates/' \
- > "/etc/apt/sources.list.d/stretch-updates.list"
+ sed -e 's/buster/buster-updates/' \
+ > "/etc/apt/sources.list.d/buster-updates.list"
-echo "deb http://time-based.snapshots.deb.tails.boum.org/debian-security/${DEBIAN_SECURITY_SERIAL}/ stretch/updates main" \
- > "/etc/apt/sources.list.d/stretch-security.list"
+echo "deb http://time-based.snapshots.deb.tails.boum.org/debian-security/${DEBIAN_SECURITY_SERIAL}/ buster/updates main" \
+ > "/etc/apt/sources.list.d/buster-security.list"
echo "I: Adding our builder-jessie suite with live-build and pinning it low..."
echo "deb http://time-based.snapshots.deb.tails.boum.org/tails/${TAILS_SERIAL}/ builder-jessie main" > "/etc/apt/sources.list.d/tails.list"
@@ -61,29 +62,12 @@ sed -e 's/^[[:blank:]]*//' > /etc/apt/preferences.d/live-build <<EOF
Pin-Priority: 999
EOF
-sed -e 's/^[[:blank:]]*//' > /etc/apt/preferences.d/stretch-backports << EOF
+sed -e 's/^[[:blank:]]*//' > /etc/apt/preferences.d/buster-backports << EOF
Package: *
- Pin: release n=stretch-backports
+ Pin: release n=buster-backports
Pin-Priority: 100
EOF
-# XXX: remove once the Vagrant build VM has mtools >= 4.0.18-2.1 (Buster)
-echo "I: Adding Debian Buster APT suite..."
-echo " deb http://time-based.snapshots.deb.tails.boum.org/debian/${DEBIAN_SERIAL}/ buster main"\
- > "/etc/apt/sources.list.d/buster.list"
-echo "I: Adding APT pinning for Buster..."
-sed -e 's/^[[:blank:]]*//' > /etc/apt/preferences.d/buster << EOF
- Package: *
- Pin: release n=buster
- Pin-Priority: -1
-EOF
-echo "I: Adding APT pinning for mtools..."
-sed -e 's/^[[:blank:]]*//' > /etc/apt/preferences.d/mtools << EOF
- Package: mtools
- Pin: release n=buster
- Pin-Priority: 999
-EOF
-
apt-get update
echo "I: Installing Vagrant dependencies..."
diff --git a/vagrant/lib/tails_build_settings.rb b/vagrant/lib/tails_build_settings.rb
index 4c09ec5..cdc0812 100644
--- a/vagrant/lib/tails_build_settings.rb
+++ b/vagrant/lib/tails_build_settings.rb
@@ -3,7 +3,7 @@
# vi: set ft=ruby :
# Hostname of the virtual machine (must be in /etc/hosts)
-VIRTUAL_MACHINE_HOSTNAME = 'vagrant-stretch'
+VIRTUAL_MACHINE_HOSTNAME = 'vagrant-buster'
# Approximate amount of RAM needed to run the builder's base system
# and perform a build
@@ -20,7 +20,7 @@ VM_MEMORY_FOR_RAM_BUILDS = VM_MEMORY_BASE + BUILD_SPACE_REQUIREMENT
# The builder VM's platform
ARCHITECTURE = "amd64"
-DISTRIBUTION = "stretch"
+DISTRIBUTION = "buster"
# The name of the Vagrant box
def box_name
diff --git a/vagrant/provision/setup-tails-builder b/vagrant/provision/setup-tails-builder
index b223266..f0e35d5 100755
--- a/vagrant/provision/setup-tails-builder
+++ b/vagrant/provision/setup-tails-builder
@@ -51,7 +51,7 @@ echo "I: Updating debian-security APT source..."
# Always set the latest serial for debian-security
stable_serial="$(grep -Po '\d{10}' /etc/apt/sources.list)"
security_serial="$(latest_serial debian-security)"
-sed -i -e "s/${stable_serial}/${security_serial}/g" /etc/apt/sources.list.d/stretch-security.list
+sed -i -e "s/${stable_serial}/${security_serial}/g" /etc/apt/sources.list.d/buster-security.list
echo "I: Current APT sources are:"
cat /etc/apt/sources.list /etc/apt/sources.list.d/*