Maximum RPM

The ultimate source for advanced RPM packaging techniques

Edward C. Bailey

Publisher: SAMS, 1997, 450 pages

ISBN: 0-672-31105-4

Keywords: System Administration

Last modified: June 9, 2021, 11:42 a.m.

Take your RPM programming skills to the highest level.

From an introduction to software package management to the step-by-step examples of the Red Hat Package Manager in daily use, thios advanced reference show you how to install and upgrade packages, perform sophisticated RPM database queries, and verify your RPM-based system. In addition to covering RPM from the user perspective, Maximum RPM tells you how to build your own RPM packages. You'll learn the right way to build RPM packages that are easy to use and maintain.

Written in close cooperation with Marc Ewing and Erik Troan, the developers of the RPM technology, Maximum RPM is the official, definitive technical reference to the RPM system. It provides accurate and detailed coverage of RPM's history, philosophy, usage, and internals, from both the user and packager perspective.

  1. RPM and Computer Users: How to Use RPM to Effectively Manage Your Computer
    1. An Introduction to Package Management
      1. What Are Packages, and Why Manage Them?
        1. Enter the Package
        2. Manage Your Packages or They Will Manage You
      2. Package Management: How to Do It?
        1. The Ancestors of RPM
      3. RPM Design Goals
        1. Making It Easy to Get Packages on and off the System
        2. Making It Easy to Verify That a Package Was Instyalled Correctly
        3. Making It Easy for the Package Builder
        4. Making It Start with the Original Source Code
        5. Making It Work on Different Computer Architectures
      4. What's in a package?
        1. RPM's Package Labels
        2. Labels and Names: Similar but Distinct
        3. Packagewide Information
        4. Per-File Information
      5. Summary
    2. Using RPM to Install Packages
      1. rpm -i — What does it do?
      2. Performing an Install
        1. URLs: Another Way to Specify Package Files
        2. A Warning Message You Might Never See
      3. Two Handy Options
        1. Getting a Bit More Feedback with -v
        2. -h: Perfect for the Impatient
      4. Additional options to rpm -i
        1. Getting a Lot More Information with -vv
        2. --test: Perform Installation Tests Only
        3. --replacepkgs: Install the Package Even if It's Already Installed
        4. --replacefiles: Install the Package Even if It Replaces Another Package's Files
        5. --nodeps: Do Not Check Dependencies Before Installing Package
        6. --force: The Big Hammer
        7. --excludedocs: Do Not Install Documentation for This Package
        8. --includedocs: Install Documentation for This Package
        9. --prefix <path>: Relaocate the Package to <path>, if Possible
        10. --noscripts: Do Not Execute Pre- and Postinstall Scripts
        11. --percent: Not Meant for Human Consumption
        12. --rcfile <rcfile>: Use <rcfile> As an rpmrc File
        13. --root <path>: Use <path> As an Alternate Root
        14. --dbpath <path>: Use <path> to Find an RPM Database
        15. --ftpport <port>: Use <port> in FTP-Based Installs
        16. --ftpproxy <host>: Use <host> As a Proxy in FTP-Based Installs
        17. --ignorearch: Do Not Verify Package Architecture
        18. --ignoreos: Do Not Verify the Package Operating System
    3. Using RPM to Erase Packages
      1. rpm -e: What Does it Do?
      2. Erasing a Package
        1. Getting More Information with -vv
      3. Additional Options
        1. --test: Go Through the Process of Erasing the Package, But Do Not Erase It
        2. --nodeps: Do Not Check Dependencies Before Erasing Package
        3. --noscripts: Do Not Execute Pre- and Postuninstall Scripts
        4. --rcfile <rcfile>: Read <rcfile> for RPM Defaults
        5. --root <path>: Use <path> As the Root
        6. --dbpath <path>: Use <path> to Find the RPM Database
      4. rpm -e and Config Files
      5. Watch Out!
    4. Using RPM to Upgrade Packages
      1. rpm -U: What Does it Do?
        1. Config File Magic
      2. Upgrading a Package
        1. rpm -U's Dirty Little Secret
      3. They're Nearly Identical…
        1. --oldpackage: Upgrade to an Older Version
        2. --force: The Big Hammer
        3. --noscripts: Do Not Execute Install and Uninstall Scripts
    5. Getting Information About Packages
      1. rpm -q: What does it do?
      2. The Parts of an RPM Query
        1. Query Commands, Part I: Package Selection
        2. Quering Commands, Part II: Information Selection
        3. Getting a Lot More Information with -vv
        4. --root <path>: Use <path> As an Alternate Root
        5. --rcfile <rcfile>: Use <rcfile>As an Alternate rpmrc File
        6. --dbpath <path>: Use <path> to Find an RPM Database
      3. A Few Handy Queries
        1. Finding Config Files Based on a Program Name
        2. Learning More About an Uninstalled Package
        3. Finding Documentation for a Specific Package
        4. Finding Similar Packages
        5. Finding Recently Installed Packages, Part I
        6. Finding Recently Installed Packages, Part II
        7. Finding the Largest Installed Packages
    6. Using RPM to Verify Installed Packages
      1. rpm -V: What Does it Do?
        1. What Does It Verify?
      2. When Verification Fails: rpm -V Output
        1. Other Verification Failure Messages
      3. Selecting What to Verify, and How
        1. The Package Label: Verify an Installed Package Against the RPM Database
        2. -a: Verify All Installed Packages Against the RPM Database
        3. -f <file>: Verify the Package Owning <file> Against the RPM Database
        4. -p <file>: Verify Against a Specific Package File
        5. -g <group>: Verify Packages Belonging to <group>
        6. --nodeps: Do Not Check Dependencies Before Erasing Package
        7. --noscripts: Do Not Execute Verification Scipts
        8. --nofiles: Do Not Verify File Attributes
        9. -v: Display Additional Information
        10. -vv: Display Debugging Information
        11. --dbpath <path>: Use <path> to Find an RPM Database
        12. --root <path>: Set Alternate Root to <path>
        13. --rcffile <rcfile>: Set Alternate rpmrc File to <rcfile>
      4. We've Lied to You…
        1. RPM Controls What Gets Verified
        2. The Package Builder Can Also Control What Gets Verified
    7. Using RPM to Verify Package Files
      1. rpm -K: What Does it Do?
        1. Pretty Good Privacy: RPM's Assistant
      2. Configuring PGP for rpm -K
      3. Using rpm -K
        1. -v: Display Additional Information
        2. When the Package Is Not Signed
        3. When You Are Missing the Correct Public Key
        4. When a Package Just Doesn't Verify 
        5. --nopgp: Do Not Verify Any PGP Signatures
        6. -vv: Display Debugging Information
        7. --rcfile <rcfile>: Use <rcfile> As an Alternate rpmrc File
    8. Miscellanea
      1. Other RPM Options
        1. --rebuilddb: Rebuild RPM Database
        2. --initdb: Create a New RPM Database
        3. --quiet: Produce As Little Output As Possible
        4. --help: Display a Help Message
        5. --version: Display the Current RPM Version
      2. Using rpm2cpio
        1. rpm2cpio: What Does It Do?
        2. A More Real-World Example: Listing the Files in a Package File
        3. Extracting One or More Files from a Package File
      3. Source Package Files and How To Use Them
        1. A Gentle Introduction to Source Code
        2. Do You Really Need More Information Than This?
        3. So What Can I Do with It?
        4. Stick with Us!
  2. RPM and Developers: How to Distribute Your Software More Easily With RPM
    1. The Philosophy Behind RPM
      1. Pristine Sources
      2. Easy Builds
        1. Reproducible Builds
        2. Unattended Builds
      3. Multiarchitecture/Operating System Support
      4. Easier For Your Users
        1. Easy Upgrades
        2. Intelligent Configuration File Handling
        3. Powerful Query Capabilities
        4. Easy Package Verification
      5. To Summarize…
    2. The Basics of Developing With RPM
      1. The Inputs
        1. The Sources
        2. The Patches
        3. The Spec File
      2. The Engine: RPM
      3. The Outputs
        1. The Source Package File
        2. The Binary RPM
      4. And Now…
    3. Building Packages: A Simple Example
      1. Creating the Build Directory Structure
      2. Getting the Sources
      3. Creating the Spec File
        1. The Preamble
        2. The %prep Section
        3. The %build Section
        4. The %install Section
        5. The %files Section
        6. The Missing Spec File Sections
      4. Starting the Build
      5. When Things Go Wrong
        1. Problems During the Build
        2. Testing Newly Built Packages
      6. Summary
    4. rpm -b Command Reference
      1. rpm -b: What Does it Do?
        1. rpm -bp: Execute %prep
        2. rpm -bc: Execute %prep, %build
        3. rpm -bi: Execute %prep, %build, %install
        4. rpm -bb: Execute %prep, %build, %install, Package (bin)
        5. rpm -ba: Execute %prep, %build, %install, Package (bin, src)
        6. rpm -bl: Check %files List
        7. --short-circuit: Force Build to Start at a Particular Stage
        8. --buildarch <arch>: Perform a Build for the <arch> Architecture
        9. --buildos <os>: Perform a Build for the <os> Operating System
        10. --sign: Add a Digital Signature to the Package
        11. --test: Create, Save, build Scripts for Review
        12. --clean: Clean Up After Build
        13. --buildroot <path>: Execute %install Using <path> As the Root
        14. --timecheck <secs>: Prints a Warning if Files to Be Packaged Are More than <secs> Old
        15. -vv: Display Debugging Information
        16. --quiet: Produce As Little Output As Possible
        17. --rcfile <rfcile>: Set Alternate rpmrc File to <rcfile>
      2. Other Build-Related Commands
        1. rpm --recompile: What Does It Do?
        2. rpm --rebuild: What Does It Do?
      3. Summary
    5. Inside the Spec File
      1. Comments: Notes Ignored by RPM
      2. Tags: Data Definitions
        1. Package Naming Tags
        2. Descriptive Tags
        3. Dependency Tags
        4. Architecture- and Operating System-Specific Tags
        5. Directory-Related Tags
        6. Source and Patch Tags
      3. Scripts: RPM's Workhorse
        1. Build-Time Scripts
        2. Install&Erase-Time Scripts
        3. Verification-Time Scripts — The %verifyscript Script
      4. Macros: Helpful Shorthand for Package Builders
        1. The %setup Macro
        2. The %patch Macro
      5. The %files List
      6. Directives For the %files list
        1. File-Related Directives
        2. Directory-Related Directives
      7. The Lone Directive: %package
        1. -n <string>: Use <string> As the Entire Subpackage Name
      8. Conditionals
        1. The %ifarch Conditional
        2. The %ifnarch Conditional
        3. The %ifos Conditional
        4. The %ifnos Conditional
        5. The %else Conditional
        6. The %endif Conditional
      9. Summary
    6. Adding Dependency Information to a Package
      1. An Overview of Dependencies
      2. Automatic Dependencies
        1. The Automatic Dependency Scripts
        2. Automatic Dependencies: An Example
        3. The autoreqprov Tag: Disable Automatic Dependency Processing
      3. Manual Dependencies
        1. The requires Tag
        2. The conflicts Tag
        3. The provides Tag
      4. To Summarize…
    7. Making a Relocatable Package
      1. Why Relocatable Packages?
      2. The prefix tag: Relocation Central
      3. Relocatable Wrinkles: Things to Consider
        1. %files List Restrictions
        2. Relocatable Packages Must Contain Relocatable Software
        3. The Relocatable Software Is Referenced by Other Software
      4. Building a Relocatable Package
        1. Tying Up the Loose Ends
        2. Test-Driving a Relocatable Package
    8. Making a Package That Can Build Anywhere
      1. Using Build Roots in a Package
        1. Some Things to Consider
      2. Having RPM Use a Different Build Area
        1. Setting Up a Build Area
        2. Directing RPM to Use the New Build Area
        3. Performing a Build in a New Build Area
      3. Specifying File Attributes
        1. %attr: How Does It Work?
        2. Betcha Thought We Forgot
    9. Adding PGP Signatures to a Package
      1. Why Sign a Package?
      2. Getting Ready to Sign
        1. Preparing PGP: Creating a Key Pair
        2. Preparing RPM
      3. Signing Packages
        1. --sign: Sing a Package at Build Time
        2. --resign: Replace a Package's Signature(s)
        3. --addsign: Add a Signature to a Package
    10. Creating Subpackages
      1. What Are Subpackages?
      2. Why Are Subpackages Needed?
      3. Our Example Spec File: Subpackages Galore!
      4. Spec File Changes For Subpackages
        1. The Subpackage's Preamble
        2. The %files List
        3. Install and Erase Time Scripts
      5. Build-Time Scripts: Unchanged For Subpackages
        1. Our Spec File: One Last Look
      6. Building Subpackages
        1. Giving Subpackages the Once-Over
    11. Building Packages for Multiple Architectures and Operating Systems
      1. Architectures and Operating Systems: A Primer
        1. Let's Just Call Them Platforms
      2. What Does RPM Do To Make Multi-Platform Packaging Easier?
        1. Automatic Detection of the Build Platform
        2. Automatic Detection of the Install Platform
        3. Platform-Dependent Tags
        4. Platform-Dependent Conditionals
      3. Build and Install Platform Detection
        1. Platform-Specific rpmrc Entries
        2. Overriding Platform Information at Build Time
        3. Overriding Platform Information at Install Time
      4. optflags: The Other rpmrc File Entry
      5. Platform-Dependent Tags
        1. The excludexxx Tags
        2. The exclusivexxx Tags
      6. Platform-Dependent Conditionals
        1. Common Features of All Conditionals
        2. %ifxxx
        3. %ifnxxx
      7. Hints and Kinks
    12. Real-World Package Building
      1. An Overview of Amanda
      2. Initial Building Without RPM
        1. Setting Up a Test Build Area
        2. Getting Software to Build
        3. Installing and Testing
      3. Initial Building With RPM
        1. Generating Patches
        2. Making a First-Cut Spec File
        3. Getting the Original Sources Unpacked
        4. Getting Patches Properly Applied
        5. Letting RPM Do the Building
        6. Letting RPM Do the Installing
        7. Testing RPM's Handiwork
      4. Package Building
        1. Creating the %files List
        2. Testing those first packages
        3. Finishing Touches
    13. A Guide to the RPM Library API
      1. An Overview of rpmlib
      2. rpmlib Functions
        1. Error handling
        2. Getting Package Information
        3. Variable Manipulation
        4. rpmrc-Related Information
        5. RPM Database Manipulation
        6. RPM Database Traversal
        7. RPM Database Search
        8. Package Manipulation
        9. Packages and File Verification
        10. Dependency-Related Operations
        11. Diagnostic Output Control
        12. Signature Verification
        13. Header Manipulation
        14. Header Entry Manipulation
        15. Header Iterator Support
      3. Sample Code
        1. Example #1
        2. Example #2
        3. Example #3
  3. Appendixes
    1. Format of the RPM File
      1. RPM File Naming Convention
      2. RPM File Format
        1. Parts of an RPM File
      3. Tools For Studying RPM Files
      4. Identifying RPM files with the file(1) command
    2. The rpmrc File
      1. Using the --showrc Option
      2. Different Places an rpmrc File Resides
        1. /ust/lib/rpmrc
        2. /etc/rpmrc
        3. .rpmrc in the User's Login Directory
        4. File Specified by the --rcfile Option
      3. rpmrc File Syntax
      4. rpmrc File Entries
        1. arch_canon
        2. os_canon
        3. buildarchtranslate
        4. buildostranslate
        5. arch_compat
        6. os_compat
        7. builddir
        8. buildroot
        9. cpiobin
        10. dbpath
        11. defaultdocdir
        12. distribution
        13. excludedocs
        14. ftpport
        15. ftpproxy
        16. messagelevel
        17. netsharedpath
        18. optflags
        19. packager
        20. pgp_name
        21. pgp_path
        22. require_distribution
        23. require_icon
        24. require_vendor
        25. rpmdir
        26. signature
        27. sourcedir
        28. specdir
        29. srcrpmdir
        30. timecheck
        31. tmppath
        32. topdir
        33. vendor
    3. Concise RPM Command Reference
      1. Global Options
      2. Informational Options
      3. Query Mode
        1. Package Specification Options for Query Mode
        2. Information Selection Options for Query Mode
      4. Verify Mode
        1. Options for Verify Mode
      5. Install Mode
        1. Options for Install Mode
      6. Upgrade Mode
        1. Options for Upgrade Mode
      7. Erase Mode
        1. Options for Erase Mode
      8. Build Mode
        1. Build Mode States
        2. Options for Build Mode
      9. Rebuild Mode
        1. Options for Rebuild Mode
      10. Recompile Mode
        1. Options for Recompile Mode
      11. Resign Mode
        1. Options for Resign Mode
      12. Add Signature Mode
        1. Options for Add Signature Mode
      13. Check Signature Mode
        1. Options for Check Signature Mode
      14. Initialize Database Mode
        1. Options for Initialize Database Mode
      15. Rebuild Database Mode
        1. Options to Rebuild Database Mode
    4. Available Tags For --queryformat
      1. List of --queryformat Tags
    5. Concise Spec File Reference
      1. Comments
      2. The Preamble
        1. Package-Naming Tags
        2. Descriptive Tags
        3. Dependency Tags
        4. Architecture- and Operating System-Specific Tags
        5. Directory-Related Tags
        6. Source and Patch Tags
      3. Scripts
        1. BuildTime Scripts
        2. Install and EraseTime Scripts
        3. Verification Scripts
      4. Macros
        1. The %setup Macro
        2. The &patch Macro
      5. The %files List
      6. Directives For the %files list
        1. File-Related Directives
        2. Directory-Related Directives
      7. The %package Directive
        1. The %package -n Option
      8. Conditionals
        1. The %ifarch Conditional
        2. The %ifnarch Conditional
        3. The %ifos Conditional
        4. The %ifnos Conditional
        5. The %else Conditional
        6. The %endif Conditional
    6. RPM-related Resources
      1. Where to Get RPM
        1. FTP Sites
        2. What Do I Need?
      2. Where to Talk About RPM
        1. The rpm-list Mailing List
        2. The redhat-list Mailing List
        3. The redhat-digest Mailing List
      3. RPM On the World Wide Web
      4. RPM's License
        • Preamble
        • GNU General Public License
        • How to Apply These Terms to Your New Programs
    7. An Introduction to PGP
      1. PGP — Privacy for Regular People
        1. Keys Your Locksmith Wouldn't Understand
        2. Are RPM Packages Encrypted?
        3. Do All RPM Packages Have Digital Signatures?
        4. So Much to Cover, So Little Time
      2. Installing PGP for RPM's Use
        1. Obtaining PGP
        2. Building PGP
        3. Ready to Go

Reviews

Maximum RPM

Reviewed by Roland Buresund

Mediocre **** (4 out of 10)

Last modified: May 21, 2007, 3:12 a.m.

The authorative work on RPM. Already obsolete and outdated. Good introduction to the subject, though.

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required

captcha

required