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" "09 June 2002" "Red Hat, Inc."
8 rpmbuild \- Build RPM Package(s)
10 .SS "BUILDING PACKAGES:"
14 \fBrpmbuild\fR {\fB-ba|-bb|-bp|-bc|-bi|-bl|-bs\fR} [\fBrpmbuild-options\fR] \fB\fISPECFILE\fB\fR\fI ...\fR
18 \fBrpmbuild\fR {\fB-ta|-tb|-tp|-tc|-ti|-tl|-ts\fR} [\fBrpmbuild-options\fR] \fB\fITARBALL\fB\fR\fI ...\fR
22 \fBrpmbuild\fR {\fB--rebuild|--recompile\fR} \fB\fISOURCEPKG\fB\fR\fI ...\fR
28 \fBrpmbuild\fR \fB--showrc\fR
30 .SS "rpmbuild-options"
34 [\fB--buildroot \fIDIRECTORY\fB\fR] [\fB--clean\fR] [\fB--nobuild\fR]
35 [\fB--rmsource\fR] [\fB--rmspec\fR] [\fB--short-circuit\fR] [\fB--sign\fR]
36 [\fB--target \fIPLATFORM\fB\fR]
40 \fBrpmbuild\fR is used to build both binary and source software packages.
41 A \fBpackage\fR consists of an archive of files and
42 meta-data used to install and erase the archive files. The meta-data
43 includes helper scripts, file attributes, and descriptive information
45 \fBPackages\fR come in two varieties: binary packages,
46 used to encapsulate software to be installed, and source packages,
47 containing the source code and recipe necessary to produce binary
50 One of the following basic modes must be selected:
52 \fBBuild Package from Tarball\fR,
53 \fBRecompile Package\fR,
54 \fBShow Configuration\fR.
57 These options can be used in all the different modes.
60 Print a longer usage message then normal.
63 Print a single line containing the version number of \fBrpm\fR
67 Print as little as possible - normally only error messages will
71 Print verbose information - normally routine progress messages will be
75 Print lots of ugly debugging information.
77 \fB--rcfile \fIFILELIST\fB\fR
78 Each of the files in the colon separated
80 is read sequentially by \fBrpm\fR for configuration
82 Only the first file in the list must exist, and tildes will be
83 expanded to the value of \fB$HOME\fR.
84 The default \fIFILELIST\fR is
85 \fI/usr/lib/rpm/rpmrc\fR:\fI/usr/lib/rpm/redhat/rpmrc\fR:\fI/etc/rpmrc\fR:\fI~/.rpmrc\fR.
87 \fB--pipe \fICMD\fB\fR
88 Pipes the output of \fBrpm\fR to the command \fICMD\fR.
90 \fB--dbpath \fIDIRECTORY\fB\fR
91 Use the database in \fIDIRECTORY\fR rather
92 than the default path \fI/var/lib/rpm\fR
94 \fB--root \fIDIRECTORY\fB\fR
95 Use the file system tree rooted at \fIDIRECTORY\fR for all operations.
96 Note that this means the database within
98 will be used for dependency checks and any scriptlet(s) (e.g.
99 \fB%post\fR if installing, or
100 \fB%prep\fR if building, a package)
101 will be run after a chroot(2) to
105 The general form of an rpm build command is
108 \fBrpmbuild\fR \fB-b\fISTAGE\fB|-t\fISTAGE\fB\fR [ \fB rpmbuild-options
109 \fR ] \fB\fIFILE\fB\fR\fI ...\fR
112 The argument used is \fB-b\fR if a spec file is being
113 used to build the package and \fB-t\fR if \fBrpmbuild\fR
114 should look inside of a (possibly compressed) tar file for
115 the spec file to use. After the first argument, the next
116 character (\fISTAGE\fR) specifies the stages
117 of building and packaging to be done and is one of:
120 Build binary and source packages (after doing the %prep, %build, and
124 Build a binary package (after doing the %prep, %build, and %install
128 Executes the "%prep" stage from the spec file. Normally this
129 involves unpacking the sources and applying any patches.
132 Do the "%build" stage from the spec file (after doing the %prep stage).
133 This generally involves the equivalent of a "make".
136 Do the "%install" stage from the spec file (after doing the %prep and
137 %build stages). This generally involves the equivalent of a
141 Do a "list check". The "%files" section from the spec file is
142 macro expanded, and checks are made to verify that each file
146 Build just the source package.
148 The following options may also be used:
150 \fB--buildroot \fIDIRECTORY\fB\fR
151 When building a package, override the BuildRoot tag with directory
155 Remove the build tree after the packages are made.
158 Do not execute any build stages. Useful for testing out spec files.
161 Do not verify build dependencies.
164 Remove the sources after the build (may also be
165 used standalone, e.g. "\fBrpmbuild\fR \fB--rmsource foo.spec\fR").
168 Remove the spec file after the build (may also be
169 used standalone, eg. "\fBrpmbuild\fR \fB--rmspec foo.spec\fR").
171 \fB--short-circuit\fR
172 Skip straight to specified stage (i.e., skip all stages leading
173 up to the specified stage). Only valid with \fB-bc\fR, \fB-bi\fR,
174 and \fB-bb\fR. Useful for local testing only. Packages built this
175 way will be marked with an unsatisfiable dependency to prevent
176 their accidental use.
179 Embed a GPG signature in the package. This signature can be used
180 to verify the integrity and the origin of the package. See the
181 section on GPG SIGNATURES in
183 for configuration details.
185 \fB--target \fIPLATFORM\fB\fR
186 When building the package, interpret \fIPLATFORM\fR
187 as \fBarch-vendor-os\fR and set the macros
189 \fB%_target_cpu\fR, and
192 .SS "REBUILD AND RECOMPILE OPTIONS"
194 There are two other ways to invoke building with rpm:
197 \fBrpmbuild\fR \fB--rebuild|--recompile\fR \fB\fISOURCEPKG\fB\fR\fI ...\fR
200 When invoked this way, \fBrpmbuild\fR installs the named source
201 package, and does a prep, compile and install. In addition,
202 \fB--rebuild\fR builds a new binary package. When the build
203 has completed, the build directory is removed (as in
204 \fB--clean\fR) and the the sources and spec file for
205 the package are removed.
211 \fBrpmbuild\fR \fB--showrc\fR
214 shows the values \fBrpmbuild\fR will use for all of the
215 options are currently set in
218 configuration file(s).
220 .SS "rpmrc Configuration"
223 \fI/usr/lib/rpm/rpmrc\fR
224 \fI/usr/lib/rpm/redhat/rpmrc\fR
228 .SS "Macro Configuration"
231 \fI/usr/lib/rpm/macros\fR
232 \fI/usr/lib/rpm/redhat/macros\fR
233 \fI/etc/rpm/macros\fR
239 \fI/var/lib/rpm/Basenames\fR
240 \fI/var/lib/rpm/Conflictname\fR
241 \fI/var/lib/rpm/Dirnames\fR
242 \fI/var/lib/rpm/Filemd5s\fR
243 \fI/var/lib/rpm/Group\fR
244 \fI/var/lib/rpm/Installtid\fR
245 \fI/var/lib/rpm/Name\fR
246 \fI/var/lib/rpm/Packages\fR
247 \fI/var/lib/rpm/Providename\fR
248 \fI/var/lib/rpm/Provideversion\fR
249 \fI/var/lib/rpm/Pubkeys\fR
250 \fI/var/lib/rpm/Removed\fR
251 \fI/var/lib/rpm/Requirename\fR
252 \fI/var/lib/rpm/Requireversion\fR
253 \fI/var/lib/rpm/Sha1header\fR
254 \fI/var/lib/rpm/Sigmd5\fR
255 \fI/var/lib/rpm/Triggername\fR
269 \fBrpmbuild --help\fR - as rpm supports customizing the options via popt
270 aliases it's impossible to guarantee that what's described in the manual
271 matches what's available.
273 \fBhttp://www.rpm.org/ <URL:http://www.rpm.org/>
278 Marc Ewing <marc@redhat.com>
279 Jeff Johnson <jbj@redhat.com>
280 Erik Troan <ewt@redhat.com>