// vim:set filetype=asciidoc:
[[patches]]
=== *debian/patches/** files

As demonstrated in "`<<alt-patch>>`", the *debian/patches/* directory holds

* __patch-file-name__**.patch** files providing *-p1* patches and
* the *series* file which defines how these patches are applied.

See how these files are used in:

* "`<<dpkg-source-b>>`" to build the Debian source package
* "`<<dpkg-source-x>>`" to extract source files from the Debian source package

NOTE: Header texts of these patches should conform to "`https://dep-team.pages.debian.net/deps/dep3/[DEP-3]`".

NOTE: If you want to use VCS tools such as *git*, *gbp* and *dgit* to create and manage these patches after learning basics here, please refer to later in "`<<git-packaging>>`".

// The *-p1* patches residing in the *debian/patches/* directory of Debian source packages are applied in the sequence defined in the *debian/patches/series* file to the upstream source tree when "`*dpkg-source -x*`" extracts files from the Debian source package for the Debian binary package building.

[[include-binaries]]
=== *debian/source/include-binaries* file

The "`**dpkg-source --commit**`" command functions like *dquilt* but has one advantage over the *dquilt* command. The *dquilt* command can't handle modified binary files since they are not representable in a diff.  Also, adding binary files under the *debian/* directory is normally rejected by *dpkg-source*.  By listing these binary files in *debian/source/include-binaries*, the maintainer can include these binary files to the Debian source package generated by *dpkg-source*.
