Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
rpmbuild(8)
Edit
PageHistory
Diff
Info
LikePages
RPM !!!RPM NAME SYNOPSIS DESCRIPTION FILES SEE ALSO AUTHORS ---- !!NAME rpm - RPM Package Manager !!SYNOPSIS __QUERYING AND VERIFYING PACKAGES:__ __rpm__ {__-q|--query__} [[__select-options__] [[__query-options__] __rpm__ {__-V|--verify__} [[__select-options__] [[__--nodeps__] [[__--nofiles__] [[__--nomd5__] [[__--noscripts__] __rpm__ {__-K|--checksig__} [[__--nogpg__] [[__--nopgp__] [[__--nomd5__] ''PACKAGE_FILE ...'' __INSTALLING, UPGRADING, AND REMOVING PACKAGES:__ __rpm__ {__-i|--install__} [[__install-options__] ''PACKAGE_FILE ...'' __rpm__ {__-U|--upgrade__} [[__install-options__] ''PACKAGE_FILE ...'' __rpm__ {__-F|--freshen__} [[__install-options__] ''PACKAGE_FILE ...'' __rpm__ {__-e|--erase__} [[__--allmatches__] [[__--nodeps__] [[__--noscripts__] [[__--notriggers__] [[__--repackage__] [[__--test__] ''PACKAGE_NAME ...'' __BUILDING PACKAGES:__ __rpm__ {__-ba|-bb|-bp|-bc|-bi|-bl|-bs__} [[__build-options__] ''SPECFILE ...'' __rpm__ {__-ta|-tb|-tp|-tc|-ti|-tl|-ts__} [[__build-options__] ''TARBALL ...'' __rpm__ {__--rebuild|--recompile__} ''SOURCEPKG ...'' __MISCELLANEOUS:__ __rpm__ {__--initdb|--rebuilddb__} __rpm__ {__--addsign|--resign__} ''PACKAGE_FILE ...'' __rpm__ {__--querytags|--showrc__} __rpm__ {__--setperms|--setugids__} ''PACKAGE_NAME ...'' __SELECT-OPTIONS__ __[[__''PACKAGE_NAME''__] [[-a,--all] [[-f,--file__ ''FILE''__] [[-g,--group__ ''GROUP''__] [[-p,--package__ ''PACKAGE_FILE''__] [[--querybynumber__ ''NUMBER''__] [[--triggeredby__ ''PACKAGE_NAME''__] [[--whatprovides__ ''CAPABILITY''__] [[--whatrequires__ ''CAPABILITY''__]__ __QUERY-OPTIONS__ __[[--changelog] [[-c,--configfiles] [[-d,--docfiles] [[--dump] [[--filesbypkg] [[-i,--info] [[--last] [[-l,--list] [[--provides] [[--qf,--queryformat__ ''QUERYFMT''__] [[-R,--requires] [[--scripts] [[-s,--state] [[--triggers,--triggerscripts]__ __INSTALL-OPTIONS__ __[[--allfiles] [[--badreloc] [[--excludepath__ ''OLDPATH''__] [[--excludedocs] [[--force] [[-h,--hash] [[--ignoresize] [[--ignorearch] [[--ignoreos] [[--includedocs] [[--justdb] [[--nodeps] [[--noorder] [[--noscripts] [[--notriggers] [[--oldpackage] [[--percent] [[--prefix__ ''NEWPATH''__] [[--relocate__ ''OLDPATH''__=__''NEWPATH''__] [[--repackage] [[--replacefiles] [[--replacepkgs] [[--test]__ __BUILD-OPTIONS__ __[[--buildroot__ ''DIRECTORY''__] [[--clean] [[--nobuild] [[--rmsource] [[--rmspec] [[--short-circuit] [[--sign] [[--target__ ''PLATFORM''__]__ !!DESCRIPTION __rpm__ is a powerful __Package Manager__, which can be used to build, install, query, verify, update, and erase individual software packages. A __package__ consists of an archive of files and meta-data used to install and erase the archive files. The meta-data includes helper scripts, file attributes, and descriptive information about the package. __Packages__ come in two varieties: binary packages, used to encapsulate software to be installed, and source packages, containing the source code and recipe necessary to produce binary packages. One of the following basic modes must be selected: __Query__, __Verify__, __Signature Check__, __Install/Upgrade/Freshen__, __Uninstall__, __Build Package__, __Build Package from Tarball__, __Recompile Package__, __Initialize Database__, __Rebuild Database__, __Resign__, __Add Signature__, __Set Owners/Groups__, __Show Querytags__, and __Show Configuration__. __GENERAL OPTIONS__ These options can be used in all the different modes. __-?, --help__ Print a longer usage message then normal. __--version__ Print a single line containing the version number of __rpm__ being used. __--quiet__ Print as little as possible - normally only error messages will be displayed. __-v__ Print verbose information - normally routine progress messages will be displayed. __-vv__ Print lots of ugly debugging information. __--rcfile__ ''FILELIST'' Each of the files in the colon separated ''FILELIST'' is read sequentially by __rpm__ for configuration information. Only the first file in the list must exist, and tildes will be expanded to the value of __$HOME__. The default ''FILELIST'' is ''/usr/lib/rpm/rpmrc'':''/etc/rpmrc'':''~/.rpmrc''. __--pipe__ ''CMD'' Pipes the output of __rpm__ to the command ''CMD''. __--dbpath__ ''DIRECTORY'' Use the database in ''DIRECTORY'' rathen than the default path ''/var/lib/rpm'' __--root__ ''DIRECTORY'' Use the system rooted at ''DIRECTORY'' for all operations. Note that this means the database will be read or modified under ''DIRECTORY'' and any __%pre__ or __%post__ scriptlet(s) are run after a chroot(2) to ''DIRECTORY''. __INSTALL AND UPGRADE OPTIONS__ The general form of an rpm install command is __rpm__ {__-i|--install__} [[__install-options__] ''PACKAGE_FILE ...'' This installs a new package. The general form of an rpm upgrade command is __rpm__ {__-U|--upgrade__} [[__install-options__] ''PACKAGE_FILE ...'' This upgrades or installs the package currently installed to a newer version. This is the same as install, except all other version(s) of the package are removed after the new package is installed. __rpm__ {__-F|--freshen__} [[__install-options__] ''PACKAGE_FILE ...'' This will upgrade packages, but only if an earlier version currently exists. The ''PACKAGE_FILE'' may be specified as an __ftp__ or __http__ URL, in which case the package will be downloaded before being installed. See __FTP/HTTP OPTIONS__ for information on __rpm__'s internal __ftp__ and __http__ client support. __--allfiles__ Installs or upgrades all the missingok files in the package, regardless if they exist. __--badreloc__ Used with __--relocate__, permit relocations on all file paths, not just those ''OLDPATH'''s included in the binary package relocation hint(s). __--excludepath__ ''OLDPATH'' Don't install files whose name begins with ''OLDPATH''. __--excludedocs__ Don't install any files which are marked as documentation (which includes man pages and texinfo documents). __--force__ Same as using __--replacepkgs__, __--replacefiles__, and __--oldpackage__. __-h, --hash__ Print 50 hash marks as the package archive is unpacked. Use with __-v|--verbose__ for a nicer display. __--ignoresize__ Don't check mount file systems for sufficient disk space before installing this package. __--ignorearch__ Allow installation or upgrading even if the architectures of the binary package and host don't match. __--ignoreos__ Allow installation or upgrading even if the operating systems of the binary package and host don't match. __--includedocs__ Install documentation files. This is the default behavior. __--justdb__ Update only the database, not the filesystem. __--nodeps__ Don't do a dependency check before installing or upgrading a package. __--noorder__ Don't reorder the packages for an install. The list of packages would normally be reordered to satisfy dependancies. __--noscripts__ __--nopre__ __--nopost__ __--nopreun__ __--nopostun__ Don't execute the scriptlet of the same name. The __--noscripts__ option is equivalent to __--nopre --nopost --nopreun --nopostun__ and turns off the execution of the corresponding __%pre__, __%post__, __%preun__, and __%postun__ scriptlet(s). __--notriggers__ __--notriggerin__ __--notriggerun__ __--notriggerpostun__ Don't execute any trigger scriptlet of the named type. The __--notriggers__ option is equivalent to __--notriggerin --notriggerun --notriggerpostun__ and turns off execution of the corresponding __%triggerin__, __%triggerun__, and __%triggerpostun__ scriptlet(s). __--oldpackage__ Allow an upgrade to replace a newer package with an older one. __--percent__ Print percentages as files are unpacked from the package archive. This is intended to make __rpm__ easy to run from other tools. __--prefix__ ''NEWPATH'' For relocateable binary packages, translate all file paths that start with the installation prefix in the package relocation hint(s) to ''NEWPATH''. __--relocate__ ''OLDPATH''__=__''NEWPATH'' For relocatable binary packages, translate all file paths that start with ''OLDPATH'' in the package relocation hint(s) to ''NEWPATH''. This option can be used repeatedly if several ''OLDPATH'''s in the package are to be relocated. __--repackage__ Re-package the files before erasing. The previously installed package will be named according to the macro __%_repackage_name_fmt__ and will be created in the directory named by the macro __%_repackage_dir__ (default value is ''/var/tmp''). __--replacefiles__ Install the packages even if they replace files from other, already installed, packages. __--replacepkgs__ Install the packages even if some of them are already installed on this system. __--nobuild__ Do not install the package, simply check for and report potential conflicts. __QUERY OPTIONS__ The general form of an rpm query command is __rpm__ {__-q|--query__} [[__select-options__] [[__query-options__] You may specify the format that package information should be printed in. To do this, you use the {__--qf|--queryformat__} ''QUERYFMT'' option, followed by the ''QUERYFMT'' format string. Query formats are modifed versions of the standard __printf(3)__ formatting. The format is made up of static strings (which may include standard C character escapes for newlines, tabs, and other special characters) and __printf(3)__ type formatters. As __rpm__ already knows the type to print, the type specifier must be omitted however, and replaced by the name of the header tag to be printed, enclosed by __{}__ characters. Tag names are case insesitive, and the __RPMTAG___ portion of the tag name may be omitted as well. Alternate output formats may be requested by following the tag with __:__''typetag''. Currently, the following types are supported: __octal__, __date__, __shescape__, __perms__, __fflags__, and __depflags__. For example, to print only the names of the packages queried, you could use __%{NAME}__ as the format string. To print the packages name and distribution information in two columns, you could use __%-30{NAME}%{DISTRIBUTION}__. __rpm__ will print a list of all of the tags it knows about when it is invoked with the __--querytags__ argument. There are two subsets of options for querying: package selection, and information selection. __PACKAGE SELECTION OPTIONS:__ ''PACKAGE_NAME'' Query installed package named ''PACKAGE_NAME''. __-a, --all__ Query all installed packages. __-f, --file__ ''FILE'' Query package owning ''FILE''. __-g, --group__ ''GROUP'' Query packages with the group of ''GROUP''. __-p, --package__ ''PACKAGE_FILE'' Query an (uninstalled) package ''PACKAGE_FILE''. The ''PACKAGE_FILE'' may be specified as an __ftp__ or __http__ style URL, in which case the package header will be downloaded and queried. See __FTP/HTTP OPTIONS__ for information on __rpm__'s internal __ftp__ and __http__ client support. The ''PACKAGE_FILE'' argument(s), if not a binary package, will be interpreted as an ASCII package manifest. Comments are permitted, starting with a '#', and each line of a package manifest file may include white space seperated glob expressions, including URL's with remote glob expressions, that will be expanded to paths that are substituted in place of the package manifest as additional ''PACKAGE_FILE'' arguments to the query. __--querybynumber__ ''NUMBER'' Query the ''NUMBER''th database entry directly; this is useful only for debugging. __--specfile__ ''SPECFILE'' Parse and query ''SPECFILE'' as if it were a package. Although not all the information (e.g. file lists) is available, this type of query permits rpm to be used to extract information from spec files without having to write a specfile parser. __--triggeredby__ ''PACKAGE_NAME'' Query packages that are triggered by package(s) ''PACKAGE_NAME''. __--whatprovides__ ''CAPABILITY'' Query all packages that provide the ''CAPABILITY'' capability. __--whatrequires__ ''CAPABILITY'' Query all packages that requires ''CAPABILITY'' for proper functioning. __PACKAGE QUERY OPTIONS:__ __--changelog__ Display change information for the package. __-c, --configfiles__ List only configuration files (implies __-l__). __-d, --docfiles__ List only documentation files (implies __-l__). __--dump__ Dump file information as follows: path size mtime md5sum mode owner group isconfig isdoc rdev symlink This option must be used with at least one of __-l__, __-c__, __-d__. __--filesbypkg__ List all the files in each selected package. __-i, --info__ Display package information, including name, version, and description. This uses the __--queryformat__ if one was specified. __--last__ Orders the package listing by install time such that the latest packages are at the top. __-l, --list__ List files in package. __--provides__ List capabilities this package provides. __-R, --requires__ List packages on which this package depends. __--scripts__ List the package specific scriptlet(s) that are used as part of the installation and uninstallation processes. __-s, --state__ Display the ''states'' of files in the package (implies __-l__). The state of each file is one of ''normal'', ''not installed'', or ''replaced''. __--triggers, --triggerscripts__ Display the trigger scripts, if any, which are contained in the package. __VERIFY OPTIONS__ The general form of an rpm verify command is __rpm__ {__-V|--verify__} [[__select-options__] [[__--nodeps__] [[__--nofiles__] [[__--nomd5__] [[__--noscripts__] Verifying a package compares information about the installed files in the package with information about the files taken from the package metadata stored in the rpm database. Among other things, verifying compares the size, MD5 sum, permissions, type, owner and group of each file. Any discrepencies are displayed. Files that were not installed from the package, for example, documentation files excluded on installation using the --excludedocs__ __ The package selection options are the same as for package querying (including package manifest files as arguments). Other options that can be used only in verify mode are: __--nodeps__ Don't verify dependencies. __--nofiles__ Don't verify files. __--nomd5__ Don't verify file MD5 checksums. __--noscripts__ Don't execute the __%verifyscript__ scriptlet (if any). The format of the output is a string of 8 characters, a possible c__ __.__ __?__ __B__oldened) character denotes failure of the corresponding __--verify__ test: __S__ file __S__ize differs __M M__ode differs (includes permissions and file type) __5__ MD__5__ sum differs __D D__evice major/minor number mis-match __L__ read__L__ink(2) path mis-match __U U__ser ownership differs __G G__roup ownership differs __T__ m__T__ime differs __SIGNATURE CHECKING__ The general form of an rpm signature check command is __rpm --checksig__ [[__--nogpg__] [[__--nopgp__] [[__--nomd5__] ''PACKAGE_FILE ...'' This checks the GPG signature of package ''PACKAGE_FILE'' to ensure its integrity and origin. GPG configuration information is read from configuration files. See the section on GPG SIGNATURES for details. __ERASE OPTIONS__ The general form of an rpm erase command is __rpm__ {__-e|--erase__} [[__--allmatches__] [[__--nodeps__] [[__--noscripts__] [[__--notriggers__] [[__--repackage__] [[__--test__] ''PACKAGE_NAME ...'' The following options may also be used: __--allmatches__ Remove all versions of the package which match ''PACKAGE_NAME''. Normally an error is issued if ''PACKAGE_NAME'' matches multiple packages. __--nodeps__ Don't check dependencies before uninstalling the packages. __--noscripts__ __--nopreun__ __--nopostun__ Don't execute the scriptlet of the same name. The __--noscripts__ option during package erase is equivalent to __--nopreun --nopostun__ and turns off the execution of the corresponding __%preun__, and __%postun__ scriptlet(s). __--notriggers__ __--notriggerun__ __--notriggerpostun__ Don't execute any trigger scriptlet of the named type. The __--notriggers__ option is equivalent to __--notriggerun --notriggerpostun__ and turns off execution of the corresponding __%triggerun__, and __%triggerpostun__ scriptlet(s). __--repackage__ Re-package the files before erasing. The previously installed package will be named according to the macro __%_repackage_name_fmt__ and will be created in the directory named by the macro __%_repackage_dir__ (default value is ''/var/tmp''). __--test__ Don't really uninstall anything, just go through the motions. Useful in conjunction with the __-vv__ option for debugging. __BUILD OPTIONS__ The general form of an rpm build command is __rpm__ {__-b__''STAGE''__|-t__''STAGE''} [[__build-options__] ''FILE ...'' The argument used is __-b__ if a spec file is being used to build the package and __-t__ if __rpm__ should look inside of a (possibly compressed) tar file for the spec file to use. After the first argument, the next character (''STAGE'') specifies the stages of building and packaging to be done and is one of: __-ba__ Build binary and source packages (after doing the %prep, %build, and %install stages). __-bb__ Build a binary package (after doing the %prep, %build, and %install stages). __-bp__ Executes the __-bc__ Do the __-bi__ Do the __-bl__ Do a __-bs__ Build just the source package. The following options may also be used: __--buildroot__ ''DIRECTORY'' When building a package, override the !BuildRoot tag with directory ''DIRECTORY''. __--clean__ Remove the build tree after the packages are made. __--nobuild__ Do not execute any build stages. Useful for testing out spec files. __--rmsource__ Remove the sources after the build (may also be used standalone, e.g. rpm --rmsource foo.spec____ __--rmspec__ Remove the spec file after the build (may also be used standalone, eg. rpm --rmspec foo.spec____ __--short-circuit__ Skip straight to specified stage (i.e., skip all stages leading up to the specified stage). Only valid with __-bc__ and __-bi__. __--sign__ Embed a GPG signature in the package. This signature can be used to verify the integrity and the origin of the package. See the section on GPG SIGNATURES for configuration details. __--target__ ''PLATFORM'' When building the package, interpret ''PLATFORM'' as __arch-vendor-os__ and set the macros __%_target__, __%_target_arch__, and __%_target_os__ accordingly. __REBUILD AND RECOMPILE OPTIONS__ There are two other ways to invoke building with rpm: __rpm__ {__--rebuild|--recompile__} ''SOURCEPKG ...'' When invoked this way, __rpm__ installs the named source package, and does a prep, compile and install. In addition, __--rebuild__ builds a new binary package. When the build has completed, the build directory is removed (as in __--clean__) and the the sources and spec file for the package are removed. __SIGNING A PACKAGE__ __rpm__ {__--addsign|--resign__} ''PACKAGE_FILE ...'' The __--addsign__ option generates and inserts new signatures for each package. Any existing signatures will be discarded. The __--resign__ option generates and appends signatures for the listed packages while preserving the existing signatures. __GPG SIGNATURES__ In order to use the signature feature, __rpm__ must be configured to run GPG and be able to find a public key ring with Red Hat (or other vendor) public keys. By default, __rpm__ uses the same conventions as GPG to find key rings, namely the __$GPGPATH__ environment variable. If your key rings are not located where GPG expects them to be, you will need to configure the macro __%_gpg_path__ to be the location of the GPG key rings to use. If you want to be able to sign packages you create yourself, you also need to create your own public and secret key pair (see the GPG manual). You will also need to configure the macros __%_signature__ The signature type. Right now only gpg and pgp are supported. __%_gpg_name__ The name of the When building packages you then add __--sign__ to the command line. You will be prompted for your pass phrase, and your package will be built and signed. For example, to be able to use GPG to sign packages as the user '' '' from the key rings located in ''/etc/rpm/.gpg'' using the executable ''/usr/bin/gpg'' you would include %_signature gpg %_gpg_path /etc/rpm/.gpg %_gpg_name John Doe in a macro configuration file. Use ''/etc/rpm/macros'' for per-system configuration and ''~/.rpmmacros'' for per-user configuration. __REBUILD DATABASE OPTIONS__ The general form of an rpm rebuild database command is __rpm__ {__--initdb|--rebuilddb__} [[__-v__] [[__--dbpath__ ''DIRECTORY''] [[__--root__ ''DIRECTORY''] Use __--initdb__ to create a new database, use __--rebuilddb__ to rebuild the database indices from the installed package headers. __SHOWRC__ The command __rpm --showrc__ shows the values __rpm__ will use for all of the options are currently set in ''rpmrc'' and ''macros'' configuration file(s). __FTP/HTTP OPTIONS__ __rpm__ can act as an FTP and/or HTTP client so that packages can be queried or installed from the internet. Package files for install, upgrade, and query operations may be specified as an __ftp__ or __http__ style URL: ftp://USER:PASSWORD@HOST:PORT/path/to/package.rpm If the __:PASSWORD__ portion is omitted, the password will be prompted for (once per user/hostname pair). If both the user and password are omitted, anonymous __ftp__ is used. In all cases, passive (PASV) __ftp__ transfers are performed. __rpm__ allows the following options to be used with ftp URLs: __--ftpproxy__ ''HOST'' The host ''HOST'' will be used as a proxy server for all ftp transfers, which allows users to ftp through firewall machines which use proxy systems. This option may also be specified by configuring the macro __%_ftpproxy__. __--ftpport__ ''HOST'' The TCP ''PORT'' number to use for the ftp connection on the proxy ftp server instead of the default port. This option may also be specified by configuring the macro __%_ftpport__. __rpm__ allows the following options to be used with __http__ URLs: __--httpproxy__ ''HOST'' The host ''HOST'' will be used as a proxy server for all __http__ transfers. This option may also be specified by configuring the macro __%_httpproxy__. __--httpport__ ''PORT'' The TCP ''PORT'' number to use for the __http__ connection on the proxy http server instead of the default port. This option may also be specified by configuring the macro __%_httpport__. !!FILES ''/usr/lib/rpm/rpmrc'' ''/etc/rpmrc'' ''~/.rpmrc'' ''/usr/lib/rpm/macros'' ''/etc/rpm/macros'' ''~/.rpmmacros'' ''/var/lib/rpm/Conflictname'' ''/var/lib/rpm/Basenames'' ''/var/lib/rpm/Group'' ''/var/lib/rpm/Name'' ''/var/lib/rpm/Packages'' ''/var/lib/rpm/Providename'' ''/var/lib/rpm/Requirename'' ''/var/lib/rpm/Triggername'' ''/var/tmp/rpm*'' !!SEE ALSO popt(3), rpm2cpio(8), rpmbuild(8), __http://www.rpm.org/__ !!AUTHORS Marc Ewing Jeff Johnson Erik Troan ----
9 pages link to
rpmbuild(8)
:
Man8r
rpm(8)
rpmdb(8)
rpme(8)
rpmi(8)
rpmquery(8)
rpmsign(8)
rpmu(8)
rpmverify(8)
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.