-->
Page 10
But RPM version 1 wasn't perfect. There were a number of flaws, some of them major:
Even though their Linux distribution was a success, and RPM was much of the reason for it, Ewing and Troan knew that some changes were going to be necessary to carry RPM to the next level.
1.2.1.5. The RPM of Today: Version 2Looking back on their experiences with RPM version 1, Ewing and Troan made a major change to RPM's design: They rewrote it entirely in C. This did wonderful things to RPM's speed and size. Querying the database was quicker now, and there was no need to have Perl around just to do package management.
In addition, the database format was redesigned to improve both performance and reliability. Displaying package information can take as little as a tenth of the time spent in RPM version 1, for example.
Page 11
Realizing RPM's potential in the non-Linux arena, Ewing and Troan also created rpmlib, a library of RPM routines that allow the use of RPM functionality in other programs. RPM's ability to function on more than one architecture was also enhanced. Finally, the package file format was made more extensible, clearing the way for future enhancements to RPM.
So is RPM perfect? No program can ever reach perfection, and RPM is no exception. But as a package manager that can run on several different types of systems, RPM has a lot to offer, and it will only get better. Let's take a look at the design criteria that drove the development of RPM.
The design goals of RPM could best be summed up with the phrase "something for everyone." While the main reason for the existence of RPM was to make it easier for Red Hat Software to build the several hundred packages that comprised the Linux distribution, it was not the only reason RPM was created. The following sections take a look at the various requirements the Red Hat team used in its design of RPM.
As you've learned in this chapter, the act of installing a package can involve many complex steps. Entrusting these steps to a person who may not have the necessary experience is a strategy for failure. So the goal for RPM was to make it as easy as possible for anyone to install and uninstall packages. These are complex and error-prone operations, which RPM should handle for the user.
The other side of this issue is that RPM should give the package builder almost total control in terms of how the package is installed. The reason for this is simple: If the package builders do their homework, their packages should install and uninstall properly.
Because software problems are a fact of life, the ability to verify the proper installation of a package is vital. If done properly, it should be possible to catch a variety of problems, including things such as missing or modified files.
Although we're dedicating an entire book to package management, it really should be a small portion of the package builder's job. Why? He's got better things to do! If the package builders are the people who are actually creating the software to be packaged, that's where they should be spending the majority of their time.
Page 12
Even if the package builder isn't actually writing software, he still has better things to do than worry about building packages. For instance, he might be responsible for building many packages. The less time spent on building an individual package, the more packages that can be built.
It was deemed important that RPM start with the original, unmodified source code. Why is this so important?
Using the original sources makes it possible to separate the changes required to build the package from any changes implemented to fix bugs, add new features, or anything else. This is a good thing for package builders because many of them are not the original authors of the programs they package.
This separation makes it easy, months down the road, to know exactly what changes were made in order to get the package to build. This is important when a new version of the packaged software becomes available. Many times it's only necessary to apply the original package building changes to the newer software. At worst, the changes provide a starting point to determine what sorts of things might need to be changed in the new version.
One of the tougher things for a package builder to do is to take a program, make it run on more than one type of computer, and distribute packages for each. Because RPM makes it easy to use a program's original source code, add the changes necessary to get it to build, and produce a package for each architecture in one step, it can be pretty handy.
With all the magical things we've claimed that package management software in general (and RPM in particular) can do, you'd think there was a tiny computer guru bundled in every package. However, the reality is not that magical. The following sections give a quick overview of the more important parts of an RPM package.
NOTE |
See Appendix A, "The Format of the RPM File, " for complete details on the contents of an .rpm file. |