summaryrefslogtreecommitdiffstats
path: root/vagrant/definitions
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2014-07-08 14:55:19 +0200
committerTails developers <amnesia@boum.org>2014-07-10 18:19:01 +0200
commit36adf1980560fedd4698e2cfaf83d10e58cdf239 (patch)
tree074f0d4b8ed50404db860618df2a8ee86510453e /vagrant/definitions
parentbd714b6a2c06ba5942b45e39ecafd123a024c4cb (diff)
Migrate Vagrant basebox to Debian Wheezy (Closes #7133, #6736).
This does a number of things beyond upgrading the basebox distribution to Debian Wheezy: * Drop Rakefile integration since it relies on Veewee's integration in Vagrant, which is broken. Now a workaround is documented. * Install the 3.x "from"-port (squeeze's l-b 2.x re-versioned to 3.x to replace wheezy's real 3.x) of `live-build` from deb.t.b.org. * Bump disk capacity to 15 GB to take into account the larger amount of space needed when building Wheezy images (#7133). This should also future-proof this aspect a bit. * The documented process for buliding new baseboxes, in particular the part that gives each one a new name, not only *works* (as opposed to the old docs, and the Rakefile integration) but should also solve #6736. The different name implies that Vagrant won't use the cached version. Of course, the commit that updates the basebox must be present in a branch for it to use the new basebox. * Various small improvements.
Diffstat (limited to 'vagrant/definitions')
-rw-r--r--vagrant/definitions/tails-builder/definition.rb (renamed from vagrant/definitions/squeeze/definition.rb)18
-rw-r--r--vagrant/definitions/tails-builder/postinstall.sh (renamed from vagrant/definitions/squeeze/postinstall.sh)5
-rw-r--r--vagrant/definitions/tails-builder/preseed.cfg (renamed from vagrant/definitions/squeeze/preseed.cfg.erb)18
3 files changed, 14 insertions, 27 deletions
diff --git a/vagrant/definitions/squeeze/definition.rb b/vagrant/definitions/tails-builder/definition.rb
index 8d1ee36..d93eeb0 100644
--- a/vagrant/definitions/squeeze/definition.rb
+++ b/vagrant/definitions/tails-builder/definition.rb
@@ -1,14 +1,11 @@
-$:.unshift File.expand_path('../../../lib', __FILE__)
-require 'tails_build_settings'
-
-Veewee::Session.declare({
+Veewee::Definition.declare({
:cpu_count => '1',
- :memory_size=> VM_MEMORY_FOR_DISK_BUILDS,
- :disk_size => '10000', :disk_format => 'VDI', :hostiocache => 'off',
+ :memory_size=> '512',
+ :disk_size => '15000', :disk_format => 'VDI', :hostiocache => 'off',
:os_type_id => 'Debian_64',
- :iso_file => "mini.iso",
- :iso_src => "http://ftp.nl.debian.org/debian/dists/squeeze/main/installer-amd64/20110106+squeeze4/images/netboot/mini.iso",
- :iso_md5 => "a439afbff15328d50103330c615c7dc4",
+ :iso_file => "debian-7.5.0-amd64-netinst.iso",
+ :iso_src => "http://cdimage.debian.org/debian-cd/7.5.0/amd64/iso-cd/debian-7.5.0-amd64-netinst.iso",
+ :iso_md5 => "8fdb6715228ea90faba58cb84644d296",
:iso_download_timeout => "1000",
:boot_wait => "10", :boot_cmd_sequence => [
'<Esc>',
@@ -24,6 +21,7 @@ Veewee::Session.declare({
'debconf/frontend=noninteractive ',
'console-setup/ask_detect=false ',
'console-keymaps-at/keymap=us ',
+ 'keyboard-configuration/xkb-keymap=us ',
'<Enter>'
],
:kickstart_port => "7122",
@@ -35,7 +33,7 @@ Veewee::Session.declare({
:ssh_key => "",
:ssh_host_port => "7222",
:ssh_guest_port => "22",
- :sudo_cmd => "echo '%p'|sudo -S sh '%f'",
+ :sudo_cmd => "echo '%p'|sudo -S bash '%f'",
:shutdown_cmd => "halt -p",
:postinstall_files => [ "postinstall.sh" ],
:postinstall_timeout => "10000"
diff --git a/vagrant/definitions/squeeze/postinstall.sh b/vagrant/definitions/tails-builder/postinstall.sh
index 7c03310..d8b68fc 100644
--- a/vagrant/definitions/squeeze/postinstall.sh
+++ b/vagrant/definitions/tails-builder/postinstall.sh
@@ -2,12 +2,9 @@
date > /etc/vagrant_box_build_time
-# Install Chef
-gem install chef --no-ri --no-rdoc
-
# Set up sudo
cp /etc/sudoers /etc/sudoers.orig
-sed -i -e 's/%sudo ALL=(ALL) ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers
+sed -i -e 's/^%sudo\W.*$/%sudo ALL=NOPASSWD:ALL/' /etc/sudoers
# Install vagrant keys
mkdir -p /home/vagrant/.ssh
diff --git a/vagrant/definitions/squeeze/preseed.cfg.erb b/vagrant/definitions/tails-builder/preseed.cfg
index 3261301..83bc244 100644
--- a/vagrant/definitions/squeeze/preseed.cfg.erb
+++ b/vagrant/definitions/tails-builder/preseed.cfg
@@ -1,6 +1,6 @@
# US locale and keyboard
-d-i debian-installer/locale string en_US
-d-i console-keymaps-at/keymap select us
+d-i debian-installer/locale string en_US.UTF-8
+d-i keyboard-configuration/xkb-keymap select us
# Network is configured through DHCP
d-i netcfg/choose_interface select auto
@@ -8,12 +8,11 @@ d-i netcfg/get_domain string vagrantup.com
# Use http.debian.net to select closest mirror
d-i mirror/country string manual
-d-i mirror/http/hostname string http.debian.net
+d-i mirror/http/hostname string http.us.debian.org
d-i mirror/http/directory string /debian
-d-i mirror/http/proxy string <%= ENV['http_proxy'] %>
+d-i mirror/http/proxy string
# Set clock to UTC
-d-i clock-setup/utc boolean true
d-i time/zone string UTC
d-i clock-setup/ntp boolean true
@@ -41,11 +40,6 @@ d-i passwd/user-password-again password vagrant
d-i user-setup/encrypt-home boolean false
d-i user-setup/allow-password-weak boolean true
-# Add backports repository (for at least rubygems, puppet and virtualbox)
-d-i apt-setup/local0/repository string \
- http://backports.debian.org/debian-backports squeeze-backports main
-d-i apt-setup/local0/source boolean false
-
# Do not select any tasks
tasksel tasksel/first multiselect
@@ -53,9 +47,7 @@ tasksel tasksel/first multiselect
d-i pkgsel/include string \
openssh-server \
curl \
- rubygems/squeeze-backports \
- puppet/squeeze-backports puppet-common/squeeze-backports \
- virtualbox-guest-utils/squeeze-backports
+ virtualbox-guest-utils
# No need for an extra upgrade: it is a full net install
d-i pkgsel/upgrade select none