LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 01-25-2006, 12:30 AM   #1
treepalm58
LQ Newbie
 
Registered: Jan 2006
Location: Ontario, Canada
Distribution: SuSE 10.0, PCLinuxOS 2010.7
Posts: 7

Rep: Reputation: 0
Question Patching application sources


Hi there,

I am new to Linux. I am trying SuSE Linux 10.0 which I found appealing and easy to install and configure. I have tried some configurations myself and it worked well by learning from the forums. My question is how to patch a source patch file, and when to patch, before make and install or after?

Thanks for any help
 
Old 01-25-2006, 12:48 AM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Applying a patch to a source file is done before make. Since it involves changing the sources so that the final executable behaves differently, it can't be done after the make.

There is a utility called patch that takes a patch file (a partial kernel patch is below) in diff format and applies the changes to your original sources. Have a look at `man patch` for more info.

Here is a simple example that the patch utility will use to remove the line 'EXTRAVERSION = .5' from your original sources and insert the line 'EXTRAVERSION = .6'

Code:
diff --git a/Makefile b/Makefile
index ea6f2f9..8c6fcb0 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 14
-EXTRAVERSION = .5
+EXTRAVERSION = .6
 NAME=Affluent Albatross

 # *DOCUMENTATION*
After patching, you can run `./configure && make && make install` or whatever your particular app needs. Alternatively, you can edit the file by hand with a text editor (vi, etc.) and then `./configure && make && make install`

Last edited by gilead; 01-25-2006 at 12:50 AM.
 
Old 01-25-2006, 01:53 AM   #3
treepalm58
LQ Newbie
 
Registered: Jan 2006
Location: Ontario, Canada
Distribution: SuSE 10.0, PCLinuxOS 2010.7
Posts: 7

Original Poster
Rep: Reputation: 0
Smile

Hi gilead
Thanx for the information. I am asking this because I applied the patch and it worked ok for the patch, but it did not make as expected. Then I applied the make and install before patching and worked. Seems the patch itself has errors. thank you for the information
 
  


Reply



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
Need Recommendation for Debian Etch sources.list ( /etc/apt/sources.list ) forgox Debian 6 05-05-2007 01:57 PM
HOWTO:Patching new ALSA sources into kernel source for new sound cards detection? deepclutch Debian 1 07-17-2005 11:49 AM
Ubuntu Sources List! I need some great sources lists! Jengo Linux - Newbie 1 06-24-2005 04:50 PM
how i migrate windows application to Linux base application vandarakalpesh Linux - Software 0 06-26-2004 03:34 AM
Software Sources Manager, how to add installation cd sources after deletion Lakota Mandriva 1 10-23-2003 12:39 AM

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

All times are GMT -5. The time now is 03:53 AM.

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