gbp: command not found

GBP stands for “Git Build Package” and is a set of tools for managing Debian package builds using Git. It allows developers to maintain the Debian package source code and build scripts in a Git repository, making it easy to manage revisions, collaborate with others, and automate the build process.

The main components of GBP are:

  • gbp buildpackage: a command to build Debian packages from a Git repository. It automatically creates a source tarball from the repository, and runs the appropriate build commands (such as dpkg-buildpackage) to create the binary packages.
  • gbp import-dsc: a command to import an existing Debian source package into a Git repository. It creates a new branch and imports the package’s files and build scripts into it, allowing developers to start making changes and create new versions of the package.
  • gbp export-dsc: a command to create a Debian source package from a Git repository. It exports the package’s files and build scripts from the repository into a source tarball and a .dsc file, which can be used to build binary packages.

GBP also provides additional commands for managing branches, tags, and releases, as well as support for various packaging formats (such as quilt and gbp-pq) and integration with other tools (such as git-buildpackage, salsa and jenkins-debian-glue).

If you encounter the below error while running the command gbp:

gbp: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install git-buildpackage
Ubuntu apt-get install git-buildpackage
Kali Linux apt-get install git-buildpackage
Raspbian apt-get install git-buildpackage

gbp Command Examples

1. Convert an existing Debian package to gbp:

# gbp import-dsc path/to/package.dsc

2. Build the package in the current directory using the default builder (`debuild`):

# gbp buildpackage -jauto -us -uc

3. Build a package in a `pbuilder` environment for Debian Bullseye:

# DIST=bullseye ARCH=amd64 gbp buildpackage -jauto -us -uc --git-builder=git-pbuilder

4. Specify a package to be a source-only upload in the `.changes` file (see https://wiki.debian.org/SourceOnlyUpload):

# gbp buildpackage -jauto -us -uc --changes-options=-S

5. Import a new upstream release:

# gbp import-orig --pristine-tar path/to/package.tar.gz
Related Post