Blame doc/rpm.8

2ff057
.\" This manpage has been automatically generated by docbook2man 
2ff057
.\" from a DocBook document.  This tool can be found at:
2ff057
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
2ff057
.\" Please send any bug reports, improvements, comments, patches, 
2ff057
.\" etc. to Steve Cheng <steve@ggi-project.org>.
2ff057
.TH "RPM" "8" "09 June 2002" "Red Hat, Inc."
2ff057
.SH NAME
2ff057
rpm \- RPM Package Manager
2ff057
.SH SYNOPSIS
2ff057
.SS "QUERYING AND VERIFYING PACKAGES:"
2ff057
.PP
2ff057
2ff057
2ff057
\fBrpm\fR {\fB-q|--query\fR} [\fBselect-options\fR] [\fBquery-options\fR]
2ff057
2ff057
\fBrpm\fR \fB--querytags\fR
2ff057
2ff057
\fBrpm\fR {\fB-V|--verify\fR} [\fBselect-options\fR] [\fBverify-options\fR]
2ff057
2ff057
.SS "INSTALLING, UPGRADING, AND REMOVING PACKAGES:"
2ff057
.PP
2ff057
2ff057
2ff057
\fBrpm\fR {\fB-i|--install\fR} [\fBinstall-options\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
2ff057
2ff057
2ff057
2ff057
\fBrpm\fR {\fB-U|--upgrade\fR} [\fBinstall-options\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
2ff057
2ff057
2ff057
2ff057
\fBrpm\fR {\fB-F|--freshen\fR} [\fBinstall-options\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
2ff057
2ff057
2ff057
2ff057
\fBrpm\fR {\fB--reinstall\fR} [\fBinstall-options\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
2ff057
2ff057
2ff057
2ff057
\fBrpm\fR {\fB-e|--erase\fR} [\fB--allmatches\fR] [\fB--justdb] [\fB--nodeps\fR] [\fB--noscripts\fR]
2ff057
    [\fB--notriggers\fR] [\fB--test\fR] \fB\fIPACKAGE_NAME\fB\fR\fI\ ...\fR
2ff057
2ff057
.SS "MISCELLANEOUS:"
2ff057
.PP
2ff057
2ff057
\fBrpm\fR \fB--showrc\fR
2ff057
2ff057
\fBrpm\fR \fB--setperms\fR \fB\fIPACKAGE_NAME\fB\fR\fI ...\fR
2ff057
2ff057
\fBrpm\fR \fB--setugids\fR \fB\fIPACKAGE_NAME\fB\fR\fI ...\fR
2ff057
2ff057
\fBrpm\fR \fB--setcaps\fR \fB\fIPACKAGE_NAME\fB\fR\fI ...\fR
2ff057
2ff057
\fBrpm\fR \fB--restore\fR \fB\fIPACKAGE_NAME\fB\fR\fI ...\fR
2ff057
2ff057
.SS "select-options"
2ff057
.PP
2ff057
2ff057
 [\fB\fIPACKAGE_NAME\fB\fR]
2ff057
 [\fB-a,--all [\fISELECTOR\fR]\fR] [\fB-f,--file \fIFILE\fB\fR]
2ff057
 [\fB-g,--group \fIGROUP\fB\fR] {\fB-p,--package \fIPACKAGE_FILE\fB\fR]
2ff057
 [\fB--hdrid \fISHA1\fB\fR] [\fB--pkgid \fIMD5\fB\fR] [\fB--tid \fITID\fB\fR]
2ff057
 [\fB--querybynumber \fIHDRNUM\fB\fR] [\fB--triggeredby \fIPACKAGE_NAME\fB\fR]
2ff057
 [\fB--whatprovides \fICAPABILITY\fB\fR] [\fB--whatrequires \fICAPABILITY\fB\fR]
2ff057
 [\fB--whatrecommends \fICAPABILITY\fB\fR] [\fB--whatsuggests \fICAPABILITY\fB\fR]
2ff057
 [\fB--whatsupplements \fICAPABILITY\fB\fR] [\fB--whatenhances \fICAPABILITY\fB\fR]
2ff057
 [\fB--whatobsoletes \fICAPABILITY\fB\fR] [\fB--whatconflicts \fICAPABILITY\fB\fR]
2ff057
2ff057
.SS "query-options"
2ff057
.PP
2ff057
General:
2ff057
 [\fB--changelog\fR] [\fB--changes\fR]  [\fB--dupes\fR] [\fB-i,--info\fR]
2ff057
 [\fB--last\fR] [\fB--qf,--queryformat \fIQUERYFMT\fB\fR] [\fB--xml\fR]
2ff057
.PP
2ff057
Dependencies:
2ff057
 [\fB--conflicts\fR] [\fB--enhances\fR] [\fB--obsoletes\fR] [\fB--provides\fR]
2ff057
 [\fB--recommends\fR] [\fB-R,--requires\fR] [\fB--suggests\fR] [\fB--supplements\fR]
2ff057
.PP
2ff057
Files:
2ff057
 [\fB-c,--configfiles\fR] [\fB-d,--docfiles\fR] [\fB--dump\fR] [\fB--fileclass\fR]
2ff057
 [\fB--filecolor\fR] [\fB--fileprovide\fR][\fB--filerequire\fR] [\fB--filecaps\fR]
2ff057
 [\fB--filesbypkg\fR] [\fB-l,--list\fR] [\fB-s,--state\fR]
2ff057
 [\fB--noartifact\fR] [\fB--noghost\fR] [\fB--noconfig\fR
2ff057
.PP
2ff057
Scripts and triggers:
2ff057
 [\fB--filetriggers\fR] [\fB--scripts\fR] [\fB--triggers,--triggerscripts\fR]
2ff057
2ff057
.SS "verify-options"
2ff057
.PP
2ff057
2ff057
2ff057
 [\fB--nodeps\fR] [\fB--nofiles\fR] [\fB--noscripts\fR]
2ff057
 [\fB--nodigest\fR] [\fB--nosignature\fR]
2ff057
 [\fB--nolinkto\fR] [\fB--nofiledigest\fR] [\fB--nosize\fR] [\fB--nouser\fR]
2ff057
 [\fB--nogroup\fR] [\fB--nomtime\fR] [\fB--nomode\fR] [\fB--nordev\fR]
2ff057
 [\fB--nocaps\fR]
2ff057
2ff057
.SS "install-options"
2ff057
.PP
2ff057
2ff057
2ff057
 [\fB--allfiles\fR] [\fB--badreloc\fR] [\fB--excludepath \fIOLDPATH\fB\fR]
2ff057
 [\fB--excludedocs\fR] [\fB--force\fR] [\fB-h,--hash\fR]
2ff057
 [\fB--ignoresize\fR] [\fB--ignorearch\fR] [\fB--ignoreos\fR]
2ff057
 [\fB--includedocs\fR] [\fB--justdb\fR]
2ff057
 [\fB--nodeps\fR] [\fB--nodigest\fR] [\fB--noplugins\fR]
Panu Matilainen 5ab759
 [\fB--nocaps\fR] [\fB--noorder\fR] [\fB--noverify\fR]
2ff057
 [\fB--nosignature\fR] [\fB--noscripts\fR] [\fB--notriggers\fR]
2ff057
 [\fB--oldpackage\fR] [\fB--percent\fR] [\fB--prefix \fINEWPATH\fB\fR]
2ff057
 [\fB--relocate \fIOLDPATH\fB=\fINEWPATH\fB\fR]
2ff057
 [\fB--replacefiles\fR] [\fB--replacepkgs\fR]
2ff057
 [\fB--test\fR]
2ff057
2ff057
.SH "DESCRIPTION"
2ff057
.PP
2ff057
\fBrpm\fR is a powerful \fBPackage Manager\fR,
2ff057
which can be used to build, install, query, verify, update, and
2ff057
erase individual software packages.
2ff057
A \fBpackage\fR consists of an archive of files and
2ff057
meta-data used to install and erase the archive files. The meta-data
2ff057
includes helper scripts, file attributes, and descriptive information
2ff057
about the package.
2ff057
\fBPackages\fR come in two varieties: binary packages,
2ff057
used to encapsulate software to be installed, and source packages,
2ff057
containing the source code and recipe necessary to produce binary
2ff057
packages.
2ff057
.PP
2ff057
One of the following basic modes must be selected:
2ff057
\fBQuery\fR,
2ff057
\fBVerify\fR,
2ff057
\fBInstall/Upgrade/Freshen/Reinstall\fR,
2ff057
\fBUninstall\fR,
2ff057
\fBSet Owners/Groups\fR,
2ff057
\fBShow Querytags\fR, and
2ff057
\fBShow Configuration\fR.
2ff057
.SS "GENERAL OPTIONS"
2ff057
.PP
2ff057
These options can be used in all the different modes.
2ff057
.TP
2ff057
\fB-?, --help\fR
2ff057
Print a longer usage message then normal.
2ff057
.TP
2ff057
\fB--version\fR
2ff057
Print a single line containing the version number of \fBrpm\fR
2ff057
being used. 
2ff057
.TP
2ff057
\fB--quiet\fR
2ff057
Print as little as possible - normally only error messages will
2ff057
be displayed.
2ff057
.TP
2ff057
\fB-v, --verbose\fR
2ff057
Print verbose information - normally routine progress messages will be
2ff057
displayed.
2ff057
.TP
2ff057
\fB-vv\fR
2ff057
Print lots of ugly debugging information.
2ff057
.TP
2ff057
\fB--rcfile \fIFILELIST\fB\fR
2ff057
Replace the list of configuration files to be read. Each of the files in the colon separated
2ff057
\fIFILELIST\fR
2ff057
is read sequentially by \fBrpm\fR for configuration
2ff057
information.
2ff057
Only the first file in the list must exist, and tildes will be
2ff057
expanded to the value of \fB$HOME\fR.
2ff057
The default \fIFILELIST\fR is
2ff057
\fI/usr/\:lib/\:rpm/\:rpmrc\fR:\:\fI/usr/\:lib/\:rpm/\:redhat/\:rpmrc\fR:\:\fI/etc/\:rpmrc\fR:\:\fI~/.rpmrc\fR.
2ff057
2ff057
.TP
2ff057
\fB--macros \fIFILELIST\fB\fR
2ff057
Replace the list of macro files to be loaded. Each of the files in the colon separated
2ff057
\fIFILELIST\fR
2ff057
is read sequentially by \fBrpm\fR for macro definitions.
2ff057
Only the first file in the list must exist, and tildes will be
2ff057
expanded to the value of \fB$HOME\fR.
2ff057
The default \fIFILELIST\fR is
2ff057
\fI/usr/\:lib/\:rpm/\:macros\fR:\:\fI/usr/\:lib/\:rpm/\:macros.d/\:macros.*\fR:\:\fI/usr/\:lib/\:rpm/\:platform/\:%{_target}/\:macros\fR:\:\fI/usr/\:lib/\:rpm/\:fileattrs/\:*.attr\fR:\:\fI/usr/\:lib/\:rpm/\:redhat/\:macros\fR:\:\fI/etc/\:rpm/\:macros.*\fR:\:\fI/etc/\:rpm/\:macros\fR:\:\fI/etc/\:rpm/\:%{_target}/\:macros\fR:\:\fI~/.rpmmacros
2ff057
2ff057
.TP
2ff057
\fB--pipe \fICMD\fB\fR
2ff057
Pipes the output of \fBrpm\fR to the command \fICMD\fR.
2ff057
.TP
2ff057
\fB--dbpath \fIDIRECTORY\fB\fR
2ff057
Use the database in \fIDIRECTORY\fR rather
2ff057
than the default path \fI/var/lib/rpm\fR
2ff057
.TP
2ff057
\fB--root \fIDIRECTORY\fB\fR
2ff057
Use the file system tree rooted at \fIDIRECTORY\fR for all operations.
2ff057
Note that this means the database within
2ff057
\fIDIRECTORY\fR
2ff057
will be used for dependency checks and any scriptlet(s) (e.g.
2ff057
\fB%post\fR if installing, or
2ff057
\fB%prep\fR if building, a package)
2ff057
will be run after a chroot(2) to
2ff057
\fIDIRECTORY\fR.
2ff057
.TP
2ff057
\fB-D, --define='\fIMACRO EXPR\fB'\fR
2ff057
Defines \fIMACRO\fR with value \fIEXPR\fR.
2ff057
.TP
2ff057
\fB--undefine='\fIMACRO\fB'\fR
2ff057
Undefines \fIMACRO\fR.
2ff057
.TP
2ff057
\fB-E, --eval='\fIEXPR\fB'\fR
2ff057
Prints macro expansion of \fIEXPR\fR.
2ff057
2ff057
.PP
2ff057
More - less often needed - options can be found on the \fBrpm-misc(8)\fR man page.
2ff057
.SS "INSTALL AND UPGRADE OPTIONS"
2ff057
.PP
2ff057
In these options, \fIPACKAGE_FILE\fR can be either \fBrpm\fR binary
2ff057
file or ASCII package manifest (see \fBPACKAGE SELECTION OPTIONS\fR), and
2ff057
may be specified as an
2ff057
\fBftp\fR or
2ff057
\fBhttp\fR URL,
2ff057
in which case the package will be downloaded before being
2ff057
installed. See \fBFTP/HTTP OPTIONS\fR
2ff057
for information on \fBrpm\fR's internal
2ff057
\fBftp\fR and
2ff057
\fBhttp\fR
2ff057
client support.
2ff057
.PP
2ff057
The general form of an rpm install command is 
2ff057
.PP
2ff057
\fBrpm\fR {\fB-i|--install\fR} [\fBinstall-options\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
2ff057
.PP
2ff057
This installs a new package.
2ff057
.PP
2ff057
The general form of an rpm upgrade command is 
2ff057
.PP
2ff057
\fBrpm\fR {\fB-U|--upgrade\fR} [\fBinstall-options\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
2ff057
.PP
2ff057
This upgrades or installs the package currently installed
2ff057
to a newer version.  This is the same as install, except
2ff057
all other version(s) of the package are removed after the
2ff057
new package is installed.
2ff057
.PP
2ff057
\fBrpm\fR {\fB-F|--freshen\fR} [\fBinstall-options\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
2ff057
.PP
2ff057
This will upgrade packages, but only ones for which an earlier version is
2ff057
installed.
2ff057
.PP
2ff057
The general form of an rpm reinstall command is 
2ff057
.PP
2ff057
\fBrpm\fR {\fB--reinstall\fR} [\fBinstall-options\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
2ff057
.PP
2ff057
This reinstalls a previously installed package.
2ff057
.PP
2ff057
.PP
2ff057
.TP
2ff057
\fB--allfiles\fR
2ff057
Installs or upgrades all the missingok files in the package,
2ff057
regardless if they exist.
2ff057
.TP
2ff057
\fB--badreloc\fR
2ff057
Used with \fB--relocate\fR, permit relocations on
2ff057
all file paths, not just those \fIOLDPATH\fR's
2ff057
included in the binary package relocation hint(s).
2ff057
.TP
2ff057
\fB--excludepath \fIOLDPATH\fB\fR
2ff057
Don't install files whose name begins with
2ff057
\fIOLDPATH\fR.
2ff057
.TP
2ff057
\fB--excludedocs\fR
2ff057
Don't install any files which are marked as documentation
2ff057
(which includes man pages and texinfo documents).
2ff057
.TP
2ff057
\fB--force\fR
2ff057
Same as using
2ff057
\fB--replacepkgs\fR,
2ff057
\fB--replacefiles\fR, and
2ff057
\fB--oldpackage\fR.
2ff057
.TP
2ff057
\fB-h, --hash\fR
2ff057
Print 50 hash marks as the package archive is unpacked.
2ff057
Use with \fB-v|--verbose\fR for a nicer display.
2ff057
.TP
2ff057
\fB--ignoresize\fR
2ff057
Don't check mount file systems for sufficient disk space before
2ff057
installing this package.
2ff057
.TP
2ff057
\fB--ignorearch\fR
2ff057
Allow installation or upgrading even if the architectures
2ff057
of the binary package and host don't match.
2ff057
.TP
2ff057
\fB--ignoreos\fR
2ff057
Allow installation or upgrading even if the operating
2ff057
systems of the binary package and host don't match.
2ff057
.TP
2ff057
\fB--includedocs\fR
2ff057
Install documentation files. This is the default behavior.
2ff057
.TP
2ff057
\fB--justdb\fR
2ff057
Update only the database, not the filesystem.
2ff057
.TP
2ff057
\fB--nodigest\fR
2ff057
Don't verify package or header digests when reading.
2ff057
.TP
2ff057
\fB--nomanifest\fR
2ff057
Don't process non-package files as manifests.
2ff057
.TP
2ff057
\fB--nosignature\fR
2ff057
Don't verify package or header signatures when reading.
2ff057
.TP
2ff057
\fB--nodeps\fR
2ff057
Don't do a dependency check before installing or upgrading
2ff057
a package.
2ff057
.TP
2ff057
\fB--nocaps\fR
2ff057
Don't set file capabilities.
2ff057
.TP
2ff057
\fB--noorder\fR
2ff057
Don't reorder the packages for an install. The list of
2ff057
packages would normally be reordered to satisfy dependencies.
2ff057
.TP
Panu Matilainen 5ab759
\fB--noverify\fR
Panu Matilainen 5ab759
Don't perform verify package files prior to installation.
Panu Matilainen 5ab759
.TP
2ff057
\fB--noplugins\fR
2ff057
Do not load and execute plugins.
2ff057
.TP
2ff057
\fB--noscripts\fR, \fB--nopre\fR, \fB--nopost\fR, \fB--nopreun\fR, \fB--nopostun\fR, \fB--nopretrans\fR, \fB--noposttrans\fR
2ff057
Don't execute the scriptlet of the same name.
2ff057
The \fB--noscripts\fR option is equivalent to
2ff057
2ff057
\fB--nopre\fR
2ff057
\fB--nopost\fR
2ff057
\fB--nopreun\fR
2ff057
\fB--nopostun\fR
2ff057
\fB--nopretrans\fR
2ff057
\fB--noposttrans\fR
2ff057
2ff057
and turns off the execution of the corresponding
2ff057
\fB%pre\fR,
2ff057
\fB%post\fR,
2ff057
\fB%preun\fR,
2ff057
\fB%postun\fR
2ff057
\fB%pretrans\fR, and
2ff057
\fB%posttrans\fR
2ff057
scriptlet(s).
2ff057
2ff057
.TP
2ff057
\fB--notriggers\fR, \fB--notriggerin\fR, \fB--notriggerun\fR, \fB--notriggerprein\fR, \fB--notriggerpostun\fR
2ff057
Don't execute any trigger scriptlet of the named type.
2ff057
The \fB--notriggers\fR option is equivalent to
2ff057
2ff057
\fB--notriggerprein\fR
2ff057
\fB--notriggerin\fR
2ff057
\fB--notriggerun\fR
2ff057
\fB--notriggerpostun\fR
2ff057
2ff057
and turns off execution of the corresponding
2ff057
\fB%triggerprein\fR,
2ff057
\fB%triggerin\fR,
2ff057
\fB%triggerun\fR, and
2ff057
\fB%triggerpostun\fR
2ff057
scriptlet(s).
2ff057
.TP
2ff057
\fB--oldpackage\fR
2ff057
Allow an upgrade to replace a newer package with an older one.
2ff057
.TP
2ff057
\fB--percent\fR
2ff057
Print percentages as files are unpacked from the package archive.
2ff057
This is intended to make \fBrpm\fR easy to run from
2ff057
other tools.
2ff057
.TP
2ff057
\fB--prefix \fINEWPATH\fB\fR
2ff057
For relocatable binary packages, translate all file paths that
2ff057
start with the installation prefix in the package relocation hint(s)
2ff057
to \fINEWPATH\fR.
2ff057
.TP
2ff057
\fB--relocate \fIOLDPATH\fB=\fINEWPATH\fB\fR
2ff057
For relocatable binary packages, translate all file paths
2ff057
that start with \fIOLDPATH\fR in the
2ff057
package relocation hint(s) to \fINEWPATH\fR.
2ff057
This option can be used repeatedly if several
2ff057
\fIOLDPATH\fR's in the package are to
2ff057
be relocated.
2ff057
.TP
2ff057
\fB--replacefiles\fR
2ff057
Install the packages even if they replace files from other,
2ff057
already installed, packages.
2ff057
.TP
2ff057
\fB--replacepkgs\fR
2ff057
Install the packages even if some of them are already installed
2ff057
on this system.
2ff057
.TP
2ff057
\fB--test\fR
2ff057
Do not install the package, simply check for and report
2ff057
potential conflicts.
2ff057
.SS "ERASE OPTIONS"
2ff057
.PP
2ff057
The general form of an rpm erase command is 
2ff057
.PP
2ff057
2ff057
\fBrpm\fR {\fB-e|--erase\fR} [\fB--allmatches\fR] [\fB--justdb] [\fB--nodeps\fR] [\fB--noscripts\fR] [\fB--notriggers\fR] [\fB--test\fR] \fB\fIPACKAGE_NAME\fB\fR\fI ...\fR
2ff057
2ff057
.PP
2ff057
The following options may also be used:
2ff057
.TP
2ff057
\fB--allmatches\fR
2ff057
Remove all versions of the package which match
2ff057
\fIPACKAGE_NAME\fR. Normally an
2ff057
error is issued if \fIPACKAGE_NAME\fR
2ff057
matches multiple packages.
2ff057
.TP
2ff057
\fB--justdb\fR
2ff057
Update only the database, not the filesystem.
2ff057
.TP
2ff057
\fB--nodeps\fR
2ff057
Don't check dependencies before uninstalling the packages.
2ff057
.TP
2ff057
\fB--noscripts\fR, \fB--nopreun\fR, \fB--nopostun\fR
2ff057
Don't execute the scriptlet of the same name.
2ff057
The \fB--noscripts\fR option during package erase is
2ff057
equivalent to
2ff057
2ff057
\fB--nopreun\fR
2ff057
\fB--nopostun\fR
2ff057
2ff057
and turns off the execution of the corresponding
2ff057
\fB%preun\fR, and
2ff057
\fB%postun\fR
2ff057
scriptlet(s).
2ff057
.TP
2ff057
\fB--notriggers\fR, \fB--notriggerun\fR, \fB--notriggerpostun\fR
2ff057
Don't execute any trigger scriptlet of the named type.
2ff057
The \fB--notriggers\fR option is equivalent to
2ff057
2ff057
\fB--notriggerun\fR
2ff057
\fB--notriggerpostun\fR
2ff057
2ff057
and turns off execution of the corresponding
2ff057
\fB%triggerun\fR, and
2ff057
\fB%triggerpostun\fR
2ff057
scriptlet(s).
2ff057
.TP
2ff057
\fB--test\fR
2ff057
Don't really uninstall anything, just go through the motions.
2ff057
Useful in conjunction with the \fB-vv\fR option
2ff057
for debugging.
2ff057
.SS "QUERY OPTIONS"
2ff057
.PP
2ff057
The general form of an rpm query command is 
2ff057
.PP
2ff057
2ff057
\fBrpm\fR {\fB-q|--query\fR} [\fBselect-options\fR] [\fBquery-options\fR]
2ff057
2ff057
.PP
2ff057
You may specify the format that package information should be
2ff057
printed in. To do this, you use the
2ff057
2ff057
 \fB--qf|--queryformat\fR \fB\fIQUERYFMT\fB\fR
2ff057
2ff057
option, followed by the \fIQUERYFMT\fR
2ff057
format string.  Query formats are modified versions of the
2ff057
standard \fBprintf(3)\fR formatting. The format
2ff057
is made up of static strings (which may include standard C
2ff057
character escapes for newlines, tabs, and other special
2ff057
characters) and \fBprintf(3)\fR type formatters.
2ff057
As \fBrpm\fR already knows the type to print, the
2ff057
type specifier must be omitted however, and replaced by the name
2ff057
of the header tag to be printed, enclosed by \fB{}\fR
2ff057
characters. Tag names are case insensitive, and the leading
2ff057
\fBRPMTAG_\fR portion of the tag name may be omitted
2ff057
as well.
2ff057
.PP
2ff057
Alternate output formats may be requested by following
2ff057
the tag with \fB:\fItypetag\fB\fR.
2ff057
Currently, the following types are supported:
2ff057
.TP
2ff057
\fB:armor\fR
2ff057
Wrap a public key in ASCII armor.
2ff057
.TP
2ff057
\fB:arraysize\fR
2ff057
Display number of elements in array tags.
2ff057
.TP
2ff057
\fB:base64\fR
2ff057
Encode binary data using base64.
2ff057
.TP
2ff057
\fB:date\fR
2ff057
Use strftime(3) "%c" format.
2ff057
.TP
2ff057
\fB:day\fR
2ff057
Use strftime(3) "%a %b %d %Y" format.
2ff057
.TP
2ff057
\fB:depflags\fR
2ff057
Format dependency comparison operator.
2ff057
.TP
2ff057
\fB:deptype\fR
2ff057
Format dependency type.
2ff057
.TP
2ff057
\fB:expand\fR
2ff057
Perform macro expansion.
2ff057
.TP
2ff057
\fB:fflags\fR
2ff057
Format file flags.
2ff057
.TP
2ff057
\fB:fstate\fR
2ff057
Format file state.
2ff057
.TP
2ff057
\fB:fstatus\fR
2ff057
Format file verify status.
2ff057
.TP
2ff057
\fB:hex\fR
2ff057
Format in hexadecimal.
2ff057
.TP
2ff057
\fB:octal\fR
2ff057
Format in octal.
2ff057
.TP
2ff057
\fB:humaniec\fR
2ff057
Human readable number (in IEC 80000). The suffix K = 1024, M = 1048576, ...
2ff057
.TP
2ff057
\fB:humansi\fR
2ff057
Human readable number (in SI). The suffix K = 1000, M = 1000000, ...
2ff057
.TP
2ff057
\fB:perms\fR
2ff057
Format file permissions.
2ff057
.TP
2ff057
\fB:pgpsig\fR
2ff057
Display signature fingerprint and time.
2ff057
.TP
2ff057
\fB:shescape\fR
2ff057
Escape single quotes for use in a script.
2ff057
.TP
2ff057
\fB:triggertype\fR
2ff057
Display trigger suffix.
2ff057
.TP
2ff057
\fB:vflags\fR
2ff057
File verification flags.
2ff057
.TP
2ff057
\fB:xml\fR
2ff057
Wrap data in simple xml markup.
2ff057
.PP
2ff057
For example, to print only the names of the packages queried,
2ff057
you could use \fB%{NAME}\fR as the format string.
2ff057
To print the packages name and distribution information in
2ff057
two columns, you could use \fB%-30{NAME}%{DISTRIBUTION}\fR.
2ff057
\fBrpm\fR will print a list of all of the tags it knows about when it
2ff057
is invoked with the \fB--querytags\fR argument.
2ff057
.PP
2ff057
There are two subsets of options for querying: package selection,
2ff057
and information selection.
2ff057
.SS "PACKAGE SELECTION OPTIONS:"
2ff057
.PP
2ff057
.TP
2ff057
\fB\fIPACKAGE_NAME\fB\fR
2ff057
Query installed package named \fIPACKAGE_NAME\fR. To specify the package more precisely the package name may be followed by the version or version and release
2ff057
both separated by a dash or an architecture name separated by a dot. See the output of \fBrpm -qa\fR or \fBrpm -qp \fIPACKAGE_FILE\fB\fR as an example.
2ff057
2ff057
.TP
2ff057
\fB-a, --all [\fISELECTOR\fR]\fR
2ff057
Query all installed packages.
2ff057
2ff057
An optional \fISELECTOR\fR in the form of tag=pattern can be provided to
2ff057
narrow the selection, for example name="b*" to query packages whose name
2ff057
starts with "b".
2ff057
.TP
2ff057
\fB--dupes\fB
2ff057
List duplicated packages.
2ff057
.TP
2ff057
\fB-f, --file \fIFILE\fB\fR
2ff057
Query package owning \fIFILE\fR.
2ff057
.TP
2ff057
\fB--filecaps\fR
2ff057
List file names with POSIX1.e capabilities.
2ff057
.TP
2ff057
\fB--fileclass\fR
2ff057
List file names with their classes (libmagic classification).
2ff057
.TP
2ff057
\fB--filecolor\fR
2ff057
List file names with their colors (0 for noarch, 1 for 32bit, 2 for 64 bit).
2ff057
.TP
2ff057
\fB--fileprovide\fR
2ff057
List file names with their provides.
2ff057
.TP
2ff057
\fB--filerequire\fR
2ff057
List file names with their requires.
2ff057
.TP
2ff057
\fB-g, --group \fIGROUP\fB\fR
2ff057
Query packages with the group of \fIGROUP\fR.
2ff057
.TP
2ff057
\fB--hdrid \fISHA1\fB\fR
2ff057
Query package that contains a given header identifier, i.e. the
2ff057
\fISHA1\fR digest of the immutable header region.
2ff057
.TP
2ff057
\fB-p, --package \fIPACKAGE_FILE\fB\fR
2ff057
Query an (uninstalled) package \fIPACKAGE_FILE\fR.
2ff057
The \fIPACKAGE_FILE\fR may be specified
2ff057
as an \fBftp\fR or \fBhttp\fR style URL, in
2ff057
which case the package header will be downloaded and queried.
2ff057
See \fBFTP/HTTP OPTIONS\fR for information on
2ff057
\fBrpm\fR's internal
2ff057
\fBftp\fR and
2ff057
\fBhttp\fR
2ff057
client support. The \fIPACKAGE_FILE\fR argument(s),
2ff057
if not a binary package, will be interpreted as an ASCII package
2ff057
manifest unless \fB--nomanifest\fR option is used.  
2ff057
In manifests, comments are permitted, starting with a '#', and each
2ff057
line of a package manifest file may include white space separated
2ff057
glob expressions, including URL's,
2ff057
that will be expanded to paths that are substituted in place of
2ff057
the package manifest as additional \fIPACKAGE_FILE\fR
2ff057
arguments to the query.
2ff057
.TP
2ff057
\fB--pkgid \fIMD5\fB\fR
2ff057
Query package that contains a given package identifier, i.e. the
2ff057
\fIMD5\fR digest of the combined header and
2ff057
payload contents.
2ff057
.TP
2ff057
\fB--querybynumber \fIHDRNUM\fB\fR
2ff057
Query the \fIHDRNUM\fRth database entry
2ff057
directly; this is useful only for debugging.
2ff057
.TP
2ff057
\fB--specfile \fISPECFILE\fB\fR
2ff057
Parse and query \fISPECFILE\fR as if
2ff057
it were a package. Although not all the information (e.g. file lists)
2ff057
is available, this type of query permits rpm to be used to extract
2ff057
information from spec files without having to write a specfile
2ff057
parser.
2ff057
.TP
2ff057
\fB--tid \fITID\fB\fR
2ff057
Query package(s) that have a given \fITID\fR
2ff057
transaction identifier. A unix time stamp is currently used as a
2ff057
transaction identifier. All package(s) installed or erased within
2ff057
a single transaction have a common identifier.
2ff057
.TP
2ff057
\fB--triggeredby \fIPACKAGE_NAME\fB\fR
2ff057
Query packages that are triggered by package(s)
2ff057
\fIPACKAGE_NAME\fR.
2ff057
.TP
2ff057
\fB--whatobsoletes \fICAPABILITY\fB\fR
2ff057
Query all packages that obsolete \fICAPABILITY\fR for proper functioning.
2ff057
.TP
2ff057
\fB--whatprovides \fICAPABILITY\fB\fR
2ff057
Query all packages that provide the \fICAPABILITY\fR capability.
2ff057
.TP
2ff057
\fB--whatrequires \fICAPABILITY\fB\fR
2ff057
Query all packages that require \fICAPABILITY\fR for proper functioning.
2ff057
.TP
2ff057
\fB--whatconflicts \fICAPABILITY\fB\fR
2ff057
Query all packages that conflict with \fICAPABILITY\fR.
2ff057
.TP
2ff057
\fB--whatrecommends \fICAPABILITY\fB\fR
2ff057
Query all packages that recommend \fICAPABILITY\fR.
2ff057
.TP
2ff057
\fB--whatsuggests \fICAPABILITY\fB\fR
2ff057
Query all packages that suggest \fICAPABILITY\fR.
2ff057
.TP
2ff057
\fB--whatsupplements \fICAPABILITY\fB\fR
2ff057
Query all packages that supplement \fICAPABILITY\fR.
2ff057
.TP
2ff057
\fB--whatenhances \fICAPABILITY\fB\fR
2ff057
Query all packages that enhance \fICAPABILITY\fR.
2ff057
.SS "PACKAGE QUERY OPTIONS:"
2ff057
.PP
2ff057
.TP
2ff057
\fB-d, --artifactfiles\fR
2ff057
List only artifact files (implies \fB-l\fR).
2ff057
.TP
2ff057
\fB--changelog\fR
2ff057
Display change information for the package.
2ff057
.TP
2ff057
\fB--changes\fR
2ff057
Display change information for the package with full time stamps.
2ff057
.TP
2ff057
\fB-c, --configfiles\fR
2ff057
List only configuration files (implies \fB-l\fR).
2ff057
.TP
2ff057
\fB--conflicts\fR
2ff057
List capabilities this package conflicts with.
2ff057
.TP
2ff057
\fB-d, --docfiles\fR
2ff057
List only documentation files (implies \fB-l\fR).
2ff057
.TP
2ff057
\fB--dump\fR
2ff057
Dump file information as follows (implies \fB-l\fR):
2ff057
.sp
2ff057
.RS
2ff057
2ff057
.nf
2ff057
path size mtime digest mode owner group isconfig isdoc rdev symlink
2ff057
	
2ff057
.fi
2ff057
.RE
2ff057
.TP
2ff057
\fB--enhances\fR
2ff057
List capabilities enhanced by package(s)
2ff057
.TP
2ff057
\fB--filesbypkg\fR
2ff057
List all the files in each selected package.
2ff057
.TP
2ff057
\fB--filetriggers\fR
2ff057
List filetrigger scriptlets from package(s).
2ff057
.TP
2ff057
\fB-i, --info\fR
2ff057
Display package information, including name, version, and description.
2ff057
This uses the \fB--queryformat\fR if one was specified.
2ff057
.TP
2ff057
\fB--last\fR
2ff057
Orders the package listing by install time such that the latest
2ff057
packages are at the top.
2ff057
.TP
2ff057
\fB-L, --licensefiles\fR
2ff057
List only license files (implies \fB-l\fR).
2ff057
.TP
2ff057
\fB-l, --list\fR
2ff057
List files in package.
2ff057
.TP
2ff057
\fB--obsoletes\fR
2ff057
List packages this package obsoletes.
2ff057
.TP
2ff057
\fB--provides\fR
2ff057
List capabilities this package provides.
2ff057
.TP
2ff057
\fB--recommends\fR
2ff057
List capabilities recommended by package(s)
2ff057
.TP
2ff057
\fB-R, --requires\fR
2ff057
List capabilities on which this package depends.
2ff057
.TP
2ff057
\fB--suggests\fR
2ff057
List capabilities suggested by package(s)
2ff057
.TP
2ff057
\fB--supplements\fR
2ff057
List capabilities supplemented by package(s)
2ff057
.TP
2ff057
\fB--scripts\fR
2ff057
List the package specific scriptlet(s) that are used as part
2ff057
of the installation and uninstallation processes.
2ff057
.TP
2ff057
\fB-s, --state\fR
2ff057
Display the \fIstates\fR of files in the package
2ff057
(implies \fB-l\fR).  The state of each file is one of
2ff057
\fInormal\fR,
2ff057
\fInot installed\fR, or
2ff057
\fIreplaced\fR.
2ff057
.TP
2ff057
\fB--triggers, --triggerscripts\fR
2ff057
Display the trigger scripts, if any, which are contained in
2ff057
the package.
2ff057
.TP
2ff057
\fB--noartifact\fR
2ff057
Don't display artifact files.
2ff057
\fB--noghost\fR
2ff057
Don't display ghost files. Useful in combination with option --list.
2ff057
.TP
2ff057
\fB--noconfig\fR
2ff057
Don't display config files.
2ff057
.TP
2ff057
\fB--xml\fR
2ff057
Format package headers as XML.
2ff057
2ff057
.SS "VERIFY OPTIONS"
2ff057
.PP
2ff057
The general form of an rpm verify command is 
2ff057
.PP
2ff057
2ff057
\fBrpm\fR {\fB-V|--verify\fR} [\fBselect-options\fR] [\fBverify-options\fR]
2ff057
2ff057
.PP
2ff057
Verifying a package compares information about the installed files in
2ff057
the package with information about the files taken from the package
2ff057
metadata stored in the rpm database.  Among other things, verifying
2ff057
compares the size, digest, permissions, type, owner and group of
2ff057
each file.  Any discrepancies are displayed.
2ff057
Files that were not installed from the package, for example,
2ff057
documentation files excluded on installation using the
2ff057
"\fB--excludedocs\fR" option,
2ff057
will be silently ignored.
2ff057
.PP
2ff057
The package selection options are the same as for package
2ff057
querying (including package manifest files as arguments).
2ff057
Other options unique to verify mode are:
2ff057
.TP
2ff057
\fB--nodeps\fR
2ff057
Don't verify dependencies of packages.
2ff057
.TP
2ff057
\fB--nodigest\fR
2ff057
Don't verify package or header digests when reading.
2ff057
.TP
2ff057
\fB--nofiles\fR
2ff057
Don't verify any attributes of package files.
2ff057
.TP
2ff057
\fB--noghost\fR
2ff057
Don't verify ghost files.
2ff057
.TP
2ff057
\fB--noconfig\fR
2ff057
Don't verify config files.
2ff057
.TP
2ff057
\fB--noscripts\fR
2ff057
Don't execute the \fB%verifyscript\fR scriptlet (if any).
2ff057
.TP
2ff057
\fB--nosignature\fR
2ff057
Don't verify package or header signatures when reading.
2ff057
.TP
2ff057
\fB--nolinkto\fR
2ff057
.TP
2ff057
\fB--nofiledigest\fR (formerly \fB--nomd5\fR)
2ff057
.TP
2ff057
\fB--nosize\fR
2ff057
.TP
2ff057
\fB--nouser\fR
2ff057
.TP
2ff057
\fB--nogroup\fR
2ff057
.TP
2ff057
\fB--nomtime\fR
2ff057
.TP
2ff057
\fB--nomode\fR
2ff057
.TP
2ff057
\fB--nordev\fR
2ff057
Don't verify the corresponding file attribute.
2ff057
.TP
2ff057
\fB--nocaps\fR
2ff057
Don't verify file capabilities.
2ff057
.PP
2ff057
The format of the output is a string of 9 characters, a possible
2ff057
attribute marker:
2ff057
2ff057
.nf
2ff057
\fBc\fR \fB%config\fR configuration file.
2ff057
\fBd\fR \fB%doc\fR documentation file.
2ff057
\fBg\fR \fB%ghost\fR file (i.e. the file contents are not included in the package payload).
2ff057
\fBl\fR \fB%license\fR license file.
2ff057
\fBr\fR \fB%readme\fR readme file.
2ff057
.fi
2ff057
2ff057
from the package header, followed by the file name.
2ff057
Each of the 9 characters denotes the result of a comparison of
2ff057
attribute(s) of the file to the value of those attribute(s) recorded
2ff057
in the database.  A single
2ff057
"\fB.\fR" (period)
2ff057
means the test passed, while a single
2ff057
"\fB?\fR" (question mark)
2ff057
indicates the test could not be performed (e.g. file permissions
2ff057
prevent reading). Otherwise, the (mnemonically
2ff057
em\fBB\fRoldened) character denotes failure of
2ff057
the corresponding \fB--verify\fR test:
2ff057
2ff057
.nf
2ff057
\fBS\fR file \fBS\fRize differs
2ff057
\fBM\fR \fBM\fRode differs (includes permissions and file type)
2ff057
\fB5\fR digest (formerly MD\fB5\fR sum) differs
2ff057
\fBD\fR \fBD\fRevice major/minor number mismatch
2ff057
\fBL\fR read\fBL\fRink(2) path mismatch
2ff057
\fBU\fR \fBU\fRser ownership differs
2ff057
\fBG\fR \fBG\fRroup ownership differs
2ff057
\fBT\fR m\fBT\fRime differs
2ff057
\fBP\fR ca\fBP\fRabilities differ
2ff057
.fi
2ff057
2ff057
.SS "MISCELLANEOUS COMMANDS"
2ff057
.PP
2ff057
.TP
2ff057
\fBrpm\fR \fB--showrc\fR
2ff057
shows the values \fBrpm\fR will use for all of the
2ff057
options are currently set in
2ff057
\fIrpmrc\fR and
2ff057
\fImacros\fR
2ff057
configuration file(s).
2ff057
.TP
2ff057
\fBrpm\fR \fB--setperms\fR \fIPACKAGE_NAME\fR
2ff057
sets permissions of files in the given package. Consider using
2ff057
\fB--restore\fR instead.
2ff057
.TP
2ff057
\fBrpm\fR \fB--setugids\fR \fIPACKAGE_NAME\fR
2ff057
sets user/group ownership of files in the given package. This command can
2ff057
change permissions and capabilities of files in that package. In most
2ff057
cases it is better to use \fB--restore\fR instead.
2ff057
.TP
2ff057
\fBrpm\fR \fB--setcaps\fR \fIPACKAGE_NAME\fR
2ff057
sets capabilities of files in the given package. Consider using
2ff057
\fB--restore\fR instead.
2ff057
.TP
2ff057
\fBrpm\fR \fB--restore\fR \fIPACKAGE_NAME\fR
2ff057
The option restores owner, group, permissions and capabilities of files
2ff057
in the given package.
2ff057
.TP
2ff057
Options \fB--setperms\fR, \fB--setugids\fR, \fB--setcaps\fR and
2ff057
\fB--restore\fR are mutually exclusive.
2ff057
2ff057
.SS "FTP/HTTP OPTIONS"
2ff057
.PP
2ff057
\fBrpm\fR can act as an FTP and/or HTTP client so
2ff057
that packages can be queried or installed from the internet.
2ff057
Package files for install, upgrade, and query operations may be
2ff057
specified as an
2ff057
\fBftp\fR or
2ff057
\fBhttp\fR
2ff057
style URL:  
2ff057
.PP
2ff057
ftp://USER:PASSWORD@HOST:PORT/path/to/package.rpm
2ff057
.PP
2ff057
If the \fB:PASSWORD\fR portion is omitted, the password will be
2ff057
prompted for (once per user/hostname pair). If both the user and
2ff057
password are omitted, anonymous \fBftp\fR is used.
2ff057
In all cases, passive (PASV) \fBftp\fR transfers are
2ff057
performed.
2ff057
.PP
2ff057
\fBrpm\fR allows the following options to be used with
2ff057
ftp URLs:
2ff057
.TP
2ff057
\fB--ftpproxy \fIHOST\fB\fR
2ff057
The host \fIHOST\fR will be used as a proxy server
2ff057
for all ftp transfers, which allows users to ftp through firewall
2ff057
machines which use proxy systems. This option may also be specified
2ff057
by configuring the macro \fB%_ftpproxy\fR.
2ff057
.TP
2ff057
\fB--ftpport \fIPORT\fB\fR
2ff057
The TCP \fIPORT\fR number to use for
2ff057
the ftp connection on the proxy ftp server instead of the default
2ff057
port. This option may also be specified by configuring the macro
2ff057
\fB%_ftpport\fR.
2ff057
.PP
2ff057
\fBrpm\fR allows the following options to be used with
2ff057
\fBhttp\fR URLs:
2ff057
.TP
2ff057
\fB--httpproxy \fIHOST\fB\fR
2ff057
The host \fIHOST\fR will be used as
2ff057
a proxy server for all \fBhttp\fR transfers. This
2ff057
option may also be specified by configuring the macro
2ff057
\fB%_httpproxy\fR.
2ff057
.TP
2ff057
\fB--httpport \fIPORT\fB\fR
2ff057
The TCP \fIPORT\fR number to use for the
2ff057
\fBhttp\fR connection on the proxy http server instead
2ff057
of the default port. This option may also be specified by configuring
2ff057
the macro \fB%_httpport\fR.
2ff057
.SH "LEGACY ISSUES"
2ff057
.SS "Executing rpmbuild"
2ff057
.PP
2ff057
The build modes of rpm are now resident in the \fI/usr/bin/rpmbuild\fR 
2ff057
executable. 
2ff057
Install the package containing \fBrpmbuild\fR (usually \fBrpm-build\fR) and see
2ff057
\fBrpmbuild\fR(8) for documentation of all the \fBrpm\fR build modes.
2ff057
.SH "FILES"
2ff057
.SS "rpmrc Configuration"
2ff057
.PP
2ff057
.nf
2ff057
\fI/usr/lib/rpm/rpmrc\fR
2ff057
\fI/usr/lib/rpm/redhat/rpmrc\fR
2ff057
\fI/etc/rpmrc\fR
2ff057
\fI~/.rpmrc\fR
2ff057
.fi
2ff057
.SS "Macro Configuration"
2ff057
.PP
2ff057
.nf
2ff057
\fI/usr/lib/rpm/macros\fR
2ff057
\fI/usr/lib/rpm/redhat/macros\fR
2ff057
\fI/etc/rpm/macros\fR
2ff057
\fI~/.rpmmacros\fR
2ff057
.fi
2ff057
.SS "Database"
2ff057
.PP
2ff057
.nf
2ff057
\fI/var/lib/rpm/Basenames\fR
2ff057
\fI/var/lib/rpm/Conflictname\fR
2ff057
\fI/var/lib/rpm/Dirnames\fR
2ff057
\fI/var/lib/rpm/Group\fR
2ff057
\fI/var/lib/rpm/Installtid\fR
2ff057
\fI/var/lib/rpm/Name\fR
2ff057
\fI/var/lib/rpm/Obsoletename\fR
2ff057
\fI/var/lib/rpm/Packages\fR
2ff057
\fI/var/lib/rpm/Providename\fR
2ff057
\fI/var/lib/rpm/Requirename\fR
2ff057
\fI/var/lib/rpm/Sha1header\fR
2ff057
\fI/var/lib/rpm/Sigmd5\fR
2ff057
\fI/var/lib/rpm/Triggername\fR
2ff057
.fi
2ff057
.SS "Temporary"
2ff057
.PP
2ff057
\fI/var/tmp/rpm*\fR
2ff057
.SH "SEE ALSO"
2ff057
2ff057
.nf
2ff057
\fBrpm-misc(8)\fR(3),
2ff057
\fBpopt\fR(3),
2ff057
\fBrpm2cpio\fR(8),
2ff057
\fBrpmbuild\fR(8),
2ff057
\fBrpmdb\fR(8),
2ff057
\fBrpmkeys\fR(8),
2ff057
\fBrpmsign\fR(8),
2ff057
\fBrpmspec\fR(8),
2ff057
.fi
2ff057
2ff057
\fBrpm --help\fR - as rpm supports customizing the options via popt aliases 
2ff057
it's impossible to guarantee that what's described in the manual matches 
2ff057
what's available.
2ff057
2ff057
2ff057
\fBhttp://www.rpm.org/ <URL:http://www.rpm.org/>
2ff057
\fR
2ff057
.SH "AUTHORS"
2ff057
2ff057
.nf
2ff057
Marc Ewing <marc@redhat.com>
2ff057
Jeff Johnson <jbj@redhat.com>
2ff057
Erik Troan <ewt@redhat.com>
2ff057
.fi