Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
03-27-2015, 03:30 PM
|
#1
|
Member
Registered: May 2014
Posts: 209
Rep:
|
Building Firefox And Applying A Patch
I'm wanting to find a way build, and also apply, a*.patch file to firefox in a simple way (from CLI using traditional unix and CLI based tools preferably). Looking on google gets a myriad of results that don't seem to help at all.
I'd appreciate any and help as I'm terrible with understanding source code as it is.
Thanks a bunch.
|
|
|
03-27-2015, 05:41 PM
|
#2
|
Senior Member
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,219
|
have a look at the beyond linux from scratch book ( google it ) it has full instructions to build firefox, beware though you will need at least 6g ram/swap and it will take a couple of hours to compile/link depending on your system
|
|
|
03-27-2015, 08:57 PM
|
#3
|
Member
Registered: May 2014
Posts: 209
Original Poster
Rep:
|
I looked at the book and I didn't see any info regarding patching it.
|
|
|
03-27-2015, 11:32 PM
|
#4
|
LQ Newbie
Registered: Nov 2014
Location: Peris
Posts: 2
Rep: 
|
sorry buddy but i am not knowing more about it but i suggest one thing that sometimes you need to restarts your device and it the problem will solve automatically but that will done often times not every-time.
|
|
|
03-28-2015, 07:01 AM
|
#5
|
Senior Member
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,219
|
just read the man page for patch.
what patch are you trying to apply anyway?
|
|
|
03-28-2015, 11:23 AM
|
#7
|
Senior Member
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,219
|
Exract the firefox source tarball, save the patch to the same folder that you are extracting the source in which should give you somthing like lis
Code:
keithhedger@LFSCerebro:/media/SkyNet/LFSSourceArchives-7.7/DESKTOP/firefox-36.0.1.source-> ls
firefox-kde.patch mozilla-release
cd into the mozilla-release folder and run
Code:
patch -Np1 -i ../firefox-kde.patch
if all is well you should see this
Code:
patching file browser/base/content/browser-kde.xul
patching file browser/base/content/browser.xul
patching file browser/base/jar.mn
patching file browser/components/build/nsModule.cpp
patching file browser/components/preferences/main.js
patching file browser/components/shell/moz.build
patching file browser/components/shell/nsKDEShellService.cpp
patching file browser/components/shell/nsKDEShellService.h
patching file browser/components/shell/nsUnixShellService.cpp
patching file browser/components/shell/nsUnixShellService.h
patching file browser/installer/package-manifest.in
Then configure and build in the normal way.
|
|
|
03-28-2015, 01:02 PM
|
#8
|
Member
Registered: May 2014
Posts: 209
Original Poster
Rep:
|
Ran into this.
Code:
The next patch would create the file
browser/base/content/browser-kde.xul, which already exists! Skipping
patch. 1 out of 1 hunk ignored patching file
browser/base/content/browser.xul Hunk #1 FAILED at 174. Hunk #2 FAILED
at 1198. 2 out of 2 hunks FAILED -- saving rejects to file
browser/base/content/browser.xul.rej patching file browser/base/jar.mn
Reversed (or previously applied) patch detected! Skipping patch. 1 out
of 1 hunk ignored -- saving rejects to file browser/base/jar.mn.rej
patching file browser/components/build/nsModule.cpp Hunk #1 FAILED at 8.
Hunk #2 FAILED at 31. Hunk #3 FAILED at 60. 3 out of 3 hunks FAILED --
saving rejects to file browser/components/build/nsModule.cpp.rej
patching file browser/components/preferences/main.js Hunk #1 FAILED at
12. Hunk #2 FAILED at 572. 2 out of 2 hunks FAILED -- saving rejects to
file browser/components/preferences/main.js.rej patching file
browser/components/shell/moz.build Hunk #1 FAILED at 30. 1 out of 1 hunk
FAILED -- saving rejects to file browser/components/shell/moz.build.rej
The next patch would create the file
browser/components/shell/nsKDEShellService.cpp, which already exists!
Skipping patch. 1 out of 1 hunk ignored The next patch would create the
file browser/components/shell/nsKDEShellService.h, which already exists!
Skipping patch. 1 out of 1 hunk ignored The next patch would create the
file browser/components/shell/nsUnixShellService.cpp, which already
exists! Skipping patch. 1 out of 1 hunk ignored The next patch would
create the file browser/components/shell/nsUnixShellService.h, which
already exists! Skipping patch. 1 out of 1 hunk ignored patching file
browser/installer/package-manifest.in Reversed (or previously applied)
patch detected! Skipping patch. 1 out of 1 hunk ignored -- saving
rejects to file browser/installer/package-manifest.in.rej
|
|
|
03-28-2015, 01:10 PM
|
#9
|
Senior Member
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,219
|
this patch is not suitable for the firefox version you are trying to compile it patches fine on version 36.0.1, what version of firefox are you trying to patch? do you have the src archive because if you are trying to patch an archive with the firefox binary's it wont work.
|
|
|
03-28-2015, 01:26 PM
|
#10
|
Member
Registered: May 2014
Posts: 209
Original Poster
Rep:
|
Quote:
Originally Posted by Keith Hedger
this patch is not suitable for the firefox version you are trying to compile it patches fine on version 36.0.1, what version of firefox are you trying to patch? do you have the src archive because if you are trying to patch an archive with the firefox binary's it wont work.
|
Whoops, messed up the first time as I had the wrong source.
I'm using firefox-36.0.1.source.tar.bz2 now which I untared and tried to patch; gave the same error.
|
|
|
03-28-2015, 01:42 PM
|
#11
|
Senior Member
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,219
|
where did you get the source from was it from mozilla? if it was from your distros repos it may already be patched.
|
|
|
03-28-2015, 01:57 PM
|
#12
|
Member
Registered: May 2014
Posts: 209
Original Poster
Rep:
|
Quote:
Originally Posted by Keith Hedger
where did you get the source from was it from mozilla? if it was from your distros repos it may already be patched.
|
I tried from mozila.
ftp://ftp.mozilla.org/pub/mozilla.or...36.0.1/source/
Nothing has changed.
|
|
|
03-28-2015, 02:12 PM
|
#13
|
Senior Member
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,219
|
The only other thing is that mozilla has made minor updates to the source without bumping the version number which is not unknown or you have some how corrupted the patch try downloading it with wget like so
Code:
wget https://build.opensuse.org/source/mozilla:Factory/MozillaFirefox/firefox-kde.patch
Make sure you remove the mozilla-release folder, re extract the source and try again, make sure you run te patch before making any changes to the contents of the mozilla-release folder.
|
|
|
03-28-2015, 02:56 PM
|
#14
|
Member
Registered: May 2014
Posts: 209
Original Poster
Rep:
|
It worked!
Do I still make a mozconfig and configure the options? Or should I just do a standard configure without it?
|
|
|
03-28-2015, 03:08 PM
|
#15
|
Senior Member
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,219
|
A mozconfig file is recommended because of the large number of options though I have on occasion built firefox using ./configure --prefix=/usr ... , but I would stick to using the config file method.
Don't forget to mark the thread as solved, and give my ego a rub and click the "Did you find this post helpful? Yes" link.
|
|
1 members found this post helpful.
|
All times are GMT -5. The time now is 04:13 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|