The Basics of the Red Hat Package Management System (RPM)


The RPM system was inaugurated in 1995 to manage applications in Red Hat Linux 2.0. It was the successor to a collection of Perl scripts that functioned as the earliest Linux packaging tools. Rewritten in the C language in 1996, it quickly became the de facto standard for managing application installations for several distributions, including SUSE Linux.

The basic idea behind RPM is to have a single "pristine" archive of an application's source code that can build packages for different systems and that can track new versions. An RPM database of all available applications is installed on your computer (in /var/lib/rpm) and is accessed by YaST and other configuration tools to determine exactly what is on your system, what might be new and updated, and what files each package provides that another package might need to run properly.

This last part, the dependency resolver, is one of the features that made RPM so successful among Linux developers and distributors. When you look at a package in YaST, click the Dependencies tab in the lower-right corner. Here, under Provides, is a list of every file included in the package. After the Provides list, the Requires list tells you every file that this package needs to run, and the Prerequisites list tells you what needs to be installed before you install this package (down to the minimum version number, if necessary). Next up is the list of packages that this package will replace or make obsolete. You have to hope that some other package doesn't require one of these; if it does, you'll get a warning. Finally is a list of conflicts; installing this package will create problems for applications on this list.

RPM packages are now more secure, as packagers can include digital signatures encrypted with GNU Privacy Guard (GnuPG). All packages produced by SUSE Linux are signed, so you know they are genuine.

Note

Interested in packaging your own software with RPM? See Chapter 28, "Using the GNU Compiler Collection and Other Programming Tools."


Downloading RPM Packages Outside of YaST

SUSE Linux is known for including the largest number of application packages of the major Linux distributions, but it doesn't include every application ever created. Because Linux developers come up with new ideas all the time, there's always something new to try as well.

You can download and install just about any RPM package from any source and run it on your SUSE Linux system.

It's possible that new packages may have some ill effect on your system's stability, but that's rare, especially with RPMs.

When you visit a software repository like freshmeat.net, you can see dozens of new and updated applications posted daily. Many developers build RPMs for their applications to make things relatively easy for users to install. Some even build separate RPMs for Red Hat and SUSE users.

You should create a single directory for your downloaded files. It should be in your home directory. Set up your browser(s) to download all files to that directory. The reason to do this is because you can then add that directory to YaST's installation sources and directly install new RPMs in YaST.

To add your ~/download directory to YaST's installation sources, follow these steps.

1.

Open YaST. Select Software, Installation Source.

2.

Click Add and select Local Directory from the drop-down menu.

3.

Type in, or browse to, the ~/download directory. Click OK to confirm.

4.

YaST will check for a "product," and then give you a message asking you to click Continue to make RPM packages available in the packages section. Do that. The directory should appear in the main window with status On.

Now when you download an RPM package to that directory, you can open YaST's Software Management module and install that package.

Tip

KDE/Konqueror users get a bonus convenience when downloading RPMs with the Konqueror web browser. After it is downloaded, Konqueror displays an Install with YaST button. Click it to run YaST's Install module.




SUSE Linux 10 Unleashed
SUSE Linux 10.0 Unleashed
ISBN: 0672327260
EAN: 2147483647
Year: 2003
Pages: 332

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