This page stems from the following discussion on debian-devel in January 2008: [ alpine.DEB.1.00.0801250818360.5187@wr-linux02].

Existing systems

Patch system

Location of the patches

How to inactivate a patch

Accepts diff -u output


[ dpatch]


Remove its name from debian/patches/00list


Can do scripting

[ quilt]


Remove its name from debian/patches/series


Suitable for generating patches on any size codebase. Advanced VCS-like features.

[ cdbs] simple-patchsys


Remove its .diff or .patch suffix



[ wig&pen]

debian/patches in .debian.tar.gz file

Rename to include a non-word non-hyphen character


Native to [ dpkg]

[ dbs]


Remove it from the directory


Patches applied in ASCIIbetical order, no series file. Tarball-in-tarball (if you're in to that).


It has been discussed that the use of patch systems was making the work of porters, NMUers, security and QA teams difficult for two main reasons:

  1. The profusion of patch systems. People would have to learn them all and to be able to detect which one is used in the package they are working on.
  2. The difficulty to repack the sources. If direct modifications of source pacakages block the target unpatch, dpkg-buildpackage will fail.

  3. It is unclear whether Wig&Pen will be implemented and if yes, when. Some patch systems are not yet adapted to this format yet.

Proposed improvements

A radical solution: not using any patch system anymore

Keeping a whole package, including upstream sources, in a version control system (VCS) has been proposed as an alternative way to manage the modification to upstream sources.

Comparison between the two paradigms



Changes to upstream sources are divided in logical blocks that are the patches.

Changes to upstream sources are divided into logical blocks that are groups of commits.

dpkg-buildpackage can fail after modifications of the sources

dpkg-buildpackage can not be blocked by the impossibility to unpatch the sources.

The diff.gz file only contains files located in the debian directory

Informations conveyed by defining groups of commits is not reflected in the diff.gz file.

Well documented in beginners tutorials, strong tradition in packaging teams.

No tutorials for beginners, new and not widespread yet.

Repositories can be limited to contain only the debian directory.

Need to keep the upstream sources in a VCS as well.

Some systems, such as dpatch allow scripting.

Changes are systematically applied.

Not very convenient for very big projects.

Well adapted to big projects.

Of course, the use of VCS have other advantages, but this table focuses on the perspective of their substitution to patch management systems.

Unanswered questions

Future directions

If a consensus emerges, a [ Debian enhancement proposal] could be written.