A quickstart Firefox dev VM
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Do you need to build Firefox, but don't have time to muddle through build dependencies and wiki pages?
Try FoxInABox, a VM that comes with a full, standard Firefox build environment out of the box.


Step 1: Install VirtualBox (https://www.virtualbox.org/)

Step 2: Install Vagrant and set up the foxinabox VM
  - note: if using Windows, see http://vagrantup.com/docs/getting-started/setup/windows.html for a more detailed setup process
$ sudo gem install vagrant
$ vagrant up
... (long wait)

Step 2.5: Final VirtualBox setup (optional, for better graphical and interactive performance)
Follow the instructions at http://mylinuxramblings.wordpress.com/2010/06/03/installing-virtualbox-guest-additions-on-ubuntu-server-10-04/ to install the
VirtualBox Guest Additions.

Step 3: Use your use VM
$ vagrant ssh
$ cd mozilla-central
$ make -f client.mk build
... (watch Firefox build, long wait)
$ exit
$ vagrant halt

At this point, there should be a new foxinabox VirtualBox machine  which you can run. To test Firefox, you'll need the graphical display
of VirtualBox, so power up the machine, and log in with the account "vagrant", password "vagrant".

$ startx
$ cd mozilla-central
$ obj-x86-64-unknown-linux-gnu/dist/bin/firefox

Poof! You're testing your new build of Firefox. From now on, you can just repeat step 3, after making changes to mozilla-central (either through hg bisect
or pulling from tip, or anything else!).

Known issues:

*** On OSX, running |vagrant up| can result in the following output:

> [default] Extracting box...
> [default] Cleaning up downloaded box...
> /Library/Ruby/Gems/1.8/gems/archive-tar-minitar-0.5.2/lib/archive/tar/minitar.rb:493:in `read': undefined method `size' for nil:NilClass (NoMethodError)
>	from /Library/Ruby/Gems/1.8/gems/archive-tar-minitar-0.5.2/lib/archive/tar/minitar.rb:740:in `extract_entry'
>	from /Library/Ruby/Gems/1.8/gems/archive-tar-minitar-0.5.2/lib/archive/tar/minitar.rb:739:in `loop'
>	from /Library/Ruby/Gems/1.8/gems/archive-tar-minitar-0.5.2/lib/archive/tar/minitar.rb:739:in `extract_entry'
> ...

This can be fixed by re-running |vagrant up| until the operation succeeds.

*** The first |vagrant up| command fails while booting up for the first time

Subsequent |vagrant up| invocations will not work. Instead, use |vagrant provision| to finish setting up the build dependencies.

*** Starting up the VM for the first time is really slow

First the OS image needs to be downloaded (~350 MB), then mozilla-central needs to be cloned (~700 MB), and a bunch of packages need to be installed.
This takes time, and puppet is really bad at providing output while long-running tasks are in operation. Just ignore the process and check back in
every 15 minutes.