📄 index.html
字号:
<HTML>
<HEAD>
<TITLE>Maximum RPM (RPM):index: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=index //-->
<!-- PAGES=425 //-->
<!-- UNASSIGNED1 //-->
<!-- UNASSIGNED2 //-->
<P><CENTER>
<a href="ewtoc.html">Table of Contents</a> | <a href="about.html">Next</a></CENTER></P>
<A NAME="PAGENUM-3"><P>Page 3</P></A>
<p>
<b>Overview</b>
</p>
<blockquote>
Introduction xix
</blockquote>
<P><b>I RPM and Computer Users: How to Use RPM to
Effectively Manage Your Computer</b>
</P>
<blockquote>
<p>
1 An Introduction to Package Management 3
</P>
<P> 2 Using RPM to Install Packages 17
</P>
<P> 3 Using RPM to Erase Packages 37
</P>
<P> 4 Using RPM to Upgrade Packages 45
</P>
<P> 5 Getting Information About Packages 53
</P>
<P> 6 Using RPM to Verify Installed Packages 79
</P>
<P> 7 Using RPM to Verify Package Files 93
</P>
<P> 8 Miscellanea 101
</P>
</blockquote>
<P><b>II RPM and Developers: How to Distribute Your Software More Easily with RPM</b>
<blockquote>
<p>
9 The Philosophy Behind RPM 113
</P>
<P> 10 The Basics of Developing with RPM 119
</P>
<P> 11 Building Packages: A Simple Example 125
</P>
<P> 12 rpm -b Command Reference 139
</P>
<P> 13 Inside the Spec File 163
</P>
<P> 14 Adding Dependency Information to a Package 205
</P>
<P> 15 Making a Relocatable Package 215
</P>
<P> 16 Making a Package That Can Build Anywhere 225
</P>
<P> 17 Adding PGP Signatures to a Package 237
</P>
<P> 18 Creating Subpackages 247
</P>
<P> 19 Building Packages for Multiple Architectures and <BR>
Operating Systems 263
</P>
<P> 20 Real-World Package Building 275
</P>
<P> 21 A Guide to the RPM Library API 305
</P>
</blockquote>
<P><b>III Appendixes</b>
<blockquote>
<p>
A The Format of the RPM File 337
</P>
<P> B The rpmrc File 353
</P>
</blockquote>
<A NAME="PAGENUM-4"><P>Page 4</P></A>
<blockquote>
<P> C Concise RPM Command Reference 367
</P>
<P> D Available Tags for --queryformat 375
</P>
<P> E Concise Spec File Reference 387
</P>
<P> F RPM-Related Resources 403
</P>
<P> G An Introduction to PGP 417
</P>
<blockquote>
<P> Index 425
</P>
</blockquote>
</blockquote>
<A NAME="PAGENUM-5"><P>Page 5</P></A>
<H2>
<A NAME="1054_ 1">Contents</a>
</H2>
<blockquote>
Introduction xix
</blockquote>
<P><b>Part I RPM and Computer Users: How to Use RPM to Effectively <BR>
Manage Your Computer</b></P>
<P>
<b> 1 An Introduction to Package Management 3</b>
</P>
<blockquote>
<P>
1.1. What Are Packages and Why Manage Them? 4
</P>
<blockquote>
<P>1.1.1. Enter the Package 5</P>
<P>1.1.2. Manage Your Packages or They Will Manage You 6
</P>
</blockquote>
<p>
1.2. Package Management: How to Do It 7
</p>
<blockquote>
<P>
1.2.1. The Ancestors of RPM 8
</P>
</blockquote>
<p>
1.3. RPM Design Goals 11
</p>
<blockquote>
<P>
1.3.1. Making It Easy to Get Packages on and off the System
11
</P>
<P>1.3.2. Making It Easy to Verify That a Package Was Installed <BR>
Correctly 11
</P>
<P>1.3.3. Making It Easy for the Package Builder
11
</P>
<P>1.3.4. Making It Start with the Original Source Code
12
</P>
<P>1.3.5. Making It Work on Different Computer Architectures
12
</P>
</blockquote>
<p>
1.4. What's in a Package? 12
</p>
<blockquote>
<P>
1.4.1. RPM's Package Labels 13
</P>
<P>1.4.2. Labels and Names: Similar but Distinct
13
</P>
<P>1.4.3. Packagewide Information 14
</P>
<P>1.4.4. Per-File Information 14
</P>
</blockquote>
<p>
1.5. Summary 15
</p>
</blockquote>
<P>
<b>2 Using RPM to Install Packages 17</b>
</P>
<blockquote>
<p>
2.1. rpm -i—What Does It Do? 18
</P>
<P>
2.2. Performing an Install 20
</p>
<blockquote>
<P>
2.2.1. URLs: Another Way to Specify Package Files
20
<P>2.2.2. A Warning Message You Might Never See
21
</P>
</blockquote>
<p>
2.3. Two Handy Options 22
</p>
<blockquote>
<P>
2.3.1. Getting a Bit More Feedback with -v 22
</P>
<P>2.3.2. -h: Perfect for the Impatient 22
</P>
</blockquote>
<p>
2.4. Additional Options to rpm -i 23
</p>
<blockquote>
<P>
2.4.1. Getting a Lot More Information with -vv
23
</P>
<P>2.4.2. --test: Perform Installation Tests Only
23
</P>
<P>2.4.3. --replacepkgs: Install the Package Even if It's <BR>
Already Installed 24
</P>
<P>2.4.4. --replacefiles: Install the Package Even if It Replaces <BR>
Another Package's Files 25
</P>
<P>2.4.5. --nodeps: Do Not Check Dependencies Before <BR>
Installing Package 29
</P>
<P>2.4.6. --force: The Big Hammer 30
</P>
</blockquote>
</blockquote>
<A NAME="PAGENUM-6"><P>Page 6</P></A>
<blockquote><blockquote>
<P>2.4.7. --excludedocs: Do Not Install Documentation for This <BR>
Package 30
</P>
<P>2.4.8. --includedocs: Install Documentation for This Package
31
</P>
<P>2.4.9. --prefix <path>: Relocate the Package to
<path>, if Possible 31
</P>
<P>2.4.10. --noscripts: Do Not Execute Pre- and Postinstall Scripts
32
</P>
<P>2.4.11. --percent: Not Meant for Human Consumption
33
</P>
<P>2.4.12. --rcfile <rcfile>: Use
<rcfile> As an Alternate rpmrc File 33
</P>
<P>2.4.13. --root <path>: Use <path> As an Alternate Root
33
</P>
<P>2.4.14. --dbpath <path>: Use <path> to Find an RPM Database
34
</P>
<P>2.4.15. --ftpport <port>: Use
<port> in FTP-Based Installs 34
</P>
<P>2.4.16. --ftpproxy <host>: Use
<host> As a Proxy in FTP-Based
Installs 34
</P>
<P>2.4.17. --ignorearch: Do Not Verify Package Architecture
35
</P>
<P>2.4.18. --ignoreos: Do Not Verify the Package Operating System
35
</P></blockquote>
</blockquote>
<P><b> 3 Using RPM to Erase Packages 37</b>
</P>
<blockquote>
<p>
3.1. rpm -e: What Does It Do? 38
</P>
<P>
3.2. Erasing a Package 38
</p>
<blockquote>
<P>
3.2.1. Getting More Information with -vv 39
</P>
</blockquote>
<p>
3.3. Additional Options 40
</p>
<blockquote>
<P>
3.3.1. --test: Go Through the Process of Erasing the Package, But <BR>
Do Not Erase It 40
</P>
<P>3.3.2. --nodeps: Do Not Check Dependencies Before Erasing <BR>
Package 41
</P>
<P>3.3.3. --noscripts: Do Not Execute Pre- and Postuninstall Scripts
41
</P>
<P>3.3.4. --rcfile <rcfile>: Read
<rcfile> for RPM Defaults 42
</P>
<P>3.3.5. --root <path>: Use <path> As the Root
42
</P>
<P>3.3.6. --dbpath <path>: Use <path> to Find the RPM Database
42
</P>
</blockquote>
<p>
3.4. rpm -e and Config Files 43
</P>
<P>
3.5. Watch Out! 43
</p>
</blockquote>
<P>
<b> 4 Using RPM to Upgrade Packages 45</b>
</P>
<blockquote>
<p>
4.1. rpm -U: What Does It Do? 47
</p>
<blockquote>
<P>
4.1.1. Config File Magic 47
</P>
</blockquote>
<p>
4.2. Upgrading a Package 50
</p>
<blockquote>
<P>
4.2.1. rpm -U's Dirty Little Secret 50
</P>
</blockquote>
<p>
4.3. They're Nearly Identical 50
</p>
<blockquote>
<P>
4.3.1. --oldpackage: Upgrade to an Older Version
50
</P>
<P>4.3.2. --force: The Big Hammer 51
</P>
<P>4.3.3. --noscripts: Do Not Execute Install and Uninstall Scripts
51
</P>
</blockquote>
</blockquote>
<P><b> 5 Getting Information About Packages
53</b>
</P>
<blockquote>
<p>
5.1. rpm -q: What Does It Do? 55
</P>
<P>
5.2. The Parts of an RPM Query 55
</p>
<blockquote>
<P>
5.2.1. Query Commands, Part I: Package Selection
55
</P>
<P>5.2.2. Querying Commands, Part II: Information Selection
61
</P>
<P>5.2.3. Getting a Lot More Information with -vv
74
</P>
</blockquote>
</blockquote>
<A NAME="PAGENUM-7"><P>Page 7</P></A>
<blockquote><blockquote>
<P>5.2.4. --root <path>: Use <path> As an Alternate Root
74
</P>
<P>5.2.5. --rcfile <rcfile>: Use
<rcfile> As an Alternate rpmrc File 75
</P>
<P>5.2.6. --dbpath <path>: Use <path> to Find an RPM Database
75
</P></blockquote>
<p>
5.3. A Few Handy Queries 75
</p>
<blockquote>
<P>
5.3.1. Finding Config Files Based on a Program Name
75
</P>
<P>5.3.2. Learning More About an Uninstalled Package
76
</P>
<P>5.3.3. Finding Documentation for a Specific Package
76
</P>
<P>5.3.4. Finding Similar Packages 77
</P>
<P>5.3.5. Finding Recently Installed Packages, Part I
77
</P>
<P>5.3.6. Finding Recently Installed Packages, Part II
77
</P>
<P>5.3.7. Finding the Largest Installed Packages
78
</P>
</blockquote>
</blockquote>
<P><b> 6 Using RPM to Verify Installed Packages
79</b>
</P>
<blockquote>
<p>
6.1. rpm -V: What Does It Do? 80
</p>
<blockquote>
<P>
6.1.1. What Does It Verify? 81
</P>
</blockquote>
<p>
6.2. When Verification Fails: rpm -V Output
83
</p>
<blockquote>
<P>
6.2.1. Other Verification Failure Messages 84
</P>
</blockquote>
<p>
6.3. Selecting What to Verify and How 85
</p>
<blockquote>
<P>
6.3.1. The Package Label: Verify an Installed Package Against the <BR>
RPM Database 85
</P>
<P>6.3.2. -a: Verify All Installed Packages Against the RPM Database
85
</P>
<P>6.3.3. -f <file>: Verify the Package Owning
<file> Against the
RPM Database 86
</P>
<P>6.3.4. -p <file>: Verify Against a Specific Package File
86
</P>
<P>6.3.5. -g <group>: Verify Packages Belonging to
<group> 87
</P>
<P>6.3.6. --nodeps: Do Not Check Dependencies Before Erasing <BR>
Package 87
</P>
<P>6.3.7. --noscripts: Do Not Execute Verification Script
88
</P>
<P>6.3.8. --nofiles: Do Not Verify File Attributes
88
</P>
<P>6.3.9. -v: Display Additional Information 89
</P>
<P>6.3.10. -vv: Display Debugging Information 89
</P>
<P>6.3.11. --dbpath <path>: Use <path> to Find an RPM Database
90
</P>
<P>6.3.12. --root <path>: Set Alternate Root to
<path> 90
</P>
<P>6.3.13. --rcfile <rcfile>: Set Alternate
rpmrc File to <rcfile> 90
</P>
</blockquote>
<p>
6.4. We've Lied to You 90
</p>
<blockquote>
<P>
6.4.1. RPM Controls What Gets Verified 90
</P>
<P>6.4.2. The Package Builder Can Also Control What Gets Verified
91
</P>
</blockquote>
</blockquote>
<P><b> 7 Using RPM to Verify Package Files
93</b>
</P>
<blockquote>
<p>
7.1. rpm -K: What Does It Do? 94
</p>
<blockquote>
<P>
7.1.1. Pretty Good Privacy: RPM's Assistant 94
</P>
</blockquote>
<p>
7.2. Configuring PGP for U 95
</P>
<P>
7.3. Using rpm -K 95
</p>
<blockquote>
<P>
7.3.1. -v: Display Additional Information 96
</P>
<P>7.3.2. When the Package Is Not Signed 97
</P>
<P>7.3.3. When You Are Missing the Correct Public Key
97
</P>
<P>7.3.4. When a Package Just Doesn't Verify 98
</P>
<P>7.3.5. --nopgp: Do Not Verify Any PGP Signatures
99
</P>
</blockquote>
</blockquote>
<A NAME="PAGENUM-8"><P>Page 8</P></A>
<blockquote><blockquote>
<P>7.3.6. -vv: Display Debugging Information 100
</P>
<P>7.3.7. --rcfile <rcfile>: Use
<rcfile> As an Alternate rpmrc File 100
</P></blockquote>
</blockquote>
<P><b> 8 Miscellanea 101</b>
</P>
<blockquote>
<p>
8.1. Other RPM Options 102
</p>
<blockquote>
<P>
8.1.1. --rebuilddb: Rebuild RPM Database 102
</P>
<P>8.1.2. --initdb: Create a New RPM Database 103
</P>
<P>8.1.3. --quiet: Produce As Little Output As Possible
104
</P>
<P>8.1.4. --help: Display a Help Message 104
</P>
<P>8.1.5. --version: Display the Current RPM Version
105
</P>
</blockquote>
<p>
8.2. Using rpm2cpio 105
</p>
<blockquote>
<P>
8.2.1. rpm2cpio: What Does It Do? 105
</P>
<P>8.2.2. A More Real-World Example: Listing the Files in a
Package File 106
</P>
<P>8.2.3. Extracting One or More Files from a Package File
106
</P>
</blockquote>
<p>
8.3. Source Package Files and How to Use Them
107
</p>
<blockquote>
8.3.1. A Gentle Introduction to Source Code 108
<P>8.3.2. Do You Really Need More Information Than This?
108
</P>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -