Quantcast
Channel: technology - Cloud Media News
Viewing all articles
Browse latest Browse all 31

How Can I Contribute to Mozilla?

$
0
0

Open source software depends upon the contributions made by thousands of people in the community who help to improve and modify it. These contributions are not merely monetary, but also in the form of feedback and improvements to the software, particularly in ironing out bugs. This is a vital service that keeps the spirit of the FOSS movement alive today.

Contribute to Mozilla

Mozilla is one of the leading open source organisations in the world. A lot of people work for Mozilla, fixing bugs and implementing new features. Since people use various platforms for this, here’s a small guide to installing the source code for Mozilla on different platforms and on how you can begin with your first contributions. As an open source contributor, I believe that Mozilla is one of the best OSS projects to start off with when you want to give back to the community.

Hardware requirements

While installing Mozilla source code, the first thing to do is to install its dependencies. The minimum hardware requirements are:
■2 GB RAM and lots of free space in it
■For debugging and builds: At least 8 GB of free space
■For optimised builds: At least 1 GB of free space (recommended 6 GB)

Build tools and dependencies

All distros require just a one-line ‘bootstrap ’ command
This is the best way to install the dependencies, irrespective of the distro you are using. For this, open a terminal and copy paste the following commands:

wget https://hg.mozilla.org/mozilla-central/raw-file/
default/python/mozboot/bin/bootstrap.py
python bootstrap.py

If the above command doesn’t work then proceed with one of the following, based on the OS you are using.
Ubuntu
Download and install the prerequisites required for the Mozilla build in Ubuntu (as root), as follows:

sudo apt-get install zip unzip mercurial g++ make autoconf2.13 yams libgtk2.0-dev libglib2.0-dev libdbus-1- dev libdbus-glib-1-dev libasound2-dev libcurl4-openssl-dev libiw-dev libxt-deva mesa-common-dev libgstreamer0.10- devlibgstreamer-plugins-base0.10-dev libpulse-dev

Debian
Install the prerequisites required for the Mozilla build in Debian (as root) by running the following:

sudo aptitude install zip unzip mercurial g++ make autoconf2.13 yasm libgtk2.0-dev libglib2.0-dev libdbus-1- devlibdbus-glib-1-dev libasound2-dev libcurl4-openssl-dev libiw-dev libxt-dev mesa-common-dev libgstreamer0.10- devlibgstreamer-plugins-base0.10-dev libpulse-dev

Debian Squeeze Edition
On Debian Squeeze, you need to install yasm-l.x from the Squeeze backports. You can also get the Mercurial bundle if you need compatibility with an existing Mercurial repository:

echo “deb http://backports.debian.org/debian-backports squeeze-backports main” >> /etc/apt/sources.list aptitude update
aptitude -t squeeze-backports install yasm mercurial

OpenSUSE and SUSE Linux Enterprise

To install the dependencies in OpenSUSE, execute the following command as a root user in your terminal: zypper install
make cvs mercurial zip gcc-c++ gtk2-devel xorg-x11-libXt- devel libidl-devel
freetype2-devel fontconfig-devel pkg-config dbus-1-glib-devel mesa-devel
libcurl-devel libnotify-devel alsa-devel autoconf213 libiw- devel yasm
gstreamer010-devel gstreamer010-plugins-base-devel pulseaudio-devel

Red Hat Enterprise Linux (RHEL), CentOS and Fedora

To install the dependencies in Fedora, execute the following command as a root user:

sudo yum groupinstall ‘Development Tools’ ‘Development Libraries’ ‘GNOME Software Development’ sudo yum install mercurial autoconf213 glibc-static libstdc++-static yasm wireless-tools-devel mesa-libGL- develalsa-lib-devel libXt-devel gstreamer-devel gstreamer- plugins-base-devel pulseaudio-libs-devel # ‘Development tools’ is defunct in Fedora 19 use the following
sudo yum groupinstall ‘C Development Tools and Libraries’ sudo yum group mark install “X Software Development”

Arch Linux

To install the dependencies in Arch Linux, execute the following command in your terminal:

-Syu –needed base-devel zip unzip freetype2 fontconfig pkg- config gtk2 dbus-glib iaw libidl2 python2 mercurial alsa-lib curl libnotify libxt mesa autoconf2.13 yasm wireless_tools gstreamer0.10 gstreamer0.10-base-plugins libpulse

After installing these, depending on the OS you use, you can proceed to build Mozilla source code.

Building Mozilla source code

After you finish the installation of the prerequisites required for the Mozilla build, you can continue with the build process. This generally proceeds with downloading and installing through the mozilla.hg file. Download the latest Mozilla bundle from the Mozilla site and follow the steps below to install the source code.
1)     Create an empty directory and initialise a new repository (in a directory called ‘mozilla-central’ here):

mkdir mozilla-central hg init mozilla-central

2)     Unbundle the mozilla.hg bundle in the created folder:

cd mozilla-central hg unbundle /home/path-to-the-bundle/mozilla.hg

3)     Create an hgrc file in /mozilla-central/.hg/. In this file we will be adding the path to the main repository, so that we can pull the latest changes and update the bundle before starting the build process

gedit /hg/hgrc

The above command will automatically open a new gedit window. Insert the following lines and save the file:

[paths]default = hg.mozilla.org/mozilla-central/

4)     Enter the following command in the terminal, so that it will pull all the latest changes to the code:

hg pull

After running the pull command to get all the changes you made to the local repo, you need to apply the changes to the repository file:

hg up (or) hg update

5)     After the changes are applied, you can start the build process with the help of the following command:

./mach build

This process will take at least 45 minutes to complete. After that you can see something like what’s shown below:

Your build was successful!
To take your build for a test drive, run: /home/path-to-
mozilla/obj-x86_64-unknown-linux-gnu/dist/bin/firefox
For more information on what to do now, see https://
developer.mozilla.org/docs/Developer_Guide/So_You_Just_Built_Firefox

Once you see this in your terminal you have completed your build and you are ready to start with your first contribution.

Getting started with your first contribution

Now you are ready to start fixing bugs, which basically involves going through the code and finding that part of it that is responsible for the bug. For this you can take the help of the Mozillans in the Internet Relay Chat (IRC).

Connecting to the Mozilla IRC

If you are using Mozilla Firefox as your browser, it has an extension for the IRC called ChatZilla, which is basically an IRC client developed by Mozilla. If not that, you can use different clients such as Mibbit or IRCCloud, based on what suits you.
After opening the chat client, to connect to the Mozilla server, just type the following in the IRC client:

/server irc.mozilla.org

Once you have connected to the Mozilla server, you can join the Introduction channel, which is for beginners. To join it, use the following command in the IRC Client:

/join #introduction

This is where you can start asking any general questions or those related to bugs. Depending on the bug that you have taken on and the availability of your mentor, you can directly communicate with him or her. There are a lot of people in Mozilla who are ready to help you at any point of time.

Selecting a bug from Bugzilla

Once you are ready with the build, you can go to Bugzilla to search for bugs. As a beginner, it is recommended that you start with minor or trivial bugs. Once you find a bug, just mention it in the ‘bug comments’ section—that you are interested in working on this particular one. After some time, you will get that bug assigned to you.

[extensions] mq =
[diff] git = 1 showfunc = 1 unified = 8

Once you are done with selecting a bug, you can ask for any help regarding the bug in #introduction on the IRC. While fixing a bug in Mozilla, you have to find out a particular function that you need to modify. In this case, you can use mxr or dxr. With these two sites, you can search for a file, a particular word or a module.
After you have fixed the bug, you have to make a patch, for which you have to use Mercurial.

Using Mercurial to create a patch

A patch gives you the changes you made to the code. The mentor of the bug fixing process then reviews the changes in the patch and tests them. For this you need to add the following lines to the hgrc file that you have created previously to give a path to the Mozilla central repository:

[ui]username = Name <example@xyz.com>
[defaults] qnew = -Ue

This helps you to create a perfect patch for the bug that you have fixed. After you attach the patch to the bug, you can wait for the mentor to review it.

The post How Can I Contribute to Mozilla? appeared first on Cloud Media News.


Viewing all articles
Browse latest Browse all 31

Trending Articles