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


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 > #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)

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

Posted in Uncategorized
Views 1295 Comments 0
« Prev     Main     Next »
Total Comments 0




All times are GMT -5. The time now is 02:14 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