pull/182/headd0127cc
Release notes (Devrandom)923c711
add CODEOWNERS (Devrandom)cac395d
git submodule support (Devrandom)496f45d
support Debian / virtualbox via Vagrant Cloud (Devrandom)ead388a
headless vbox (Devrandom)7338dc5
do not complain about kvm if in VBOX mode (Devrandom)
@@ -0,0 +1 @@ | |||
* @devrandom |
@@ -1,3 +1,12 @@ | |||
2017-02-14 | |||
---------- | |||
- VirtualBox launches are now headless. You can use the VirtualBox Manager to open the console UI if needed. | |||
- Debian on VirtualBox is supported via Vagrant Cloud images | |||
- Note that Debian on kvm is currently not supported because vmbuilder fails in the grub install stage | |||
- git submodule support - any submodules are cloned and checked out | |||
- Note that lxc-execute in Ubuntu 17.10 has a showstopper bug in stdin handling | |||
2015-12-12 | |||
---------- | |||
@@ -12,27 +12,45 @@ echo "ok" | |||
SCRIPT | |||
archs = ["amd64", "i386"] | |||
suites = ["precise", "quantal", "raring", "saucy", "trusty"] | |||
ubuntu_suites = ["precise", "quantal", "raring", "saucy", "trusty", "xenial", "bionic"] | |||
debian_suites = ["jessie", "stretch"] | |||
if ARGV[0] == "up" and ARGV.length == 1 | |||
puts "Specify a name of the form 'suite-architecture'" | |||
puts " suites: " + suites.join(', ') | |||
puts " ubuntu suites: " + ubuntu_suites.join(', ') | |||
puts " debian suites (x86_64 only): " + debian_suites.join(', ') | |||
puts " architectures: " + archs.join(', ') | |||
Process.exit 1 | |||
end | |||
Vagrant.configure("2") do |config| | |||
# vagrant 1.9.1 (Ubuntu 17.10) compat | |||
if Vagrant::DEFAULT_SERVER_URL =~ /hashicorp/ | |||
Vagrant::DEFAULT_SERVER_URL.replace('https://vagrantcloud.com') | |||
end | |||
Vagrant.configure("2") do |config| | |||
config.vm.provision "shell", inline: $script | |||
config.vm.network :forwarded_port, id: "ssh", guest: 22, host: 2223 | |||
suites.each do |suite| | |||
debian_suites.each do |suite| | |||
name = "#{suite}-amd64" | |||
box = "debian/#{suite}64" | |||
config.vm.define name do |config| | |||
config.vm.box = box | |||
config.vm.provider :virtualbox do |vb| | |||
vb.name = "Gitian-#{name}" | |||
end | |||
end | |||
end | |||
ubuntu_suites.each do |suite| | |||
archs.each do |arch| | |||
name = "#{suite}-#{arch}" | |||
config.vm.define name do |config| | |||
config.vm.box = name | |||
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/#{suite}/current/#{suite}-server-cloudimg-#{arch}-vagrant-disk1.box" | |||
config.vm.box_url = "https://cloud-images.ubuntu.com/#{suite}/current/#{suite}-server-cloudimg-#{arch}-vagrant.box" | |||
config.vm.provider :virtualbox do |vb| | |||
vb.name = "Gitian-#{name}" | |||
end |
@@ -197,7 +197,7 @@ OptionParser.new do |opts| | |||
end | |||
end.parse! | |||
if !ENV["USE_LXC"] and !File.exist?("/dev/kvm") | |||
if !ENV["USE_LXC"] and !ENV["USE_VBOX"] and !File.exist?("/dev/kvm") | |||
$stderr.puts "\n************* WARNING: kvm not loaded, this will probably not work out\n\n" | |||
end | |||
@@ -284,6 +284,7 @@ build_desc["remotes"].each do |remote| | |||
commit = `cd inputs/#{dir} && git log --format=%H -1 #{commit}`.strip | |||
raise "error looking up commit for tag #{remote["commit"]}" unless $?.exitstatus == 0 | |||
system!("cd inputs/#{dir} && git checkout -q #{commit}") | |||
system!("cd inputs/#{dir} && git submodule update --init --recursive --force") | |||
in_sums << "git:#{commit} #{dir}" | |||
end | |||
@@ -112,6 +112,7 @@ elif [ $DISTRO = "debian" ]; then | |||
FLAVOUR=686-pae | |||
fi | |||
LOCALE_PKG=language-pack-en | |||
if [ $DISTRO = "debian" ]; then | |||
LOCALE_PKG=locales | |||
@@ -159,7 +160,16 @@ if [ $VBOX = "1" ]; then | |||
exit 1 | |||
fi | |||
DISTRO_USER_CREATE=0 | |||
if [ $DISTRO = "debian" ]; then | |||
# we use a vagrant provider | |||
DISTRO_USER_CREATE=1 | |||
fi | |||
vagrant up "$NAME" | |||
if [ $DISTRO_USER_CREATE = "1" ]; then | |||
vagrant ssh "$NAME" -c "sudo useradd -m -s /bin/bash $DISTRO" | |||
fi | |||
vagrant ssh "$NAME" -c "sudo mkdir -p /root/.ssh && sudo chmod 700 /root/.ssh" | |||
vagrant ssh "$NAME" -c "sudo sh -c 'cat >> /root/.ssh/authorized_keys'" < var/id_rsa.pub |
@@ -31,7 +31,7 @@ case $VMSW in | |||
true #sudo lxc-start -n gitian -c var/target.log -f lxc.config | |||
;; | |||
VBOX) | |||
VBoxManage startvm "Gitian-${2}" # --type headless | |||
VBoxManage startvm "Gitian-${2}" --type headless | |||
echo "Gitian-${2}" > var/target.vmname | |||
;; | |||
esac |