Patching Source Code

From Notes

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