rpm(8) System Manager's Manual rpm(8) rpm - RPM rpm {-q|--query} [select-options] [query-options] rpm --querytags rpm {-V|--verify} [select-options] [verify-options] rpm {-i|--install} [install-options] PACKAGE_FILE ... rpm {-U|--upgrade} [install-options] PACKAGE_FILE ... rpm {-F|--freshen} [install-options] PACKAGE_FILE ... rpm {--reinstall} [install-options] PACKAGE_FILE ... rpm {-e|--erase} [--allmatches] [--nodeps] [--noscripts] [--notriggers] [--test] PACKAGE_NAME ... rpm --showrc rpm --setperms PACKAGE_NAME ... rpm --setugids PACKAGE_NAME ... [PACKAGE_NAME] [-a,--all] [-f,--file FILE] [-g,--group GROUP] {-p,--package PACKAGE_FILE] [--hdrid SHA1] [--pkgid MD5] [--tid TID] [--querybynumber HDRNUM] [--triggeredby PACKAGE_NAME] [--whatprovides CAPABILITY] [--whatrequires CAPABILITY] [--changelog] [-c,--configfiles] [--conflicts] [-d,--docfiles] [--dump] [--filesbypkg] [-i,--info] [--last] [-l,--list] [--obsoletes] [--provides] [--qf,--queryformat QUERYFMT] [-R,--requires] [--scripts] [-s,--state] [--triggers,--triggerscripts] [--nodeps] [--nofiles] [--noscripts] [--nodigest] [--nosignature] [--nolinkto] [--nofiledigest] [--nosize] [--nouser] [--nogroup] [--nomtime] [--nomode] [--nordev] [--nocaps] [--allfiles] [--badreloc] [--excludepath OLDPATH] [--excludedocs] [--force] [-h,--hash] [--ignoresize] [--ignorearch] [--ignoreos] [--includedocs] [--justdb] [--nocollections] [--nodeps] [--nodigest] [--nosignature] [--noorder] [--noscripts] [--notriggers] [--oldpackage] [--percent] [--prefix NEWPATH] [--relocate OLDPATH=NEWPATH] [--replacefiles] [--replacepkgs] [--test] rpm : , , , , TarRPM, , , , , , , , , , . . -vv . --quiet - . --help . --version rpm --rcfile , , rpm . /usr/lib/rpm/rpmrc:/etc/rpmrc:~/.rpmrc. (/usr/lib/rpm/rpmrc) , ~$HOME. --root . , prepostchroot() . --dbpath RPM. --justdb ,. --ftpproxy , --httpproxy FTPHTTP. FTP/HTTP . --ftpport , --httpport FTPHTTP. FTP/HTTP . --pipe rpm. rpm: rpm -i [install-options] + . rpm: rpm -U [install-options] + RPM. , . rpm [-F|--freshen] [install-options] + , . , ftphttp URL. RPMftphttp, FTP/HTTP . --force --replacepkgs, --replacefiles, --oldpackage -h, --hash , 50. -v . --oldpackage . --percent . rpm . --replacefiles , . --replacepkgs ,. --allfiles ,. --nodeps . --noscripts --notriggers --ignoresize mount. --excludepath . --excludedocs (). --includedocs , . --test , . --ignorearch RPM. --ignoreos RPM. --prefix , . --relocate = , . --badreloc --relocate, . --noorder , , . rpm: rpm -q [query-options] , [--queryformat|-qf], . printf(3). (, tab, C), printf(3). rpm, , tag, {}. tagRPMTAG_. :typetag.:octal, date, shescape, perms, fflags, depflags. ,,%{}. ,%-30{}%{}. --querytags,rpmtags. : . : . -a, --all . --whatrequires . --whatprovides . -f , --file . -g , --group ??? -p . ftphttp URL,. RPMftphttp,FTP/HTTP OPTIONS --specfile Parse. (), rpmspecfile parserspec files. --querybynumber ,. --triggeredby . : -i ,,,.??? -R, --requires . --provides . --changelog . -l, --list . -s, --state ,-l. : normal, not installed, replaced. -d, --docfiles (-l). -c, --configfiles (-l). --scripts ,shell. --triggers, --triggerscripts ,. --dump : path size mtime md5sum mode owner group isconfig isdoc rdev symlink. :-l, -c, -d. --last ,. --querybypkg . --triggerscripts . rpm -V|-y|--verify [verify-options] rpm, . ,??? .. ,"--excludedocs" ,. : --nofiles --nomd5 MD5 --nopgp PGP --nofiles ,"c", ,. RPM. "."().: 5 MD5 S L T D U G M () rpm: rpm --checksig + PGP. PGP. PGP . rpm: rpm -e + --allmatches .,,. --noscripts . --notriggers --nodeps --test ,.-vv. The general form of an rpm build command is rpm -[b|t]O [build-options] + 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 gzipped (or compressed) tar file for the spec file to use. After the first argument, the next argument (O) specifies the stages of building and packaging to be done and is one of: rpm: rpm -[b|t]O [build-options] + -bp Executes the "%prep" stage from the spec file. Normally this involves unpacking the sources and applying any patches. -bl Do a "list check". The "%files" section from the spec file is macro expanded, and checks are made to verify that each file exists. -bc Do the "%build" stage from the spec file (after doing the prep stage). This generally involves the equivalent of a "make". -bi Do the "%install" stage from the spec file (after doing the prep and build stages). This generally involves the equivalent of a "make install". -bb (prep, build, install) -bs (prep, build, install) -ba (prep, build, install) : --short-circuit specified(,specified). -bc -bi. --timecheck "timecheck"(0-?)."_timecheck". timecheck,., . --clean ,. --rmsource spec (,:"rpm --rmsource foo.spec"). --test .spec. --sign PGP.. PGP . --buildroot ,tag. --target ,arch-vendor- os, _target, _target_arch _target_os. --buildarch ,architecture. RPM 3.0--target. --buildos ,architecture. RPM 3.0--target. There are two other ways to invoke building with rpm: rpm: rpm --recompile + rpm --rebuild + ,rpm,prep,compile,install. ,--rebuild. ,(--clean), spec. RPM rpm --resign + .. rpm --addsign + . PGP ,RPMPGP(PGP), PGPRPM. ,RPMPGP(PGPPATH). PGP, _pgp_path PGP. ,(PGP). : _signature pgp.: _pgp_name . ,--sign., . ,"John Doe ", /etc/rpm/.pgp,, %_signature pgp %_pgp_name /etc/rpm/.pgp %_pgp_name John Doe " . /etc/rpm/macros, ~/.rpmmacros. rpm rpm --rebuilddb ,: rpm --initdb --dbpath --root. SHOWRC rpm --showrc rpmrc,RPM. FTP/HTTP RPMFTPHTTP,internet. ,,ftphttpURL: ftp://:@hostname:/path/to/package.rpm :password,(/) ,ftp. (PASV) ftp. RPMftp URLs --ftpproxy ftp, ftp. _ftpproxy. --ftpport TCP<>ftp. _ftpport. RPMhttp URLs --httpproxy <>http. _httpproxy. --httpport TCP<>http. _httpport. /usr/lib/rpm/rpmrc /etc/rpmrc ~/.rpmrc /var/lib/rpm/packages /var/lib/rpm/pathidx /var/lib/rpm/nameidx /tmp/rpm* glint(8) rpm2cpio(8) http://www.rpm.org/ Marc Ewing Jeff Johnson Erik Troan [] mapping [] 2001/7/21 Linuxfourm MAN-PAGE http://cmpp.linuxforum.net man man https://github.com/man-pages-zh/manpages- zh Red Hat, Inc. 200269 rpm(8)