← 返回命令列表

Linux command

gbp 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Import an existing Debian source package into Git

gbp import-dsc [path/to/package.dsc]

Build the package using the default builder

gbp buildpackage -jauto -us -uc

Build a package in a pbuilder environment

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

Import a new upstream release

gbp import-orig --pristine-tar [path/to/package.tar.gz]

Clone a repository with gbp branch tracking

gbp clone [url]

Generate changelog entries from Git commits

gbp dch --auto

Tag the current Debian release in Git

gbp tag

Push packaging branches and tags to remote

gbp push

说明

gbp (git-buildpackage) integrates Debian package building with Git version control. It maintains separate Git branches for upstream source, Debian packaging, and optionally pristine tarballs, providing a clean workflow for package maintenance. The typical workflow involves importing upstream releases with gbp import-orig, making packaging changes on the debian branch, and building with gbp buildpackage. The tool handles merging upstream changes and generating proper Debian source packages. gbp supports building in clean environments via pbuilder, sbuild, or cowbuilder for reproducible builds.

参数

buildpackage
Build Debian source and binary packages from a Git repository.
import-dsc
Import an existing Debian source package into a Git repository.
import-orig
Import a new upstream source tarball into a Git repository.
export-orig
Recreate upstream tarballs from a Git repository.
clone
Clone a Git repository and set up gbp tracking branches.
pull
Update a repository from remote, aware of packaging branch tracking.
push
Push to a remote repository, aware of packaging branch tracking.
dch
Generate debian/changelog entries from Git commit history.
tag
Tag a Debian release in a Git repository.
pq
Manage debian/patches as Git topic branches (patch queue).
create-remote-repo
Create a remote Git repository and push the local repository into it.
import-dscs
Import several Debian source packages into a Git repository, sorted by version.

FAQ

What is the gbp command used for?

gbp (git-buildpackage) integrates Debian package building with Git version control. It maintains separate Git branches for upstream source, Debian packaging, and optionally pristine tarballs, providing a clean workflow for package maintenance. The typical workflow involves importing upstream releases with gbp import-orig, making packaging changes on the debian branch, and building with gbp buildpackage. The tool handles merging upstream changes and generating proper Debian source packages. gbp supports building in clean environments via pbuilder, sbuild, or cowbuilder for reproducible builds.

How do I run a basic gbp example?

Run `gbp import-dsc [path/to/package.dsc]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does buildpackage do in gbp?

Build Debian source and binary packages from a Git repository.