debianlinuxopen sourcepackagestechnotes

Packaging Debian From Git Repository

Using the Libvirt project as an example, here is how to create a Debian package from using a Git repository clone:

git clone git://
cd libvirt
git-buildpackage --git-pristine-tar --git-upstream-branch=origin/upsgtream

If your upstream uses the source code management system (VCS) to maintain their code, you should consider to use them. That makes merging and cherry-picking upstream patches much easier. There are several specialized wrapper script packages for the Debian package building for each VCS.

  • git-buildpackage: Suite to help with Debian packages in Git repositories.
  • topgit: a Git patch queue manager
  • svn-buildpackage: helper programs to maintain Debian packages with Subversion.
  • cvs-buildpackage: A set of Debian package scripts for CVS source trees.

These packages offer more elegant working environment than manual use of the quilt commands for advanced audiences to automate building of packages.

Also on the note of Debian and package management, here is a nice way to handle package dependencies:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.