Redhat Package Manager at 20,000 ft
what is it?
The defacto standard for package management on linux. Introduced by Redhat in the hopes of making software easier to install for the end user, it is now the
foundation for numerous linux distributions, including SUSE, Mandrake, and Redhat.
what does it do?
- maintains a database of installed software packages
- enforces dependencies
- provides harness for installation and setup scripts
- allows for components to be upgraded, removed, or recompiled
inputs
- package source code
- installation script
- build script
- data files
- dependency information
these components are brought together in a spec file The rpm engine is essentially a bash preprocessor. The spec file is a collection of scripts delimited by section. RPM performs regular expression filters and macro expansion
on the spec file to create shell scripts for each of the activities an RPM needsto do.
main spec file sections
preamble
RPM header describing version and release, dependencies, source code archive
%build
tells rpm how to configure source tree and build binaries.
%install
what to do on installation, where to put files, what permissions.
%files
the list of files you installed in the %install section, including permission information.
outputs
feeding a spec file to the RPM engine can have two outputs
binary rpm:
A binary rpm is an architecture specific package that contains the executables, shareables, and data
needed at runtime, ready for installation
source rpm:
A source rpm encapsulates your spec file and source code into one package that is designed to be rebuilt
on a new architecture simply by invoking rpm with a switch for rebuilding
limitations
- not designed for use as a non-root user
- not connected to CMT, much reinventing of the wheel for runtime configuration
- each component currently needs a hand written spec file
- only end user packages, no developer packages with source, cmt, and includes yet
real rpm documentation found here: http://www.rpmdp.org/rpmbook