[[gbp]]
===  git-buildpackage

The *git-buildpackage* package offers many commands to automate packaging activities using the git repository.

* *git-import-dsc*: import the previous Debian source package to the git repository.
* *git-import-orig*: import the new upstream tar to the git repository.
* *git-dch*: generate the Debian changelog from the git commit messages.
* *git-buildpackage*: build the Debian binary package from the git repository. (alias *gbp*)
** The *--pristine-tar* option for the *git-buildpackage* command enables to store the upstream tarball in the same git repository.
** The *--uscan* option for the *git-buildpackage* command enables to download and commit the new upstream tarball into the git repository.
** The ``*gbp pull*'' command updates the *debian*, *upstream* and *pristine-tar* branches safely from the remote repository.
* *git-pbuilder*: build the Debian binary package from the git repository using the *pbuilder* package.
** The *cowbuilder* package is used as its backend.
* The *gbp-pq*, *git-dpm* or *quilt* (or alias *dquilt*) commands are used to manage quilt patches.
** The use of the *dquilt* command is the simplest to learn and requires you to commit the resulting files manually with the *git* command to the *master* branch.
** The use of the ``*gbp pq*'' command provides the equivalent functionality of the patch set management without using *dquilt* and eases including upstream git repository changes by the cherry-picking.
** The use of the ``*gbp dpm*'' command provides the more enhanced functionality than that of the `*gbp pq*'' command.

The package history management with the *git-buildpackage* package is becoming the standard practice for most Debian maintainers.

See:

* http://honk.sigxcpu.org/projects/git-buildpackage/manual-html/gbp.html[Building Debian Packages with git-buildpackage]
* https://wiki.debian.org/GitPackagingWorkflow
* https://wiki.debian.org/GitPackagingWorkflow/DebConf11BOF
* http://raphaelhertzog.com/2010/11/18/4-tips-to-maintain-a-3-0-quilt-debian-source-package-in-a-vcs/
* The *systemd* packaging practice documentation on http://anonscm.debian.org/gitweb/?p=pkg-systemd/systemd.git;a=blob;f=debian/README.source[Building from source].

TIP:  Relax. You don't need to use all the wrapper tools.  Use only ones which match your needs.
