LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 03-27-2015, 03:30 PM   #1
Pinonoir
Member
 
Registered: May 2014
Posts: 209

Rep: Reputation: 0
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.
 
Old 03-27-2015, 05:41 PM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,154

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
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
 
Old 03-27-2015, 08:57 PM   #3
Pinonoir
Member
 
Registered: May 2014
Posts: 209

Original Poster
Rep: Reputation: 0
I looked at the book and I didn't see any info regarding patching it.
 
Old 03-27-2015, 11:32 PM   #4
somyasmith001
LQ Newbie
 
Registered: Nov 2014
Location: Peris
Posts: 2

Rep: Reputation: Disabled
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.
 
Old 03-28-2015, 07:01 AM   #5
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,154

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
just read the man page for patch.
what patch are you trying to apply anyway?
 
Old 03-28-2015, 10:43 AM   #6
Pinonoir
Member
 
Registered: May 2014
Posts: 209

Original Poster
Rep: Reputation: 0
The patch for firefox from opensuse and KDE found here https://build.opensuse.org/package/v...patch?expand=1
 
Old 03-28-2015, 11:23 AM   #7
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,154

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
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.
 
Old 03-28-2015, 01:02 PM   #8
Pinonoir
Member
 
Registered: May 2014
Posts: 209

Original Poster
Rep: Reputation: 0
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
 
Old 03-28-2015, 01:10 PM   #9
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,154

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
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.
 
Old 03-28-2015, 01:26 PM   #10
Pinonoir
Member
 
Registered: May 2014
Posts: 209

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Keith Hedger View Post
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.
 
Old 03-28-2015, 01:42 PM   #11
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,154

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
where did you get the source from was it from mozilla? if it was from your distros repos it may already be patched.
 
Old 03-28-2015, 01:57 PM   #12
Pinonoir
Member
 
Registered: May 2014
Posts: 209

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Keith Hedger View Post
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.
 
Old 03-28-2015, 02:12 PM   #13
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,154

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
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.
 
Old 03-28-2015, 02:56 PM   #14
Pinonoir
Member
 
Registered: May 2014
Posts: 209

Original Poster
Rep: Reputation: 0
It worked!
Do I still make a mozconfig and configure the options? Or should I just do a standard configure without it?
 
Old 03-28-2015, 03:08 PM   #15
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,154

Rep: Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857Reputation: 857
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.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
applying cfs patch. dale_chip Linux - General 1 10-03-2007 06:29 AM
Applying patch from CD-ROM M K Mandriva 1 01-26-2006 01:26 PM
applying patch? alaios Linux - General 1 11-29-2004 10:41 AM
Building a kernel RPM with applying a patch barisdemiray Programming 1 08-04-2004 06:50 AM
applying a patch darthczyz Linux - Newbie 2 05-07-2004 08:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration