Patching Source Code

From Notes

Revision as of 23:50, 18 July 2006 by (Talk)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Create a patch from modified source code and the original

diff -uNr <original code> <modified code> > <file>.patch

Apply the patch to an RPM

  • Copy the patch to your SOURCES directory

Modify your SPEC file to include the following lines

Under summary:

  • Patch0: %{name}-%{version}.patch

Note: your patch must be named the same as your application - version.

Under prep:

  •  %patch -p1
Personal tools