Initial Phase of contributing to Mozilla

Contributing to firefox was a great experience for me. I learnt a lot. These are some tips which will help to make contribution easier.

The first and foremost thing that should be done after building the source code is to talk in IRC. Be active in IRC. It is very helpful 24*7 hours. The best channel for the beginners is #introduction in network mozilla. Even if any error is encountered during the build it can be asked through IRC. The mozilla people is very helpful.

When an error is encountered during the build it is necessary to see the entire build history. So it will be difficult to copy-paste the whole stuff and ask in IRC. For copy- pasting the whole content in terminal we can use the following sites: [1] or  [2] .

This will show the contents in an understandable manner.

Contributing to firefox can be done by fixing bugs, adding new features etc. The beginners start with fixing bugs in Mozilla. Starting with trivial, minor to medium , advanced. To search for bugs you can either use:[3] or [4] .

It is better to start by selecting a bug which has a mentor assigned. For fixing the bugs first you have find out the files in which the code has to be modified. The files in mozilla can be searched from either of these sites: [5] or [6].

The searching can done easier by using the keywords. Search the files using some keywords which you doubt will be included in the file that is required. After getting the file, try understanding the code. Ask doubts if any in IRC.

Now you know what all has to be done before fixing a bug. So, what are waiting for go on and fix your first bug… 😉

[1] http://bpaste.net/
[2] http://pastebin.mozilla.org/
[3] https://bugzilla.mozilla.org/
[4] http://www.joshmatthews.net/bugsahoy/
[5] http://mxr.mozilla.org
[6] http://dxr.mozilla.org

First Step to Contribution – Building a Custom Firefox in Linux Distro

 Firefox-logo
Building custom firefox is very easy in Linux Distro but that main thing to keep in mind is that all the pre-requisite packages should be installed first. And that too is easy. It is just about few lines of commands 🙂
Actually the Developer guide has explained everything, only thing is you have to search the appropriate place.
To install all the system dependencies the following one line command is used:
wget https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py && python bootstrap.py
If it shows an error like wget: command not found then you can install using curl.
curl https://hg.mozilla.org/mozilla-central/raw-file/default/python/mozboot/bin/bootstrap.py > bootstrap.py && python bootstrap.py
If this too doesn’t work then you can download the file from here. And then run it using:
python bootstrap.py
For Ubuntu all the pre-requisites can be installed using the command:
sudo apt-get install zip unzip mercurial g++ make autoconf2.13 yasm libgtk2.0-dev libglib2.0-dev libdbus-1-dev libdbus-glib-1-dev libasound2-dev libcurl4-openssl-dev libiw-dev libxt-dev mesa-common-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libpulse-dev
Next step you can do in two ways getting the source code. Either by downloading the bundle or getting the source code directly by cloning. But the latter will be too slow.
i) Get the latest source code from Mozilla’s Mercurial code repository using  the command:
hg clone https://hg.mozilla.org/mozilla-central
ii) You can get the up to date bundle for Mozilla central from here.
After dowloading the repository bundle follow these commands:

1) Create a directory and initialise a new repository in that directory:

mkdir mozilla-central</pre>
</div>
<div style="padding-left: 30px;">hg init mozilla-central
2) Go to that directory
cd mozilla-central
and unbundle the source code to that repository:
hg unbundle /pathtoyourbundle.hg
3) For getting the changes and updating the souce code in the future you have to add the following command to mozilla-central/.hg/hgrc
[paths]</pre>
</div>
<div style="padding-left: 30px;">default=https://hg.mozilla.org/mozilla-central/
4) Check the bundle integrity and update the bundle:
hg pull</pre>
</div>
<div style="padding-left: 30px;">hg update
Now you have a clone to the Mozilla central like the one you got by doing hg clone.

Now it’s ready to start the build. The command to start the build is

./mach build

You can run the custom firefox by giving the following command:

./mach run

You did it…now you have your own custom firefox 😉

You can keep track of everything that is done during the build by using the command:

./mach build &> temp.txt

If the build fails it’s a normal thing to happen. Build will not work at the first attempt itself.

  • If you are doing the build in a virtual box the main problem that is faced is the memory usage you can check the memory usage by typing the command free.
  • For clearing older build works type the command
make clean -f client.mk

or

./mach clobber

Now you have the source code with you…make your contributions.