Opened 7 years ago

Closed 7 years ago

#9280 closed defect (fixed)

Building TBB 3.0 with Vagrant fails

Reported by: gk Owned by: erinn
Priority: Medium Milestone:
Component: Applications/Tor bundles/installation Version:
Severity: Keywords: tbb-3.0
Cc: mikeperry, arlolra Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Following the advices in the README.md in the vagrant directory of the tor-browser-bundle repo results in:

firefox64@firefox64-TravelMate-7740G:~/TBB/tor-browser-bundle/vagrant$ make
vagrant destroy --force
/home/firefox64/TBB/tor-browser-bundle/vagrant/Vagrantfile:4: undefined method `configure' for Vagrant:Module (NoMethodError)
	from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:115:in `load'
	from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:115:in `procs_for_source'
	from /usr/lib/ruby/vendor_ruby/vagrant/config.rb:41:in `capture_configures'
	from /usr/lib/ruby/vendor_ruby/vagrant/config.rb:36:in `synchronize'
	from /usr/lib/ruby/vendor_ruby/vagrant/config.rb:36:in `capture_configures'
	from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:114:in `procs_for_source'
	from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:51:in `set'
	from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:45:in `each'
	from /usr/lib/ruby/vendor_ruby/vagrant/config/loader.rb:45:in `set'
	from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:377:in `load_config!'
	from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:392:in `call'
	from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:392:in `load_config!'
	from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:327:in `load!'
	from /usr/bin/vagrant:40
make: *** [hostvm] Error 1

Child Tickets

Change History (15)

comment:1 Changed 7 years ago by arlolra

The Vagrantfile expects vagrant 1.2.x. I'm guessing you're using an outdated version.

Either try upgrading to the latest, or you can edit line 4 from,

Vagrant.configure("2") do |config|

to,

Vagrant::Config.run do |config|

and line 40 from,

config.vm.provider :virtualbox do |vb|
    # Use VBoxManage to customize the VM. For example to change memory:
    vb.customize ["modifyvm", :id, "--memory", "1280"]
end

to,

config.vm.customize ["modifyvm", :id, "--memory", 1280]

You may run into another problem with Guest Additions, in which case you can try changing your config.vm.box_url to something like http://dl.dropbox.com/u/1537815/precise64.box. There's a bunch of boxes at http://www.vagrantbox.es/.

Hope that helps. I've only tested on,

λ vagrant -v          
Vagrant version 1.2.2
λ VBoxManage -v
4.2.16r86992

comment:2 Changed 7 years ago by gk

Status: newneeds_revision

Alas, it did not help. Thus I decided it is probably easier to "patch" the README file adding a minVersion for Vagrant.

comment:3 Changed 7 years ago by gk

Status: needs_revisionneeds_review

I meant, 'needs_review'...

comment:4 Changed 7 years ago by gk

Status: needs_reviewneeds_revision

There is an issue with the Makefile as 'all' is not the default target but the README just says |make| should be enough...

comment:5 Changed 7 years ago by gk

Status: needs_revisionneeds_review

The 'needs_review' is for the new patch. But even with that one I still get a failure (which does not go away after restarting the build):

--- Building tor-linux for lucid i386 ---
Stopping target if it is up
Making a new image copy
Starting target
Checking if target is up
sudo: unable to resolve host precise64
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US)
Preparing build environment
passwd: password expiry information changed.
sudo: unable to resolve host precise64
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US)
bash: warning: setlocale: LC_ALL: cannot change locale (en_US)
sudo: unable to resolve host precise64
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US)
sudo: unable to resolve host precise64
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US)
Updating apt-get repository (log in var/install.log)
Installing additional packages (log in var/install.log)
./bin/gbuild:21:in `system!': failed to run on-target -u root DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends -y install git-core unzip zip autoconf autoconf2.13 automake faketime libtool hardening-wrapper > var/install.log 2>&1 (RuntimeError)
	from ./bin/gbuild:93:in `build_one_configuration'
	from ./bin/gbuild:223
	from ./bin/gbuild:218:in `each'
	from ./bin/gbuild:218
	from ./bin/gbuild:216:in `each'
	from ./bin/gbuild:216
make: *** [build] Error 1
make: *** [tbb] Error 2

Not sure what is wrong here yet.

comment:6 Changed 7 years ago by arlolra

Hmm, this is what I get:

--- Building tor-linux for lucid i386 ---
Stopping target if it is up
Making a new image copy
sudo: unable to resolve host precise64
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US)
stdin: is not a tty
Starting target
Checking if target is up
sudo: unable to resolve host precise64
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US)
Preparing build environment
sudo: unable to resolve host precise64
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US)
stdin: is not a tty
passwd: password expiry information changed.
sudo: unable to resolve host precise64
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US)
bash: warning: setlocale: LC_ALL: cannot change locale (en_US)
sudo: unable to resolve host precise64
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US)
sudo: unable to resolve host precise64
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US)
Updating apt-get repository (log in var/install.log)
Installing additional packages (log in var/install.log)
Grabbing package manifest
sudo: unable to resolve host precise64
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US)
stdin: is not a tty
bash: warning: setlocale: LC_ALL: cannot change locale (en_US)
Creating build script (var/build-script)
sudo: unable to resolve host precise64
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US)
sudo: unable to resolve host precise64
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US)
sudo: unable to resolve host precise64
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US)
Running build script (log in var/build.log)

You seem to have failed at Grabbing package manifest.

Can you provide some system info? (vagrant, virtualbox, os, etc.)
Also, try pulling the latest changes from the git repo.

comment:7 Changed 7 years ago by arlolra

It's possible this is just exhibiting "known issues". See around L108,
https://gitweb.torproject.org/builders/tor-browser-bundle.git/blob/HEAD:/gitian/README.build

Try rebuilding and see if it fails consistently at that point.

comment:8 Changed 7 years ago by arlolra

I've uploaded a few bundles (built with vagrant/virtualbox) and my shasums of alpha-3 for comparison,
https://people.torproject.org/~arlo/3.0-alpha-3/

comment:9 Changed 7 years ago by gk

Okay, I finally managed to get the build going (it was probably a combination of 1. and 5. in the README's known issues section). Thus, getting the patch merged would close the ticket for me.
arlolra: I looked at your builds and they don't match the "official" ones at least for one reason: The bundle.inputs file does not contain the git revision of the tor-browser-bundle repo (dunno why yet). I remember having seen some ".git no such file or directory"-errors during my build. I'll file a new ticket tomorrow if my currently running build fails as well.

comment:10 Changed 7 years ago by arlolra

Great.

Yeah, the problem is with --exclude=.git,
https://gitweb.torproject.org/builders/tor-browser-bundle.git/blob/HEAD:/vagrant/Makefile#l40

I sent a patch.

comment:11 Changed 7 years ago by mikeperry

Ok I merged these. I didn't verify the worked, but since they only touch vagrant it seemed fine to me.

Btw, there is some basic support in Gitian for VirtualBox.. It might be nice to actually make that stuff work as an option instead of KVM? Its incomplete though, so in the meantime vagrant seems fine, but in the long run it might be nice to drop the dependency.

comment:12 Changed 7 years ago by mikeperry

Resolution: fixed
Status: needs_reviewclosed
Note: See TracTickets for help on using tickets.