Google Site SearchFN Site Search FN Blog Login FN Blog Login
Site Navigation:
 
 

HOWTO build Firefox RPM package for Fedora Core

by Thomas Chung on Aug 06, 2004 (UPDATED 2006-01-30)


UPDATE 2006-01-30
Firefox 1.5.0.1 has been released. Here is updated spec file.

UPDATE 2005-11-29
Firefox 1.5 has been released. Here is updated spec file.

UPDATE 2005-11-18
Firefox 1.5rc3 has been released. Here is updated spec file.

UPDATE 2005-11-11
Firefox 1.5rc2 has been released. Here is updated spec file.

UPDATE 2005-11-02
Firefox 1.5rc1 has been released. Here is updated spec file.

UPDATE 2005-09-20
Firefox 1.0.7 has been released. Here is updated spec file.

UPDATE 2005-07-19
Firefox 1.0.6 has been released. Here is updated spec file.

UPDATE 2005-07-12
Firefox 1.0.5 has been released. Here is updated spec file. NOTE: If you get dependency error for libstdc++.so.5, type following command to resolve the dependency:

$ sudo yum install libstdc++.so.5

UPDATE 2005-05-11
Firefox 1.0.4 has been released. - What's New 1.0.4, firefox-1.0.4.tar.gz, updated spec file

UPDATE 2005-04-16
Firefox 1.0.3 has been released. - What's New 1.0.3, firefox-1.0.3.tar.gz

UPDATE 2005-03-23
Firefox 1.0.2 has been released. - What's New 1.0.2, firefox-1.0.2.tar.gz

UPDATE 2005-02-24
Firefox 1.0.1 has been released. - What's New 1.0.1, firefox-1.0.1.tar.gz, updated spec file

UPDATE 2004-11-09
Firefox version 1.0 has been finally released! See About Mozilla Firefox screenshot.
- firefox-1.0.tar.gz
- updated spec file
I've updated History of Firefox Release page as well.
It's been a long way to reach the version 1.0 since the first version 0.1 released on Sept 2002.

UPDATE 2004-11-04
Firefox 1.0 Release Candidate 2 (1.0rc2) has been released.
- firefox-1.0rc2.tar.gz
- updated spec file
Don't forget you still need firefox.desktop and firefox.png files from this article in order to build RPM package.

UPDATE 2004-10-31
Bug 3084 filed for RealPlayer 10 on Firefox 1.0PR has been fixed with Firefox 1.0RC1.
Now you can enjoy RealMedia Movies from http://movies.guide.real.com/ with RealPlayer 10 on Firefox 1.0RC1.

UPDATE 2004-10-27
Firefox 1.0 Release Candidate 1 (1.0rc1) has been released.
Here is the tarball and updated spec.
Don't forget you still need firefox.desktop and firefox.png files from this article in order to build RPM package.

UPDATE 2004-10-02
On October 1, 2004, The Mozilla Foundation releaseed an important security update for Firefox. All users should upgrade to the latest version of the Firefox Preview Release. A patch is available for current Preview Release users. See Mozilla Press Release for more information.

Here is the tarball for Firefox 0.10.1
I have updated my firefox spec file to handle verson number change and allow you upgrade from 1.0PR to 0.10.1 using Epoch tag.

UPDATE 2004-09-18
Congratulations to Spread Firefox Team for reaching their one million download campaign!

UPDATE 2004-09-16
Here is a very cool new feature in Firefox 1.0PR - I call it "Installing Flash Plugin in Firefox Way!"

UPDATE 2004-09-14
Just learned about this URL. http://spreadfirefox.com. Spread the Word! Spread the Firefox!

UPDATE 2004-09-14
The Mozilla Foundation just released Firefox 1.0 Preview Release (1.0PR)
Noticeable changes include:
- You don't have to run it as root first any more in order to run it as a user.
- It now asks for Would you like to make it your default browser?
Here is updated firefox spec file for Firefox 1.0PR.


Firefox is a free, open-source web browser for Windows, Linux and MacOS X and is based on the Mozilla codebase. It is small, fast and easy to use, and offers many advantages over Internet Explorer, such as the ability to block pop-up windows.

In this article, I'll be using Firefox 0.9.3 tarball on Fedora Core 1 as an example so please modify the spec file for your environment as necessary.

To build RPM, you'll need:
Tarball - firefox-0.9.3-i686-linux-gtk2+xft.tar.gz
Spec File - firefox.spec
Desktop File - firefox.desktop
Image File - firefox.png

Let's begin:
(Make sure you have created rpmbuild directory in your own home.)

[tchung@localhost firefox]$ ls
firefox-0.9.3-i686-linux-gtk2+xft.tar.gz  firefox.desktop  firefox.png  firefox.spec
[tchung@localhost firefox]$ cp *.gz *.desktop *.png ~/rpmbuild/SOURCES/
[tchung@localhost firefox]$ cp *.spec ~/rpmbuild/SPECS/
[tchung@localhost firefox]$ rpmbuild -ba ~/rpmbuild/SPECS/firefox.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.55841
+ umask 022
+ cd /home/tchung/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ rm -rf /var/tmp/firefox-0.9.3-buildroot
+ cd /home/tchung/rpmbuild/BUILD
+ rm -rf firefox-0.9.3
+ /bin/mkdir -p firefox-0.9.3
+ cd firefox-0.9.3
+ /usr/bin/gzip -dc /home/tchung/rpmbuild/SOURCES/firefox-0.9.3-i686-linux-gtk2+xft.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
++ /usr/bin/id -u
+ '[' 500 = 0 ']'
++ /usr/bin/id -u
+ '[' 500 = 0 ']'
+ /bin/chmod -Rf a+rX,g-w,o-w .
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.74695
+ umask 022
+ cd /home/tchung/rpmbuild/BUILD
+ cd firefox-0.9.3
+ LANG=C
+ export LANG
+ unset DISPLAY
+ mkdir -p /var/tmp/firefox-0.9.3-buildroot/usr/lib
+ cp -a firefox /var/tmp/firefox-0.9.3-buildroot/usr/lib
+ mkdir -p /var/tmp/firefox-0.9.3-buildroot/usr/share/applications /var/tmp/firefox-0.9.3-buildroot/usr/share/pixmaps
+ cp -a /home/tchung/rpmbuild/SOURCES/firefox.desktop /var/tmp/firefox-0.9.3-buildroot/usr/share/applications
+ cp -a /home/tchung/rpmbuild/SOURCES/firefox.png /var/tmp/firefox-0.9.3-buildroot/usr/share/pixmaps
+ mkdir -p /var/tmp/firefox-0.9.3-buildroot/usr/bin
+ ln -s /usr/lib/firefox/firefox /var/tmp/firefox-0.9.3-buildroot/usr/bin/firefox
+ ln -s /usr/lib/firefox/firefox-bin /var/tmp/firefox-0.9.3-buildroot/usr/bin/firefox-bin
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
Processing files: firefox-0.9.3-1.fc1
Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/firefox-0.9.3-buildroot
Wrote: /home/tchung/rpmbuild/SRPMS/firefox-0.9.3-1.fc1.src.rpm
Wrote: /home/tchung/rpmbuild/RPMS/i386/firefox-0.9.3-1.fc1.i386.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.26612
+ umask 022
+ cd /home/tchung/rpmbuild/BUILD
+ cd firefox-0.9.3
+ rm -rf /var/tmp/firefox-0.9.3-buildroot
+ exit 0
[tchung@localhost firefox]$

To install,

[tchung@localhost firefox]$ sudo rpm -Uvh /home/tchung/rpmbuild/RPMS/i386/firefox-0.9.3-1.fc1.i386.rpm
Password:
Preparing...                ########################################### [100%]
   1:firefox                ########################################### [100%]
[tchung@localhost firefox]$
Note

Following note ONLY apply if you were building Firefox 0.93 RPM in this original article.
It's no longer necessary to run as root if you were building Firefox 1.0PR RPM or higher.

Note: If you install in the default directory (which is usually /usr/local/firefox), or any other directory (in this article, we used /usr/lib/firefox) where only the root user normally has write-access, you must start firefox first as root before other users can start the program. Doing so generates a set of files required for later use by other users.

Base on above note, run it as root first before running as a user.

[tchung@localhost firefox]$ su -
Password:
[root@localhost root]# firefox
*** loading the extensions datasource
*** loading the extensions datasource

Choose "Don't import anything" and click on Next

Now you should able to run it as a user.

[tchung@localhost firefox]$ firefox

OR, you can launch it from 'Main Menu' > 'Internet' > 'Mozilla Firefox Browser'

Here is the screenshot for Firefox Browser.


See the Firefox Updates for more useful information.