Commit 03923fe8 authored by bertagaz's avatar bertagaz
Browse files

Merge remote-tracking branch 'origin/feature/11738-stretch-vagrant-basebox' into stable

Fix-committed: #11738
parents 30d4f389 fd27b878
......@@ -162,7 +162,7 @@ def enough_free_host_memory_for_ram_build?
return false unless RbConfig::CONFIG['host_os'] =~ /linux/i
begin
usable_free_mem = `free`.split[16].to_i
usable_free_mem = `free`.split[12].to_i
usable_free_mem > VM_MEMORY_FOR_RAM_BUILDS * 1024
rescue
false
......@@ -170,7 +170,7 @@ def enough_free_host_memory_for_ram_build?
end
def free_vm_memory
capture_vagrant_ssh('free').first.chomp.split[16].to_i
capture_vagrant_ssh('free').first.chomp.split[12].to_i
end
def enough_free_vm_memory_for_ram_build?
......
......@@ -36,15 +36,11 @@ apt-key add /tmp/tails.binary.gpg
echo "I: Add standard APT suites."
cat "/etc/apt/sources.list" | \
sed -e 's/jessie/jessie-updates/' \
> "/etc/apt/sources.list.d/jessie-updates.list"
sed -e 's/stretch/stretch-updates/' \
> "/etc/apt/sources.list.d/stretch-updates.list"
cat "/etc/apt/sources.list" | \
sed -e 's/jessie/jessie-backports/' \
> "/etc/apt/sources.list.d/jessie-backports.list"
echo "deb http://time-based.snapshots.deb.tails.boum.org/debian-security/${DEBIAN_SECURITY_SERIAL}/ jessie/updates main" \
> "/etc/apt/sources.list.d/jessie-security.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 "I: Adding our builder-jessie suite with live-build, pin 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"
......@@ -56,22 +52,13 @@ EOF
sed -e 's/^[[:blank:]]*//' > /etc/apt/preferences.d/live-build <<EOF
Package: live-build
Pin: release o=Tails,n=builder-jessie
Pin-Priority: 500
EOF
sed -e 's/^[[:blank:]]*//' > /etc/apt/preferences.d/discount <<EOF
Package: discount libmarkdown2 libmarkdown2-dev
Pin: release o=Tails,n=builder-jessie
Pin-Priority: 500
Pin-Priority: 999
EOF
sed -e 's/^[[:blank:]]*//' > /etc/apt/preferences.d/jessie-backports << EOF
sed -e 's/^[[:blank:]]*//' > /etc/apt/preferences.d/stretch-backports << EOF
Package: *
Pin: release n=jessie-backports
Pin: release n=stretch-backports
Pin-Priority: 100
Package: debootstrap
Pin: release n=jessie-backports
Pin-Priority: 991
EOF
apt-get update
......@@ -82,13 +69,9 @@ apt-get -y install ca-certificates curl grub2 openssh-server wget
echo "I: Configuring GRUB..."
sed -i 's,^GRUB_TIMEOUT=5,GRUB_TIMEOUT=1,g' /etc/default/grub
echo "I: Upgrading to the backported kernel..."
apt-get -y purge 'linux-image-*'
apt-get -y install -t "${DISTRIBUTION}-backports" "linux-image-${ARCHITECTURE}"
echo "I: Installing Tails build dependencies."
apt-get -y install \
debootstrap/jessie-backports \
debootstrap \
git \
dpkg-dev \
eatmydata \
......@@ -114,7 +97,6 @@ apt-get -y install \
libyaml-perl \
libyaml-syck-perl \
perlmagick \
wdg-html-validator \
psmisc
# Ensure we can use timedatectl
......
......@@ -3,7 +3,7 @@
# vi: set ft=ruby :
# Hostname of the virtual machine (must be in /etc/hosts)
VIRTUAL_MACHINE_HOSTNAME = 'vagrant-jessie'
VIRTUAL_MACHINE_HOSTNAME = 'vagrant-stretch'
# Approximate amount of extra space needed for builds
BUILD_SPACE_REQUIREMENT = 12.25*1024
......@@ -16,7 +16,7 @@ VM_MEMORY_FOR_RAM_BUILDS = VM_MEMORY_FOR_DISK_BUILDS + BUILD_SPACE_REQUIREMENT
# The builder VM's platform
ARCHITECTURE = "amd64"
DISTRIBUTION = "jessie"
DISTRIBUTION = "stretch"
# The name of the Vagrant box
def box_name
......
......@@ -46,7 +46,7 @@ fi
# 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/jessie-security.list
sed -i -e "s/${stable_serial}/${security_serial}/g" /etc/apt/sources.list.d/stretch-security.list
cat /etc/apt/sources.list /etc/apt/sources.list.d/*
# Upgrade if needed
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment