gbp.conf(5)

πŸ’… gbp.conf β€” the vibe check

okay so bestie, you know gbp.conf(5), right? the config file for git-buildpackage? from the git-buildpackage Manual? yeah. this is the whole thing. sit down, grab a boba, we're doing this πŸ§‹βœ¨


🌸 NAME

gbp.conf β€” the Gbp configuration file. that's it. that's the name. iconic of it honestly.


πŸŽ€ SYNOPSIS

these files get read in this order, top to bottom, and the ones further down win when they disagree (increasing precedence, slay):

  • /etc/git-buildpackage/gbp.conf β€” system wide, the big communal one 🏠
  • ~/.gbp.conf β€” per user, your personal little corner πŸ’–
  • .gbp.conf β€” per branch, can be published with the repository β€” deprecated ⚠️
  • debian/gbp.conf β€” per branch, can be published with the repository πŸ“¦
  • .git/gbp.conf β€” per repository πŸ—‚οΈ

✨ DESCRIPTION

so the gbp.conf configuration files give you default global options AND specific options for individual gbp commands. every file has the same format (we'll get there, don't worry) and they're parsed in that order from top to bottom with increasing precedence. and if a file doesn't exist? skipped. no drama. πŸ¦‹

each file is made of either zero or one default section, and zero or one sections for each gbp command. plus! there can be an arbitrary number of remote-config sections. comments start with a hash sign (#). the whole layout situation is:

[DEFAULT]
# This section is for global settings. Affects all commands.
# Options set here have the lowest priority.
key = value

[<command>]
# Specific sections for each command, like buildpackage
# Options set here have lower priority than command line options
key = value

[remote-config <name>]
# Specific sections for a remote configuration. This can be used several
# times to set up remote configuration for gbp create-remote-repo
key = value

the sections for each command are named like the command (without gbp) and surrounded by square brackets, e.g. [buildpackage]. for backwards compatibility, command sections starting with git- or gbp- are also supported β€” but heads up, they will provoke a warning when parsed by gbp. it's giving deprecated. πŸ™ˆ

the keys in the key=value pairs are named like the command-line options of the corresponding command (with the -- stripped off) and can hold the same values, but see below for details. except for gbp buildpackage and gbp buildpackage-rpm, where the key needs --git- instead of -- stripped off. yeah, they're special like that.

for example, the gbp-buildpackage(1) manual page documents the --git-export-dir=directory option which can be turned into a configuration file setting by dropping the --git- prefix:

[buildpackage]
export-dir = directory

options that can be repeated on the command line take Python-like lists in the config file. for example, the gbp-import-orig(1) command has the --filter=pattern option which can be turned into a configuration file option like this:

[import-orig]
filter = [ '.svn', '.hg' ]

boolean options can be either True or False. for example, gbp-import-orig(1) has the --pristine-tar and --no-pristine-tar options which translate to:

[import-orig]
pristine-tar = True

and:

[import-orig]
pristine-tar = False

respectively. ✨

🌈 REMOTE SITE CONFIGURATION

gbp-create-remote-repo(1) can additionally parse remote site configurations from gbp.conf. for example, a configuration like:

[remote-config pkg-libvirt]
# Location of the repository
remote-url-pattern = ssh://git.debian.org/git/pkg-libvirt/%(pkg)s
# Template dir to passed to git-init
template-dir = /srv/alioth.debian.org/chroot/home/groups/pkg-libvirt/git-template

can be used to create remote repositories for the pkg-libvirt project using:

gbp-create-remote-repo --remote-config=pkg-libvirt

this can be useful if you're often creating new remote repositories for different projects. lowkey a time saver fr fr 🫢

πŸ‘€ NOTES

Note: to see the current set of values that would be applied after parsing the configuration files, use gbp-config(1). πŸ”
Note: gbp import-dscs and git-pbuilder can't be configured via gbp.conf. sorry bestie. πŸ’€

πŸ”₯ EXAMPLES

an example set up for packaging work:

# $HOME/.gbp.conf

[DEFAULT]
pristine-tar = True
cleaner = fakeroot debian/rules clean

[buildpackage]
export-dir  = ../build-area/

[import-orig]
dch = False
  filter = [
  '.svn',
  '.hg',
  '.bzr',
  'CVS',
  'debian/*',
  '*/debian/*'
]
filter-pristine-tar = True

[import-dsc]
filter = [
  'CVS',
  '.cvsignore',
  '.hg',
  '.hgignore'
  '.bzr',
  '.bzrignore',
  '.gitignore'
]

# End of file

no cap, that's a whole personality in a config file πŸ’…


πŸ¦‹ ENVIRONMENT

the following environment variables can be used to modify gbp's configuration file handling:

  • GBP_CONF_FILES β€” a colon separated list of configuration files to parse. if unset or empty, the default list of files is parsed (see above). πŸ‘‘
  • GBP_DISABLE_SECTION_DEPRECATION β€” when set to a non-empty value, don't print a deprecation warning in case gbp encounters a section starting with git- or gbp-. πŸ™…
  • GBP_DISABLE_GBP_CONF_DEPRECATION β€” when set to a non-empty value, don't print a deprecation warning in case gbp encounters a configuration file in a deprecated location. 🚫

πŸ“ FILES

see /etc/git-buildpackage/gbp.conf for an example. it's right there, go look πŸ‘€


⭐ SEE ALSO

gbp-config(1), gbp-clone(1), gbp-create-remote-repo(1), gbp-pq(1), gbp-pull(1), gbp-dch(1), gbp-import-dsc(1), gbp-import-orig(1), gbp-buildpackage(1), The Git-Buildpackage Manual ⟨file:///usr/share/doc/git-buildpackage/manual-html/index.html⟩

the whole friend group, basically πŸ«‚


πŸ’– AUTHORS

Guido GΓΌnther <agx@sigxcpu.org> β€” king behavior πŸ‘‘

this manual page is based on a POD version by Jari Aalto <jari.aalto@cante.net>. released under license GNU GPL version 2 or (at your option) any later. version.


and that's the whole page, bestie! this was gbp.conf(5), part of the git-buildpackage manual, dated 26 May 2026 β€” love that for us. mwah, go configure something iconic πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from