Placing a patch on the Fox

For Week 4’s Lab, I am to learn how to apply patches to source code and rebuild Firefox including the updated changes. Luckily I already have a head start. Last week, I was conversing with the Mozilla contact of whom  I am associated and collaborating with on my project. Deep into the depths of the bug posted on Bugzilla lie patches written by volunteers collaborating on the bug/feature (in my case, I selected the privacy mode bug) – with the latest version being 2.9 at the time of this writing.

As my project will involve working on bleeding edge technology, the process of tinkering with code, applying, reapply and removing patches, I decided to focus this blog post and the second part of the lab, patching my build with patches posted on Bug 248970.

In order to apply the newest patch, I performed the following steps:

  1. Saved the (*.patch) file to my Mozilla Central source folder, it was shown on the bug as an attachment, Figure 1 below:
  2. After the patch was saved, I than installed it and ran patch*: patch -p1 < /path/to/the/latest.patch
  3. The next steps are the same as always, after your new patch is inserted into the source code, perform a make -f build to build Firefox with the patch.
  4. Firefox was now updated to include the particular patch you downloaded.

* – Note: patch is a Unix program that updates text files according to instructions contained in a separate file, called a patch file. The patch file is a text file that consists of a list of differences and is produced by running the related diff program with the original and updated file as arguments. In essence, I applied the patch as so one would say.

As well, Patches can be undone, or reversed, with the ‘-R’ option:

$ patch -R < mods.diff


To verify that the patch added this new technology:

One response to this post.

  1. Posted by kiwon on September 26, 2008 at 5:50 pm

    Hello, Aaron Train.

    My name is Park Kiwon. I am doing SQLite test project (testing stored data) which is opposite ways of your project that remove personal information.
    Therefore, you and I have to find the database communicate sources. I think sharing the parts will save our researching time!

    If you think it is good idea then please let me know.
    Thank you.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: