Mainpage
Searchform
History
Versions
Categories
Contents
Deutsch
SuSE Linux: Versions since 5.0
Starting with version 5.0 »rpm
« (Red Hat Package Manager)
became part of the S.u.S.E. Linux distribution. This way package management
is much easier for all involved people : Users, system administrators and
- last, but not least - those that create packages. The powerful RPM database
provides detailed information about the installed software.
In principle rpm
can operate in three different modi :
Installable RPM archives are packaged in a special binary format. These archives consist
of the (program-)files, that should be installed and of different meta information that
are being used during the installation by rpm
(in order to configure a software
package or to be stored for documentation purposes in the RPM database). RPM archives
end on the suffix .rpm
.
The installation of an RPM archive is usually as simple as
rpm -i PACKAGE.rpm
However the package will only get installed with this command, if all "dependencies"
are fulfilled and if there will be no "conflicts". rpm
asks (through an error message)
for the packages that are necessary to fulfill all dependencies. The database checks in the background,
that no conflicts arise : A file may normally only belong to one single package. However you can
override this rule with a couple of options. Please note, that in this case you should know exacty, what
you are doing. This way you might endager the possibility to update a specific package.
The option -U
resp. --upgrade
is interesting, if you want to update a package.
An older version of the same package gets erased, then the new version gets installed.
rpm
will try to handle configuration files carefully at the same time.
The following strategy is being used :
rpm
. No intervention by the administrator is necessary.
rpm
will only backup the changed file with the suffix .rpmorig
and install the new version of the
RPM package, if there were changes between the original file and the one contained in the update package.
It is likely that you must adapt the newly installed configuration file to the needs of your system according
to the backup (.rpmorig
). It is highly recommended to remove all .rpmorig
files
afterwards so they won't hinder future updates.
After every update you must check the backup copies created by rpm
(with suffix
.rpmorig
); these are your old configuration files. If necessary you must enter your
changes of the .rpmorig
-files into the new configuration files manually. Then erase the
old files with the suffix .rpmorig
If you want to remove a package, simply enter
rpm -e PAKET
However rpm
will only remove a package, if no dependencies exist.
For example it is impossible to remove TCL/TK while some other software needs these programs.
RPM checks this with the help of its database.
If it is impossible to erase a package even though no dependencies exist
anymore, it might help to rebuild the RPM database with the option --rebuilddb
(see the hints under RPM database below).
The option -q
(aka query) starts an enquiry. It can be used to
scan both RPM archives (option -p PACKAGE_FILE
) and the RPM database.
You can specify the desired information with additional switches :
-i
-l
-f FILE+
FILE
. FILE
must
be given with its full path !
-s
-l
)
-d
-l
)
-c
-l
)
--dump
-l
,
-c
or -d
!)
--provides
--requires
, -R
--scripts
For example the command
rpm -q -i rpmdisplays the following information :
Name : rpm Distribution: S.u.S.E Linux Version : 2.4.1 Vendor: S.u.S.E. GmbH Release : 1 Build Date: Wed Jun 18 14:46:53 1997 Install date: Sat Jun 21 12:01:21 1997 Build Host: Fibonacci.suse.de Group : Source RPM: rpm-2.4.1-1.src.rpm Size : 1365662 Packager : feedback@suse.de URL : (none) Summary : Red Hat Package Manager Description : RPM is a powerful package manager, which can be used to build, install, query, verify, update, and uninstall individual software packages. A package consists of an archive of files, and package information, including name, version, and description.
The option -f
only works, if you know the complete filename including
the path. An arbitrary number of files can be specified, e.g.
rpm -q -f /bin/rpm /usr/bin/wget
returns
rpm-2.4.1-1 wget-1.4.5-2If you only know part of the filename, you must use a shell script like the following (the filename must be given to the script as a parameter) :
#! /bin/sh for i in `rpm -q -a -l | grep $1 `; do echo »$i« is in package: rpm -q -f $i echo "" doneThe database can be used for verification purposes. Scun enquiries start with the option
-V
(same as -y
or --verify
). With these options
rpm
will show you all those files, that were changed compared to the original
version contained in the package. rpm
displays up to 8 characters in front of the
filename which indicate the following changes :
5
S
L
T
D
U
G
M
For configuration files a c
will be shown in addition. E.g. if
/etc/wgetrc
(from wget
) was changed :
rpm -V wget
S.5....T c /etc/wgetrc
The files of the RPM database can be found under /var/lib/rpm
.
A /usr
partition of 500 MB can easily use 20 MB of disk space,
especially after a complete update. If the database seems to be too big, it
might help to create a new database from the existing one using the option
--rebuilddb
. However it is wise to create a backup copy of the
old database before.
Furthermore the cron
-script cron.daily
creates
a compressed copy of the database under /var/adm/backup/rpmdb
every day, if there were changes.The number of existing copies of the database
can be specified with the variable MAX_RPMDB_BACKUPS
(default : 5)
in /etc/rc.config
. Expect up to 3 MB for each backup (with
500 MB in /usr
).You must take this diskspace into account when
specifying the size of the root-partition (unless you give /var
its own partition).
The Midnight Commander (mc
) is able to show the content
of RPM archives or to copy parts of them to another location. It shows the content
of such an archive in the form of a virtual filesystem, so all usual controls
of the Midnight Commander are available (if useful) : The headline of the "file"
HEADER
can be viewed with F3
. You can "browse" the archive
with cursor-keys and Enter
, components of the archive can be copied to
another location (outside of the archive) with F5
. BTW, Emacs
doesn't do this, so far ;-)
With Alien (alien
) the package formats of different distributions
can be converted. This way you can try to convert TGZ archives into RPM before the
installation, so the RPM database gets the package information. However be careful :
alien
is a Perl script which is (according to the authors) still in the
alpha stage although its version is currently (5.2) already 5.19 .
See also:
Keywords: RPM, PACKAGEMANAGER, PACKAGE, INSTALL, UPDATE
Categories:
Package-Installation
Mainpage
Searchform
History
Versions
Categories
Contents
Deutsch