How are the patches in debian/patches obtained?
diff -Nurp folder/original folder1/new
This usually depends on the type of patch system which the package uses.
There are 3 types of patch systems for Debian packages:
All patch systems store patches in debian/patches. You can use the what-patch command in package ubuntu-dev-tools to find out which patch system a package is using.
Introduction of Quilt:
Quilt patches can be easily manipulated using the quilt command from a terminal. The quilt command is a part of package quilt .
This page will help you getting along with quilt. Also check out the quilt manpage by running
in a terminal.
Now for cdbs + simple-patchsys:
These patches are manipulated commonly by a script called
You can add new patches like this:
The section "Modify upstream files" of http://raphaelhertzog.com/2011/07/04/how-to-prepare-patches-for-debian-packages/ explains how those patches are created when the patch system in use is quilt (which is the most common case thanks to the new source format "3.0 (quilt)").