The configuration files are parsed in this order:
/etc/git-buildpackage/gbp.conf |
system wide configuration |
~/.gbp.conf |
per user configuration |
.gbp.conf |
per repository/branch configuration (deprecated) |
debian/gbp.conf |
per repository/branch configuration |
.git/gbp.conf |
per (local) repository configuration |
All have the same format. They consist of several sections, all of them are optional:
[DEFAULT] |
Options in this section apply to all gbp commands. |
[buildpackage] |
Options in this section apply to gbp buildpackage only and override options from the [DEFAULT] section. |
[import-orig] |
Options in this section apply to gbp import-orig only and override options from the [DEFAULT] section. |
[import-dsc] |
Options in this section apply to gbp import-dsc only and override options from the [DEFAULT] section. |
[dch] |
Options in this section apply to gbp dch only and override options from the [DEFAULT] section. |
... |
Same for the other gbp commands |
The actual options in these sections are the command line options without
the '--' prefix. So --upstream-branch=
dfsgfree
would read:
upstream-branch
=dfsgfree
in the config file. In the special case of gbp buildpackage, the stripped prefix is not '--' but '--git-'. Here's a more complete example:
[DEFAULT] # the default build command builder=debuild -i\.git -I.git # the default branch for upstream sources upstream-branch=upstream # the default branch for the debian patch debian-branch=master [buildpackage] upstream-branch=dfsgclean # Sign tags with GPG: sign-tags = True # Keyid to sign tags with #keyid = 0xdeadbeef [import-orig] upstream-branch=notdfsgclean [import-dsc] upstream-branch=notdfsgclean [dch] git-log=--no-merges
For more details, see the gbp.conf(5) manual page.
The environment variable GBP_CONF_FILES
can be
used to override the order in which configuration files are
parsed. The following example parses two configuration files in the
users home directory (~/.gbp.conf
and
~/.gbp.late.conf
) and in the debian
directory (debian/gbp.conf
).
The file are parsed from left to right. Since
~/.gbp.late.conf
is at the very end of the list it
can be used to override configuration entries shipped by the
package. This can be useful if packages set
e.g. export-dir
or
tarball-dir
and you prefer different locations:
$ cat <<EOF >~/.gbp.late.conf [DEFAULT] export-dir = ../build-area tarball-dir = ../tarballs EOF $ export GBP_CONF_FILES=~/.gbp.conf:debian/gbp.conf:~/.gbp.late.conf $ cd <mypkg> $ gbp config buildpackage.export-dir ../build-area
If you want all configuration files to be skipped, set
GBP_CONF_FILES
to a non existing location. This way
only default values and options from the command line will be used:
$ export GBP_CONFI_FILES=/does/not/exist $ gbp config buildpackage.debian-branch master