Maximum RPM
Max. RPM
Taking the Red Hat Package Manager to the
Limit
1.0 17-February-1997
First edition (Produced/printed by Red Hat Software)
1.1 ??-???-1997
Revised for production by Sams Publishing
1.2 29-February-2000
Translated into DocBook
Edition: 2
ISBN: 1-888172-78-9
First edition printed February, 1997
Sams first edition printed ???, 1999
Sams first edition reprinted ???, 1999
Red Hat, Inc.
2600 Meridian Parkway Durham , NC 27709 US 919-547-0012 919-547-0024 docs@redhat.com
13588 Research Triangle Park , NC 27713
Edward C. Bailey
Red Hat, Inc.
ed@redhat.com
© 2000 Red Hat, Inc.
Copyright © 2000 by Red Hat, Inc. This material may be distributed only subject to the terms and con-
ditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available
at http://www.opencontent.org/openpub/).
Distribution of the work or derivative of the work in any standard (paper) book form is prohibited unless
prior permission is obtained from the copyright holder.
ii
To Deb — My lover, editor, indexer, and friend…
To Matt, who heard "Daddy can’t play right now" far too often…
iii
Contents
Maximum RPM
Preface........................................................................................... xi
Linux and RPM — A Brief History........................................................ xi
Parts of the book, and Who They’re For................................................. xii
Acknowledgements ........................................................................ xiii
Part I RPM and Computer Users — How to Use RPM to
Effectively Manage Your Computer .............................. 15
Chapter 1 An Introduction to Package Management........... 17
1.1 What are Packages, and Why Manage Them? ............................... 17
1.2 Package Management: How to Do It? ......................................... 21
1.3 RPM Design Goals ............................................................... 26
1.4 What’s in a package? ............................................................ 28
1.5 Let’s Get Started ................................................................. 30
Chapter 2 Using RPM to Install Packages............................. 33
2.1 rpm -i — What does it do?....................................................... 36
2.2 Performing an Install ............................................................. 38
2.3 Two handy options................................................................ 41
2.4 Additional options to rpm -i ...................................................... 42
Chapter 3 Using RPM to Erase Packages ............................. 61
3.1 rpm -e — What Does it Do? ..................................................... 62
3.2 Erasing a Package ............................................................... 62
3.3 Additional Options ................................................................ 64
3.4 rpm -e and Config files........................................................... 68
3.5 Watch Out! ........................................................................ 69
iv
Chapter 4 Using RPM to Upgrade Packages ........................ 71
4.1 rpm -U — What Does it Do? .................................................... 74
4.2 Upgrading a Package ............................................................ 78
4.3 They’re Nearly Identical… ....................................................... 79
Chapter 5 Getting Information About Packages .................. 83
5.1 rpm -q — What does it do?...................................................... 86
5.2 The Parts of an RPM Query..................................................... 86
5.3 A Few Handy Queries............................................................ 114
Chapter 6 Using RPM to Verify Installed Packages............. 119
6.1 rpm -V — What Does it Do?..................................................... 121
6.2 When Verification Fails — rpm -V Output...................................... 124
6.3 Selecting What to Verify, and How.............................................. 126
6.4 We’ve Lied to You….............................................................. 134
Chapter 7 Using RPM to Verify Package Files...................... 137
7.1 rpm -K — What Does it Do?..................................................... 137
7.2 Configuring PGP for rpm -K ..................................................... 138
7.3 Using rpm -K ...................................................................... 139
Chapter 8 Miscellania............................................................... 147
8.1 Other RPM Options .............................................................. 147
8.2 Using rpm2cpio ................................................................... 151
8.3 Source Package Files and How To Use Them ................................ 155
Part II RPM and Developers — How to Distribute Your
Software More Easily With RPM ................................... 159
Chapter 9 The Philosophy Behind RPM................................ 161
9.1 Pristine Sources .................................................................. 161
9.2 Easy Builds........................................................................ 163
v