appendix-c.html

来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 632 行

HTML
632
字号


<HTML>

<HEAD>

<TITLE>Maximum RPM (RPM):appendix-c:EarthWeb Inc.-</TITLE>

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!-- ISBN=0672311054 //-->

<!-- TITLE=Maximum RPM (RPM)//-->

<!-- AUTHOR=Edward Bailey//-->

<!-- PUBLISHER=Macmillan Computer Publishing//-->

<!-- IMPRINT=Sams//-->

<!-- CHAPTER=appendix-c //-->

<!-- PAGES=0367-0374 //-->

<!-- UNASSIGNED1 //-->

<!-- UNASSIGNED2 //-->





<P><CENTER>

<a href="appendix-b.html">Previous</a> | <a href="ewtoc.html">Table of Contents</a> | <a href="appendix-d.html">Next</a></CENTER></P>









<A NAME="PAGENUM-367"><P>Page 367</P></A>







<H3><A NAME="1054_ 3">

Apendix C</a></H3>



<H2>



Concise RPM Command<BR> Reference



</H2>



<A NAME="PAGENUM-368"><P>Page 368</P></A>











<H3>

C.1. Global Options

</H3>



<P>The following options can be used in any of RPM's modes:

</P>



<UL>

<LI>     

--quiet&#151;Print as little output as possible.

<LI>          -v&#151;Be a little more verbose.

<LI>          -vv&#151;Be incredibly verbose (for debugging).

<LI>          --root

&lt;dir&gt;&#151;Use &lt;dir&gt; as the top-level directory.

<LI>          --dbpath

&lt;dir&gt;&#151;Use &lt;dir&gt; as the directory for the database.

<LI>          --rcfile

&lt;file&gt;&#151;Use &lt;file&gt; instead of

/etc/rpmrc and $HOME/.rpmrc.

</UL>



<H3>

C.2. Informational Options

</H3>



<P>The following options are used to display information about RPM:

</P>



<!-- CODE SNIP //-->

<PRE>

Format: rpm &lt;option&gt;

</PRE>

<!-- END CODE SNIP //-->



<UL>

<LI>     

--version&#151;Print the version of RPM being used.

<LI>          --help&#151;Print a help message.

<LI>     

--showrc&#151;Show rcfile information.

<LI>     

--querytags&#151;List the tags that can be used with

--queryformat.

</UL>



<H3>

C.3. Query Mode

</H3>



<P>RPM's query mode is used to display information about packages.

</P>



<!-- CODE SNIP //-->

<PRE>

Format:      rpm --query &lt;options&gt;



             or



             rpm -q &lt;options&gt;

</PRE>

<!-- END CODE SNIP //-->



<H4>

C.3.1. Package Specification Options for Query Mode

</H4>



<P>No more than one of the following options may be present in every query command. They

are used to select the source of the information to be displayed. Where plus signs appear,

more than one item may be included, separated by a space:

</P>



<UL>

<LI>     

&lt;packagename&gt;&#151;Query the named package.

<LI>          -a&#151;Query all packages.

<LI>          -f

&lt;file&gt;+&#151;Query package owning

&lt;file&gt;.

</UL>



<A NAME="PAGENUM-369"><P>Page 369</P></A>





<UL>

<LI>          -g

&lt;group&gt;+&#151;Query packages with group

&lt;group&gt;.

<LI>          -p

&lt;packagefile&gt;+&#151;Query (uninstalled) package

&lt;packagefile&gt;.

<LI>          --whatprovides

&lt;i&gt;&#151;Query packages that provide

&lt;i&gt; capability.

<LI>          --whatrequires

&lt;i&gt;&#151;Query packages that require

&lt;i&gt; capability.

</UL>



<H4>

C.3.2. Information Selection Options for Query Mode

</H4>



<P>One or more of the following options may be added to any query command. They are used

to select what information RPM will display. If no information-selection option is present on

the command line, RPM will simply display the applicable package label(s):

</P>



<UL>

<LI>          -i&#151;Display package information.

<LI>          -l&#151;Display package file list.

<LI>          -s&#151;Show file states (implies

-l).

<LI>          -d&#151;List only documentation files (implies

-l).

<LI>          -c&#151;List only configuration files (implies

-l).

<LI>     

--dump&#151;Show all available information for each file (must be used with

-l, -c, or -d).

<LI>     

--provides&#151;List capabilities that the package provides.

<LI>     

--requires, -R&#151;List capabilities that the package requires.

<LI>     

--scripts&#151;Print the various (un)install, verification scripts.

<LI>          --queryformat

&lt;s&gt;&#151;Use &lt;s&gt; as the header format (implies

-i).

<LI>          --qf

&lt;s&gt;&#151;Shorthand for --queryformat.

</UL>



<H3>

C.4. Verify Mode

</H3>



<P>RPM's verification mode is used to ensure that a package is still installed properly:

</P>



<!-- CODE //-->

<PRE>

Format:  rpm --verify &lt;options&gt;



          or





         rpm -V &lt;options&gt;



          or



         rpm -y &lt;options&gt;

</PRE>

<!-- END CODE //-->



<A NAME="PAGENUM-370"><P>Page 370</P></A>







<H4>

C.4.1. Options for Verify Mode

</H4>



<P>The following options can be used on any verify command:

</P>



<UL>

<LI>     

--nodeps&#151;Do not verify package dependencies.

<LI>     

--nofiles&#151;Do not verify file attributes.

<LI>     

--noscripts&#151;Do not execute the package's verification script.

</UL>



<H3>

C.5. Install Mode

</H3>



<P>RPM's installation mode is used to install packages.

</P>



<!-- CODE //-->

<PRE>

Format:      rpm --install &lt;packagefile&gt;





             or





             rpm -i &lt;packagefile&gt;

</PRE>

<!-- END CODE //-->



<H4>

C.5.1. Options for Install Mode

</H4>



<P>The following options can be used on any install command:

</P>



<UL>

<LI>          -h,

--hash&#151;Print hash marks as package installs (good with

-v).

<LI>          --prefix

&lt;dir&gt;&#151;Relocate the package to

&lt;dir&gt;, if relocatable.

<LI>     

--excludedocs&#151;Do not install documentation.

<LI>     

--force&#151;Shorthand for --replacepkgs and

--replacefiles.

<LI>     

--ignorearch&#151;Do not verify package architecture.

<LI>     

--ignoreos&#151;Do not verify package operating system.

<LI>     

--includedocs&#151;Install documentation.

<LI>     

--nodeps&#151;Do not check package dependencies.

<LI>     

--noscripts&#151;Do not execute any installation scripts.

<LI>     

--percent&#151;Print percentages as package installs.

<LI>     

--replacefiles&#151;Install even if the package replaces installed files.

<LI>     

--replacepkgs&#151;Reinstall if the package is already present.

<LI>     

--test&#151;Do not install, but tell whether it would work.

</UL>



<A NAME="PAGENUM-371"><P>Page 371</P></A>











<H3>

C.6. Upgrade Mode

</H3>



<P>RPM's upgrade mode is used to upgrade packages.

</P>



<!-- CODE SNIP //-->

<PRE>

Format:      rpm --upgrade &lt;packagefile&gt;



             or



             rpm -U &lt;packagefile&gt;

</PRE>

<!-- END CODE SNIP //-->



<H4>

C.6.1. Options for Upgrade Mode

</H4>



<P>The following options can be used on any upgrade command:

</P>



<UL>

<LI>          -h,

--hash&#151;Print hash marks as package installs (good with

-v).

<LI>          --prefix

&lt;dir&gt;&#151;Relocate the package to

&lt;dir&gt;, if relocatable.

<LI>     

--excludedocs&#151;Do not install documentation.

<LI>     

--force&#151;Shorthand for --replacepkgs,

--replacefiles, and --oldpackage.

<LI>     

--ignorearch&#151;Do not verify package architecture.

<LI>     

--ignoreos&#151;Do not verify package operating system.

<LI>     

--includedocs&#151;Install documentation.

<LI>     

--nodeps&#151;Do not verify package dependencies.

<LI>     

--noscripts&#151;Do not execute any installation scripts.

<LI>     

--percent&#151;Print percentages as package installs.

<LI>     

--replacefiles&#151;Install even if the package replaces installed files.

<LI>     

--replacepkgs&#151;Reinstall if the package is already present.

<LI>     

--test&#151;Do not install, but tell whether it would work.

<LI>     

--oldpackage&#151;Upgrade to an old version of the package

(--force on upgrades does this automatically).

</UL>



<H3>

C.7. Erase Mode

</H3>



<P>RPM's erase mode is used to erase previously installed packages.

</P>



<!-- CODE //-->

<PRE>

Format:      rpm --erase &lt;package&gt;





             or





             rpm -e &lt;package&gt;

</PRE>

<!-- END CODE //-->



<A NAME="PAGENUM-372"><P>Page 372</P></A>







<H4>

C.7.1. Options for Erase Mode

</H4>



<P>The following options can be used on any erase command:

</P>



<UL>

<LI>     

--nodeps&#151;Do not verify package dependencies.

<LI>     

--noscripts&#151;Do not execute any installation scripts.

</UL>



<H3>

C.8. Build Mode

</H3>



<P>RPM's build mode is used to build packages.

</P>



<P>Format: rpm -b&lt;stage&gt; &lt;options&gt;

&lt;specfile&gt;

</P>



<P>(Note that -vv is the default for all build mode commands.)

</P>



<H4>

C.8.1. Build Mode Stages

</H4>



<P>One of the following stages must follow the -b option:

</P>



<UL>

<LI>     

p&#151;Prep (unpack sources and apply patches).

<LI>          l&#151;List check (do some cursory checks on

%files).

<LI>          c&#151;Compile (prep and compile).

<LI>          i&#151;Install (prep, compile, install).

<LI>          b&#151;Binary package (prep, compile, install, package).

<LI>          a&#151;Binary/source package (prep, compile, install, package).

</UL>



<H4>

C.8.2. Options for Build Mode

</H4>



<P>The following options can be used on any build command:

</P>



<UL>

<LI>     

--short-circuit&#151;Skip straight to specified stage (only for

c and i).

<LI>     

--clean&#151;Remove build tree when done.

<LI>     

--sign&#151;Generate PGP signature.

<LI>          --buildroot

&lt;s&gt;&#151;Use &lt;s&gt; as the build root.

<LI>          --buildarch

&lt;s&gt;&#151;Use &lt;s&gt; as the build architecture.

<LI>          --buildos

&lt;s&gt;&#151;Use &lt;s&gt; as the build operating system.

<LI>     

--test&#151;Do not execute any stages.

<LI>          --timecheck

&lt;s&gt;&#151;Set the time check to &lt;s&gt; seconds

(0 disables it).

</UL>



<A NAME="PAGENUM-373"><P>Page 373</P></A>







<H3>

C.9. Rebuild Mode

</H3>



<P>RPM's rebuild mode is used to rebuild packages from a source package file. The source

archives, patches, and icons that comprise the source package are removed after the binary

package is built. Rebuild mode implies --clean.

</P>



<!-- CODE SNIP //-->

<PRE>

Format: rpm --rebuild &lt;options&gt; &lt;source-package&gt;

</PRE>

<!-- END CODE SNIP //-->



<P>(Note that -vv is the default for all rebuild mode commands.)

</P>



<H4>

C.9.1. Options for Rebuild Mode

</H4>



<P>Only the global options may be used.

</P>



<H3>

C.10. Recompile Mode

</H3>



<P>RPM's recompile mode is used to recompile software from a source package file. Unlike 

--rebuild, no binary package is created.

</P>



<!-- CODE SNIP //-->

<PRE>

Format: rpm --recompile &lt;options&gt; &lt;source-package&gt;

</PRE>

<!-- END CODE SNIP //-->



<P>Note that -vv is the default for all recompile mode commands.

</P>



<H4>

C.10.1. Options for Recompile Mode

</H4>



<P>Only the global options may be used.

</P>



<H3>

C.11. Resign Mode

</H3>



<P>RPM's resign mode is used to replace a package's signature with a new one.

</P>



<!-- CODE SNIP //-->

<PRE>

Format: rpm --resign &lt;options&gt; &lt;packagefile&gt;+

</PRE>

<!-- END CODE SNIP //-->



<H4>

C.11.1. Options for Resign Mode

</H4>



<P>Only the global options may be used.

</P>



<H3>

C.12. Add Signature Mode

</H3>



<P>RPM's add signature mode is used to add a signature to a package.

</P>



<!-- CODE SNIP //-->

<PRE>

Format: rpm --addsign &lt;options&gt; &lt;packagefile&gt;+

</PRE>

<!-- END CODE SNIP //-->



<A NAME="PAGENUM-374"><P>Page 374</P></A>







<H4>

C.12.1. Options for Add Signature Mode

</H4>



<P>Only the global options may be used.

</P>



<H3>

C.13. Check Signature Mode

</H3>



<P>RPM's check signature mode is used to verify a package's signature.

</P>



<!-- CODE //-->

<PRE>

Format:      rpm --checksig &lt;options&gt; &lt;packagefile&gt;+





             or





             rpm -K &lt;options&gt; &lt;packagefile&gt;+

</PRE>

<!-- END CODE //-->



<H4>

C.13.1. Options for Check Signature Mode

</H4>



<P>The following option can be used on any check signature command:

</P>



<UL>

<LI>     

--nopgp&#151;Skip any PGP signatures (size and MD5 only).

</UL>



<H3>

C.14. Initialize Database Mode

</H3>



<P>RPM's initialize database mode is used to create a new RPM database.

</P>



<!-- CODE SNIP //-->

<PRE>

Format: rpm --initdb &lt;options&gt;

</PRE>

<!-- END CODE SNIP //-->



<H4>

C.14.1. Options for Initialize Database Mode

</H4>



<P>Only the global options may be used.

</P>



<H3>

C.15. Rebuild Database Mode

</H3>



<P>RPM's rebuild database mode is used to rebuild an RPM database.

</P>



<!-- CODE SNIP //-->

<PRE>

Format: rpm --rebuilddb &lt;options&gt;

</PRE>

<!-- END CODE SNIP //-->



<H4>

C.15.1. Options to Rebuild Database Mode

</H4>



<P>Only the global options may be used.

</P>

<BR><BR>







<P><CENTER>

<a href="appendix-b.html">Previous</a> | <a href="ewtoc.html">Table of Contents</a> | <a href="appendix-d.html">Next</a></CENTER></P>







</td>
</tr>
</table>

<!-- begin footer information -->





</body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?