-->

Previous | Table of Contents | Next

Page 123

10.2. The Engine: RPM

At the center of the action is RPM. It performs a number of steps during the build process:

  1. It executes the commands and macros in the prep section of the spec file.
  2. It checks the contents of the file list.
  3. It executes the commands and macros in the build section of the spec file.
  4. It executes the commands and macros in the install section of the spec file. Any macros in the file list are executed at this time, too.
  5. It creates the binary package file.
  6. It creates the source package file.

By using different options on the RPM command line, the build process can be stopped at any of these steps. This makes the initial building of a package that much easier because it is then possible to see whether each step completed successfully before continuing to the next step.

10.3. The Outputs

The end product of this entire process is a source package file and a binary package file.

10.3.1. The Source Package File

The source package file is a specially formatted archive that contains the following files:

Because the source package contains everything needed to create the binary package, create the source package, and provide the original sources, it's a great way to distribute source code. As mentioned earlier, it's also a great way to archive all the information needed to rebuild a particular version of the package.

10.3.2. The Binary RPM

The binary package file is the one part of the entire RPM building process that is most visible to the user. It contains the files that comprise the application, along with any additional information needed to install and erase it. The binary package file is where the rubber hits the road.

Page 124

10.4. And Now…

Now that we've seen, in broad-brush terms, the way RPM builds packages, let's take a look at an actual build. Chapter 11, "Building Packages: A Simple Example," does just that, showing how simple it can be to build a package.

Previous | Table of Contents | Next