~ubuntu-branches/ubuntu/edgy/rpm/edgy

« back to all changes in this revision

Viewing changes to doc/rpmbuild.8

  • Committer: Bazaar Package Importer
  • Author(s): Joey Hess
  • Date: 2002-01-22 20:56:57 UTC
  • Revision ID: james.westby@ubuntu.com-20020122205657-l74j50mr9z8ofcl5
Tags: upstream-4.0.3
ImportĀ upstreamĀ versionĀ 4.0.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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"
 
7
.SH NAME
 
8
rpmbuild \- Build RPM Package(s)
 
9
.SH SYNOPSIS
 
10
.SS "BUILDING PACKAGES:"
 
11
.PP
 
12
 
 
13
\fBrpmbuild\fR {\fB-ba|-bb|-bp|-bc|-bi|-bl|-bs\fR} [\fBrpmbuild-options\fR] \fB\fISPECFILE\fB\fR\fI ...\fR
 
14
 
 
15
\fBrpmbuild\fR {\fB-ta|-tb|-tp|-tc|-ti|-tl|-ts\fR} [\fBrpmbuild-options\fR] \fB\fITARBALL\fB\fR\fI ...\fR
 
16
 
 
17
\fBrpmbuild\fR {\fB--rebuild|--recompile\fR} \fB\fISOURCEPKG\fB\fR\fI ...\fR
 
18
 
 
19
.SS "MISCELLANEOUS:"
 
20
.PP
 
21
 
 
22
\fBrpmbuild\fR {\fB--showrc\fR}
 
23
.SS "RPMBUILD-OPTIONS"
 
24
.PP
 
25
 
 
26
\fB[--buildroot \fIDIRECTORY\fB] [--clean] [--nobuild] [--rmsource] [--rmspec]
 
27
[--short-circuit] [--sign] [--target \fIPLATFORM\fB]\fR
 
28
.SH "DESCRIPTION"
 
29
.PP
 
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
 
34
about the package.
 
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
 
38
packages.
 
39
.PP
 
40
One of the following basic modes must be selected:
 
41
\fBBuild Package\fR,
 
42
\fBBuild Package from Tarball\fR,
 
43
\fBRecompile Package\fR,
 
44
\fBShow Configuration\fR.
 
45
.SS "GENERAL OPTIONS"
 
46
.PP
 
47
These options can be used in all the different modes.
 
48
.TP
 
49
\fB-?, --help\fR
 
50
Print a longer usage message then normal.
 
51
.TP
 
52
\fB--version\fR
 
53
Print a single line containing the version number of \fBrpm\fR
 
54
being used. 
 
55
.TP
 
56
\fB--quiet\fR
 
57
Print as little as possible - normally only error messages will
 
58
be displayed.
 
59
.TP
 
60
\fB-v\fR
 
61
Print verbose information - normally routine progress messages will be
 
62
displayed.
 
63
.TP
 
64
\fB-vv\fR
 
65
Print lots of ugly debugging information.
 
66
.TP
 
67
\fB--rcfile \fIFILELIST\fB\fR
 
68
Each of the files in the colon separated
 
69
\fIFILELIST\fR
 
70
is read sequentially by \fBrpm\fR for configuration
 
71
information.
 
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.
 
76
.TP
 
77
\fB--pipe \fICMD\fB\fR
 
78
Pipes the output of \fBrpm\fR to the command \fICMD\fR.
 
79
.TP
 
80
\fB--dbpath \fIDIRECTORY\fB\fR
 
81
Use the database in \fIDIRECTORY\fR rathen
 
82
than the default path \fI/var/lib/rpm\fR
 
83
.TP
 
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
 
88
\fB%pre\fR or
 
89
\fB%post\fR
 
90
scriptlet(s) are run after a chroot(2) to
 
91
\fIDIRECTORY\fR.
 
92
.SS "BUILD OPTIONS"
 
93
.PP
 
94
The general form of an rpm build command is 
 
95
.PP
 
96
\fBrpmbuild\fR {\fB-b\fISTAGE\fB|-t\fISTAGE\fB\fR} [\fBrpmbuild-options\fR] \fB\fIFILE\fB\fR\fI ...\fR
 
97
.PP
 
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:
 
104
.TP
 
105
\fB-ba\fR
 
106
Build binary and source packages (after doing the %prep, %build, and
 
107
%install stages).
 
108
.TP
 
109
\fB-bb\fR
 
110
Build a binary package (after doing the %prep, %build, and %install
 
111
stages).
 
112
.TP
 
113
\fB-bp\fR
 
114
Executes the "%prep" stage from the spec file. Normally this
 
115
involves unpacking the sources and applying any patches.
 
116
.TP
 
117
\fB-bc\fR
 
118
Do the "%build" stage from the spec file (after doing the %prep stage).
 
119
This generally involves the equivalent of a "make".
 
120
.TP
 
121
\fB-bi\fR
 
122
Do the "%install" stage from the spec file (after doing the %prep and
 
123
%build stages).  This generally involves the equivalent of a
 
124
"make install".
 
125
.TP
 
126
\fB-bl\fR
 
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
 
129
exists.
 
130
.TP
 
131
\fB-bs\fR
 
132
Build just the source package.
 
133
.PP
 
134
The following options may also be used:
 
135
.TP
 
136
\fB--buildroot \fIDIRECTORY\fB\fR
 
137
When building a package, override the BuildRoot tag with directory
 
138
\fIDIRECTORY\fR.
 
139
.TP
 
140
\fB--clean\fR
 
141
Remove the build tree after the packages are made.
 
142
.TP
 
143
\fB--nobuild\fR
 
144
Do not execute any build stages. Useful for testing out spec files.
 
145
.TP
 
146
\fB--rmsource\fR
 
147
Remove the sources after the build (may also be
 
148
used standalone, e.g. "\fBrpmbuild\fR \fB--rmsource foo.spec\fR").
 
149
.TP
 
150
\fB--rmspec\fR
 
151
Remove the spec file after the build (may also be
 
152
used standalone, eg. "\fBrpmbuild\fR \fB--rmspec foo.spec\fR").
 
153
.TP
 
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
 
157
and \fB-bi\fR.
 
158
.TP
 
159
\fB--sign\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.
 
163
.TP
 
164
\fB--target \fIPLATFORM\fB\fR
 
165
When building the package, interpret \fIPLATFORM\fR
 
166
as \fBarch-vendor-os\fR and set the macros
 
167
\fB%_target\fR,
 
168
\fB%_target_arch\fR, and
 
169
\fB%_target_os\fR
 
170
accordingly.
 
171
.SS "REBUILD AND RECOMPILE OPTIONS"
 
172
.PP
 
173
There are two other ways to invoke building with rpm:
 
174
.PP
 
175
\fBrpmbuild\fR {\fB--rebuild|--recompile\fR} \fB\fISOURCEPKG\fB\fR\fI ...\fR
 
176
.PP
 
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.
 
183
.SS "SHOWRC"
 
184
.PP
 
185
The command
 
186
.PP
 
187
\fBrpmbuild\fR \fB--showrc\fR
 
188
.PP
 
189
shows the values \fBrpmbuild\fR will use for all of the
 
190
options are currently set in
 
191
\fIrpmrc\fR and
 
192
\fImacros\fR
 
193
configuration file(s).
 
194
.SH "FILES"
 
195
.PP
 
196
 
 
197
\fI/usr/lib/rpm/rpmrc\fR
 
198
 
 
199
\fI/etc/rpmrc\fR
 
200
 
 
201
\fI~/.rpmrc\fR
 
202
 
 
203
\fI/usr/lib/rpm/macros\fR
 
204
 
 
205
\fI/etc/rpm/macros\fR
 
206
 
 
207
\fI~/.rpmmacros\fR
 
208
 
 
209
\fI/var/lib/rpm/Conflictname\fR
 
210
 
 
211
\fI/var/lib/rpm/Basenames\fR
 
212
 
 
213
\fI/var/lib/rpm/Group\fR
 
214
 
 
215
\fI/var/lib/rpm/Name\fR
 
216
 
 
217
\fI/var/lib/rpm/Packages\fR
 
218
 
 
219
\fI/var/lib/rpm/Providename\fR
 
220
 
 
221
\fI/var/lib/rpm/Requirename\fR
 
222
 
 
223
\fI/var/lib/rpm/Triggername\fR
 
224
 
 
225
\fI/var/tmp/rpm*\fR
 
226
.SH "SEE ALSO"
 
227
 
 
228
\fBpopt\fR(3),
 
229
 
 
230
\fBrpm2cpio\fR(8),
 
231
 
 
232
\fBgendiff\fR(1),
 
233
 
 
234
\fBrpm\fR(8),
 
235
 
 
236
\fB http://www.rpm.org/ <URL:http://www.rpm.org/>
 
237
\fR
 
238
.SH "AUTHORS"
 
239
 
 
240
Marc Ewing <marc@redhat.com>
 
241
 
 
242
Jeff Johnson <jbj@redhat.com>
 
243
 
 
244
Erik Troan <ewt@redhat.com>