gbp
Build Debian packages from Git repositories
TLDR
Convert an existing Debian package to gbp
Build the package in the current directory using the default builder (debuild)
Build a package in a pbuilder environment for Debian Bullseye
Specify a package to be a source-only upload in the .changes file (see
Import a new upstream release
SYNOPSIS
gbp [options] <command> [<args>]
PARAMETERS
-v, --verbose
Increase verbosity level
-q, --quiet
Suppress non-essential output
--color[=WHEN]
Colorize output (auto/on/off)
-h, --help
Show help message and exit
--version
Show version information and exit
DESCRIPTION
gbp (Git Build Package) is a collection of command-line tools that assist Debian package maintainers in using Git repositories for packaging workflows. It facilitates importing upstream source code, managing patches via quilt series, building Debian packages, and maintaining branches like upstream, debian, and pristine-tar commits.
Key workflows include: importing Debian source packages with gbp import-dsc, applying patches from debian/patches using gbp pq, building with gbp buildpackage, and generating changelogs via gbp dch. It supports modern formats like 3.0 (quilt) and integrates with pristine-tar for reproducible tarballs.
Designed for efficiency, gbp enforces conventions for Git workflows in Debian, reducing errors in package maintenance. It's essential for Debian maintainers, Ubuntu packagers, and derivatives, promoting best practices like separate branches for upstream code and Debian modifications.
CAVEATS
Requires Git 1.7+ and Debian packaging tools like debhelper; subcommands have additional dependencies (e.g., pristine-tar for tarball regeneration). Not for non-Debian workflows.
COMMON SUBCOMMANDS
build: Build source package.
buildpackage: Full binary build.
import-dsc: Import Debian source.
import-orig: Import upstream tarball.
pq: Patch queue management.
dch: Debian changelog handling.
clone: Clone packaging repo.
HISTORY
Originated from the git-buildpackage project in 2008 by Moray Jardine and Anders Kaseorg. Integrated into Debian as git-buildpackage package since 0.5 (2009). Actively maintained by Debian Git Maintainers team; current version 0.10+ supports modern Git features and reproducible builds.


