Fedora's rpm management has the same logic of all the RedHat versions.
rpm
is the command used to handle all the operations on the packages (installation, removal, update...), in Fedora 2 is used rpm version 4.3. Every day (/etc/cron.daily/rpm/
) a list of installed packages is placed in /var/log/rpmpkgs
.
The rpm database, containing info about the installed rpms, the dependencies and requirements, the accepted GPG keys and MD5 signatures is in the /var/lib/rpm
directory.
Note: Previous versions of rpm had a bug tha locked the database during certain operations and blocked all the rpm activities so that only a reboot could solve the problem. A faster solution is to delete the temporary data files called __db.001
, __db.002
, __db.003
in /var/lib/rpm
. These files, if absent, are regenerated when the rpm command is issued.
Fedora provides system-config-packages
(previously called redhat-config-packages) a graphical front-end to package management. It's accessible from the menu: System Settings - Add/Remove Applications and directly during the installation procedure.
An update system is necessary for any modern operating systems and Fedora actually can boast two different default update tools plus various other that can be installed separately.
UP2DATE is the official Red Hat Update Agent, which usually connects to Red Hat Network (RHN) for automatic packages update. A subscription to RHN is required for commercial versions of RedHat Linux and is actually the price you pay for the software. In Fedora up2date actually uses Yum or Apt repositories in different Fedora mirrors worldwide to retrieve packages, so it doesn't directly downloads packages from RHN and is free as beer.
The list of mirrors used by up2date is in /etc/sysconfig/rhn/sources
, the general configuration file is /etc/sysconfig/rhn/up2date
and is generated by the up2date-config graphical tool.
An unique identification ID of the system for RHN is placed in /etc/sysconfig/rhn/systemid
, the downloaded packages and headers are stored in /var/spool/up2date
.
YUM derives from the Yellow Dog distro and has been used by RedHat since Fedora 1. It has fastly become a major and well spread update system and actually does its work well. The configuration file is /etc/yum.conf
, packages are downloaded in the /var/cache/yum
directory, a log of the updates is /var/log/yum.log
. Nightly yum updates can be activated as a normal service. Yum actually is not an always running daemon: a cron job every day checks if a lock file is present (/var/lock/subsys/yum
)
before executing, with /etc/init.d/yum status
you can see if Yum updates are activated.
Yum, as similar tools, takes care of all the dependencies because it downloads from the source sites the full list of the headers of all the locally installed rpms. The headers (file called "packagename.hdr") are a compressed text with all the typical information about a package: description, files provided, dependencies, checksums.
With the yum-arch
command is possible to create all the headers of the rpms stored is the selected directory, building up what actually is necessary for a Yum repository.
Packages are divided in channels, there are the official ones (base CDROM, official updates, testing updates) and the ones from indipendent RPM builders (the most important ones are Freshmeat and DAG) or software makers.
An automatic update of the system can seem dangerous for a production server, but if this is entirely based on official rpms (without relevant software built from sources) it's quite safe and advisable.
To be sure to update rpms from a trusted source it's possibile to force the checking the GPG signature of the new packages against an imported and trusted GPG key.
To import the official GPG key for RedHat's released packages: rpm --import /usr/share/doc/fedora-release-2/RPM-GPG-KEY
. If want to install checked software from other sources you need also to import the relative GPG key.
The number of rpm repositories for Fedora is getting quite large with overlapping software and potential problems if you use some of them together.
The basic scenario is this:
Fedora Updates are the official updates of the software provided with the Fedora CDROMs
Fedora Extras are extra semi-official packages made by the www.fedora.us guys (a collaborative effort)
Livna is a repository based of the Fedora extras packages list (must be used with it) featuring software that for various reasons (not totally free licence, impending patents and so on) could not be officially merged with Fedora Extra. Main page: rpm.livna.org
FreshRPMS, DAG, Newrpms, Dries, ATrpms are five different sites, maintained by individuals, with plenty of rpms of different software. The complete merged list of projects is impressive (more than 1500).
The most reasonable choice when using alternative channels for packages is the duo Fedora Extras / Livna OR one or more source from the alternative list.
How software is installed, updated and managed on different Linux distributions
OS Guide: FedoraThe OpenSkills Guide for Experienced Linux Sysadmin: Fedora