Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 10-02-2003, 10:06 AM   #1
LQ Newbie
Registered: Oct 2003
Posts: 1

Rep: Reputation: 0
Applying patch to source code


I am trying to apply the OpenSSH patch for the buffer management errors detailed in: buffer.adv

However, I have never applied a source code patch and I am unsure of how to do it.

Any links or info would be apperciated.

Old 10-02-2003, 08:04 PM   #2
LQ Guru
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 11
Posts: 7,990

Rep: Reputation: 409Reputation: 409Reputation: 409Reputation: 409Reputation: 409
"However, I have never applied a source code patch and I am unsure of how to do it."

You use the patch command. See:
man patch

Applying a patch typically looks something like this:

gunzip newapplication-2.3.1.tar.gz | patch -p1

Be prepared. Create a LifeBoat CD.

Steve Stites
Old 10-02-2003, 08:38 PM   #3
Senior Member
Registered: Oct 2002
Location: Belgium
Distribution: Debian, Free/OpenBSD
Posts: 1,123

Rep: Reputation: 47
Originally posted by jailbait
gunzip newapplication-2.3.1.tar.gz | patch -p1
A more logical approach (imho) would be: (assuming you dld the patch in your home directory)

# cd /sources/you/want/to/patch
# patch -p1 < ~/nameofyourpatch

naturally, you'll have to decompress the patch if it's compressed

ex (to patch linux 2.4.21 to 2.4.22)

# bunzip2 ~/patch-2.4.22.bz2
# cd /usr/src/linux-2.4.21
# patch -p1 < ~/patch-2.4.22


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 kernel patch pirozzi Debian 1 12-01-2004 07:47 AM
applying patch? alaios Linux - General 1 11-29-2004 10:41 AM
applying a patch darthczyz Linux - Newbie 2 05-07-2004 08:44 AM
applying ck kernel patch Abe_the_Man Linux - General 1 01-29-2004 11:43 AM
Applying a code patch to XFree without a complete rebuild? Locura Slackware 4 07-25-2003 06:20 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:38 AM.

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