Translator(s): English - Indonesian

Maintaining Debian source packages in git with git-dpm

This page describes how to use git-dpm. For instructions how to use the git-buildpackage family of commands, look at PackagingWithGit.

design goals

The main design goals are:


As with most tool, documentation can always be improved. I hope this page will also get some more examples and explanations added.

How to start

You can either import .dsc files or start from scratch.

Common operations

Build a package

git-dpm prepare && dpkg-buildpackage -rfakeroot -us -uc

will check everything is ready (possibly checking out a missing .orig.tar file using pristine tar) and then build it. (Usually it should suffice to just place the .orig.tar file in the parent directory and call dpkg-buildpackage, but git-dpm prepare will make sure you are not in the middle of some change and the correct .orig.tar file is there).

Add a patch

To write a patch yourself:

git-dpm checkout-patched
vim files
git commit -a
git-dpm update-patches

Include a patch file

git-dpm apply-patch patchfile
git-dpm update-patches

Cherry pick a commit from upstream:

git-dpm cherry-pick commit
git-dpm update-patches

(You of course only need the update-patches command once you are done and not if you want to add more stuff or edit any of the patches afterwards).


git config --global dpm.pristineTarCommit true


other stuff

to be continued ...