
584
|
Chapter 5: Package Management
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
Query an uninstalled package, printing information about the package and listing
the files it contains:
$ rpm -qpil ~/downloads/bash2-doc-2.03-8.i386.rpm
Install a package (assumes superuser privileges):
$ rpm -i sudo-1.6.7p5-30.1.i386.rpm
Do the same thing, but report on the progress of the installation:
$ rpm -ivh sudo-1.6.7p5-30.1.i386.rpm
The rpmbuild Command
The rpmbuild command is used to build RPM packages. The syntax for rpmbuild
is:
rpmbuild -[b|t]stage [build-options] spec-file ...
Specify -b to build a package directly from a spec file, or -t to open a tarred,
gzipped file and use its spec file.
Both forms take the following single-character stage arguments, which specify the
stages, or steps, required to build a package. The stages are listed in the order they
would be performed:
p Perform the prep stage, unpacking source files and applying patches.
l Do a list check, expanding macros in the files section of the spec file and veri-
fying that each file exists.
c Perform the prep and build stages; generally equivalent to doing a make.
i Perform the prep, build, and install stages; generally equivalent to doing a
make install.
b Perform the prep, build, and install stages, then build a binary package.
s Build a source package.
a Perform the prep,