From the course: Building, Maintaining, and Distributing RPM Packages

What is a package?

- [Instructor] And RPM package is a file that contains both metadata and an archive of files. This archive is a CPIO archive, which is one chunk of data that contains a number of files, giving us a convenient way to keep a bunch of files altogether and addressable in order to distribute them. The metadata contained in an RPM file, describes the software in the package, both for end users and for the RPM Package Management Software. As I mentioned earlier, there are two kinds of packages. The first kind we'll take a look at are binary packages. These are the ones you find in repositories and which you download in order to install new software on the system. They contain an archive of a file system that represents the locations where files for new software will end up on a client system after installation. Usually these files are binaries and supporting files, like configuration and documentation. During installation, these files are copied into place on the client's root file system. Because executable files need to be compiled for the processor architecture that they're going to be used on, binary packages generally are built for specific platforms and architectures. Though binary packages can also be built to apply to no particular architecture, if the package is only used to distribute non-executable files. This is a useful application of packages for many system administrators. Source packages on the other hand contains source code and any other assets that are part of the package. They also contain a spec file, which we'll learn about in a little bit. Source packages can be installed by a client, but by and large, they're used as archives of a particular version of a package, in case of package needs to be updated later, and they're used by people who want to make modifications to existing software. We can build binary packages from source packages, either when an update or change is made, or when we need to generate a new binary package for a different platform, or process, or architecture. Each kind of package has its own use, and as a packager, it's important to know the difference.

Contents