-->

Table of Contents | Next

Page 3

Overview

Introduction xix

I RPM and Computer Users: How to Use RPM to Effectively Manage Your Computer

1 An Introduction to Package Management 3

2 Using RPM to Install Packages 17

3 Using RPM to Erase Packages 37

4 Using RPM to Upgrade Packages 45

5 Getting Information About Packages 53

6 Using RPM to Verify Installed Packages 79

7 Using RPM to Verify Package Files 93

8 Miscellanea 101

II RPM and Developers: How to Distribute Your Software More Easily with RPM

9 The Philosophy Behind RPM 113

10 The Basics of Developing with RPM 119

11 Building Packages: A Simple Example 125

12 rpm -b Command Reference 139

13 Inside the Spec File 163

14 Adding Dependency Information to a Package 205

15 Making a Relocatable Package 215

16 Making a Package That Can Build Anywhere 225

17 Adding PGP Signatures to a Package 237

18 Creating Subpackages 247

19 Building Packages for Multiple Architectures and
Operating Systems 263

20 Real-World Package Building 275

21 A Guide to the RPM Library API 305

III Appendixes

A The Format of the RPM File 337

B The rpmrc File 353

Page 4

C Concise RPM Command Reference 367

D Available Tags for --queryformat 375

E Concise Spec File Reference 387

F RPM-Related Resources 403

G An Introduction to PGP 417

Index 425

Page 5

Contents

Introduction xix

Part I RPM and Computer Users: How to Use RPM to Effectively
Manage Your Computer

1 An Introduction to Package Management 3

1.1. What Are Packages and Why Manage Them? 4

1.1.1. Enter the Package 5

1.1.2. Manage Your Packages or They Will Manage You 6

1.2. Package Management: How to Do It 7

1.2.1. The Ancestors of RPM 8

1.3. RPM Design Goals 11

1.3.1. Making It Easy to Get Packages on and off the System 11

1.3.2. Making It Easy to Verify That a Package Was Installed
Correctly 11

1.3.3. Making It Easy for the Package Builder 11

1.3.4. Making It Start with the Original Source Code 12

1.3.5. Making It Work on Different Computer Architectures 12

1.4. What's in a Package? 12

1.4.1. RPM's Package Labels 13

1.4.2. Labels and Names: Similar but Distinct 13

1.4.3. Packagewide Information 14

1.4.4. Per-File Information 14

1.5. Summary 15

2 Using RPM to Install Packages 17

2.1. rpm -i—What Does It Do? 18

2.2. Performing an Install 20

2.2.1. URLs: Another Way to Specify Package Files 20

2.2.2. A Warning Message You Might Never See 21

2.3. Two Handy Options 22

2.3.1. Getting a Bit More Feedback with -v 22

2.3.2. -h: Perfect for the Impatient 22

2.4. Additional Options to rpm -i 23

2.4.1. Getting a Lot More Information with -vv 23

2.4.2. --test: Perform Installation Tests Only 23

2.4.3. --replacepkgs: Install the Package Even if It's
Already Installed 24

2.4.4. --replacefiles: Install the Package Even if It Replaces
Another Package's Files 25

2.4.5. --nodeps: Do Not Check Dependencies Before
Installing Package 29

2.4.6. --force: The Big Hammer 30

Page 6

2.4.7. --excludedocs: Do Not Install Documentation for This
Package 30

2.4.8. --includedocs: Install Documentation for This Package 31

2.4.9. --prefix <path>: Relocate the Package to <path>, if Possible 31

2.4.10. --noscripts: Do Not Execute Pre- and Postinstall Scripts 32

2.4.11. --percent: Not Meant for Human Consumption 33

2.4.12. --rcfile <rcfile>: Use <rcfile> As an Alternate rpmrc File 33

2.4.13. --root <path>: Use <path> As an Alternate Root 33

2.4.14. --dbpath <path>: Use <path> to Find an RPM Database 34

2.4.15. --ftpport <port>: Use <port> in FTP-Based Installs 34

2.4.16. --ftpproxy <host>: Use <host> As a Proxy in FTP-Based Installs 34

2.4.17. --ignorearch: Do Not Verify Package Architecture 35

2.4.18. --ignoreos: Do Not Verify the Package Operating System 35

3 Using RPM to Erase Packages 37

3.1. rpm -e: What Does It Do? 38

3.2. Erasing a Package 38

3.2.1. Getting More Information with -vv 39

3.3. Additional Options 40

3.3.1. --test: Go Through the Process of Erasing the Package, But
Do Not Erase It 40

3.3.2. --nodeps: Do Not Check Dependencies Before Erasing
Package 41

3.3.3. --noscripts: Do Not Execute Pre- and Postuninstall Scripts 41

3.3.4. --rcfile <rcfile>: Read <rcfile> for RPM Defaults 42

3.3.5. --root <path>: Use <path> As the Root 42

3.3.6. --dbpath <path>: Use <path> to Find the RPM Database 42

3.4. rpm -e and Config Files 43

3.5. Watch Out! 43

4 Using RPM to Upgrade Packages 45

4.1. rpm -U: What Does It Do? 47

4.1.1. Config File Magic 47

4.2. Upgrading a Package 50

4.2.1. rpm -U's Dirty Little Secret 50

4.3. They're Nearly Identical 50

4.3.1. --oldpackage: Upgrade to an Older Version 50

4.3.2. --force: The Big Hammer 51

4.3.3. --noscripts: Do Not Execute Install and Uninstall Scripts 51

5 Getting Information About Packages 53

5.1. rpm -q: What Does It Do? 55

5.2. The Parts of an RPM Query 55

5.2.1. Query Commands, Part I: Package Selection 55

5.2.2. Querying Commands, Part II: Information Selection 61

5.2.3. Getting a Lot More Information with -vv 74

Page 7

5.2.4. --root <path>: Use <path> As an Alternate Root 74

5.2.5. --rcfile <rcfile>: Use <rcfile> As an Alternate rpmrc File 75

5.2.6. --dbpath <path>: Use <path> to Find an RPM Database 75

5.3. A Few Handy Queries 75

5.3.1. Finding Config Files Based on a Program Name 75

5.3.2. Learning More About an Uninstalled Package 76

5.3.3. Finding Documentation for a Specific Package 76

5.3.4. Finding Similar Packages 77

5.3.5. Finding Recently Installed Packages, Part I 77

5.3.6. Finding Recently Installed Packages, Part II 77

5.3.7. Finding the Largest Installed Packages 78

6 Using RPM to Verify Installed Packages 79

6.1. rpm -V: What Does It Do? 80

6.1.1. What Does It Verify? 81

6.2. When Verification Fails: rpm -V Output 83

6.2.1. Other Verification Failure Messages 84

6.3. Selecting What to Verify and How 85

6.3.1. The Package Label: Verify an Installed Package Against the
RPM Database 85

6.3.2. -a: Verify All Installed Packages Against the RPM Database 85

6.3.3. -f <file>: Verify the Package Owning <file> Against the RPM Database 86

6.3.4. -p <file>: Verify Against a Specific Package File 86

6.3.5. -g <group>: Verify Packages Belonging to <group> 87

6.3.6. --nodeps: Do Not Check Dependencies Before Erasing
Package 87

6.3.7. --noscripts: Do Not Execute Verification Script 88

6.3.8. --nofiles: Do Not Verify File Attributes 88

6.3.9. -v: Display Additional Information 89

6.3.10. -vv: Display Debugging Information 89

6.3.11. --dbpath <path>: Use <path> to Find an RPM Database 90

6.3.12. --root <path>: Set Alternate Root to <path> 90

6.3.13. --rcfile <rcfile>: Set Alternate rpmrc File to <rcfile> 90

6.4. We've Lied to You 90

6.4.1. RPM Controls What Gets Verified 90

6.4.2. The Package Builder Can Also Control What Gets Verified 91

7 Using RPM to Verify Package Files 93

7.1. rpm -K: What Does It Do? 94

7.1.1. Pretty Good Privacy: RPM's Assistant 94

7.2. Configuring PGP for U 95

7.3. Using rpm -K 95

7.3.1. -v: Display Additional Information 96

7.3.2. When the Package Is Not Signed 97

7.3.3. When You Are Missing the Correct Public Key 97

7.3.4. When a Package Just Doesn't Verify 98

7.3.5. --nopgp: Do Not Verify Any PGP Signatures 99

Page 8

7.3.6. -vv: Display Debugging Information 100

7.3.7. --rcfile <rcfile>: Use <rcfile> As an Alternate rpmrc File 100

8 Miscellanea 101

8.1. Other RPM Options 102

8.1.1. --rebuilddb: Rebuild RPM Database 102

8.1.2. --initdb: Create a New RPM Database 103

8.1.3. --quiet: Produce As Little Output As Possible 104

8.1.4. --help: Display a Help Message 104

8.1.5. --version: Display the Current RPM Version 105

8.2. Using rpm2cpio 105

8.2.1. rpm2cpio: What Does It Do? 105

8.2.2. A More Real-World Example: Listing the Files in a Package File 106

8.2.3. Extracting One or More Files from a Package File 106

8.3. Source Package Files and How to Use Them 107

8.3.1. A Gentle Introduction to Source Code 108

8.3.2. Do You Really Need More Information Than This? 108

8.3.3. So What Can I Do with It? 108

8.3.4. Stick with Us! 110

Part II RPM and Developers: How to Distribute Your Software
More Easily with RPM

9 The Philosophy Behind RPM 113

9.1. Pristine Sources 114

9.2. Easy Builds 115

9.2.1. Reproducible Builds 115

9.2.2. Unattended Builds 116

9.3. Multiarchitecture/Operating System Support 116

9.4. Easier for Your Users 116

9.4.1. Easy Upgrades 116

9.4.2. Intelligent Configuration File Handling 116

9.4.3. Powerful Query Capabilities 117

9.4.4. Easy Package Verification 117

9.5. To Summarize 117

10 The Basics of Developing with RPM 119

10.1. The Inputs 120

10.1.1. The Sources 120

10.1.2. The Patches 120

10.1.3. The Spec File 121

10.2. The Engine: RPM 123

10.3. The Outputs 123

10.3.1. The Source Package File 123

10.3.2. The Binary RPM 123

10.4. And Now… 124

Page 9

11 Building Packages: A Simple Example 125

11.1. Creating the Build Directory Structure 126

11.2. Getting the Sources 127

11.3. Creating the Spec File 127

11.3.1. The Preamble 127

11.3.2. The %prep Section 129

11.3.3. The %build Section 130

11.3.4. The %install Section 130

11.3.5. The %files Section 131

11.3.6. The Missing Spec File Sections 132

11.4. Starting the Build 132

11.5. When Things Go Wrong 136

11.5.1. Problems During the Build 136

11.5.2. Testing Newly Built Packages 137

11.6. Summary 137

12 rpm -b Command Reference 139

12.1. rpm -b: What Does It Do? 140

12.1.1. rpm -bp: Execute %prep 141

12.1.2. rpm -bc: Execute %prep, %build 142

12.1.3. rpm -bi: Execute %prep, %build, %install 143

12.1.4. rpm -bb: Execute %prep, %build, %install, Package (bin) 144

12.1.5. rpm -ba: Execute %prep, %build, %install, Package (bin, src) 145

12.1.6. rpm -bl: Check %files List 146

12.1.7. --short-circuit: Force Build to Start at a Particular Stage 149

12.1.8. --buildarch <arch>: Perform a Build for the <arch> Architecture 151

12.1.9. --buildos <os>: Perform Build for the <os> Operating System 152

12.1.10. --sign: Add a Digital Signature to the Package 152

12.1.11. --test: Create, Save Build Scripts for Review 153

12.1.12. --clean: Clean Up After Build 154

12.1.13. --buildroot <path>: Execute %install Using <path> As the Root 155

12.1.14. --timecheck <secs>: Print a Warning if Files to Be
Packaged Are More Than <secs> Old 158

12.1.15. -vv: Display Debugging Information 159

12.1.16. --quiet: Produce As Little Output As Possible 159

12.1.17. --rcfile <rcfile>: Set Alternate rpmrc File to <rcfile> 160

12.2. Other Build-Related Commands 160

12.2.1. rpm --recompile: What Does It Do? 160

12.2.2. rpm --rebuild: What Does It Do? 161

12.3. Summary 162

Page 10

13 Inside the Spec File 163

13.1. Comments: Notes Ignored by RPM 164

13.2. Tags: Data Definitions 164

13.2.1. Package Naming Tags 165

13.2.2. Descriptive Tags 166

13.2.3. Dependency Tags 169

13.2.4. Architecture- and Operating System_Specific Tags 172

13.2.5. Directory-Related Tags 174

13.2.6. Source and Patch Tags 175

13.3. Scripts: RPM's Workhorse 178

13.3.1. Build-Time Scripts 178

13.3.2. Install/Erase-Time Scripts 181

13.3.3. Verification-Time Script—The %verifyscript Script 183

13.4. Macros: Helpful Shorthand for Package Builders 183

13.4.1. The %setup Macro 184

13.4.2. The %patch Macro 191

13.5. The %files List 194

13.6. Directives for the %files List 194

13.6.1. File-Related Directives 195

13.6.2. Directory-Related Directives 197

13.7. The Lone Directive: %package 200

13.7.1. -n <string>: Use <string> As the Entire Subpackage Name 201

13.8. Conditionals 201

13.8.1. The %ifarch Conditional 202

13.8.2. The %ifnarch Conditional 202

13.8.3. The %ifos Conditional 203

13.8.4. The %ifnos Conditional 203

13.8.5. The %else Conditional 203

13.8.6. The %endif Conditional 203

13.9. Summary 204

14 Adding Dependency Information to a Package 205

14.1. An Overview of Dependencies 206

14.2. Automatic Dependencies 206

14.2.1. The Automatic Dependency Scripts 207

14.2.2. Automatic Dependencies: An Example 208

14.2.3. The autoreqprov Tag: Disable Automatic
Dependency Processing 209

14.3. Manual Dependencies 209

14.3.1. The requires Tag 209

14.3.2. The conflicts Tag 211

14.3.3. The provides Tag 212

14.4. To Summarize 213

Page 11

15 Making a Relocatable Package 215

15.1. Why Relocatable Packages? 216

15.2. The prefix tag: Relocation Central 216

15.3. Relocatable Wrinkles: Things to Consider 217

15.3.1. %files List Restrictions 218

15.3.2. Relocatable Packages Must Contain Relocatable Software 218

15.3.3. The Relocatable Software Is Referenced by
Other Software 219

15.4. Building a Relocatable Package 219

15.4.1. Tying Up the Loose Ends 221

15.4.2. Test-Driving a Relocatable Package 222

16 Making a Package That Can Build Anywhere 225

16.1. Using Build Roots in a Package 226

16.1.1. Some Things to Consider 229

16.2. Having RPM Use a Different Build Area 230

16.2.1. Setting Up a Build Area 230

16.2.2. Directing RPM to Use the New Build Area 231

16.2.3. Performing a Build in a New Build Area 231

16.3. Specifying File Attributes 233

16.3.1. %attr: How Does It Work? 233

16.3.2. Betcha Thought We Forgot 235

17 Adding PGP Signatures to a Package 237

17.1. Why Sign a Package? 238

17.2. Getting Ready to Sign 238

17.2.1. Preparing PGP: Creating a Key Pair 238

17.2.2. Preparing RPM 240

17.3. Signing Packages 241

17.3.1. --sign: Sign a Package at Build Time 241

17.3.2. --resign: Replace a Package's Signature(s) 243

17.3.3. --addsign: Add a Signature to a Package 244

18 Creating Subpackages 247

18.1. What Are Subpackages? 248

18.2. Why Are Subpackages Needed? 248

18.3. Our Sample Spec File: Subpackages Galore! 248

18.4. Spec File Changes for Subpackages 249

18.4.1. The Subpackage's Preamble 249

18.4.2. The %files List 253

18.4.3. Install and Erase Time Scripts 255

18.5. Build-Time Scripts: Unchanged for Subpackages 257

18.5.1. Our Spec File: One Last Look 257

18.6. Building Subpackages 259

18.6.1. Giving Subpackages the Once-Over 260

Page 12

19 Building Packages for Multiple Architectures and
Operating Systems 263


19.1. Architectures and Operating Systems: A Primer 264

19.1.1. Let's Just Call Them Platforms 265

19.2. What Does RPM Do to Make Multiplatform Packaging Easier? 265

19.2.1. Automatic Detection of the Build Platform 265

19.2.2. Automatic Detection of the Install Platform 265

19.2.3. Platform-Dependent Tags 265

19.2.4. Platform-Dependent Conditionals 266

19.3. Build and Install Platform Detection 266

19.3.1. Platform-Specific rpmrc Entries 266

19.3.2. Overriding Platform Information at Build Time 268

19.3.3. Overriding Platform Information at Install Time 268

19.4. optflags: The Other rpmrc File Entry 269

19.5. Platform-Dependent Tags 269

19.5.1. The excludexxx Tags 270

19.5.2. The exclusivexxx Tags 270

19.6. Platform-Dependent Conditionals 270

19.6.1. Common Features of All Conditionals 271

19.6.2. %ifxxx 272

19.6.3. %ifnxxx 272

19.7. Hints and Kinks 273

20 Real-World Package Building 275

20.1. An Overview of Amanda 276

20.2. Initial Building Without RPM 276

20.2.1. Setting Up a Test Build Area 277

20.2.2. Getting Software to Build 278

20.2.3. Installing and Testing 279

20.3. Initial Building with RPM 281

20.3.1. Generating Patches 281

20.3.2. Making a First-Cut Spec File 283

20.3.3. Getting the Original Sources Unpacked 285

20.3.4. Getting Patches Properly Applied 286

20.3.5. Letting RPM Do the Building 287

20.3.6. Letting RPM Do the Installing 288

20.3.7. Testing RPM's Handiwork 289

20.4. Package Building 289

20.4.1. Creating the %files List 291

20.4.2. Testing those first packages 296

20.4.3. Finishing Touches 297

21 A Guide to the RPM Library API 305

21.1. An Overview of rpmlib 306

21.2. rpmlib Functions 306

21.2.1. Error Handling 306

21.2.2. Getting Package Information 307

Page 13

21.2.3. Variable Manipulation 308

21.2.4. rpmrc-Related Information 309

21.2.5. RPM Database Manipulation 311

21.2.6. RPM Database Traversal 312

21.2.7. RPM Database Search 313

21.2.8. Package Manipulation 315

21.2.9. Package and File Verification 318

21.2.10. Dependency-Related Operations 319

21.2.11. Diagnostic Output Control 322

21.2.12. Signature Verification 323

21.2.13. Header Manipulation 324

21.2.14. Header Entry Manipulation 326

21.2.15. Header Iterator Support 327

21.3. Sample Code 328

21.3.1. Example #1 328

21.3.2. Example #2 330

21.3.3. Example #3 333

Part III Appendixes

A The Format of the RPM File 337

A.1. The RPM File-Naming Convention 338

A.2. The RPM File Format 339

A.2.1. Parts of an RPM File 339

A.3. Tools for Studying RPM Files 349

A.4. Identifying RPM Files with the file(1) Command 351

B The rpmrc File 353

B.1. Using the --showrc Option 354

B.2. Different Places an rpmrc File Resides 355

B.2.1. /usr/lib/rpmrc 355

B.2.2. /etc/rpmrc 358

B.2.3. .rpmrc in the User's Login Directory 358

B.2.4. File Specified by the --rcfile Option 358

B.3. rpmrc File Syntax 358

B.4. rpmrc File Entries 359

B.4.1. arch_canon 359

B.4.2. os_canon 359

B.4.3. buildarchtranslate 359

B.4.4. buildostranslate 360

B.4.5. arch_compat 360

B.4.6. os_compat 360

B.4.7. builddir 361

B.4.8. buildroot 361

B.4.9. cpiobin 361

B.4.10. dbpath 361

B.4.11. defaultdocdir 361

Page 14

B.4.12. distribution 362

B.4.13. excludedocs 362

B.4.14. ftpport 362

B.4.15. ftpproxy 362

B.4.16. messagelevel 362

B.4.17. netsharedpath 362

B.4.18. optflags 363

B.4.19. packager 363

B.4.20. pgp_name 363

B.4.21. pgp_path 364

B.4.22. require_distribution 364

B.4.23. require_icon 364

B.4.24. require_vendor 364

B.4.25. rpmdir 364

B.4.26. signature 365

B.4.27. sourcedir 365

B.4.28. specdir 365

B.4.29. srcrpmdir 365

B.4.30. timecheck 365

B.4.31. tmppath 365

B.4.32. topdir 366

B.4.33. vendor 366

C Concise RPM Command Reference 367

C.1. Global Options 368

C.2. Informational Options 368

C.3. Query Mode 368

C.3.1. Package Specification Options for Query Mode 368

C.3.2. Information Selection Options for Query Mode 369

C.4. Verify Mode 369

C.4.1. Options for Verify Mode 370

C.5. Install Mode 370

C.5.1. Options for Install Mode 370

C.6. Upgrade Mode 371

C.6.1. Options for Upgrade Mode 371

C.7. Erase Mode 371

C.7.1. Options for Erase Mode 372

C.8. Build Mode 372

C.8.1. Build Mode Stages 372

C.8.2. Options for Build Mode 372

C.9. Rebuild Mode 373

C.9.1. Options for Rebuild Mode 373

C.10. Recompile Mode 373

C.10.1. Options for Recompile Mode 373

C.11. Resign Mode 373

C.11.1. Options for Resign Mode 373

Page 15

C.12. Add Signature Mode 373

C.12.1. Options for Add Signature Mode 374

C.13. Check Signature Mode 374

C.13.1. Options for Check Signature Mode 374

C.14. Initialize Database Mode 374

C.14.1. Options for Initialize Database Mode 374

C.15. Rebuild Database Mode 374

C.15.1. Options to Rebuild Database Mode 374

D Available Tags for queryformat 375

D.1. List of --queryformat Tags 376

E Concise Spec File Reference 387

E.1. Comments 388

E.2. The Preamble 388

E.2.1. Package-Naming Tags 388

E.2.2. Descriptive Tags 388

E.2.3. Dependency Tags 390

E.2.4. Architecture- and Operating System_Specific Tags 391

E.2.5. Directory-Related Tags 392

E.2.6. Source and Patch Tags 393

E.3. Scripts 394

E.3.1. BuildTime Scripts 394

E.3.2. Install and EraseTime Scripts 395

E.3.3. Verification Scripts 396

E.4. Macros 396

E.4.1. The %setup Macro 396

E.4.2. The %patch Macro 397

E.5. The %files List 398

E.6. Directives for the %files List 399

E.6.1. File-Related Directives 399

E.6.2. Directory-Related Directives 400

E.7. The %package Directive 401

E.7.1. The %package -n Option 401

E.8. Conditionals 401

E.8.1. The %ifarch Conditional 401

E.8.2. The %ifnarch Conditional 402

E.8.3. The %ifos Conditional 402

E.8.4. The %ifnos Conditional 402

E.8.5. The %else Conditional 402

E.8.6. The %endif Conditional 402

F RPM-Related Resources 403

F.1. Where to Get RPM 404

F.1.1. FTP Sites 404

F.1.2. What Do I Need? 406

Page 16

F.2. Where to Talk About RPM 407

F.2.1. The rpm-list Mailing List 408

F.2.2. The redhat-list Mailing List 408

F.2.3. The redhat-digest Mailing List 408

F.3. RPM on the World Wide Web 409

F.4. RPM's License 409

Preamble 410

GNU General Public License 411

How to Apply These Terms to Your New Programs 415

G An Introduction to PGP 417

G.1. PGP: Privacy for Regular People 418

G.1.1. Keys Your Locksmith Wouldn't Understand 418

G.1.2. Are RPM Packages Encrypted? 419

G.1.3. Do All RPM Packages Have Digital Signatures? 420

G.1.4. So Much to Cover, So Little Time 420

G.2. Installing PGP for RPM's Use 420

G.2.1. Obtaining PGP 420

G.2.2. Building PGP 422

G.2.3. Ready to Go! 423

Index 425

Page 19

Introduction

Linux and RPM: A Brief History

Welcome! This is a book about the Red Hat Package Manager or, as it is known to its friends, RPM. The history of RPM is inextricably linked to the history of Linux, so a bit of Linux history may be in order. Linux is a full-featured implementation of a UNIX-like operating system, and has taken the computing world by storm.

And for good reason: With the addition of Linux, an Intel-based personal computer that had previously been prisoner of the dreaded Windows hourglass is transformed into a fully multitasking, network-capable personal workstation. All for the cost of the time required to download, install, and configure the software.

Of course, if you're not the type to tinker with downloaded software, you can get a CD-ROM containing Linux and associated software. The amount of tinkering required with these distributions varies widely. The phrase "You get what you pay for" is never more true than in the area of Linux distributions.

One distribution bears the curious name Red Hat Linux. Produced by a company of the same name, this Linux distribution is different. One of the key decisions a new Linux user needs to make is which of the many different parts of the distribution to install on his system. Most distributions use some sort of menu, making it easy to pick and choose. Red Hat Linux is no different.

But what is different about Red Hat Linux is that the creators of the distribution wanted their customers to have the ability to make the same choices long after the installation process was over. Some commercial UNIX systems have this capability (called package management), and a few Linux distributors were trying to come up with something similar, but none had the extensive scope present in RPM.

Over time, Red Hat Linux has become the most popular distribution available. For it to edge out the previous leader (known as Slackware) in just two years is amazing. There has to be a reason for this kind of success, and a good part of the reason is RPM. But until now, there has been precious little in terms of RPM documentation. You could say that RPM's ease of use has made detailed instructions practically unnecessary, and you'd be right.

However, there are always people who want to know more about their computers, and given the popularity of Red Hat Linux, this alone would have made a book on RPM worthwhile.

But there's more to the story than that.

Page 20

There is a truism in the world of free software that goes something like this: If there's a better solution freely available, use it! RPM is no exception to the rule. Put under the terms of the GNU General Public License (meaning: RPM cannot be made proprietary by anyone, not even Bill Gates), RPM started to attract the attention of others in the Linux, UNIX, and free software communities.

At present, RPM is used by several commercial software companies producing Linux applications. They find that RPM makes it easier to get their products into the hands of their customers. They also find that it can even make the process of building their software easier. (Those of you who develop software for fun and profit, stick around. The second half of this book will show you everything you need to know to get your software "RPM-ized.")

People have also ported RPM to several commercial UNIX systems, including DEC's Digital UNIX, IBM's AIX, and Silicon Graphics's IRIX. Why? The simple answer is that it makes it easier to install, upgrade, and uninstall software. If all these people are using RPM, shouldn't you?

Parts of the Book and Who They're For

This book is divided into two major sections. The first section is for anyone who needs to know how to use RPM on his system. Given the state of the Linux arena today, this could include just about anyone, including people who are new to Linux or even UNIX. So those of you who think that

ls -FAl !*|less

is serious magic (or maybe even a typing error), relax. We'll explain everything you'll need to know in the first section.

The book's second half covers all there is to know about building packages using RPM. Because software engineering on Linux and UNIX systems requires in-depth knowledge of the operating system, available tools, and basic programming concepts, we're going to assume that the reader has sufficient background in these areas. Feel free to browse through the second half, but don't hesitate to seek additional sources of information if you find the going a bit tough.

Table of Contents | Next