.\" This manpage has been automatically generated by docbook2man .\" from a DocBook document. This tool can be found at: .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . .TH "GBP-BUILDPACKAGE" "1" "07 February 2017" "" "git-buildpackage Manual" .SH NAME gbp-buildpackage \- Build Debian packages from a Git repository .SH SYNOPSIS \fBgbp\~buildpackage\fR [ \fB--git-[no-]ignore-new\fR ] [ \fB--git-tag\fR ] [ \fB--git-verbose\fR ] [ \fB--git-color=\fI[auto|on|off]\fB\fR ] [ \fB--git-color-scheme=\fICOLOR_SCHEME\fB\fR ] [ \fB--git-notify=\fI[auto|on|off]\fB\fR ] [ \fB--git-upstream-branch=\fITREEISH\fB\fR ] [ \fB--git-debian-branch=\fIBRANCH_NAME\fB\fR ] [ \fB--git-ignore-branch\fR ] [ \fB--git-[no-]submodules\fR ] [ \fB--git-builder=\fIBUILD_CMD\fB\fR ] [ \fB--git-cleaner=\fICLEAN_CMD\fB\fR ] [ \fB--git-[no-]pbuilder\fR ] [ \fB--git-[no-]qemubuilder\fR ] [ \fB--git-dist=\fIDIST\fB\fR ] [ \fB--git-arch=\fIARCH\fB\fR ] [ \fB--git-[no-]pbuilder-autoconf\fR ] [ \fB--git-pbuilder-options=\fIPBUILDER_OPTIONS\fB\fR ] [ \fB--git-[no-]sign-tags\fR ] [ \fB--git-keyid=\fIGPG-KEYID\fB\fR ] [ \fB--git-posttag=\fICOMMAND\fB\fR ] [ \fB--git-postbuild=\fICOMMAND\fB\fR ] [ \fB--git-postexport=\fICOMMAND\fB\fR ] [ \fB--git-prebuild=\fICOMMAND\fB\fR ] [ \fB--git-[no-]hooks\fR ] [ \fB--git-debian-tag=\fItag-format\fB\fR ] [ \fB--git-upstream-tag=\fItag-format\fB\fR ] [ \fB--git-debian-tag-msg=\fItag-msg-format\fB\fR ] [ \fB--git-force-create\fR ] [ \fB--git-no-create-orig\fR ] [ \fB--git-upstream-tree=\fI[TAG|BRANCH|TREEISH]\fB\fR ] [ \fB--git-tarball-dir=\fIDIRECTORY\fB\fR ] [ \fB--git-compression=\fITYPE\fB\fR ] [ \fB--git-compression-level=\fILEVEL\fB\fR ] [ \fB--git-component=\fIcomponent\fB\fR\fI ...\fR ] [ \fB--git-export-dir=\fIDIRECTORY\fB\fR ] [ \fB--git-export=\fITREEISH\fB\fR ] [ \fB--git-[no-]pristine-tar\fR ] [ \fB--git-[no-]pristine-tar-commit\fR ] [ \fB--git-[no-]-purge\fR ] [ \fB--git-dont-purge\fR ] [ \fB--git-tag-only\fR ] [ \fB--git-retag\fR ] [ \fBOPTION_PASSED_TO_BUILD_CMD\fR\fI ...\fR ] .SH "DESCRIPTION" .PP \fBgbp\~buildpackage\fR is used to build Debian source and .deb packages from a Git repository. .PP \fBgbp\~buildpackage\fR will, in order: .TP 0.2i \(bu Verify that it is being executed from the proper location. .TP 0.2i \(bu Verify that the repository doesn't contain any uncommitted source changes. .TP 0.2i \(bu Verify that it is being executed from the correct branch. .TP 0.2i \(bu (Optionally) run a clean command specified with \fB--git-cleaner\fR\&. .TP 0.2i \(bu (Optionally) export the source tree to a separate build area. .TP 0.2i \(bu Build an orig tarball if it doesn't exist. Optionally using pristine-tar\&. .TP 0.2i \(bu (Optionally) call a pre build hook. .TP 0.2i \(bu Call \fBdebuild\fR(1) or Cowbuilder (via \fB--git-pbuilder\fR) or the application specified via \fB--git-builder\fR passing along all arguments given to \fBgbp\~buildpackage\fR on the command line that don't start with --git-. .TP 0.2i \(bu (Optionally) tag the tree after a successful build. .TP 0.2i \(bu (Optionally) call a post build hook - e.g. to run lintian\&. .TP 0.2i \(bu (Optionally) call a post tag hook - e.g. to push the results to a remote repository after creating the tag. .SH "OPTIONS" .PP All options are prefixed with \fBgit-\fR to distinguish options for \fBgbp\~buildpackage\fR from options passed to the \fIBUILD_CMD\fR: .TP \fB--git-[no-]ignore-new \fR Don't abort if there are uncommitted changes in the source tree or the current branch doesn't match the \fIDEBIAN-BRANCH\fR\&. .TP \fB--git-tag \fR Add a git tag after a successful build. This is a command line only option that cannot be specified via \fIgbp.conf\fR\&. .TP \fB--git-builder=\fIBUILD_CMD\fB \fR Use \fIBUILD_CMD\fR instead of \fBdebuild -i -I\fR\&. .TP \fB--git-cleaner=\fICLEAN_CMD\fB \fR Use \fICLEAN_CMD\fR instead of \fBdebuild clean\fR\&. .TP \fB--git-pbuilder \fR Build package using \fBgit-pbuilder\fR\&. Note that this overwrites any \fB--git-builder\fR and \fB--git-cleaner\fR options. .TP \fB--git-qemubuilder \fR Build package using \fBgit-pbuilder\fR with \fBqemubuilder\fR\&. Note that this overwrites any \fB--git-builder\fR and \fB--git-cleaner\fR options. .TP \fB--git-dist=\fIDIST\fB \fR Build for distribution \fIDIST\fR when using \fB--git-pbuilder\fR\&. If unset build for the unstable distribution. The special value \fBDEP14\fR will set the distribution to build for from the branch name. I.e. if you're starting the build from a branch named \fIdebian/wheezy-backports\fR the distribution is set to \fIwheezy-backports\fR\&. If the branch is named \fIdownstream/sid\fR the distribution would be set to \fIdownstream_sid\fR\&. .TP \fB--git-arch=\fIARCH\fB \fR Build for architecture \fIARCH\fR when using \fB--git-pbuilder\fR\&. If unset no architecture is passed to \fBgit-pbuilder\fR\&. .TP \fB--git-pbuilder-autoconf \fR Whether to try to autoconfigure \fBgit-pbuilder\fR or to rely on the settings in .pbuilderrc. See the \fBgit-pbuilder\fR manpage for details. .TP \fB--git-pbuilder-options \fR Options to pass to pbuilder .TP \fB--git-verbose \fR verbose execution .TP \fB--git-color=\fI[auto|on|off]\fB \fR Whether to use colored output. .TP \fB--git-notify=\fI[auto|on|off]\fB \fR Whether to send a desktop notification after the build. .TP \fB--git-color-scheme=\fICOLOR_SCHEME\fB \fR Colors to use in output (when color is enabled). The format for COLOR_SCHEME is \&':::\&'. Numerical values and color names are accepted, empty fields imply the default color. For example --git-color-scheme='cyan:34::' would show debug messages in cyan, info messages in blue and other messages in default (i.e. warning and error messages in red). .TP \fB--git-upstream-branch=\fIBRANCH_NAME\fB \fR Branch to build the orig tarball from if \fB--git-upstream-tree\fR is set to \fIBRANCH\fR\&. Default is \fIupstream\fR\&. .TP \fB--git-debian-branch=\fIBRANCH_NAME\fB \fR If you're not on this branch when invoking \fBgbp\~buildpackage\fR it will fail. Default is \fImaster\fR\&. This is done to make sure you don't accidentally release from a topic branch. Not being on this branch will be ignored when using \fB--git-ignore-new\fR\&. .TP \fB--git-ignore-branch \fR Don't check if the current branch matches \fIDEBIAN-BRANCH\fR\&. .TP \fB--git-[no-]sign-tags \fR GPG sign all created tags. .TP \fB--git-[no-]submodules \fR Include git submodules in the orig tarball. .TP \fB--git-keyid=\fIGPG-KEYID\fB \fR Use this keyid for gpg signing tags. .TP \fB--git-posttag=\fICOMMAND\fB \fR Execute \fICOMMAND\fR after tagging a new version. Exported environment variables are: \fBGBP_TAG\fR (the name of the generated tag), \fBGBP_BRANCH\fR (the branch the package was build from) and \fBGBP_SHA1\fR (the sha1 of the commit the tag was created at). .TP \fB--git-postbuild=\fICOMMAND\fB \fR Execute \fICOMMAND\fR after successful build. Exported environment variables are: \fBGBP_CHANGES_FILE\fR (the name of the generated changes file), \fBGBP_BUILD_DIR\fR (the build dir). .TP \fB--git-postexport=\fICOMMAND\fB \fR Execute \fICOMMAND\fR after exporting the source tree - valid only if --git-export-dir has been specified. Exported environment variables are: \fBGBP_GIT_DIR\fR (the repository the package is being built from), \fBGBP_TMP_DIR\fR (the temporary directory where the sources have been initially exported). .TP \fB--git-prebuild=\fICOMMAND\fB \fR Execute \fICOMMAND\fR from the build directory before calling \fBdebuild\fR or the application specified via \fB--git-builder\fR\&. Exported environment variables are: \fBGBP_GIT_DIR\fR (the repository the package is being built from), \fBGBP_BUILD_DIR\fR (the build dir). .TP \fB--git-[no-]hooks \fR Enable running all (cleaner, postexport, prebuild, postbuild, and posttag) hooks. Note: the \fB--git-builder\fR command is not affected by this option. .TP \fB--git-debian-tag=\fITAG-FORMAT\fB \fR Use this tag format when tagging Debian versions, default is \fIdebian/%(version)s\fR\&. .TP \fB--git-upstream-tag=\fITAG-FORMAT\fB \fR Use this tag format when looking for tags of upstream versions, default is \fIupstream/%(version)s\fR\&. .TP \fB--git-debian-tag-msg=\fItag-msg-format\fB \fR Use this tag message format when signing Debian versions, default is \fI%(pkg)s Debian release %(version)s\fR .TP \fB--git-force-create \fR Force creation of an orig tarball (overwriting a pre-existing one if present). .TP \fB--git-no-create-orig \fR Don't try to create any orig tarball. .TP \fB--git-overlay \fR Extract orig tarball from \fBtarball-dir\fR when using the \fBexport-dir\fR option (in analogy to mergeWithUpstream in svn-bp). Also remove debian/ if contained in the upstream tarball in case of 2.0 and 3.0 source formats. .TP \fB--git-export-dir=\fIDIRECTORY\fB \fR Export the current branch head (or the treeish object given via \fB--git-export\fR to \fIDIRECTORY\fR before building. .TP \fB--git-export=\fITREEISH\fB \fR Instead of exporting the current branch head, export the treeish object \fITREEISH\fR\&. The special name \fIINDEX\fR exports the current index whereas the special name \fIWC\fR exports the current working copy as is. .TP \fB--git-upstream-tree=\fI[TAG|BRANCH|TREEISH]\fB \fR How to find the upstream sources used to generate the tarball. \fITAG\fR (the default) looks at a tag corresponding to the version in the changelog. \fIBRANCH\fR looks at the upstream branch given via the \fB--git-upstream-branch\fR option. Other values are interpreted as treeishs. This doesn't have any effect if \fB--git-pristine-tar\fR is being used. .TP \fB--git-tarball-dir=\fIDIRECTORY\fB \fR Search for original tarballs in \fIDIRECTORY\fR instead of generating them. .TP \fB--git-compression=\fITYPE\fB \fR Specifies the upstream tarball compression type. This will be used to locate and build the upstream tarball if necessary. The default is \fIauto\fR which derives the compression type from the pristine-tar branch if available and falls back to gzip otherwise. Other options are \fIgzip\fR, \fIbzip2\fR, \fIlzma\fR and \fIxz\fR\&. .TP \fB--git-compression-level=\fILEVEL\fB \fR Specifies the upstream tarball compression level if an upstream tarball needs to be built. .TP \fB--git-component=\fICOMPONENT\fB \fR When generating tarballs create an additional original tarball of directory \fICOMPONENT\fR in the source tree. Using additional original tarballs is a feature of the 3.0 (quilt) source format. See the \fBdpkg-source\fR manpage for details. Note that the \fI--git-pristine-tar-commit\fR option is currently incompatible with this option. This is considered an experimental feature and might change incompatibly. .TP \fB--git[-no]-purge \fR Purge (remove) temporary build directory after build. .TP \fB--git-dont-purge \fR Deprecated, use --git-no-purge instead. This is a command line only option that cannot be specified via \fIgbp.conf\fR\&. .TP \fB--git-tag-only \fR Don't build, only tag and run post-tag hooks. This is a command line only option that cannot be specified via \fIgbp.conf\fR\&. .TP \fB--git-retag \fR Don't fail tag operations if a tag with the same version already exists. This is a command line only option that cannot be specified via \fIgbp.conf\fR\&. .TP \fB--git-pristine-tar \fR Use pristine-tar when generating the upstream tarball if it doesn't exist. .TP \fB--git-pristine-tar-commit \fR Commit the pristine-tar delta to the pristine-tar branch if a new tarball was generated and the pristine-tar data isn't already there. .SH "EXAMPLES" .PP Build a Debian package using \fBgit-pbuilder\fR which in turn invokes \fBcowbuilder\fR\&. Instruct cowbuilder to build within a Wheezy chroot for i386. .nf \fBgbp\~buildpackage\fR --git-pbuilder --git-arch=i386 --git-dist=wheezy .fi .PP Note that the above needs a \fBcowbuilder\fR chroot already. This can be created using: .nf DIST=wheezy ARCH=i386 \fBgit-pbuilder\fR create .fi .SH "CONFIGURATION FILES" .PP Several \fIgbp.conf\fR files are parsed to set defaults for the above command-line arguments. See the \fBgbp.conf\fR(5)> manpage for details. .PP All options in the config files must be specified without the 'git-' prefix. So e.g. \fB--git-debian-branch\fR=\fIdebian/sid\fR becomes in \fIgbp.conf\fR: .nf [buildpackage] debian-branch = debian/sid .fi .SH "SEE ALSO" .PP \fBgbp-import-dsc\fR(1)>, \fBgbp-import-dscs\fR(1)>, \fBgbp-import-orig\fR(1)>, \fBgbp-dch\fR(1)>, \fBgit-pbuilder\fR(1), \fBcowbuilder\fR(8), \fBdpkg-source\fR(1), \fBgbp.conf\fR(5)>, \fBdebuild\fR(1), \fBgit\fR(1), \fBpristine-tar\fR(1), \fIThe Git-Buildpackage Manual\fR .SH "AUTHOR" .PP Guido Guenther