1
.\" This manpage has been automatically generated by docbook2man
2
.\" from a DocBook document. This tool can be found at:
3
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
4
.\" Please send any bug reports, improvements, comments, patches,
5
.\" etc. to Steve Cheng <steve@ggi-project.org>.
6
.TH "RPMBUILD" "8" "06 June 2001" "Red Hat, Inc." "Red Hat Linux"
8
rpmbuild \- Build RPM Package(s)
10
.SS "BUILDING PACKAGES:"
13
\fBrpmbuild\fR {\fB-ba|-bb|-bp|-bc|-bi|-bl|-bs\fR} [\fBrpmbuild-options\fR] \fB\fISPECFILE\fB\fR\fI ...\fR
15
\fBrpmbuild\fR {\fB-ta|-tb|-tp|-tc|-ti|-tl|-ts\fR} [\fBrpmbuild-options\fR] \fB\fITARBALL\fB\fR\fI ...\fR
17
\fBrpmbuild\fR {\fB--rebuild|--recompile\fR} \fB\fISOURCEPKG\fB\fR\fI ...\fR
22
\fBrpmbuild\fR {\fB--showrc\fR}
23
.SS "RPMBUILD-OPTIONS"
26
\fB[--buildroot \fIDIRECTORY\fB] [--clean] [--nobuild] [--rmsource] [--rmspec]
27
[--short-circuit] [--sign] [--target \fIPLATFORM\fB]\fR
30
\fBrpmbuild\fR is used to build both binary and source software packages.
31
A \fBpackage\fR consists of an archive of files and
32
meta-data used to install and erase the archive files. The meta-data
33
includes helper scripts, file attributes, and descriptive information
35
\fBPackages\fR come in two varieties: binary packages,
36
used to encapsulate software to be installed, and source packages,
37
containing the source code and recipe necessary to produce binary
40
One of the following basic modes must be selected:
42
\fBBuild Package from Tarball\fR,
43
\fBRecompile Package\fR,
44
\fBShow Configuration\fR.
47
These options can be used in all the different modes.
50
Print a longer usage message then normal.
53
Print a single line containing the version number of \fBrpm\fR
57
Print as little as possible - normally only error messages will
61
Print verbose information - normally routine progress messages will be
65
Print lots of ugly debugging information.
67
\fB--rcfile \fIFILELIST\fB\fR
68
Each of the files in the colon separated
70
is read sequentially by \fBrpm\fR for configuration
72
Only the first file in the list must exist, and tildes will be
73
expanded to the value of \fB$HOME\fR.
74
The default \fIFILELIST\fR is
75
\fI/usr/lib/rpm/rpmrc\fR:\fI/etc/rpmrc\fR:\fI~/.rpmrc\fR.
77
\fB--pipe \fICMD\fB\fR
78
Pipes the output of \fBrpm\fR to the command \fICMD\fR.
80
\fB--dbpath \fIDIRECTORY\fB\fR
81
Use the database in \fIDIRECTORY\fR rathen
82
than the default path \fI/var/lib/rpm\fR
84
\fB--root \fIDIRECTORY\fB\fR
85
Use the system rooted at \fIDIRECTORY\fR for all operations.
86
Note that this means the database will be read or modified under
87
\fIDIRECTORY\fR and any
90
scriptlet(s) are run after a chroot(2) to
94
The general form of an rpm build command is
96
\fBrpmbuild\fR {\fB-b\fISTAGE\fB|-t\fISTAGE\fB\fR} [\fBrpmbuild-options\fR] \fB\fIFILE\fB\fR\fI ...\fR
98
The argument used is \fB-b\fR if a spec file is being
99
used to build the package and \fB-t\fR if \fBrpmbuild\fR
100
should look inside of a (possibly compressed) tar file for
101
the spec file to use. After the first argument, the next
102
character (\fISTAGE\fR) specifies the stages
103
of building and packaging to be done and is one of:
106
Build binary and source packages (after doing the %prep, %build, and
110
Build a binary package (after doing the %prep, %build, and %install
114
Executes the "%prep" stage from the spec file. Normally this
115
involves unpacking the sources and applying any patches.
118
Do the "%build" stage from the spec file (after doing the %prep stage).
119
This generally involves the equivalent of a "make".
122
Do the "%install" stage from the spec file (after doing the %prep and
123
%build stages). This generally involves the equivalent of a
127
Do a "list check". The "%files" section from the spec file is
128
macro expanded, and checks are made to verify that each file
132
Build just the source package.
134
The following options may also be used:
136
\fB--buildroot \fIDIRECTORY\fB\fR
137
When building a package, override the BuildRoot tag with directory
141
Remove the build tree after the packages are made.
144
Do not execute any build stages. Useful for testing out spec files.
147
Remove the sources after the build (may also be
148
used standalone, e.g. "\fBrpmbuild\fR \fB--rmsource foo.spec\fR").
151
Remove the spec file after the build (may also be
152
used standalone, eg. "\fBrpmbuild\fR \fB--rmspec foo.spec\fR").
154
\fB--short-circuit\fR
155
Skip straight to specified stage (i.e., skip all stages leading
156
up to the specified stage). Only valid with \fB-bc\fR
160
Embed a GPG signature in the package. This signature can be used
161
to verify the integrity and the origin of the package. See the
162
section on GPG SIGNATURES for configuration details.
164
\fB--target \fIPLATFORM\fB\fR
165
When building the package, interpret \fIPLATFORM\fR
166
as \fBarch-vendor-os\fR and set the macros
168
\fB%_target_arch\fR, and
171
.SS "REBUILD AND RECOMPILE OPTIONS"
173
There are two other ways to invoke building with rpm:
175
\fBrpmbuild\fR {\fB--rebuild|--recompile\fR} \fB\fISOURCEPKG\fB\fR\fI ...\fR
177
When invoked this way, \fBrpmbuild\fR installs the named source
178
package, and does a prep, compile and install. In addition,
179
\fB--rebuild\fR builds a new binary package. When the build
180
has completed, the build directory is removed (as in
181
\fB--clean\fR) and the the sources and spec file for
182
the package are removed.
187
\fBrpmbuild\fR \fB--showrc\fR
189
shows the values \fBrpmbuild\fR will use for all of the
190
options are currently set in
193
configuration file(s).
197
\fI/usr/lib/rpm/rpmrc\fR
203
\fI/usr/lib/rpm/macros\fR
205
\fI/etc/rpm/macros\fR
209
\fI/var/lib/rpm/Conflictname\fR
211
\fI/var/lib/rpm/Basenames\fR
213
\fI/var/lib/rpm/Group\fR
215
\fI/var/lib/rpm/Name\fR
217
\fI/var/lib/rpm/Packages\fR
219
\fI/var/lib/rpm/Providename\fR
221
\fI/var/lib/rpm/Requirename\fR
223
\fI/var/lib/rpm/Triggername\fR
236
\fB http://www.rpm.org/ <URL:http://www.rpm.org/>
240
Marc Ewing <marc@redhat.com>
242
Jeff Johnson <jbj@redhat.com>
244
Erik Troan <ewt@redhat.com>