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
14       rpmbuild {-ta|-tb|-tp|-tc|-ti|-tl|-ts} [rpmbuild-options] TARBALL ...
15
16
17
18       rpmbuild {--rebuild|--recompile} SOURCEPKG ...
19
20
21   MISCELLANEOUS:
22       rpmbuild --showrc
23
24
25   rpmbuild-options
26        [--buildroot DIRECTORY] [--clean] [--nobuild]
27        [--rmsource] [--rmspec] [--short-circuit]
28        [--noclean] [--nocheck]
29        [--target PLATFORM]
30
31

DESCRIPTION

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

FILES

187   rpmrc Configuration
188       /usr/lib/rpm/rpmrc
189       /usr/lib/rpm/redhat/rpmrc
190       /etc/rpmrc
191       ~/.rpmrc
192
193   Macro Configuration
194       /usr/lib/rpm/macros
195       /usr/lib/rpm/redhat/macros
196       /etc/rpm/macros
197       ~/.rpmmacros
198
199   Temporary
200       /var/tmp/rpm*
201

SEE ALSO

203       gendiff(1),
204       popt(3),
205       rpm(8),
206       rpm2cpio(8),
207       rpmkeys(8)
208       rpmspec(8),
209       rpmsign(8),
210
211       rpmbuild --help - as rpm supports  customizing  the  options  via  popt
212       aliases  it's impossible to guarantee that what's described in the man‐
213       ual matches what's available.
214
215       http://www.rpm.org/ <URL:http://www.rpm.org/>
216

AUTHORS

218       Marc Ewing <marc@redhat.com>
219       Jeff Johnson <jbj@redhat.com>
220       Erik Troan <ewt@redhat.com>
221
222
223
224Red Hat, Inc.                    09 June 2002                      RPMBUILD(8)
Impressum