update NEWS
[manpages-zh.git] / raw / man8 / rpm.8
blob539ac4c0372fcbdae9783fa19317b631a2fea9d5
1 .\" This manpage has been automatically generated by docbook2man 
2 .\" from a DocBook document.  This tool can be found at:
3 .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/> 
4 .\" Please send any bug reports, improvements, comments, patches, 
5 .\" etc. to Steve Cheng <steve@ggi-project.org>.
6 .TH "RPM" "8" "09 June 2002" "Red Hat, Inc." "Red Hat Linux"
7 .SH NAME
8 rpm \- RPM Package Manager
9 .SH SYNOPSIS
10 .SS "QUERYING AND VERIFYING PACKAGES:"
11 .PP
14 \fBrpm\fR {\fB-q|--query\fR} [\fBselect-options\fR] [\fBquery-options\fR]
18 \fBrpm\fR {\fB-V|--verify\fR} [\fBselect-options\fR] [\fBverify-options\fR]
22 \fBrpm\fR \fB--import\fR \fB\fIPUBKEY\fB\fR\fI ...\fR
26 \fBrpm\fR {\fB-K|--checksig\fR} [\fB--nosignature\fR] [\fB--nodigest\fR]
27     \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
29 .SS "INSTALLING, UPGRADING, AND REMOVING PACKAGES:"
30 .PP
33 \fBrpm\fR {\fB-i|--install\fR} [\fBinstall-options\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
37 \fBrpm\fR {\fB-U|--upgrade\fR} [\fBinstall-options\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
41 \fBrpm\fR {\fB-F|--freshen\fR} [\fBinstall-options\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
45 \fBrpm\fR {\fB-e|--erase\fR} [\fB--allmatches\fR] [\fB--nodeps\fR] [\fB--noscripts\fR]
46     [\fB--notriggers\fR] [\fB--repackage\fR] [\fB--test\fR] \fB\fIPACKAGE_NAME\fB\fR\fI\ ...\fR
48 .SS "MISCELLANEOUS:"
49 .PP
52 \fBrpm\fR {\fB--initdb|--rebuilddb\fR}
56 \fBrpm\fR {\fB--addsign|--resign\fR} \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
60 \fBrpm\fR {\fB--querytags|--showrc\fR}
64 \fBrpm\fR {\fB--setperms|--setugids\fR} \fB\fIPACKAGE_NAME\fB\fR\fI ...\fR
66 .SS "select-options"
67 .PP
70  [\fB\fIPACKAGE_NAME\fB\fR] [\fB-a,--all\fR] [\fB-f,--file \fIFILE\fB\fR]
71  [\fB-g,--group \fIGROUP\fB\fR] {\fB-p,--package \fIPACKAGE_FILE\fB\fR]
72  [\fB--fileid \fIMD5\fB\fR] [\fB--hdrid \fISHA1\fB\fR] [\fB--pkgid \fIMD5\fB\fR] [\fB--tid \fITID\fB\fR]
73  [\fB--querybynumber \fIHDRNUM\fB\fR] [\fB--triggeredby \fIPACKAGE_NAME\fB\fR]
74  [\fB--whatprovides \fICAPABILITY\fB\fR] [\fB--whatrequires \fICAPABILITY\fB\fR]
76 .SS "query-options"
77 .PP
80  [\fB--changelog\fR] [\fB-c,--configfiles\fR] [\fB-d,--docfiles\fR] [\fB--dump\fR]
81  [\fB--filesbypkg\fR] [\fB-i,--info\fR] [\fB--last\fR] [\fB-l,--list\fR]
82  [\fB--provides\fR] [\fB--qf,--queryformat \fIQUERYFMT\fB\fR]
83  [\fB-R,--requires\fR] [\fB--scripts\fR] [\fB-s,--state\fR]
84  [\fB--triggers,--triggerscripts\fR]
86 .SS "verify-options"
87 .PP
90  [\fB--nodeps\fR] [\fB--nofiles\fR] [\fB--noscripts\fR]
91  [\fB--nodigest\fR] [\fB--nosignature\fR]
92  [\fB--nolinkto\fR] [\fB--nomd5\fR] [\fB--nosize\fR] [\fB--nouser\fR]
93  [\fB--nogroup\fR] [\fB--nomtime\fR] [\fB--nomode\fR] [\fB--nordev\fR]
95 .SS "install-options"
96 .PP
99  [\fB--aid\fR] [\fB--allfiles\fR] [\fB--badreloc\fR] [\fB--excludepath \fIOLDPATH\fB\fR]
100  [\fB--excludedocs\fR] [\fB--force\fR] [\fB-h,--hash\fR]
101  [\fB--ignoresize\fR] [\fB--ignorearch\fR] [\fB--ignoreos\fR]
102  [\fB--includedocs\fR] [\fB--justdb\fR] [\fB--nodeps\fR]
103  [\fB--nodigest\fR] [\fB--nosignature\fR] [\fB--nosuggest\fR]
104  [\fB--noorder\fR] [\fB--noscripts\fR] [\fB--notriggers\fR]
105  [\fB--oldpackage\fR] [\fB--percent\fR] [\fB--prefix \fINEWPATH\fB\fR]
106  [\fB--relocate \fIOLDPATH\fB=\fINEWPATH\fB\fR]
107  [\fB--repackage\fR] [\fB--replacefiles\fR] [\fB--replacepkgs\fR]
108  [\fB--test\fR]
110 .SH "DESCRIPTION"
112 \fBrpm\fR is a powerful \fBPackage Manager\fR,
113 which can be used to build, install, query, verify, update, and
114 erase individual software packages.
115 A \fBpackage\fR consists of an archive of files and
116 meta-data used to install and erase the archive files. The meta-data
117 includes helper scripts, file attributes, and descriptive information
118 about the package.
119 \fBPackages\fR come in two varieties: binary packages,
120 used to encapsulate software to be installed, and source packages,
121 containing the source code and recipe necessary to produce binary
122 packages.
124 One of the following basic modes must be selected:
125 \fBQuery\fR,
126 \fBVerify\fR,
127 \fBSignature Check\fR,
128 \fBInstall/Upgrade/Freshen\fR,
129 \fBUninstall\fR,
130 \fBInitialize Database\fR,
131 \fBRebuild Database\fR,
132 \fBResign\fR,
133 \fBAdd Signature\fR,
134 \fBSet Owners/Groups\fR,
135 \fBShow Querytags\fR, and
136 \fBShow Configuration\fR.
137 .SS "GENERAL OPTIONS"
139 These options can be used in all the different modes.
141 \fB-?, --help\fR
142 Print a longer usage message then normal.
144 \fB--version\fR
145 Print a single line containing the version number of \fBrpm\fR
146 being used. 
148 \fB--quiet\fR
149 Print as little as possible - normally only error messages will
150 be displayed.
152 \fB-v\fR
153 Print verbose information - normally routine progress messages will be
154 displayed.
156 \fB-vv\fR
157 Print lots of ugly debugging information.
159 \fB--rcfile \fIFILELIST\fB\fR
160 Each of the files in the colon separated
161 \fIFILELIST\fR
162 is read sequentially by \fBrpm\fR for configuration
163 information.
164 Only the first file in the list must exist, and tildes will be
165 expanded to the value of \fB$HOME\fR.
166 The default \fIFILELIST\fR is
167 \fI/usr/lib/rpm/rpmrc\fR:\fI/usr/lib/rpm/redhat/rpmrc\fR:\fI/etc/rpmrc\fR:\fI~/.rpmrc\fR.
169 \fB--pipe \fICMD\fB\fR
170 Pipes the output of \fBrpm\fR to the command \fICMD\fR.
172 \fB--dbpath \fIDIRECTORY\fB\fR
173 Use the database in \fIDIRECTORY\fR rathen
174 than the default path \fI/var/lib/rpm\fR
176 \fB--root \fIDIRECTORY\fB\fR
177 Use the file system tree rooted at \fIDIRECTORY\fR for all operations.
178 Note that this means the database within
179 \fIDIRECTORY\fR
180 will be used for dependency checks and any scriptlet(s) (e.g.
181 \fB%post\fR if installing, or
182 \fB%prep\fR if building, a package)
183 will be run after a chroot(2) to
184 \fIDIRECTORY\fR.
185 .SS "INSTALL AND UPGRADE OPTIONS"
187 The general form of an rpm install command is 
190 \fBrpm\fR {\fB-i|--install\fR} [\fBinstall-options\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
193 This installs a new package.
195 The general form of an rpm upgrade command is 
198 \fBrpm\fR {\fB-U|--upgrade\fR} [\fBinstall-options\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
201 This upgrades or installs the package currently installed
202 to a newer version.  This is the same as install, except
203 all other version(s) of the package are removed after the
204 new package is installed.
207 \fBrpm\fR {\fB-F|--freshen\fR} [\fBinstall-options\fR] \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
210 This will upgrade packages, but only if an earlier version
211 currently exists. The \fIPACKAGE_FILE\fR
212 may be specified as an
213 \fBftp\fR or
214 \fBhttp\fR URL,
215 in which case the package will be downloaded before being
216 installed. See \fBFTP/HTTP OPTIONS\fR
217 for information on \fBrpm\fR's internal
218 \fBftp\fR and
219 \fBhttp\fR
220 client support. 
223 \fB--aid\fR
224 Add suggested packages to the transaction set when needed.
226 \fB--allfiles\fR
227 Installs or upgrades all the missingok files in the package,
228 regardless if they exist.
230 \fB--badreloc\fR
231 Used with \fB--relocate\fR, permit relocations on
232 all file paths, not just those \fIOLDPATH\fR's
233 included in the binary package relocation hint(s).
235 \fB--excludepath \fIOLDPATH\fB\fR
236 Don't install files whose name begins with
237 \fIOLDPATH\fR.
239 \fB--excludedocs\fR
240 Don't install any files which are marked as documentation
241 (which includes man pages and texinfo documents).
243 \fB--force\fR
244 Same as using
245 \fB--replacepkgs\fR,
246 \fB--replacefiles\fR, and
247 \fB--oldpackage\fR.
249 \fB-h, --hash\fR
250 Print 50 hash marks as the package archive is unpacked.
251 Use with \fB-v|--verbose\fR for a nicer display.
253 \fB--ignoresize\fR
254 Don't check mount file systems for sufficient disk space before
255 installing this package.
257 \fB--ignorearch\fR
258 Allow installation or upgrading even if the architectures
259 of the binary package and host don't match.
261 \fB--ignoreos\fR
262 Allow installation or upgrading even if the operating
263 systems of the binary package and host don't match.
265 \fB--includedocs\fR
266 Install documentation files. This is the default behavior.
268 \fB--justdb\fR
269 Update only the database, not the filesystem.
271 \fB--nodigest\fR
272 Don't verify package or header digests when reading.
274 \fB--nosignature\fR
275 Don't verify package or header signatures when reading.
277 \fB--nodeps\fR
278 Don't do a dependency check before installing or upgrading
279 a package.
281 \fB--nosuggest\fR
282 Don't suggest package(s) that provide a missing dependency.
284 \fB--noorder\fR
285 Don't reorder the packages for an install. The list of
286 packages would normally be reordered to satisfy dependancies.
288 \fB--noscripts\fR
290 \fB--nopre\fR
292 \fB--nopost\fR
294 \fB--nopreun\fR
296 \fB--nopostun\fR
297 Don't execute the scriptlet of the same name.
298 The \fB--noscripts\fR option is equivalent to
300 \fB--nopre\fR
301 \fB--nopost\fR
302 \fB--nopreun\fR
303 \fB--nopostun\fR
305 and turns off the execution of the corresponding
306 \fB%pre\fR,
307 \fB%post\fR,
308 \fB%preun\fR, and
309 \fB%postun\fR
310 scriptlet(s).
312 \fB--notriggers\fR
314 \fB--notriggerin\fR
316 \fB--notriggerun\fR
318 \fB--notriggerpostun\fR
319 Don't execute any trigger scriptlet of the named type.
320 The \fB--notriggers\fR option is equivalent to
322 \fB--notriggerin\fR
323 \fB--notriggerun\fR
324 \fB--notriggerpostun\fR
326 and turns off execution of the corresponding
327 \fB%triggerin\fR,
328 \fB%triggerun\fR, and
329 \fB%triggerpostun\fR
330 scriptlet(s).
332 \fB--oldpackage\fR
333 Allow an upgrade to replace a newer package with an older one.
335 \fB--percent\fR
336 Print percentages as files are unpacked from the package archive.
337 This is intended to make \fBrpm\fR easy to run from
338 other tools.
340 \fB--prefix \fINEWPATH\fB\fR
341 For relocateable binary packages, translate all file paths that
342 start with the installation prefix in the package relocation hint(s)
343 to \fINEWPATH\fR.
345 \fB--relocate \fIOLDPATH\fB=\fINEWPATH\fB\fR
346 For relocatable binary packages, translate all file paths
347 that start with \fIOLDPATH\fR in the
348 package relocation hint(s) to \fINEWPATH\fR.
349 This option can be used repeatedly if several
350 \fIOLDPATH\fR's in the package are to
351 be relocated.
353 \fB--repackage\fR
354 Re-package the files before erasing. The previously installed
355 package will be named according to the macro
356 \fB%_repackage_name_fmt\fR
357 and will be created in the directory named by
358 the macro \fB%_repackage_dir\fR (default value
359 is \fI/var/tmp\fR).
361 \fB--replacefiles\fR
362 Install the packages even if they replace files from other,
363 already installed, packages.
365 \fB--replacepkgs\fR
366 Install the packages even if some of them are already installed
367 on this system.
369 \fB--test\fR
370 Do not install the package, simply check for and report
371 potential conflicts.
372 .SS "ERASE OPTIONS"
374 The general form of an rpm erase command is 
377 \fBrpm\fR {\fB-e|--erase\fR} [\fB--allmatches\fR] [\fB--nodeps\fR] [\fB--noscripts\fR] [\fB--notriggers\fR] [\fB--repackage\fR] [\fB--test\fR] \fB\fIPACKAGE_NAME\fB\fR\fI ...\fR
380 The following options may also be used:
382 \fB--allmatches\fR
383 Remove all versions of the package which match
384 \fIPACKAGE_NAME\fR. Normally an
385 error is issued if \fIPACKAGE_NAME\fR
386 matches multiple packages.
388 \fB--nodeps\fR
389 Don't check dependencies before uninstalling the packages.
391 \fB--noscripts\fR
393 \fB--nopreun\fR
395 \fB--nopostun\fR
396 Don't execute the scriptlet of the same name.
397 The \fB--noscripts\fR option during package erase is
398 equivalent to
400 \fB--nopreun\fR
401 \fB--nopostun\fR
403 and turns off the execution of the corresponding
404 \fB%preun\fR, and
405 \fB%postun\fR
406 scriptlet(s).
408 \fB--notriggers\fR
410 \fB--notriggerun\fR
412 \fB--notriggerpostun\fR
413 Don't execute any trigger scriptlet of the named type.
414 The \fB--notriggers\fR option is equivalent to
416 \fB--notriggerun\fR
417 \fB--notriggerpostun\fR
419 and turns off execution of the corresponding
420 \fB%triggerun\fR, and
421 \fB%triggerpostun\fR
422 scriptlet(s).
424 \fB--repackage\fR
425 Re-package the files before erasing. The previously installed
426 package will be named according to the macro
427 \fB%_repackage_name_fmt\fR
428 and will be created in the directory named by
429 the macro \fB%_repackage_dir\fR (default value
430 is \fI/var/tmp\fR).
432 \fB--test\fR
433 Don't really uninstall anything, just go through the motions.
434 Useful in conjunction with the \fB-vv\fR option
435 for debugging.
436 .SS "QUERY OPTIONS"
438 The general form of an rpm query command is 
441 \fBrpm\fR {\fB-q|--query\fR} [\fBselect-options\fR] [\fBquery-options\fR]
444 You may specify the format that package information should be
445 printed in. To do this, you use the
447  \fB--qf|--queryformat\fR \fB\fIQUERYFMT\fB\fR
449 option, followed by the \fIQUERYFMT\fR
450 format string.  Query formats are modifed versions of the
451 standard \fBprintf(3)\fR formatting. The format
452 is made up of static strings (which may include standard C
453 character escapes for newlines, tabs, and other special
454 characters) and \fBprintf(3)\fR type formatters.
455 As \fBrpm\fR already knows the type to print, the
456 type specifier must be omitted however, and replaced by the name
457 of the header tag to be printed, enclosed by \fB{}\fR
458 characters. Tag names are case insesitive, and the leading
459 \fBRPMTAG_\fR portion of the tag name may be omitted
460 as well.
462 Alternate output formats may be requested by following
463 the tag with \fB:\fItypetag\fB\fR.
464 Currently, the following types are supported:
466 \fB:armor\fR
467    
468 Wrap a public key in ASCII armor.
470 \fB:base64\fR
471 Encode binary data using base64.
473 \fB:date\fR
474 Use strftime(3) "%c" format.
476 \fB:day\fR
477 Use strftime(3) "%a %b %d %Y" format.
479 \fB:depflags\fR
480 Format dependency flags.
482 \fB:fflags\fR
483 Format file flags.
485 \fB:hex\fR
486 Format in hexadecimal.
488 \fB:octal\fR
489 Format in octal.
491 \fB:perms\fR
492 Format file permissions.
494 \fB:shescape\fR
495 Escape single quotes for use in a script.
497 \fB:triggertype\fR
498 Display trigger suffix.
500 For example, to print only the names of the packages queried,
501 you could use \fB%{NAME}\fR as the format string.
502 To print the packages name and distribution information in
503 two columns, you could use \fB%-30{NAME}%{DISTRIBUTION}\fR.
504 \fBrpm\fR will print a list of all of the tags it knows about when it
505 is invoked with the \fB--querytags\fR argument.
507 There are two subsets of options for querying: package selection,
508 and information selection.
509 .SS "PACKAGE SELECTION OPTIONS:"
512 \fB\fIPACKAGE_NAME\fB\fR
513 Query installed package named \fIPACKAGE_NAME\fR.
515 \fB-a, --all\fR
516 Query all installed packages.
518 \fB-f, --file \fIFILE\fB\fR
519 Query package owning \fIFILE\fR.
521 \fB--fileid \fIMD5\fB\fR
522 Query package that contains a given file identifier, i.e. the
523 \fIMD5\fR digest of the file contents.
525 \fB-g, --group \fIGROUP\fB\fR
526 Query packages with the group of \fIGROUP\fR.
528 \fB--hdrid \fISHA1\fB\fR
529 Query package that contains a given header identifier, i.e. the
530 \fISHA1\fR digest of the immutable header region.
532 \fB-p, --package \fIPACKAGE_FILE\fB\fR
533 Query an (uninstalled) package \fIPACKAGE_FILE\fR.
534 The \fIPACKAGE_FILE\fR may be specified
535 as an \fBftp\fR or \fBhttp\fR style URL, in
536 which case the package header will be downloaded and queried.
537 See \fBFTP/HTTP OPTIONS\fR for information on
538 \fBrpm\fR's internal
539 \fBftp\fR and
540 \fBhttp\fR
541 client support. The \fIPACKAGE_FILE\fR argument(s),
542 if not a binary package, will be interpreted as an ASCII package
543 manifest.  Comments are permitted, starting with a '#', and each
544 line of a package manifest file may include white space seperated
545 glob expressions, including URL's with remote glob expressions,
546 that will be expanded to paths that are substituted in place of
547 the package manifest as additional \fIPACKAGE_FILE\fR
548 arguments to the query.
550 \fB--pkgid \fIMD5\fB\fR
551 Query package that contains a given package identifier, i.e. the
552 \fIMD5\fR digest of the combined header and
553 payload contents.
555 \fB--querybynumber \fIHDRNUM\fB\fR
556 Query the \fIHDRNUM\fRth database entry
557 directly; this is useful only for debugging.
559 \fB--specfile \fISPECFILE\fB\fR
560 Parse and query \fISPECFILE\fR as if
561 it were a package. Although not all the information (e.g. file lists)
562 is available, this type of query permits rpm to be used to extract
563 information from spec files without having to write a specfile
564 parser.
566 \fB--tid \fITID\fB\fR
567 Query package(s) that have a given \fITID\fR
568 transaction identifier. A unix time stamp is currently used as a
569 transaction identifier. All package(s) installed or erased within
570 a single transaction have a common identifier.
572 \fB--triggeredby \fIPACKAGE_NAME\fB\fR
573 Query packages that are triggered by package(s)
574 \fIPACKAGE_NAME\fR.
576 \fB--whatprovides \fICAPABILITY\fB\fR
577 Query all packages that provide the \fICAPABILITY\fR capability.
579 \fB--whatrequires \fICAPABILITY\fB\fR
580 Query all packages that requires \fICAPABILITY\fR for proper functioning.
581 .SS "PACKAGE QUERY OPTIONS:"
584 \fB--changelog\fR
585 Display change information for the package.
587 \fB-c, --configfiles\fR
588 List only configuration files (implies \fB-l\fR).
590 \fB-d, --docfiles\fR
591 List only documentation files (implies \fB-l\fR).
593 \fB--dump\fR
594 Dump file information as follows:
599 path size mtime md5sum mode owner group isconfig isdoc rdev symlink
600         
604 This option must be used with at least one of
605 \fB-l\fR,
606 \fB-c\fR,
607 \fB-d\fR.
609 \fB--filesbypkg\fR
610 List all the files in each selected package.
612 \fB-i, --info\fR
613 Display package information, including name, version, and description.
614 This uses the \fB--queryformat\fR if one was specified.
616 \fB--last\fR
617 Orders the package listing by install time such that the latest
618 packages are at the top.
620 \fB-l, --list\fR
621 List files in package.
623 \fB--provides\fR
624 List capabilities this package provides.
626 \fB-R, --requires\fR
627 List packages on which this package depends.
629 \fB--scripts\fR
630 List the package specific scriptlet(s) that are used as part
631 of the installation and uninstallation processes.
633 \fB-s, --state\fR
634 Display the \fIstates\fR of files in the package
635 (implies \fB-l\fR).  The state of each file is one of
636 \fInormal\fR,
637 \fInot installed\fR, or
638 \fIreplaced\fR.
640 \fB--triggers, --triggerscripts\fR
641 Display the trigger scripts, if any, which are contained in
642 the package.
643 .SS "VERIFY OPTIONS"
645 The general form of an rpm verify command is 
648 \fBrpm\fR {\fB-V|--verify\fR} [\fBselect-options\fR] [\fBverify-options\fR]
651 Verifying a package compares information about the installed files in
652 the package with information about the files taken from the package
653 metadata stored in the rpm database.  Among other things, verifying
654 compares the size, MD5 sum, permissions, type, owner and group of
655 each file.  Any discrepencies are displayed.
656 Files that were not installed from the package, for example,
657 documentation files excluded on installation using the
658 "\fB--excludedocs\fR" option,
659 will be silently ignored.
661 The package selection options are the same as for package
662 querying (including package manifest files as arguments).
663 Other options unique to verify mode are:
665 \fB--nodeps\fR
666 Don't verify dependencies of packages.
668 \fB--nodigest\fR
669 Don't verify package or header digests when reading.
671 \fB--nofiles\fR
672 Don't verify any attributes of package files.
674 \fB--noscripts\fR
675 Don't execute the \fB%verifyscript\fR scriptlet (if any).
677 \fB--nosignature\fR
678 Don't verify package or header signatures when reading.
680 \fB--nolinkto\fR
682 \fB--nomd5\fR
684 \fB--nosize\fR
686 \fB--nouser\fR
688 \fB--nogroup\fR
690 \fB--nomtime\fR
692 \fB--nomode\fR
694 \fB--nordev\fR
695 Don't verify the corresponding file attribute.
697 The format of the output is a string of 8 characters, a possible
698 attribute marker:
701 \fBc\fR \fB%config\fR configuration file.
702 \fBd\fR \fB%doc\fR documentation file.
703 \fBg\fR \fB%ghost\fR file (i.e. the file contents are not included in the package payload).
704 \fBl\fR \fB%license\fR license file.
705 \fBr\fR \fB%readme\fR readme file.
708 from the package header, followed by the file name.
709 Each of the 8 characters denotes the result of a comparison of
710 attribute(s) of the file to the value of those attribute(s) recorded
711 in the database.  A single
712 "\fB.\fR" (period)
713 means the test passed, while a single
714 "\fB?\fR" (question mark)
715 indicates the test could not be performed (e.g. file permissions
716 prevent reading). Otherwise, the (mnemonically
717 em\fBB\fRoldened) character denotes failure of
718 the corresponding \fB--verify\fR test:
721 \fBS\fR file \fBS\fRize differs
722 \fBM\fR \fBM\fRode differs (includes permissions and file type)
723 \fB5\fR MD\fB5\fR sum differs
724 \fBD\fR \fBD\fRevice major/minor number mis-match
725 \fBL\fR read\fBL\fRink(2) path mis-match
726 \fBU\fR \fBU\fRser ownership differs
727 \fBG\fR \fBG\fRroup ownership differs
728 \fBT\fR m\fBT\fRime differs
731 .SS "DIGITAL SIGNATURE AND DIGEST VERIFICATION"
733 The general forms of rpm digital signature commands are
737 \fBrpm\fR \fB--import\fR \fB\fIPUBKEY\fB\fR\fI ...\fR
740 \fBrpm\fR {\fB--checksig\fR} [\fB--nosignature\fR] [\fB--nodigest\fR]
741     \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
744 The \fB--checksig\fR option checks all the digests and signatures contained in
745 \fIPACKAGE_FILE\fR to ensure
746 the integrity and origin of the package. Note that
747 signatures are now verified whenever a package is read,
748 and \fB--checksig\fR is useful to verify
749 all of the digests and signatures associated with a package.
751 Digital signatures cannot be verified without a public key.
752 An ascii armored public key can be added to the \fBrpm\fR database
753 using \fB--import\fR. An imported public key is
754 carried in a header, and key ring management is performed
755 exactly like package management. For example, all currently imported
756 public keys can be displayed by:
758 \fBrpm -qa gpg-pubkey*\fR
760 Details about a specific public key, when imported, can be displayed
761 by querying.  Here's information about the Red Hat GPG/DSA key:
763 \fBrpm -qi gpg-pubkey-db42a60e\fR
765 Finally, public keys can be erased after importing just like
766 packages. Here's how to remove the Red Hat GPG/DSA key
768 \fBrpm -e gpg-pubkey-db42a60e\fR
769 .SS "SIGNING A PACKAGE"
772 \fBrpm\fR \fB--addsign|--resign\fR \fB\fIPACKAGE_FILE\fB\fR\fI ...\fR
775 Both of the \fB--addsign\fR and \fB--resign\fR
776 options generate and insert new signatures for each package
777 \fIPACKAGE_FILE\fR given, replacing any
778 existing signatures. There are two options for historical reasons,
779 there is no difference in behavior currently.
780 .SS "USING GPG TO SIGN PACKAGES"
782 In order to sign packages using GPG, \fBrpm\fR
783 must be configured to run GPG and be able to find a key
784 ring with the appropriate keys. By default,
785 \fBrpm\fR uses the same conventions as GPG
786 to find key rings, namely the \fB$GNUPGHOME\fR environment
787 variable.  If your key rings are not located where GPG expects
788 them to be, you will need to configure the macro
789 \fB%_gpg_path\fR
790 to be the location of the GPG key rings to use.
792 For compatibility with older versions of GPG, PGP, and rpm,
793 only V3 OpenPGP signature packets should be configured.
794 Either DSA or RSA verification algorithms can be used, but DSA
795 is preferred.
797 If you want to be able to sign packages you create yourself, you
798 also need to create your own public and secret key pair (see the
799 GPG manual). You will also need to configure the \fBrpm\fR macros
801 \fB%_signature\fR
802 The signature type.  Right now only gpg and pgp are supported.
804 \fB%_gpg_name\fR
805 The name of the "user" whose key you wish to use to sign your packages.
807 For example, to be able to use GPG to sign packages as the user
808 \fI"John Doe <jdoe@foo.com>"\fR
809 from the key rings located in \fI/etc/rpm/.gpg\fR
810 using the executable \fI/usr/bin/gpg\fR you would include
813 %_signature gpg
814 %_gpg_path /etc/rpm/.gpg
815 %_gpg_name John Doe <jdoe@foo.com>
816 %_gpgbin /usr/bin/gpg
819 in a macro configuration file. Use \fI/etc/rpm/macros\fR
820 for per-system configuration and \fI~/.rpmmacros\fR
821 for per-user configuration. 
822 .SS "REBUILD DATABASE OPTIONS"
824 The general form of an rpm rebuild database command is 
827 \fBrpm\fR {\fB--initdb|--rebuilddb\fR} [\fB-v\fR] [\fB--dbpath \fIDIRECTORY\fB\fR] [\fB--root \fIDIRECTORY\fB\fR]
830 Use \fB--initdb\fR to create a new database, use
831 \fB--rebuilddb\fR to rebuild the database indices from
832 the installed package headers.
833 .SS "SHOWRC"
835 The command
837 \fBrpm\fR \fB--showrc\fR
839 shows the values \fBrpm\fR will use for all of the
840 options are currently set in
841 \fIrpmrc\fR and
842 \fImacros\fR
843 configuration file(s).
844 .SS "FTP/HTTP OPTIONS"
846 \fBrpm\fR can act as an FTP and/or HTTP client so
847 that packages can be queried or installed from the internet.
848 Package files for install, upgrade, and query operations may be
849 specified as an
850 \fBftp\fR or
851 \fBhttp\fR
852 style URL:  
854 ftp://USER:PASSWORD@HOST:PORT/path/to/package.rpm
856 If the \fB:PASSWORD\fR portion is omitted, the password will be
857 prompted for (once per user/hostname pair). If both the user and
858 password are omitted, anonymous \fBftp\fR is used.
859 In all cases, passive (PASV) \fBftp\fR transfers are
860 performed.
862 \fBrpm\fR allows the following options to be used with
863 ftp URLs:
865 \fB--ftpproxy \fIHOST\fB\fR
866 The host \fIHOST\fR will be used as a proxy server
867 for all ftp transfers, which allows users to ftp through firewall
868 machines which use proxy systems. This option may also be specified
869 by configuring the macro \fB%_ftpproxy\fR.
871 \fB--ftpport \fIPORT\fB\fR
872 The TCP \fIPORT\fR number to use for
873 the ftp connection on the proxy ftp server instead of the default
874 port. This option may also be specified by configuring the macro
875 \fB%_ftpport\fR.
877 \fBrpm\fR allows the following options to be used with
878 \fBhttp\fR URLs:
880 \fB--httpproxy \fIHOST\fB\fR
881 The host \fIHOST\fR will be used as
882 a proxy server for all \fBhttp\fR transfers. This
883 option may also be specified by configuring the macro
884 \fB%_httpproxy\fR.
886 \fB--httpport \fIPORT\fB\fR
887 The TCP \fIPORT\fR number to use for the
888 \fBhttp\fR connection on the proxy http server instead
889 of the default port. This option may also be specified by configuring
890 the macro \fB%_httpport\fR.
891 .SH "LEGACY ISSUES"
892 .SS "Executing rpmbuild"
894 The build modes of rpm are now resident in the
895 \fI/usr/bin/rpmbuild\fR
896 executable. Although legacy compatibility provided by the popt aliases
897 below has been adequate, the compatibility is not perfect; hence build
898 mode compatibility through popt aliases is being removed from rpm.
899 Install the \fBrpmbuild\fR package, and see
900 \fBrpmbuild\fR(8) for documentation of all the
901 \fBrpm\fR build modes previously documented here in
902 \fBrpm\fR(8).
904 Add the following lines to \fI/etc/popt\fR
905 if you wish to continue invoking \fBrpmbuild\fR from
906 the \fBrpm\fR command line:
909 rpm     exec --bp               rpmb -bp
910 rpm     exec --bc               rpmb -bc
911 rpm     exec --bi               rpmb -bi
912 rpm     exec --bl               rpmb -bl
913 rpm     exec --ba               rpmb -ba
914 rpm     exec --bb               rpmb -bb
915 rpm     exec --bs               rpmb -bs 
916 rpm     exec --tp               rpmb -tp 
917 rpm     exec --tc               rpmb -tc 
918 rpm     exec --ti               rpmb -ti 
919 rpm     exec --tl               rpmb -tl 
920 rpm     exec --ta               rpmb -ta
921 rpm     exec --tb               rpmb -tb
922 rpm     exec --ts               rpmb -ts 
923 rpm     exec --rebuild          rpmb --rebuild
924 rpm     exec --recompile        rpmb --recompile
925 rpm     exec --clean            rpmb --clean
926 rpm     exec --rmsource         rpmb --rmsource
927 rpm     exec --rmspec           rpmb --rmspec
928 rpm     exec --target           rpmb --target
929 rpm     exec --short-circuit    rpmb --short-circuit
931 .SH "FILES"
932 .SS "rpmrc Configuration"
935 \fI/usr/lib/rpm/rpmrc\fR
936 \fI/usr/lib/rpm/redhat/rpmrc\fR
937 \fI/etc/rpmrc\fR
938 \fI~/.rpmrc\fR
940 .SS "Macro Configuration"
943 \fI/usr/lib/rpm/macros\fR
944 \fI/usr/lib/rpm/redhat/macros\fR
945 \fI/etc/rpm/macros\fR
946 \fI~/.rpmmacros\fR
948 .SS "Database"
951 \fI/var/lib/rpm/Basenames\fR
952 \fI/var/lib/rpm/Conflictname\fR
953 \fI/var/lib/rpm/Dirnames\fR
954 \fI/var/lib/rpm/Filemd5s\fR
955 \fI/var/lib/rpm/Group\fR
956 \fI/var/lib/rpm/Installtid\fR
957 \fI/var/lib/rpm/Name\fR
958 \fI/var/lib/rpm/Packages\fR
959 \fI/var/lib/rpm/Providename\fR
960 \fI/var/lib/rpm/Provideversion\fR
961 \fI/var/lib/rpm/Pubkeys\fR
962 \fI/var/lib/rpm/Removed\fR
963 \fI/var/lib/rpm/Requirename\fR
964 \fI/var/lib/rpm/Requireversion\fR
965 \fI/var/lib/rpm/Sha1header\fR
966 \fI/var/lib/rpm/Sigmd5\fR
967 \fI/var/lib/rpm/Triggername\fR
969 .SS "Temporary"
971 \fI/var/tmp/rpm*\fR
972 .SH "SEE ALSO"
975 \fBpopt\fR(3),
976 \fBrpm2cpio\fR(8),
977 \fBrpmbuild\fR(8),
980 \fBhttp://www.rpm.org/ <URL:http://www.rpm.org/>
982 .SH "AUTHORS"
985 Marc Ewing <marc@redhat.com>
986 Jeff Johnson <jbj@redhat.com>
987 Erik Troan <ewt@redhat.com>