Several additional rpm options are available:
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.
Show the values rpm will use for all options that can be set in an .rpmrc file.
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 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.
The syntax for the build options is:
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:
t]step [build-options] spec-file ...
Perform the prep stage, unpacking source files and applying patches.
Do a list check, expanding macros in the files section of the spec file and verifying that each file exists.
Perform the build stage. Done after the prep stage; generally equivalent to doing a make.
Perform the install stage. Done after the prep and build stages; generally equivalent to doing a make install.
Build a binary package. Done after prep, build, and install.
Build a source package. Done after prep, build, and install.
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 up (remove) the build files after the package has been made.
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.
Can be used with -bc and -bi to skip previous stages.
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.
Go through the motions, but don't execute any build stages. Used for testing spec files.
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.
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