.\" 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" "29 October 2014" "" "git-buildpackage Manual" .SH NAME git-buildpackage, 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-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 ] .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) export the source tree to a separate build area .TP 0.2i \(bu Build an orig tarball if it doesn't exist. .TP 0.2i \(bu Call \fBdebuild\fR(1) (or the application specified via \fB--git-builder\fR) with arguments instructing it to ignore Git meta-data in the diff.gz, passing along all arguments given to \fBgbp buildpackage\fR 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" .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. .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. .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 excecute \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 when using export-dir option (analog to mergeWithUpstream in svn-bp) .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 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[-no]-purge \fR Purge (remove) temporary build directory after build .TP \fB--git-dont-purge \fR Deprecated, use --git-no-purge instead. .TP \fB--git-tag-only \fR don't build, only tag and run post-tag hooks .TP \fB--git-retag \fR don't fail tag operations if a tag with the same version already exists .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 commandline arguments. See the \fBgbp.conf\fR(5) manpage for details. .PP All options in the config files are specified without the 'git-' prefix. .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), \fBgbp.conf\fR(5), \fBdebuild\fR(1), \fBgit\fR(1), \fBpristine-tar\fR(1), \fIThe Git-Buildpackage Manual\fR .SH "AUTHOR" .PP Guido Guenther