Blame doc/rpmbuild.8

2ff057
.\" This manpage has been automatically generated by docbook2man 
2ff057
.\" from a DocBook document.  This tool can be found at:
2ff057
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
2ff057
.\" Please send any bug reports, improvements, comments, patches, 
2ff057
.\" etc. to Steve Cheng <steve@ggi-project.org>.
2ff057
.TH "RPMBUILD" "8" "09 June 2002" "Red Hat, Inc."
2ff057
.SH NAME
2ff057
rpmbuild \- Build RPM Package(s)
2ff057
.SH SYNOPSIS
2ff057
.SS "BUILDING PACKAGES:"
2ff057
.PP
2ff057
2ff057
2ff057
\fBrpmbuild\fR {\fB-ba|-bb|-bp|-bc|-bi|-bl|-bs\fR} [\fBrpmbuild-options\fR] \fB\fISPECFILE\fB\fR\fI ...\fR
2ff057
2ff057
2ff057
\fBrpmbuild\fR {\fB-ra|-rb|-rp|-rc|-ri|-rl|-rs\fR} [\fBrpmbuild-options\fR] \fB\fISOURCEPACKAGE\fB\fR\fI ...\fR
2ff057
2ff057
2ff057
\fBrpmbuild\fR {\fB-ta|-tb|-tp|-tc|-ti|-tl|-ts\fR} [\fBrpmbuild-options\fR] \fB\fITARBALL\fB\fR\fI ...\fR
2ff057
2ff057
2ff057
2ff057
\fBrpmbuild\fR {\fB--rebuild|--recompile\fR} \fB\fISOURCEPKG\fB\fR\fI ...\fR
2ff057
2ff057
.SS "MISCELLANEOUS:"
2ff057
.PP
2ff057
2ff057
2ff057
\fBrpmbuild\fR \fB--showrc\fR
2ff057
2ff057
.SS "rpmbuild-options"
2ff057
.PP
2ff057
2ff057
2ff057
 [\fB--buildroot \fIDIRECTORY\fB\fR] [\fB--clean\fR] [\fB--nobuild\fR]
2ff057
 [\fB--rmsource\fR] [\fB--rmspec\fR] [\fB--short-circuit\fR] [\fB--build-in-place\fR]
2ff057
 [\fB--noprep\fR] [\fB--noclean\fR] [\fB--nocheck\fR]
2ff057
 [\fB--rpmfcdebug\fR]
2ff057
 [\fB--target \fIPLATFORM\fB\fR]
2ff057
 [\fB--with \fIOPTION\fB\fR] [\fB--without \fIOPTION\fB\fR]
2ff057
2ff057
.SH "DESCRIPTION"
2ff057
.PP
2ff057
\fBrpmbuild\fR is used to build both binary and source software packages.
2ff057
A \fBpackage\fR consists of an archive of files and
2ff057
meta-data used to install and erase the archive files. The meta-data
2ff057
includes helper scripts, file attributes, and descriptive information
2ff057
about the package.
2ff057
\fBPackages\fR come in two varieties: binary packages,
2ff057
used to encapsulate software to be installed, and source packages,
2ff057
containing the source code and recipe necessary to produce binary
2ff057
packages.
2ff057
.PP
2ff057
One of the following basic modes must be selected:
2ff057
\fBBuild Package\fR,
2ff057
\fBBuild Package from Tarball\fR,
2ff057
\fBRecompile Package\fR,
2ff057
\fBShow Configuration\fR.
2ff057
.SS "GENERAL OPTIONS"
2ff057
.PP
2ff057
These options can be used in all the different modes.
2ff057
.TP
2ff057
\fB-?, --help\fR
2ff057
Print a longer usage message then normal.
2ff057
.TP
2ff057
\fB--version\fR
2ff057
Print a single line containing the version number of \fBrpm\fR
2ff057
being used. 
2ff057
.TP
2ff057
\fB--quiet\fR
2ff057
Print as little as possible - normally only error messages will
2ff057
be displayed.
2ff057
.TP
2ff057
\fB-v\fR
2ff057
Print verbose information - normally routine progress messages will be
2ff057
displayed.
2ff057
.TP
2ff057
\fB-vv\fR
2ff057
Print lots of ugly debugging information.
2ff057
.TP
2ff057
\fB--rpmfcdebug\fR
2ff057
Enables to debug dependencies generation.
2ff057
.TP
2ff057
\fB--rcfile \fIFILELIST\fB\fR
2ff057
Each of the files in the colon separated
2ff057
\fIFILELIST\fR
2ff057
is read sequentially by \fBrpm\fR for configuration
2ff057
information.
2ff057
Only the first file in the list must exist, and tildes will be
2ff057
expanded to the value of \fB$HOME\fR.
2ff057
The default \fIFILELIST\fR is
2ff057
\fI/usr/lib/rpm/rpmrc\fR:\fI/usr/lib/rpm/redhat/rpmrc\fR:\fI/etc/rpmrc\fR:\fI~/.rpmrc\fR.
2ff057
.TP
2ff057
\fB--pipe \fICMD\fB\fR
2ff057
Pipes the output of \fBrpm\fR to the command \fICMD\fR.
2ff057
.TP
2ff057
\fB--dbpath \fIDIRECTORY\fB\fR
2ff057
Use the database in \fIDIRECTORY\fR rather
2ff057
than the default path \fI/var/lib/rpm\fR
2ff057
.TP
2ff057
\fB--root \fIDIRECTORY\fB\fR
2ff057
Use the file system tree rooted at \fIDIRECTORY\fR for all operations.
2ff057
Note that this means the database within
2ff057
\fIDIRECTORY\fR
2ff057
will be used for dependency checks and any scriptlet(s) (e.g.
2ff057
\fB%post\fR if installing, or
2ff057
\fB%prep\fR if building, a package)
2ff057
will be run after a chroot(2) to
2ff057
\fIDIRECTORY\fR.
2ff057
.TP
2ff057
\fB-D, --define='\fIMACRO EXPR\fB'\fR
2ff057
Defines \fIMACRO\fR with value \fIEXPR\fR.
2ff057
.SS "BUILD OPTIONS"
2ff057
.PP
2ff057
The general form of an rpm build command is 
2ff057
.PP
2ff057
2ff057
\fBrpmbuild\fR \fB-b\fISTAGE\fB|-r\fISTAGE\fB|-t\fISTAGE\fB\fR [ \fB     rpmbuild-options
2ff057
\fR ] \fB\fIFILE\fB\fR\fI ...\fR
2ff057
2ff057
.PP
2ff057
The argument used is \fB-b\fR if a spec file is being
2ff057
used to build the package, \fB-r\fR if a source package is to be rebuild
2ff057
and \fB-t\fR if \fBrpmbuild\fR
2ff057
should look inside of a (possibly compressed) tar file for
2ff057
the spec file to use. After the first argument, the next
2ff057
character (\fISTAGE\fR) specifies the stages
2ff057
of building and packaging to be done and is one of:
2ff057
.TP
2ff057
\fB-ba\fR
2ff057
Build binary and source packages (after doing the %prep, %build, and
2ff057
%install stages).
2ff057
.TP
2ff057
\fB-bb\fR
2ff057
Build a binary package (after doing the %prep, %build, and %install
2ff057
stages).
2ff057
.TP
2ff057
\fB-bp\fR
2ff057
Executes the "%prep" stage from the spec file. Normally this
2ff057
involves unpacking the sources and applying any patches.
2ff057
.TP
2ff057
\fB-bc\fR
2ff057
Do the "%build" stage from the spec file (after doing the %prep stage).
2ff057
This generally involves the equivalent of a "make".
2ff057
.TP
2ff057
\fB-bi\fR
2ff057
Do the "%install" stage from the spec file (after doing the %prep and
2ff057
%build stages).  This generally involves the equivalent of a
2ff057
"make install".
2ff057
.TP
2ff057
\fB-bl\fR
2ff057
Do a "list check".  The "%files" section from the spec file is
2ff057
macro expanded, and checks are made to verify that each file
2ff057
exists.
2ff057
.TP
2ff057
\fB-bs\fR
2ff057
Build just the source package.
2ff057
.PP
2ff057
The following options may also be used:
2ff057
.TP
2ff057
\fB--buildroot \fIDIRECTORY\fB\fR
2ff057
When building a package, override the BuildRoot tag with directory
2ff057
\fIDIRECTORY\fR.
2ff057
.TP
2ff057
\fB--clean\fR
2ff057
Remove the build tree after the packages are made.
2ff057
.TP
2ff057
\fB--nobuild\fR
2ff057
Do not execute any build stages. Useful for testing out spec files.
2ff057
.TP
2ff057
\fB--noprep\fR
2ff057
Do not execute %prep build stage even if present in spec.
2ff057
.TP
2ff057
\fB--noclean\fR
2ff057
Do not execute %clean build stage even if present in spec.
2ff057
.TP
2ff057
\fB--nocheck\fR
2ff057
Do not execute %check build stage even if present in spec.
2ff057
.TP
2ff057
\fB--nodebuginfo\fR
2ff057
Do not generate debuginfo packages..
2ff057
.TP
2ff057
\fB--nodeps\fR
2ff057
Do not verify build dependencies.
2ff057
.TP
2ff057
\fB--rmsource\fR
2ff057
Remove the sources after the build (may also be
2ff057
used standalone, e.g. "\fBrpmbuild\fR \fB--rmsource foo.spec\fR").
2ff057
.TP
2ff057
\fB--rmspec\fR
2ff057
Remove the spec file after the build (may also be
2ff057
used standalone, eg. "\fBrpmbuild\fR \fB--rmspec foo.spec\fR").
2ff057
.TP
2ff057
\fB--short-circuit\fR
2ff057
Skip straight to specified stage (i.e., skip all stages leading
2ff057
up to the specified stage).  Only valid with \fB-bc\fR, \fB-bi\fR,
2ff057
and \fB-bb\fR.  Useful for local testing only.  Packages built this
2ff057
way will be marked with an unsatisfiable dependency to prevent
2ff057
their accidental use.
2ff057
.TP
2ff057
\fB--build-in-place\fR
2ff057
Build from locally checked out sources. Sets _builddir to current working
2ff057
directory. Skips handling of -n and untar in the %setup and the deletion of
2ff057
the buildSubdir.
2ff057
.TP
2ff057
\fB--target \fIPLATFORM\fB\fR
2ff057
When building the package, interpret \fIPLATFORM\fR
2ff057
as \fBarch-vendor-os\fR and set the macros
2ff057
\fB%_target\fR,
2ff057
\fB%_target_cpu\fR, and
2ff057
\fB%_target_os\fR
2ff057
accordingly.
2ff057
.TP
2ff057
\fB--with \fIOPTION\fB\fR
2ff057
Enable configure \fIOPTION\fR for build.
2ff057
.TP
2ff057
\fB--without \fIOPTION\fB\fR
2ff057
Disable configure \fIOPTION\fR for build.
2ff057
.SS "REBUILD AND RECOMPILE OPTIONS"
2ff057
.PP
2ff057
There are two other ways to invoke building with rpm:
2ff057
.PP
2ff057
2ff057
\fBrpmbuild\fR \fB--rebuild|--recompile\fR \fB\fISOURCEPKG\fB\fR\fI ...\fR
2ff057
2ff057
.PP
2ff057
When invoked this way, \fBrpmbuild\fR installs the named source
Packit Service 0cfc1f
package, and does a prep, compile and install. In addition,
2ff057
\fB--rebuild\fR builds a new binary package. When the build
2ff057
has completed, the build directory is removed (as in
2ff057
\fB--clean\fR) and the the sources and spec file for
2ff057
the package are removed.
2ff057
Packit Service 0cfc1f
These options are now superseded by the \fB-r*\fR options which allow 
Packit Service 0cfc1f
much more fine control over what stages of the build to run. 
2ff057
.SS "SHOWRC"
2ff057
.PP
2ff057
The command
2ff057
.PP
2ff057
2ff057
\fBrpmbuild\fR \fB--showrc\fR
2ff057
2ff057
.PP
2ff057
shows the values \fBrpmbuild\fR will use for all of the
2ff057
options are currently set in
2ff057
\fIrpmrc\fR and
2ff057
\fImacros\fR
2ff057
configuration file(s).
2ff057
.SH "FILES"
2ff057
.SS "rpmrc Configuration"
2ff057
.PP
2ff057
.nf
2ff057
\fI/usr/lib/rpm/rpmrc\fR
2ff057
\fI/usr/lib/rpm/redhat/rpmrc\fR
2ff057
\fI/etc/rpmrc\fR
2ff057
\fI~/.rpmrc\fR
2ff057
.fi
2ff057
.SS "Macro Configuration"
2ff057
.PP
2ff057
.nf
2ff057
\fI/usr/lib/rpm/macros\fR
2ff057
\fI/usr/lib/rpm/redhat/macros\fR
2ff057
\fI/etc/rpm/macros\fR
2ff057
\fI~/.rpmmacros\fR
2ff057
.fi
2ff057
.SS "Temporary"
2ff057
.PP
2ff057
\fI/var/tmp/rpm*\fR
2ff057
.SH "SEE ALSO"
2ff057
2ff057
.nf
2ff057
\fBgendiff\fR(1),
2ff057
\fBpopt\fR(3),
2ff057
\fBrpm\fR(8),
2ff057
\fBrpm2cpio\fR(8),
2ff057
\fBrpmkeys\fR(8)
2ff057
\fBrpmspec\fR(8),
2ff057
\fBrpmsign\fR(8),
2ff057
.fi
2ff057
2ff057
\fBrpmbuild --help\fR - as rpm supports customizing the options via popt 
2ff057
aliases it's impossible to guarantee that what's described in the manual 
2ff057
matches what's available.
2ff057
2ff057
\fBhttp://www.rpm.org/ <URL:http://www.rpm.org/>
2ff057
\fR
2ff057
.SH "AUTHORS"
2ff057
2ff057
.nf
2ff057
Marc Ewing <marc@redhat.com>
2ff057
Jeff Johnson <jbj@redhat.com>
2ff057
Erik Troan <ewt@redhat.com>
2ff057
.fi