1RPMBUILD(8)                 System Manager's Manual                RPMBUILD(8)
2
3
4

NAME

6       rpmbuild - Build RPM Package(s)
7

SYNOPSIS

9   BUILDING PACKAGES:
10       rpmbuild {-ba|-bb|-bp|-bc|-bi|-bl|-bs} [rpmbuild-options] SPECFILE ...
11
12
13       rpmbuild {-ra|-rb|-rp|-rc|-ri|-rl|-rs} [rpmbuild-options] SOURCEPACKAGE
14       ...
15
16
17       rpmbuild {-ta|-tb|-tp|-tc|-ti|-tl|-ts} [rpmbuild-options] TARBALL ...
18
19
20
21       rpmbuild {--rebuild|--recompile} SOURCEPKG ...
22
23
24   MISCELLANEOUS:
25       rpmbuild --showrc
26
27
28   rpmbuild-options
29        [--buildroot DIRECTORY] [--clean] [--nobuild]
30        [--rmsource] [--rmspec] [--short-circuit] [--build-in-place]
31        [--noprep] [--noclean] [--nocheck]
32        [--rpmfcdebug]
33        [--target PLATFORM]
34        [--with OPTION] [--without OPTION]
35
36

DESCRIPTION

38       rpmbuild is used to build both binary and source software packages.   A
39       package  consists  of an archive of files and meta-data used to install
40       and erase the archive files. The  meta-data  includes  helper  scripts,
41       file  attributes, and descriptive information about the package.  Pack‐
42       ages come in two varieties: binary packages, used to encapsulate  soft‐
43       ware  to  be installed, and source packages, containing the source code
44       and recipe necessary to produce binary packages.
45
46       One of the following basic modes must be selected: Build Package, Build
47       Package from Tarball, Recompile Package, Show Configuration.
48
49   GENERAL OPTIONS
50       These options can be used in all the different modes.
51
52       -?, --help
53              Print a longer usage message then normal.
54
55       --version
56              Print  a  single line containing the version number of rpm being
57              used.
58
59       --quiet
60              Print as little as possible - normally only error messages  will
61              be displayed.
62
63       -v     Print  verbose  information - normally routine progress messages
64              will be displayed.
65
66       -vv    Print lots of ugly debugging information.
67
68       --rpmfcdebug
69              Enables to debug dependencies generation.
70
71       --rcfile FILELIST
72              Each of the files  in  the  colon  separated  FILELIST  is  read
73              sequentially  by  rpm  for  configuration information.  Only the
74              first file in the list must exist, and tildes will  be  expanded
75              to    the   value   of   $HOME.    The   default   FILELIST   is
76              /usr/lib/rpm/rpmrc:/usr/lib/rpm/red‐
77              hat/rpmrc:/etc/rpmrc:~/.rpmrc.
78
79       --pipe CMD
80              Pipes the output of rpm to the command CMD.
81
82       --dbpath DIRECTORY
83              Use  the  database  in  DIRECTORY  rather  than the default path
84              /var/lib/rpm
85
86       --root DIRECTORY
87              Use the file system tree rooted at DIRECTORY for all operations.
88              Note  that this means the database within DIRECTORY will be used
89              for dependency checks  and  any  scriptlet(s)  (e.g.   %post  if
90              installing, or %prep if building, a package) will be run after a
91              chroot(2) to DIRECTORY.
92
93       -D, --define='MACRO EXPR'
94              Defines MACRO with value EXPR.
95
96   BUILD OPTIONS
97       The general form of an rpm build command is
98
99       rpmbuild -bSTAGE|-rSTAGE|-tSTAGE [      rpmbuild-options
100        ] FILE ...
101
102
103       The argument used is -b if a spec file is being used to build the pack‐
104       age,  -r if a source package is to be rebuild and -t if rpmbuild should
105       look inside of a (possibly compressed) tar file for the  spec  file  to
106       use. After the first argument, the next character (STAGE) specifies the
107       stages of building and packaging to be done and is one of:
108
109       -ba    Build binary and source packages (after doing the %prep, %build,
110              and %install stages).
111
112       -bb    Build  a  binary  package  (after  doing  the %prep, %build, and
113              %install stages).
114
115       -bp    Executes the "%prep" stage from the  spec  file.  Normally  this
116              involves unpacking the sources and applying any patches.
117
118       -bc    Do  the "%build" stage from the spec file (after doing the %prep
119              stage).  This generally involves the equivalent of a "make".
120
121       -bi    Do the "%install" stage from the  spec  file  (after  doing  the
122              %prep  and  %build stages).  This generally involves the equiva‐
123              lent of a "make install".
124
125       -bl    Do a "list check".  The "%files" section from the spec  file  is
126              macro  expanded,  and  checks  are made to verify that each file
127              exists.
128
129       -bs    Build just the source package.
130
131       The following options may also be used:
132
133       --buildroot DIRECTORY
134              When building a package, override the BuildRoot tag with  direc‐
135              tory DIRECTORY.
136
137       --clean
138              Remove the build tree after the packages are made.
139
140       --nobuild
141              Do  not  execute  any  build stages. Useful for testing out spec
142              files.
143
144       --noprep
145              Do not execute %prep build stage even if present in spec.
146
147       --noclean
148              Do not execute %clean build stage even if present in spec.
149
150       --nocheck
151              Do not execute %check build stage even if present in spec.
152
153       --nodebuginfo
154              Do not generate debuginfo packages..
155
156       --nodeps
157              Do not verify build dependencies.
158
159       --rmsource
160              Remove the sources after the build (may also be used standalone,
161              e.g. "rpmbuild --rmsource foo.spec").
162
163       --rmspec
164              Remove  the  spec  file after the build (may also be used stand‐
165              alone, eg. "rpmbuild --rmspec foo.spec").
166
167       --short-circuit
168              Skip straight to specified stage (i.e., skip all stages  leading
169              up  to the specified stage).  Only valid with -bc, -bi, and -bb.
170              Useful for local testing only.  Packages built this way will  be
171              marked  with  an unsatisfiable dependency to prevent their acci‐
172              dental use.
173
174       --build-in-place
175              Build from locally checked out sources. Sets _builddir  to  cur‐
176              rent  working  directory.  Skips handling of -n and untar in the
177              %setup and the deletion of the buildSubdir.
178
179       --target PLATFORM
180              When building the package, interpret PLATFORM as  arch-vendor-os
181              and  set  the  macros  %_target,  %_target_cpu,  and %_target_os
182              accordingly.
183
184       --with OPTION
185              Enable configure OPTION for build.
186
187       --without OPTION
188              Disable configure OPTION for build.
189
190   REBUILD AND RECOMPILE OPTIONS
191       There are two other ways to invoke building with rpm:
192
193       rpmbuild --rebuild|--recompile SOURCEPKG ...
194
195
196       When invoked this way, rpmbuild installs the named source package,  and
197       does  a prep, compile and install.  In addition, --rebuild builds a new
198       binary package. When the build has completed, the  build  directory  is
199       removed (as in --clean) and the the sources and spec file for the pack‐
200       age are removed.
201
202       These options are noaways superseded by the  -r*  options  which  allow
203       more more fine control over what stages of the build to run.
204
205   SHOWRC
206       The command
207
208       rpmbuild --showrc
209
210
211       shows the values rpmbuild will use for all of the options are currently
212       set in rpmrc and macros configuration file(s).
213

FILES

215   rpmrc Configuration
216       /usr/lib/rpm/rpmrc
217       /usr/lib/rpm/redhat/rpmrc
218       /etc/rpmrc
219       ~/.rpmrc
220
221   Macro Configuration
222       /usr/lib/rpm/macros
223       /usr/lib/rpm/redhat/macros
224       /etc/rpm/macros
225       ~/.rpmmacros
226
227   Temporary
228       /var/tmp/rpm*
229

SEE ALSO

231       gendiff(1),
232       popt(3),
233       rpm(8),
234       rpm2cpio(8),
235       rpmkeys(8)
236       rpmspec(8),
237       rpmsign(8),
238
239       rpmbuild --help - as rpm supports  customizing  the  options  via  popt
240       aliases  it's impossible to guarantee that what's described in the man‐
241       ual matches what's available.
242
243       http://www.rpm.org/ <URL:http://www.rpm.org/>
244

AUTHORS

246       Marc Ewing <marc@redhat.com>
247       Jeff Johnson <jbj@redhat.com>
248       Erik Troan <ewt@redhat.com>
249
250
251
252Red Hat, Inc.                    09 June 2002                      RPMBUILD(8)
Impressum