commit 88f6c9e6d6530690de52ffb4186b8531a04e39bd Author: Arlo Breault arlolra@gmail.com Date: Sat Jun 22 17:06:07 2013 -0700
Gitian builds in VirtualBox with Vagrant --- .gitignore | 1 + gitian/README.build | 2 +- gitian/gpg/openssl.gpg | 94 ----------------------------------------- vagrant/Makefile | 50 ++++++++++++++++++++++ vagrant/README.md | 12 ++++++ vagrant/Vagrantfile | 108 ++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 172 insertions(+), 95 deletions(-)
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..54e0741 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +vagrant/.vagrant diff --git a/gitian/README.build b/gitian/README.build index 41d0494..2cfd53f 100644 --- a/gitian/README.build +++ b/gitian/README.build @@ -90,7 +90,7 @@ Partial Rebuilds: the bundles using the addons and localization packs.
The Tor and Firefox stages end up as a *gbuilt*.zip files in - ../gitian-builder/inputs/, and those zip files are used as inputs into + ../../gitian-builder/inputs/, and those zip files are used as inputs into the final bundling and localization stage. If those files exist in that directory, the corresponding bundle will *not* be built.
diff --git a/gitian/gpg/openssl.gpg b/gitian/gpg/openssl.gpg deleted file mode 100644 index 6c9aeb8..0000000 --- a/gitian/gpg/openssl.gpg +++ /dev/null @@ -1,94 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.11 (GNU/Linux) - -mQENAzZz6nwAAAEIAMo0phUn+IyEMv4v4gN7ANsdksYAwsrN+3XutOrNlJIJ1HSK -VxlgzU7N6XkYvFH+fSMaHE1+SRREyCO2MVBXWDrSAGCYETcKY+KM2gzSEB2pMxNd -ewZDFM5ayUHMCVjvROanLr5KfjEcA6uibwLcq+tvKGTq16kba3COgYElM5LR1vHx -7EZB3PHAonHfgggM/MmKZw3061PG+xfAvJZFyOojVLcGGqa510ctnoqLBhCceRQb -QEaEO+1KIxJ+qf3BGyl5i1Ldz04252WxANVlEyVhqaVLFwY7jAcaeqWK+CxOyK0H -jJnQ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wPz/nG -/rWmQcrFK8Q7YRLSjSmTQqWeeNRCBb8x -=AtEC ------END PGP PUBLIC KEY BLOCK----- diff --git a/vagrant/Makefile b/vagrant/Makefile new file mode 100644 index 0000000..d4cfc38 --- /dev/null +++ b/vagrant/Makefile @@ -0,0 +1,50 @@ +REQS = git apache2 python-vm-builder ruby debootstrap lxc apt-cacher-ng \ + virt-what lxctl fakeroot faketime zip unzip subversion bridge-utils + +# remove torsocks to speed up testing +TORSOCKS = torsocks + +.PHONY: hostvm +hostvm: + vagrant destroy --force + vagrant up + vagrant ssh --command "sudo apt-get install -y tor torsocks" + vagrant ssh --command "sudo $(TORSOCKS) apt-get update" + + # https://github.com/mitchellh/vagrant/issues/289 + vagrant ssh --command "sudo DEBIAN_FRONTEND=noninteractive $(TORSOCKS) \ + apt-get upgrade -y" + + vagrant reload + vagrant ssh --command "sudo $(TORSOCKS) apt-get install -y $(REQS)" + vagrant halt + +.PHONY: tbb +tbb: + vagrant up + vagrant ssh --command "\ + if [ -d ~/gitian-builder ]; then \ + rm -rf ~/gitian-builder; \ + fi" + + vagrant ssh --command "$(TORSOCKS) \ + git clone -b tor-browser-builder-2 \ + 'https://git.torproject.org/builders/gitian-builder.git' ~/gitian-builder" + + vagrant ssh --command "\ + if [ -d ~/tor-browser-bundle ]; then \ + rm -rf ~/tor-browser-bundle; \ + fi" + + vagrant ssh --command "\ + rsync -r --exclude=.git --exclude=.vagrant \ + /tor-browser-bundle/ ~/tor-browser-bundle" + + vagrant ssh --command "cd ~/tor-browser-bundle/gitian && USE_LXC=1 make" + + vagrant ssh --command "cd ~/tor-browser-bundle/gitian && \ + cp -R 3.* /vagrant/" + + vagrant halt + +all: hostvm tbb \ No newline at end of file diff --git a/vagrant/README.md b/vagrant/README.md new file mode 100644 index 0000000..6873a42 --- /dev/null +++ b/vagrant/README.md @@ -0,0 +1,12 @@ +Automated Gitian builds with Vagrant +==================================== + +Install VirtualBox and Vagrant, + + https://www.virtualbox.org/wiki/Downloads + http://vagrantup.com/ + +Then, + + cd vagrant/ + make \ No newline at end of file diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile new file mode 100644 index 0000000..af16469 --- /dev/null +++ b/vagrant/Vagrantfile @@ -0,0 +1,108 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| + # All Vagrant configuration is done here. The most common configuration + # options are documented and commented below. For a complete reference, + # please see the online documentation at vagrantup.com. + + # Every Vagrant virtual environment requires a box to build off of. + config.vm.box = "Ubuntu 12.04 (x86_64)" + + # The url from where the 'config.vm.box' box will be fetched if it + # doesn't already exist on the user's system. + config.vm.box_url = "http://files.vagrantup.com/precise64.box" + + # Create a forwarded port mapping which allows access to a specific port + # within the machine from a port on the host machine. In the example below, + # accessing "localhost:8080" will access port 80 on the guest machine. + # config.vm.network :forwarded_port, guest: 80, host: 8080 + + # Create a private network, which allows host-only access to the machine + # using a specific IP. + # config.vm.network :private_network, ip: "192.168.33.10" + + # Create a public network, which generally matched to bridged network. + # Bridged networks make the machine appear as another physical device on + # your network. + # config.vm.network :public_network + + # Share an additional folder to the guest VM. The first argument is + # the path on the host to the actual folder. The second argument is + # the path on the guest to mount the folder. And the optional third + # argument is a set of non-required options. + config.vm.synced_folder "../.", "/tor-browser-bundle" + + # Provider-specific configuration so you can fine-tune various + # backing providers for Vagrant. These expose provider-specific options. + # Example for VirtualBox: + + config.vm.provider :virtualbox do |vb| + # Use VBoxManage to customize the VM. For example to change memory: + vb.customize ["modifyvm", :id, "--memory", "1280"] + end + + # View the documentation for the provider you're using for more + # information on available options. + + # Enable provisioning with Puppet stand alone. Puppet manifests + # are contained in a directory path relative to this Vagrantfile. + # You will need to create the manifests directory and a manifest in + # the file Ubuntu 12.04 (x86_64).pp in the manifests_path directory. + # + # An example Puppet manifest to provision the message of the day: + # + # # group { "puppet": + # # ensure => "present", + # # } + # # + # # File { owner => 0, group => 0, mode => 0644 } + # # + # # file { '/etc/motd': + # # content => "Welcome to your Vagrant-built virtual machine! + # # Managed by Puppet.\n" + # # } + # + # config.vm.provision :puppet do |puppet| + # puppet.manifests_path = "manifests" + # puppet.manifest_file = "init.pp" + # end + + # Enable provisioning with chef solo, specifying a cookbooks path, roles + # path, and data_bags path (all relative to this Vagrantfile), and adding + # some recipes and/or roles. + # + # config.vm.provision :chef_solo do |chef| + # chef.cookbooks_path = "../my-recipes/cookbooks" + # chef.roles_path = "../my-recipes/roles" + # chef.data_bags_path = "../my-recipes/data_bags" + # chef.add_recipe "mysql" + # chef.add_role "web" + # + # # You may also specify custom JSON attributes: + # chef.json = { :mysql_password => "foo" } + # end + + # Enable provisioning with chef server, specifying the chef server URL, + # and the path to the validation key (relative to this Vagrantfile). + # + # The Opscode Platform uses HTTPS. Substitute your organization for + # ORGNAME in the URL and validation key. + # + # If you have your own Chef Server, use the appropriate URL, which may be + # HTTP instead of HTTPS depending on your configuration. Also change the + # validation key to validation.pem. + # + # config.vm.provision :chef_client do |chef| + # chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME" + # chef.validation_key_path = "ORGNAME-validator.pem" + # end + # + # If you're using the Opscode platform, your validator client is + # ORGNAME-validator, replacing ORGNAME with your organization name. + # + # If you have your own Chef Server, the default validation client name is + # chef-validator, unless you changed the configuration. + # + # chef.validation_client_name = "ORGNAME-validator" +end