LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Blogs > The Slacker's Blog
User Name
Password

Notices

This is a semi-random collection of posts on nearly all things Slackware and Linux-related -- at least as I see it.
Rate this Entry

Creating a patch . . .

Posted 05-28-2011 at 01:03 PM by Lufbery

Hi all,

I thought I'd share a procedure for making patches that I learned.

Starting with information from a mailing list or newsgroup for a patch, copy the relevant information to a text file and give it a descriptive name with a .patch suffix.
  1. tar -xf file.tar.bz2
  2. mv file file.orig
  3. tar -xf file.tar.bz2
  4. cd file
  5. patch -Np1 ../file.patch # Applies patch from newsgroup or other source with offsets
  6. cd ..
  7. diff -Naur file.orig file > file.new.patch #Creates the new patch file without the offsets.

Finally, take a look at the new patch and add any relevant comments:

emacs (or vi, or whatever) file.new.patch

The new patch should work fine at this point and you can go forward with compiling the software.

Regards,
Posted in Uncategorized
Views 538 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



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

Main Menu

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration