What Is RPM?

click to expand
Figure 8-1

You can find more information about the background of RPM at www.redhat.com and www.rpm.org/max-rpm/ .

The benefits of using RPM can be summarized as follows :

  • Simplicity: RPM simplifies the task of installing software. RPM packages can be managed using the RPM GUI interface, or via the command line.

  • Upgrade ability: RPM gives you the flexibility to upgrade existing packages without having to reinstall them. You can freshen and upgrade parts , or all, of your system automatically, with the minimum of fuss.

  • Manageability: RPM facilitates managing software packages. It maintains a database of all the packages installed on the system, so you know exactly what you ve got installed, what version it is, and when it was added.

  • Package queries: RPM provides options to query packages for more details in different ways. You can search the package installed on the system. You can also find out what package a file belongs to. It helps in keeping track of all packages installed on your system.

  • Uninstalling: RPM makes it easy to uninstall packages. This helps you keep the system clean.

  • System verification: RPM also provides a feature to verify packages. In case of any doubt about file deletion, packages can be verified against the original package information using RPM. This checks all the files on the system with the package information and verifies that the files on the system are the same as those installed from the package originally.

  • Security: RPM provides commands for the user to check the integrity of packages. Packages can be checked using md5sum to verify that they have not been corrupted or tampered with since they were created. RPM also provides functionality to verify a package provider s identity and package integrity using gnupg (very handy if you re downloading sensitive material from the Internet, because you want to be sure that you re installing what you think you re installing).

Now that you understand what RPM is, and what it can be used for, let s move on to consider how it works. RPM can be used in two different, yet complementary ways ”from the desktop, using the GUI interface, and from the command line.

The RPM Package Management Tool

Fedora has added a lot of new features to its latest operating system (Fedora 2) to make it easier to manage. One of these new features is the Package Management Tool . This tool is a graphical user interface (GUI) designed for the management of package installation and removal. The GUI allows you to add and remove packages at the click of a mouse.


The Package Management Tool, also called Add and Remove Software, as accessed from the Main Menu, is able to manage only packages provided as part of Fedora 2. To install other RPMs from disk or download, you must navigate to the RPM in question and double-click on the file. This will load the Package Management Tool and skip you straight to the Install screen, bypassing the system-specific install options. Alternatively, you can install any RPM package by using the RPM command line utility, discussed later in this chapter.

Starting the RPM Package Management Tool

There are two ways to start the RPM Package Management Tool. From the Main Menu, select Main Menu>System Settings>Add/Remove Applications. Alternatively, from the command line you can type the following command:

   $ system-config-packages   

Either way, if you re logged in with privileges other than root privileges, you ll be prompted to enter the root password.

After you ve authenticated as system root user with administrative privileges, you ll see the window shown in Figure 8-2.

Package Management Tool Functions

Fedora 2 Package Management Tool comes with two windows , each providing different functions. The first window is Add/Remove Software; the second window is Update System.

In the Add/Remove Software window, the package manager presents packages divided up into different categories, each containing different groups. The following table lists all the available package categories and package groups on a typical system. If you look through the entries on your machine, you ll find an explanatory note next to each one explaining what it does on your machine.

click to expand
Figure 8-2

Package Category

Package Groups


X Window System

GNOME Desktop Environment

KDE (K Desktop Environment)



Engineering and Scientific

Graphical Internet

Text-based Internet


Sound and Video

Authoring and Publishing


Games and Entertainment


Server Configuration Tools

Web Server

Mail Server

Windows File Server

DNS Name Server

FTP Server

SQL Database Server

News Server

Network Servers


Development Tools

Kernel Development

X Software Development

GNOME Software Development

KDE Software Development


Administration Tools

System Tools

Printing Support


Compatibility Arch Development Support

Compatibility Arch Support

You can view the details of any group of packages by clicking the Details link. See Figure 8-3 for details of each group .

click to expand
Figure 8-3

Each group may have Installed packages and Packages not installed. Installed packages are always available when a package group is installed ”so you can remove it only from the Update System.

You can also change the view of the Add/Remove window by selecting View>Package View from the Main Menu bar. See Figure 8-4 for the Package view of Add/Remove Software GUI.

click to expand
Figure 8-4

As you can see from Figure 8-5, the package view of the Add or Remove Packages window represents individual packages with Package Name, Version, Package Size , and Current state information. You can select any package, whose state is Not installed and click the Install button to install that package.

The Update System GUI can be used to remove any installed RPM packages available with Fedora 2. It provides a nice and easy graphical user interface to remove RPM packages from the system.

As you can see from Figure 8-6, the Package Management Tool presents packages divided up into different categories, each containing different groups. It will show only the categories for which the patches are available for removal.

You can view the details of any group of packages available for removal by clicking the Remove link. Details of each group of packages available for removal looks like those in Figure 8-5.

The Remove Packages window shows the Packages to be removed with their size. By default, all the installed packages will be checked for removal. To remove a selected package, uncheck the package and click the Remove Package button.

You can also change the view of the Remove Packages window by selecting View>Package View from the Main Menu bar. The Package view of the Remove Packages GUI looks like Figure 8-6.

click to expand
Figure 8-5
click to expand
Figure 8-6

As you can see from Figure 8-8, the Package view of the Remove Packages window presents individual packages with Package Name, Version, and Package Size information. You can select any package and click the Remove button to uninstall the package.


To change the view of the Add or Remove Package and Remove Packages window, select View>Group View from the Main Menu bar.

Adding and Removing Packages

The Package Management Tool makes adding and removing packages very simple. In fact, it s just as easy as using the Add/Remove Programs menu under Microsoft Windows.

Installing Packages

When you select any group using the RPM Package Management Tool interface, it automatically selects the standard packages (if any) that are needed for the category, as well as any dependent packages that it may have.


Dependent packages are packages needed for the main package to run properly. RPM checks for these before installing any new package. If they re not present, it adds them to the list of files to be installed. There s nothing unusual in this ”Windows software also depends on other files (such as Dynamic Link Libraries, or DLLs), but it packages them all together for simplicity, while Linux leaves them separate for ease of updating, and bug-fixing.

To install packages, click on the Details button in the Add/Remove Software window under RPM Package Management Tool. You can customize the packages to be installed by selecting or deselecting checkboxes near the package names , as shown in Figure 8-7.

click to expand
Figure 8-7

After you ve made your selections in the preceding window, click the Install Packages button. The Package Management Tool will then calculate the disk space required for installing packages, as well as any dependencies, before displaying the dialog box shown in Figure 8-8.

click to expand
Figure 8-8

If you click the Show Details button shown in the preceding dialog box, you ll see a list of all the packages to be installed ”with the disk space needed for each individual package. If you click the Continue button, the installation procedure starts. When the installation is finished, an Update Complete dialog box appears.

Removing Packages

Removing a package is also simple. To remove all packages installed within a package group, click the Remove link in the Update System window, which opens a dialog box as shown in Figure 8-9.

You can also remove any specific package by selecting the checkbox next to each package to be removed in the Remove Packages window.

Click the Remove Packages button shown in the preceding dialog box to continue with the package removal process. You will be presented with another dialog box, as shown in Figure 8-10.

click to expand
Figure 8-9
click to expand
Figure 8-10

If you click the Show Details button shown in the preceding dialog box, you ll see a list of all the packages to be removed, with the disk space freed by each individual package removal, as shown in Figure 8-11.

click to expand
Figure 8-11

If you click the Continue button in the preceding dialog box, the uninstall procedure starts. When the uninstall is finished, an Update Complete dialog box appears, as shown in Figure 8-12.

click to expand
Figure 8-12

The Package Management Tool takes care of finding and removing any dependent packages that might also be installed, just as it did in the install routine. It will show you the following window.

click to expand
Figure 8-13

If this happens, you ll have to leave the package where it is, unless you want to delete the program that s using it first (in which case it will probably be removed anyway, as a dependent package).

Package Installation and Configuration Files

Before we leave the subject of package installation and removal, it s important to consider the topic of configuration files. What follows can seem a little daunting, so it s important to realize that this happens only rarely. If you re installing a new version of older software, or upgrading your existing version, there s a small chance that the installation will encounter pre-existing configuration files as it installs . This presents a dilemma because you may have customized those files, so it doesn t want to just overwrite them and lose your settings.

Therefore, the installation problems are dealt with in the following ways:

  • If you re installing a package, a new configuration file with a .rpmnew extension is created. The old file is left in place, and you need to swap it manually if you want to take advantage of the new file s settings ”a warning message is displayed telling you where the file is.

  • If you re upgrading a package, the old configuration file is renamed with a .rpmsave extension, and the new file takes its place. Again, you are shown a warning message telling you this has taken place.

  • If you re removing a package, and the tool detects that a configuration file has been modified, it warns you of this, and leaves a version of the file behind with a .rpmsave extension so it s still available if you should need it.

This situation isn t likely to occur very often, but you re aware of the issues now should you encounter it. Bear in mind the differences between how installs and upgrades handle configuration files. This knowledge will stand you in good stead as you move on to look at the command line package installer (RPM).

Beginning Fedora 2
Beginning Fedora 2
ISBN: 0764569961
EAN: 2147483647
Year: 2006
Pages: 170

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net