As a part of their design, RPM packages consist of the following three parts:
Each of these three parts must be defined, provided, or included by the package in order to successfully build, install, or uninstall the package.
1.2.1. Package File Name
Every package file is labeled with a highly identifiable name. This name has four parts, which typically look something like:
kernel-smp-2.6.32.9-3.i686.rpm
kernel-smp-2.6.32.9-3.x86_64.rpm
rootfiles-7.2-1.noarch.rpm
Here, the four parts of each name are separated from each other by dashes or periods. The structure of the package file name is as follows:
1.2.1.1. Package Architecture
RPM supports various architectures. The following table presents some of the architectures available for different platforms that are supported by Fedora 18.
Table 1.1. Package Architecture
Platform | Architecture |
---|
Intel x86 or compatible | i386, i686 |
AMD64 / Intel 64 | x86_64 |
Intel Itanium | ia64 |
IBM POWER | ppc64 |
IBM System z | s390x, s390 |
No architecture | noarch |
A platform-independent package, which is identified with noarch
in the architecture part of the file name, provides programs that are not dependent on any platform. Programs written in Perl, Python, or other scripting languages often do not depend on code compiled for a particular architecture. In addition, compiled Java applications are usually free of platform dependencies, thus are also distributed in the form of platform-independent packages.
A source RPM package (SRPM) contain all the commands, usually in scripts, necessary to recreate the binary RPM. Having a SRPM means that you can recreate the binary RPM at any time. A SRPM has a file name ending in .src.rpm
, for example:
The SRPM distributes a source code for the corresponding software that is ready to be installed on the system with the binary RPM. It also includes a spec file, which describes the software and the package, and contains instructions on how to perform the installation on the system.