As of version 0.17, gitpkg ships with a hook called quilt-patches-deb-export-hook. This can be used to export patches from git at the time of creating the source package.
This is controlled by a file debian/source/git-patches.
Each line contains a range suitable for passing to git-format-patch(1).
DEB_VERSION are replaced with
values taken from debian/changelog. Note that
the first part of
An example is
This tells gitpkg to export the given two ranges of commits to debian/patches while generating the source package. Each commit becomes a patch in debian/patches, with names generated from the commit messages. In this example, we get 5 patches from the two ranges.
0001-expand-pattern-in-no-java-rule.patch 0002-fix-dd_free_global_constants.patch 0003-Backported-patch-for-CPlusPlus-name-mangling-guesser.patch 0004-Use-system-copy-of-nauty-in-apps-graph.patch 0005-Comment-out-jreality-installation.patch
Thanks to the wonders of
3.0 (quilt) packages, these are applied
when the source package is unpacked.
Current lintian complains bitterly about debian/source/git-patches. This should be fixed with the next upload.
It's a bit dangerous if you checkout such package from git, don't read any of the documentation, and build with debuild or something similar, since you won't get the patches applied. There is a proposed check that catches most of such booboos. You could also cause the build to fail if the same error is detected; this a matter of personal taste I guess.