git-pbuilder - Wrapper around pbuilder for git-buildpackage
DIST=distribution git-pbuilder debbuild-options
DIST=distribution git-pbuilder (update | create | login)
git-pbuilder is a wrapper around pdebuild intended for use by git-
buildpackage. It configures pdebuild to use cowbuilder, passes
appropriate options to debbuild, and sets the base path for cowbuilder
based on the environment variable DIST.
By default, git-pbuilder assumes the target distribution is "sid" and
uses /var/cache/pbuilder/base-sid.cow if it exists. If it doesn't,
/var/cache/pbuilder/base.cow is tried. If DIST is set, its value is
the target distribution and /var/cache/pbuilder/base-dist.cow is used
instead. If DIST is "etch" or "ebo", --debian-etch-workaround is also
passed to cowbuilder.
If git-pbuilder is invoked via a name that starts with "git-pbuilder-",
the part after the last hyphen is taken to be the distribution
(although the environment variable overrides this). One can therefore
create symlinks like "git-pbuilder-lenny" pointing to git-pbuilder and
use that name when wanting to use a distribution of "lenny".
Any arguments are passed as-is to dpkg-buildpackage via the
--debbuildopts option to pdebuild.
Normally, one does not run this script directly. Instead, it's used as
the builder script for git-buildpackage. To configure git-buildpackage
to use it, add a stanza like:
builder = /path/to/git-pbuilder
in your gbp.conf file (which can be .gbp.conf in your home directory or
at the top level of the repository, or gbp.conf in the .git directory).
DIST is read as an environment variable so that you can set it before
running git-buildpackage without having to worry about passing
parameters through git-buildpackage.
Alternately, git-pbuilder may be called with an argument of "update",
"create", or "login". In this case, it calls cowbuilder using sudo and
passes the corresponding command to cowbuilder, using the same logic as
above to determine the base directory and distribution.
Sets the target distribution. This is used primarily to determine
the base path for cowbuilder, but it's also used to determine
whether to pass --debian-etch-workaround to cowbuilder.
The default "cowbuilder --basepath" directories, searched for in
that order, if DIST is not set.
The "cowbuilder --basepath" directory used if DIST is set.
cowbuilder(8), dpkg-buildpackage(1), git-buildpackage(1), pdebuild(1),
The latest version of this script is available from
Russ Allbery <email@example.com>