Chapter 3.5Building Custom PackagesThere are many things that might go wrong when building software packages. This is especiallytrue when these packages must be delivered and installed through Red Hat Network. This chapterprovides an overview of how to build packages for successful delivery via Red Hat Network. Topicscovered include why to use RPM, how to build packages for RHN, and how to properly sign packages.3.1. Building packages for Red Hat NetworkRed Hat Network uses the RPM Package Manager (RPM) technology to determine what softwareadditions and updates are applicable to each client system. Packages retrieved from Red Hat Networkare usually in RPM format. Entire ISO images, however, are available through the Software tab of theRed Hat Network website, but are not available in RHN Satellite Server installations. If your Satellitehas Solaris support enabled, you can use RHN Push to upload Solaris packages to custom channelsused by Solaris clients.RPM is a tool that provides users with a simple method for installing, uninstalling, upgrading, andverifying software packages. It also allows software developers to package the source code andcompiled versions of a program for end users and developers.3.1.1. RPM BenefitsRPM provides the following advantages:Easy UpgradesUsing RPM, you upgrade individual components of a system without completely reinstalling.When Red Hat releases a new version of Red Hat Enterprise Linux, users do not have toreinstall in order to upgrade. RPM allows intelligent, fully-automated, in-place upgrades of yoursystem. Configuration files in packages are preserved across upgrades so users do not losecustomizations. There are no special upgrade files needed to update a package because thesame RPM file is used to install and upgrade the package.Package QueryingRPM provides querying options that allows you to search through your entire RPM database for allpackages or just for certain files. You can also easily find out what package a file belongs to andfrom where the package came. The files contained in the package are in a compressed archive,with a custom binary header containing useful information about the package and its contents.RPM queries the headers quickly and easily.System VerificationAnother feature is the ability to verify packages. If you are worried a file related to a package wasdeleted, you can verify the package to check the status of the files it provides. The verificationnotifies you of any anomalies. If errors do exist, you can reinstall the files easily. Modifiedconfiguration files are preserved during reinstallation.Pristine SourcesA crucial design goal of RPM is to allow the use of pristine software sources, as distributed bythe original authors of the software. With RPM, the pristine sources can be packaged, along withany patches that were used, plus complete build instructions. This is an important advantage forseveral reasons. For instance, if a new version of a program is released, you do not necessarilyhave to start from scratch to make it compile. You can look at the patch to see what you might