Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
Look up keyword or section
Like this

Table Of Contents

1.1 The Need for Linux Package Management Systems
1.2 RPM Design Goals
• Package-oriented focus
1.2.1 Ease of use
1.2.2 Package-oriented focus
1.2.3 Package upgradability
1.2.4 Package interdependencies
1.2.5 Query capabilities
1.2.6 Package verification
1.2.7 Multiple architectures
1.2.8 Pristine sources
1.3 RPM Terminology
1.4 Summary
2.1 Understanding the Package File
2.1.1 RPM file format
2.1.2 Binary RPMs and Source RPMs binary RPMs
2.1.3 Source RPMs
2.2 Querying the RPM Database
2.3 Running RPM Commands
2.3.1 Working with the rpm command
2.3.2 Other RPM commands
2.4 Summary
Using RPM
3.1 The rpm Command
3.2 Upgrading and Installing Software
3.2.1 Upgrading with the rpm command Checking That the Package Is Installed Getting Feedback During Installation and upgrades The Installation Task In Detail Taking a Test Drive Installing or upgrading More Than One Package At A Time Installing in Different Directories Forcing the Issue Skipping the Scripts Ignorance Is Bliss Documentation? What Documentation?
3.2.2 Upgrading packages Options When Upgrading Smart Upgrades
3.2.3 Freshening up
3.2.4 Installing Packages
3.2.5 Installing Over the Internet Installing Using FTP Installing Using HTTP
3.2.6 Installing source RPMs Open-source Software
3.3 Removing Software
3.3.1 Checking that the package has been removed
3.3.2 Removing multiple packages at a time
3.3.3 Options when removing packages
3.4 Other rpm Command Options
3.5 Summary
Using the RPM Database
• Querying the RPM database
4.1 Querying the RPM Database
4.1.1 Querying packages
4.1.2 Querying everything
4.1.3 Refining the query Piping the Output To grep Querying with Wildcards
4.1.4 Finding which packages own files
4.2 Getting Information on Packages
4.2.1 Describing packages
4.2.2 Package groups
4.2.3 Listing the files in a package Listing Package Description and Documentation Files Listing the State of Configuration Files Querying for Package Dependencies Querying for File Information Other Query Format Tags
4.2.11 Other queries
4.3 Getting Information on Package Files
4.4 Verifying Installed RPM Packages
4.4.1 Verifying your entire system
4.4.2 Controlling the verification
4.5 Working With the RPM Database
4.5.1 Backing up the RPM database
4.5.2 Rebuilding the RPM database
4.5.3 Creating a new RPM database
4.6 Summary
Package Dependencies
5.1 Understanding the Dependency Concept
5.1.1 Capabilities
5.1.2 Version dependencies
5.1.3 Conflicts
5.1.4 Obsoletes
5.2 Checking for Dependencies
5.2.1 Determining the capabilities a package requires
5.2.2 Determining the capabilities a package provides
5.2.3 Checking for conflicts
5.2.4 Determining which packages require a certain capability
5.2.5 Determining which package provides a certain capability
5.3 Triggers
5.4 Summary
• Understanding transactions
6.1 Understanding Transactions
6.1.1 When do you need transactions?
6.1.2 Backing out of transactions
6.2 Transactions with the rpm Command
6.2.1 Transaction IDs Viewing RPM Transaction IDs Viewing the Packages Associated with a Transaction ID
6.2.2 Rolling Back Transactions
6.3 Saving Old Packages
6.4 Summary
RPM Management Software
7.1 Locating RPMs
7.3 Extending RPM Management
7.3.1 AutoRPM
7.3.2 AutoUpdate
7.3.3 The Red Hat Network and up2date
7.3.4 Current
7.3.5 urpmi and RpmDrake
7.3.6 apt-rpm
7.3.7 The poldek
7.4 Summary
Creating RPMs: An Overview
• Preparing to build RPMs
8.1 Preparing to Build RPMs
8.1.1 Planning what you want to build
8.1.2 Gathering the software to package
8.1.3 Creating a reproducible build of the software Unpacking Software Reading the README Building Programs with Linux Build Tools imake The configure script Building Perl modules
8.1.4 Planning for Upgrades
8.1.5 Outlining Any Dependencies
8.2 Building RPMs
8.2.1 Setting up the directory structure
8.2.2 Placing your sources into the directory structure
8.2.3 Creating the spec file The introduction section The prep section The build section The install section The clean section The files section
8.2.4 Building RPMs with the rpmbuild command
8.3 Verifying Your RPMS
8.4 Summary
Working with Spec Files
9.1 Reading Spec Files
9.2 Writing Spec Files
9.2.2 Storing spec files on disk
9.3 Defining Package Information
9.3.1 Describing the package Naming the Package Specifying Company Information Filling in the Description Specifying the Platform Architecture
9.3.2 Setting build locations
9.3.3 Naming source files
9.3.4 Naming patches
9.4 Controlling the Build
9.4.1 Preparing for the build
9.4.2 Building the software
9.4.3 Installing the software
9.4.4 Cleaning up after the build
9.4.5 Defining installation scripts
9.5 Filling the List of Files
9.5.1 Using wildcards
9.5.2 Naming directories of files
9.5.3 Marking files as documentation or configuration files
9.5.4 Setting file attributes
9.5.5 Verifying the %files section
9.5.6 Filling the list of files automatically
9.5.7 Handling RPM build errors for unpackaged files
9.6 Adding Change Log Entries
9.7 Defining Spec File Macros
9.7.1 Built-in macros
9.7.2 Spec file-specific macros
9.7.3 Defining new macros
9.7.4 Specifying parameters to macros
9.8 Creating XML Spec Files
9.9 Summary
Advanced RPM Packaging
10.1 Defining Package Dependencies
10.1.1 Naming dependencies Specifying the Version of the Dependencies Creating Virtual CAPABILITIES Naming Dependencies on Script Engines and Modules
10.1.2 Setting prerequisites
10.1.3 Naming build dependencies
10.1.4 Generating dependencies automatically
10.2 Setting Triggers
10.3 Writing Verification Scripts
10.4 Creating Subpackages
10.4.1 Providing information for subpackages
10.4.2 Defining scripts for subpackages
10.4.3 Building subpackages
10.5 Creating Relocatable Packages
10.5.1 Setting up the prefixes
10.5.2 Define the files section
10.5.3 Problems creating relocatable packages
10.6 Defining Conditional Builds
10.6.1 Defining conditional macros
10.6.2 Using conditional blocks
10.6.3 Using architecture-based conditionals
10.7 Summary
11.1 Building RPMs with the rpmbuild Command
11.1.1 Customizing the build
11.1.2 Testing the build
11.1.3 Debugging the build
11.1.4 Cleaning up
11.1.5 Building for other platforms
11.2 Building RPMs Without an External Spec File
11.2.1 Options for working with tar archives
11.2.2 The expected archive structure
11.3 Working with Source RPMs
11.3.1 Rebuilding binary RPMS from source RPMs
11.3.2 Recompiling binaries from source RPMs
11.3.3 SRPMS? Finding source RPMs
11.4 Signing Built RPMs
11.4.1 Checking that the GPG software is installed
11.4.2 Configuring a signature
11.4.3 Signing with the rpmbuild command
11.4.4 Signing with the rpm command
11.4.5 Verifying signatures
11.4.6 Importing public keys
11.4.7 Getting the Red Hat public key
11.5 Summary
12.1 Packaging Aids
12.1.1 Using VIM spec plugins to improve spec file editing
12.1.2 Adding functions with emacs rpm-spec-mode
12.1.3 Validating and debugging spec files with rpmlint
12.1.4 Generating the %files section with RUST
12.1.5 setup.sh and MakeRPM.pl
12.1.6 Manipulating Package Files with rpm2cpio
12.2 Summary
13.1 Avoiding Common Problems
13.1.1 Scan the mailing lists
13.1.2 Use rpmbuild
13.1.3 Don’t try to defeat the system
13.1.4 Turn off automatic dependency generation
13.1.5 Don’t list directories in %files
13.1.6 Handling circular dependencies
13.2 Following Good Practices
13.2.1 Preparation Create a Source RPM Start with Pristine Sources Decide What Goes In Each Package Create a Test RPM Database
13.2.2 Building Use Tools Never Build RPMs as Root Create a Digital Signature Copy Smartly Set Up the BuildRoot Add changelog entries for each new version Define the Group For Your Package
13.3 Summary
14.1 Scripting
14.2 Distinguishing Scripting Languages from Programming Languages
14.3 Deciding When to Program and When to Script
14.4 Shell Scripting Basics
14.4.1 Writing a script
14.4.2 Running a script
14.4.3 Problems running scripts
14.4.4 Turning a script into a command
14.4.5 Passing command-line options to your script
14.5 Examining RPM Files
14.6 Querying the RPM Database
14.6.1 Querying for all packages installed at the same time
14.6.2 Reading HTML documentation for a package
14.7 Where to Go From Here
14.8 Summary
Programming RPM with C
15.1 Programming with the C Library
15.1.1 Setting Up a C Programming Environment
15.1.2 Setting Up the RPM Programming Environment
15.1.3 Using the RPM Library
15.1.4 Compiling and Linking RPM Programs Include Files Libraries
15.1.5 Getting information on your RPM environment Printing the Configuration Expanding the Value of Macros Expanding Macros in Your Code
15.2 The Power of popt
15.2.1 Popt aliases
15.2.2 Programming with popt Filling in the Options Table Popt Callbacks Special Option Table Flags Magic Options Parsing the Command-Line Options Walking Through the Command-Line Options
15.2.3 Handling Errors
15.2.4 Running a popt example
15.2.5 Handling rpm command-line options
15.3 Working with RPM Files
15.3.1 Opening RPM files
15.3.2 Reading the RPM lead and signature
15.3.3 Reading header information
15.3.4 A shortcut to header information
15.3.5 Closing RPM files
15.4 Programming with the RPM Database
15.4.1 Database iterators
15.4.2 Dependency Sets
15.5 Comparing an RPM File to an Installed Package
15.6 Where to Go from Here
15.7 Summary
Programming RPM with Python
16.1 Setting Up a Python Development Environment
16.1.1 Installing the base Python packages
16.1.2 Using Python for graphics
16.2 The Python API Hierarchy
16.3 Programming with the RPM Database
16.3.1 Accessing the RPM database Setting the Database Location Initializing, Rebuilding, and Verifying the Database
16.3.2 Querying the RPM database
16.3.3 Examining the package header The hdr Class Printing Header Information with sprintf
16.3.4 Querying for specific packages
16.3.5 Printing information on packages
16.3.6 Refining queries
16.4 Reading Package Files
16.4.1 Reading headers from package files
16.4.2 Setting the verification flags
16.5 Dependency Comparisons
16.6 Installing and Upgrading Packages
16.6.1 Building up the transaction set
16.6.2 Transaction elements
16.6.3 Checking and reordering the transaction elements Checking the Dependencies Transaction Check Method Callbacks Reordering the Transaction Set
16.6.4 Running the transaction Transaction run Method Callbacks Coding A Sample Callback Upgrading A Package
16.7 Where to Go from Here
16.8 Summary
Programming RPM with Perl
17.1 Getting and Using the Perl RPM Modules
17.2 Working with RPM Files
17.2.1 Opening package files
17.2.2 Listing tags from the package
17.2.3 Convenience methods
17.2.4 Listing the name and version
17.2.5 Checking whether the package is a source package
17.3 Programming with the RPM Database
17.3.1 Opening the database
17.3.2 Finding packages
17.3.3 Iterating over packages
17.3.4 Additional query subroutines
17.3.5 Getting information on packages Listing the Installed Date Handling String Array Tags Listing the Files In A Package
17.3.6 Comparing versions
17.3.7 Closing the database
17.4 Where to Go from Here
17.5 Summary
Using RPM on Non-Red Hat Linuxes
18.1 Troubleshooting RPM Installation Issues
18.1.1 Dealing with RPM versions
18.1.2 Dealing with divisions of software into packages
18.1.3 Dealing with dependency issues
18.1.4 Dealing with install locations
18.1.5 When all else fails, rebuild from the source package
18.2 Handling Problems Building RPMs
18.2.1 Writing distribution-specific packages
18.2.2 Dealing with automatic dependency generation
18.2.3 Dealing with different macros
18.2.4 Making relocatable packages
18.2.5 Creating an RPM build environment Detecting Vendors Build environment and macros Compatibility and Glue Packages Dealing with Signatures
18.3 Dealing with Non-RPM-Based Linux Versions
18.3.1 Handling non-RPM packages with alien
18.4 Standardizing RPMs
18.4.1 Filesystem Hierarchy Standard
18.4.2 RPM adoption
18.5 Summary
• Running RPM on other operating systems
19.1 Running RPM on Other Operating Systems
19.1.1 Getting RPM for your system
19.1.2 Running RPM on Windows
19.2 Bootstrapping RPM On Other Operating Systems
19.2.1 Downloading the RPM software
19.2.2 Extracting the software
19.2.3 Reading the INSTALL file
19.2.4 Libraries required by RPM
19.2.5 Tools for building RPM
19.2.6 Compiling RPM
19.2.7 Handling problems
19.3 Setting Up the RPM System
19.3.1 Setting up the RPM database Initializing an Empty RPM Database Handling Dependencies for Packages Installed Without RPM Setting Up A Virtual Package Creating a Virtual Package Manually
19.3.2 Creating the RPM environment
19.4 Creating Non-Linux RPMS
19.4.1 Setting up a build environment
19.4.2 Cross-building packages
19.5 Summary
20.1 Customizing with RPM Macros
20.1.1 Defining macros Defining Macros in Spec Files Defining Macros in Macro Initialization Files Defining Macros on the Command Line
20.1.2 Customizing Macros
20.2 Configuring RPM Settings
20.2.1 Viewing the current settings
20.2.2 Locating the rpmrc files
20.2.3 Changing settings Setting the optflags Setting the Architecture Values
20.3 Adding Popt Aliases
20.3.1 Defining aliases
20.3.2 Customizing popt aliases
20.4 Summary
RPM Command Reference
21.1 The rpm Command
21.1.1 Upgrade, freshen, and install options
21.1.2 Erase options
21.1.3 Signature options
21.1.4 Verify options
21.1.5 Database options
21.1.6 Miscellaneous options
21.2 The rpmbuild Command
21.2.1 Building from a spec file
21.2.2 Building from a compressed tar archive
21.2.3 Rebuilding RPMs from source RPMs
21.2.4 Customizing the build
Spec File Syntax
22.1 Package Information Tags
22.1.2 Build settings
22.1.3 Dependency tags
22.1.4 Source files
22.2 Macros
22.2.1 Variable definition macros
22.2.2 Conditional macros
22.2.3 Built-in macros
22.3 Build Sections
22.3.1 Build preparation
22.3.2 Build
22.3.3 Installation
22.3.4 Clean up
22.3.5 Install and uninstall scripts
22.4 File Tags
22.4.1 Making relocatable packages
22.5 The Change Log
24.1 The Package File
24.1.1 The file identifier
24.1.2 The signature
24.1.3 The header Header Tags Private Header Tags Signature Tags Installation Tags File Information Tags Dependency Tags
24.1.4 The payload
25.1 Finding RPM Sites
25.1.1 The main rpm.org site
25.1.2 RPM locator sites
25.1.3 RPM tools sites
25.1.4 Programming sites
25.1.5 Sites related to RPM
25.2 Accessing RPM Mailing Lists and Newsgroups
• General text editors
26.1 General Text Editors
26.2 Programming Text Editors
26.3 Integrated Development Environments for C Programming
26.4 Integrated Development Environments for Python Programming
27.1 The GNU General Public License
0 of .
Results for:
No results containing your search query
P. 1


|Views: 200|Likes:
Published by downloadlinux

More info:

Published by: downloadlinux on Jul 30, 2010
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





You're Reading a Free Preview
Pages 8 to 18 are not shown in this preview.
You're Reading a Free Preview
Pages 26 to 65 are not shown in this preview.
You're Reading a Free Preview
Page 73 is not shown in this preview.
You're Reading a Free Preview
Pages 81 to 109 are not shown in this preview.
You're Reading a Free Preview
Pages 117 to 351 are not shown in this preview.

Activity (5)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
vijayang liked this
vijayang liked this
Dr supriyanto liked this

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->