LinuxDevCenter.com

oreilly.comSafari Books Online.Conferences.

We've expanded our Linux news coverage and improved our search! Search for all things Linux across O'Reilly!

Search
Search Tips

advertisement

Listen Print Subscribe to Linux Subscribe to Newsletters

Red Hat and Debian GNU/Linux Package Managers
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9

Miscellaneous options

Several additional rpm options are available:

--querytags

Print the tags available for use with the --queryformat option in query mode.

--setgids packages

Set file owner and group of the specified packages to those in the database.

--setperms packages

Set file permissions of the specified packages to those in the database.

--showrc

Show the values rpm will use for all options that can be set in an .rpmrc file.



FTP/HTTP options

The following options are available for use with ftp:// and http:// URLs in install, update, and query modes:

--ftpport port

Use port for making an FTP connection on the proxy FTP server instead of the default port. Same as specifying the macro _ftpport.

--ftpproxy host

Use host as the proxy server for FTP transfers through a firewall that uses a proxy. Same as specifying the macro _ftpproxy.

Linux in a Nutshell, 3rd EditionLinux in a Nutshell, 3rd Edition
By Ellen Siever, Stephen Spainhour, Jessica P. Hekman, & Stephen Figgins
3rd Edition August 2000
0-596-00025-1, Order Number: 0251
800 pages, $34.95

--httpport port

Use port for making an HTTP connection on the proxy HTTP server instead of the default port. Same as specifying the macro _httpport.

--httpproxy host

Use host as a proxy server for HTTP transfers. Same as specifying the macro _httpproxy.

Build options

The syntax for the build options is:

rpm -[b|t]step [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 step arguments:

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 verifying that each file exists.

c

Perform the build stage. Done after the prep stage; generally equivalent to doing a make.

i

Perform the install stage. Done after the prep and build stages; generally equivalent to doing a make install.

b

Build a binary package. Done after prep, build, and install.

s

Build a source package. Done after prep, build, and install.

a

Build both binary and source packages. Done after prep, build, and install.

The following additional options can be used when building an rpm file:

--buildarch arch
--buildos os

For use with pre-3.0 versions of RPM. Build the package for architecture arch or the operating system os. Replaced in 3.0 with --target.

--buildroot dir

Override the BuildRoot tag with dir when building the package.

--clean

Clean up (remove) the build files after the package has been made.

--rmsource

Remove the source files and the spec file when the build is done. Can be used as a standalone option with rpm to clean up files separately from creating the packages.

--short-circuit

Can be used with -bc and -bi to skip previous stages.

--sign

Add a PGP signature to the package.

--target platform

When building the package, set the macros _target, _target_arch, and _target_os to the value indicated by platform.

--test

Go through the motions, but don't execute any build stages. Used for testing spec files.

--timecheck

Set the timecheck age (the maximum age in seconds of a file being packaged). Set to 0 to disable.

Two other options can be used standalone with rpm to recompile or rebuild a package:

--rebuild source-pkgfile...

Like --recompile, but also build a new binary package. Remove the build directory, the source files, and the spec file once the build is complete.

--recompile source-pkgfile...

Install the named source package, and prep, compile, and install the package.

RPM examples

Query the RPM database to find Emacs-related packages:

% rpm -q -a | grep emacs

Query an uninstalled package, printing information about the package, and list the files it contains:

% rpm -qpil ~/downloads/bash2-doc-2.03-8.i386.rpm

Install a package (assumes superuser privileges):

% rpm -i sudo-1.5.3-6.i386.rpm

Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9

Next Pagearrow




Tagged Articles

Be the first to post this article to del.icio.us

Sponsored Resources

  • Inside Lightroom
Advertisement

Sponsored by:

O'Reilly Media

©2009, O'Reilly Media, Inc.
(707) 827-7000 / (800) 998-9938
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.
About O'Reilly
Academic Solutions
Authors
Contacts
Customer Service
Jobs
Newsletters
O'Reilly Labs
Press Room
Privacy Policy
RSS Feeds
Terms of Service
User Groups
Writing for O'Reilly
Content Archive
Business Technology
Computer Technology
Google
Microsoft
Mobile
Network
Operating System
Digital Photography
Programming
Software
Web
Web Design
More O'Reilly Sites
O'Reilly Radar
Ignite
Tools of Change for Publishing
Digital Media
Inside iPhone
O'Reilly FYI
makezine.com
craftzine.com
hackszine.com
perl.com
xml.com

Partner Sites
InsideRIA
java.net
O'Reilly Insights on Forbes.com