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] [--sign]
28        [--target PLATFORM]
29
30

DESCRIPTION

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

FILES

178   rpmrc Configuration
179       /usr/lib/rpm/rpmrc
180       /usr/lib/rpm/redhat/rpmrc
181       /etc/rpmrc
182       ~/.rpmrc
183
184   Macro Configuration
185       /usr/lib/rpm/macros
186       /usr/lib/rpm/redhat/macros
187       /etc/rpm/macros
188       ~/.rpmmacros
189
190   Database
191       /var/lib/rpm/Basenames
192       /var/lib/rpm/Conflictname
193       /var/lib/rpm/Dirnames
194       /var/lib/rpm/Filemd5s
195       /var/lib/rpm/Group
196       /var/lib/rpm/Installtid
197       /var/lib/rpm/Name
198       /var/lib/rpm/Packages
199       /var/lib/rpm/Providename
200       /var/lib/rpm/Provideversion
201       /var/lib/rpm/Pubkeys
202       /var/lib/rpm/Removed
203       /var/lib/rpm/Requirename
204       /var/lib/rpm/Requireversion
205       /var/lib/rpm/Sha1header
206       /var/lib/rpm/Sigmd5
207       /var/lib/rpm/Triggername
208
209   Temporary
210       /var/tmp/rpm*
211

SEE ALSO

213       popt(3),
214       rpm2cpio(8),
215       gendiff(1),
216       rpm(8),
217
218       rpmbuild  --help  -  as  rpm  supports customizing the options via popt
219       aliases it's impossible to guarantee that what's described in the  man‐
220       ual matches what's available.
221
222       http://www.rpm.org/ <URL:http://www.rpm.org/>
223

AUTHORS

225       Marc Ewing <marc@redhat.com>
226       Jeff Johnson <jbj@redhat.com>
227       Erik Troan <ewt@redhat.com>
228
229
230
231Red Hat, Inc.                    09 June 2002                      RPMBUILD(8)
Impressum