.\" 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-RPM" "1" "07 February 2017" "" "git-buildpackage Manual"
.SH NAME
gbp-buildpackage-rpm \- Build RPM packages from a Git repository
.SH SYNOPSIS
\fBgbp\~buildpackage-rpm\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-tmp-dir=\fIDIRECTORY\fB\fR ] [ \fB--git-vendor=\fIVENDOR\fB\fR ] [ \fB--git-native=\fI[auto|on|off]\fB\fR ] [ \fB--git-upstream-branch=\fITREEISH\fB\fR ] [ \fB--git-packaging-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-]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-]build\fR ] [ \fB--git-[no-]hooks\fR ] [ \fB--git-packaging-tag=\fITAG-FORMAT\fB\fR ] [ \fB--git-upstream-tag=\fITAG-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-level=\fILEVEL\fB\fR ] [ \fB--git-export-dir=\fIDIRECTORY\fB\fR ] [ \fB--git-export=\fITREEISH\fB\fR ] [ \fB--git-packaging-dir=\fIDIRECTORY\fB\fR ] [ \fB--git-spec-file=\fIFILEPATH\fB\fR ] [ \fB--git-export-sourcedir=\fIDIRECTORY\fB\fR ] [ \fB--git-export-specdir=\fIDIRECTORY\fB\fR ] [ \fB--git-[no-]pristine-tar\fR ] [ \fB--git-[no-]pristine-tar-commit\fR ] [ \fB--git-tag-only\fR ] [ \fB--git-retag\fR ] [ \fB--git-mock\fR ] [ \fB--git-dist=\fIDISTRIBUTION\fB\fR ] [ \fB--git-arch=\fIARCHITECTURE\fB\fR ] [ \fB--git-mock-options=\fIOPTIONS\fB\fR ] [ \fB--git-mock-root=\fIROOT\fB\fR ]
.SH "DESCRIPTION"
.PP
\fBgbp\~buildpackage-rpm\fR is used to build RPM packages from a Git
repository. It is an RPM counterpart for the \fBgbp\~buildpackage\fR tool that
is designed for building Debian packages.
.PP
\fBgbp\~buildpackage-rpm\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
Export packaging files to a separate build area.
.TP 0.2i
\(bu
Create an orig source tarball if it doesn't exist.
.TP 0.2i
\(bu
Call \fBrpmbuild\fR(1) (or the application
specified via \fB--git-builder\fR), passing along all
command line arguments 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
rpmlint\&.
.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
\fIPACKAGING-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
\fBrpmbuild -ba\fR\&.
.TP
\fB--git-cleaner=\fICLEAN_CMD\fB \fR
Use \fICLEAN_CMD\fR\&.
.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-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-notify=\fI[auto|on|off]\fB \fR
Whether to send a desktop notification after the build.
.TP
\fB--git-tmp-dir=\fIDIRECTORY\fB \fR
Base directory under which temporary directories are created.
.TP
\fB--git-vendor=\fIVENDOR\fB \fR
Distribution vendor name.
.TP
\fB--git-native=\fI[auto|on|off]\fB \fR
Define the 'nativity' of a package. The default value
\fIauto\fR makes \fBgbp\~buildpackage-rpm\fR to
guess. Guessing is based on the existence of upstream branch.
.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-packaging-branch=\fIBRANCH_NAME\fB \fR
If you're not on this branch when invoking \fBgbp\~buildpackage-rpm\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
\fIPACKAGING-BRANCH\fR\&.
.TP
\fB--git-[no-]submodules \fR
Include git submodules in the orig tarball.
.TP
\fB--git-[no-]sign-tags \fR
GPG sign all created tags.
.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.
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 \fBrpmbuild\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-]build \fR
Enable builder. Note: \fB--git-no-build\fR causes the
postbuild hook to be disabled, too.
.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-packaging-tag=\fITAG-FORMAT\fB \fR
Use this tag format when tagging released versions of the package.
.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-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-export-dir=\fIDIRECTORY\fB \fR
Export the packaging files from the current branch head (or the
treeish object given via \fB--git-export\fR to
\fIDIRECTORY\fR before building.
.TP
\fB--git-export-sourcedir=\fIDIRECTORY\fB \fR
.TP
\fB--git-export-specdir=\fIDIRECTORY\fB \fR
Subdirectories under export directory where packaging files are
exported. The default build options of rpmbuild builder are also
adjusted accordingly.
.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,
\fIWC\fR) exports all files in the
current working directory.
.TP
\fB--git-packaging-dir=\fIDIRECTORY\fB \fR
Subdirectory that contains the RPM packaging files.
.TP
\fB--git-spec-file=\fIFILEPATH\fB \fR
Relative path to the spec file to use. Special value
\fIauto\fR causes \fBgbp\~buildpackage-rpm\fR to
search and guess. Other values cause the
\fB--git-packaging-dir\fR option to be ignored: the
directory of the spec file is used, instead.
.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-level=\fILEVEL\fB \fR
Specifies the upstream tarball compression level if an upstream
tarball needs to be built.
.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, but, overwrite the existing tag, instead.
.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.
.TP
\fB--git-mock \fR
Use mock to build the rpms by invoking \fBgbp-builder-mock\fR\&.
.TP
\fB--git-dist \fR
Build for this distribution when using mock (e.g.: epel-6).
.TP
\fB--git-arch \fR
Build for this architecture when using mock, default is to build
for the current host architecture.
.TP
\fB--git-mock-root \fR
The mock root to use. Defaults
to \fIDIST\fR-\fIARCH\fR
from above.
.TP
\fB--git-mock-options \fR
Additional options to pass to mock. Default is to pass no
additional options.
.SH "EXAMPLES"
.PP
Only build a source RPM with \fBrpmbuild\fR
.nf
\fBgbp\~buildpackage-rpm\fR -bs
.fi
.PP
Build an RPM package with \fBrpmbuild\fR on a custom branch with the uncommitted
changes included.
.nf
\fBgbp\~buildpackage-rpm\fR --git-ignore-branch --git-export=WC
.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 are specified without the 'git-' prefix.
.SH "SEE ALSO"
.PP
\fBgbp-import-srpm\fR(1)>,
\fBgbp-pq-rpm\fR(1)>,
\fBgbp-rpm-ch\fR(1),
\fBrpmbuild\fR(8),
\fBmock\fR(1),
\fBgbp.conf\fR(5)>,
\fBdebuild\fR(1),
\fBgit\fR(1),
\fBpristine-tar\fR(1),
\fIThe Git-Buildpackage Manual\fR
.SH "AUTHOR"
.PP
Markus Lehtonen