Home > Articles > Operating Systems, Server

  • Print
  • + Share This
From the author of

Directories Involved in the Build Process

The directories used by the RPM build process are generally underneath the directory /usr/src/distribution, where distribution is something like redhat, OpenLinux, or sometimes even just RPM. The following directories are used during the build process:

  • SOURCES—This directory contains the source TAR files, patches, and icon files for the software to be packaged.

  • SPECS—This directory contains the spec files for building packages. A spec file for a package contains information about the package as well as scripts that are used to automatically build the package from the files in the SOURCES directory.

  • BUILD—The BUILD directory holds the source code for the software while it is being compiled and constructed (during the build process). Source files are extracted to subdirectories of the BUILD directory during the prep stage. Compiled program binaries and configuration and documentation files are moved from this directory into the main filesystem during the install stage.

  • RPMS—The resulting binary package is placed in a subdirectory underneath the RPMS directory when the package is finally assembled (during the packaging stage). There are subdirectories beneath RPMS that hold the packages for particular platforms. These subdirectories have the same name as the architecture string used in the package filename. Packages compiled for Intel-based Linux distributions are generally placed in the i386 subdirectory, although they may be in the i586 or i686 directory, depending on your particular processor and the distribution.

  • SRPMS—This directory holds the source RPM package that results from a build. This is a snapshot of all the materials required to produce the corresponding binary RPM.

The location of this directory tree can be overridden by setting the value of %_topdir in either /usr/lib/rpm/macros or ${HOME}/.rpmmacros.

To perform the examples in this article, you need to access the directories listed in the preceding section. Normally, this means that you need to log in as the root user (or use the su command to become root).

  • + Share This
  • 🔖 Save To Your Account