RPM Quick Reference

From MediaWiki
Revision as of 09:26, 24 April 2007 by Paul Blankenbaker (talk | contribs) (How to find the architecture of a RPM package)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Showing the Architecture

It is not easy to determine a RPM package architecture using the rpm command. You need to create a custom RPM format to see this information.

Using --queryformat to Show Architecture
[root@taco ~]# rpm -q --queryformat "%{NAME}-%{VERSION}.%{ARCH}\n" coreutils
coreutils-5.97.i386
[root@taco ~]# rpm -q --queryformat "%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n" kernel
kernel-2.6.20-1.2933.fc6.i686
kernel-2.6.20-1.2944.fc6.i686
[root@taco ~]#

The --queryformat FORMAT option is a powerful feature included with the RPM toolset. For details on the various format specifiers, see: "http://www.rpm.org/max-rpm/ch-queryformat-tags.html", or run the following command:

Using --querytags to Show --queryformat Options
[root@taco ~]# rpm --querytags | sort
ARCH
ARCHIVESIZE
BASENAMES
BUILDARCHS
BUILDHOST
BUILDTIME
C
CACHECTIME
CACHEPKGMTIME
CACHEPKGPATH
CACHEPKGSIZE
CHANGELOGNAME
CHANGELOGTEXT
CHANGELOGTIME
CLASSDICT
CONFLICTFLAGS
CONFLICTNAME
CONFLICTS
CONFLICTVERSION
COOKIE
COPYRIGHT
CVSID
D
DEPENDSDICT
DESCRIPTION
DIRINDEXES
DIRNAMES
DISTRIBUTION
DISTTAG
DISTURL
DSAHEADER
E
ENHANCESFLAGS
ENHANCESNAME
ENHANCESVERSION
EPOCH
EXCLUDEARCH
EXCLUDEOS
EXCLUSIVEARCH
EXCLUSIVEOS
FILECLASS
FILECOLORS
FILECONTEXTS
FILEDEPENDSN
FILEDEPENDSX
FILEDEVICES
FILEFLAGS
FILEGROUPNAME
FILEINODES
FILELANGS
FILELINKTOS
FILEMD5S
FILEMODES
FILEMTIMES
FILENAMES
FILEPROVIDE
FILERDEVS
FILEREQUIRE
FILESIZES
FILESTATES
FILEUSERNAME
FILEVERIFYFLAGS
FSCONTEXTS
FSNAMES
FSSIZES
GIF
GROUP
HDRID
HEADERI18NTABLE
HEADERIMAGE
HEADERIMMUTABLE
HEADERREGIONS
HEADERSIGNATURES
ICON
INSTALLCOLOR
INSTALLPREFIX
INSTALLTID
INSTALLTIME
INSTPREFIXES
LICENSE
N
NAME
O
OBSOLETEFLAGS
OBSOLETENAME
OBSOLETES
OBSOLETEVERSION
OLDFILENAMES
OPTFLAGS
OS
P
PACKAGER
PATCH
PATCHESFLAGS
PATCHESNAME
PATCHESVERSION
PAYLOADCOMPRESSOR
PAYLOADFLAGS
PAYLOADFORMAT
PKGID
PLATFORM
POLICIES
POSTIN
POSTINPROG
POSTTRANS
POSTTRANSPROG
POSTUN
POSTUNPROG
PREFIXES
PREIN
PREINPROG
PRETRANS
PRETRANSPROG
PREUN
PREUNPROG
PRIORITY
PROVIDEFLAGS
PROVIDENAME
PROVIDES
PROVIDEVERSION
PUBKEYS
R
RECONTEXTS
RELEASE
REMOVETID
REQUIREFLAGS
REQUIRENAME
REQUIRES
REQUIREVERSION
RHNPLATFORM
RPMVERSION
RSAHEADER
SERIAL
SHA1HEADER
SIGGPG
SIGMD5
SIGPGP
SIGSIZE
SIZE
SOURCE
SOURCEPACKAGE
SOURCEPKGID
SOURCERPM
SUGGESTSFLAGS
SUGGESTSNAME
SUGGESTSVERSION
SUMMARY
SVNID
TRIGGERCONDS
TRIGGERFLAGS
TRIGGERINDEX
TRIGGERNAME
TRIGGERSCRIPTPROG
TRIGGERSCRIPTS
TRIGGERTYPE
TRIGGERVERSION
URL
V
VENDOR
VERIFYSCRIPT
VERIFYSCRIPTPROG
VERSION
XPM
[root@taco ~]#