"Linux Gazette...making Linux just a little more fun!"


The Answer Guy


By James T. Dennis, tag@lists.linuxgazette.net
Starshine Technical Services, http://www.starshine.org/


(?)What is an RPM?

From Andre Solheim on Fri, 03 Jul 1998

I am in the process og getting hold of Linux. Could you please tell me what RPM is, and what it does?

I hope you can mail the answer to me directly
André L Solheim

(!) RPM is the Red Hat Package Management system. This is an freely published set of specifications and tools to allow Linux and Unix vendors to package their software in a way that is amenable to automated installation upgrade, removable and administration.

Although it has Red Hat's name in it --- it has been adopted by most of the major Linux distribution maintainers. The only to major holdouts are Debian and Slackware. (There are a number of small, special purpose Linux distributions that don't use any package management --- many fit on a single diskette or designed to be installed into a DOS subdirectory and run via LOADLIN).

Debian has developed their own package management format (usually seen with the .deb extension) and Slackware continues to use the tried and true "tarball" format with pkgadd (?) and some other tools to help a little bit.

However, you can easily install the RPM subsystem into any Linux that you want. You can also use RPM on some packages and continue to manually build others from tarballs (.tar.gz files). You can also convert between package formats using tools like 'alien' and 'rpm2cpio' (or you can just use Midnight Commander to open and work with .rpm files, just as you would any directory, .zip or .tar file etc --- what how I usually delve into RPM files if I'm not going to install them).

The RPM system as been ported to several flavors of Unix and is no longer a purely "Linux" thing. Some sites are using it to help maintain their Solaris, and HP-UX systems.

In the simplest form you can use commands like:
rpm -i foo-1.2.rpm
... to install a package (foo version 1.2 in this example).

There are also GUI and menu drive frontends to using RPM .... but I usually use the command line.

You can also let rpm do the FTP for you with a command like:
rpm -U ftp://myserver.myorg.net/upgrades/bar-2.2.rpm
... and this will upgrade the bar version 2.2 package off of an internal ftp server (where I presumably have placed it after testing it on one of my sacrificial admin systems).

Another trick I've used is to get the description of an rpm file without bothering to get the whole file (to decide which files I wanted to fetch). I do this with a command like:
rpm -qpi ftp://ftp.redhat.com/..../contrib/.....rpm
(I don't have a specific path and filename handy --- but this should show the idea). You can also get a list of the contents of a package with:
rpm -qpl $SOME_RPM_FILE
... or a list of files from an installed package with
rpm -ql $SOME_INSTALLED_PACKAGE
You can also do things like list all of the packages that you have installed on the whole system (at least those that you've installed using RPM) with a command like:
rpm -qa
... and you can verify a package with a command like:
rpm -V foobar
... which will give you a summary of every change to the checksums, ownership, permission, timestamp, etc --- of every file that was part of the "foobar" package.

Combining these in a relatively obvious way you can check every package on your system with the following:
rpm -qa | xargs rpm -V
You can also find out which package a given file "belongs to" with a command like:
rpm -qf /some/file/that/was/installed/by/something
You can learn more about the RPM system by looking at their very own web site: http://www.rpm.org.

So, good luck on your new adventure. Have fun with Linux.


Copyright © 1998, James T. Dennis
Published in Linux Gazette Issue 31 August 1998


[ Answer Guy Index ] backup uidgid connect 95slow badblock trident sound
kernel solprint idescsi distrib modem NDS rpm
guy maildns memleak multihead cdr


[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Next Section ]