3.18. Checking RPMs for sanity

After creating a package, it is necessary to check the quality of the package.

The main tool for checking package quality is rpmlint.

The rpmlint tool does the following:

  • Improves RPM maintainability.
  • Enables sanity checking by performing static analysis of the RPM.
  • Enables error checking by performing static analysis of the RPM.

The rpmlint tool can check binary RPMs, source RPMs (SRPMs), and SPEC files, so it is useful for all stages of packaging, as shown in the following sections.

Note that rpmlint has very strict guidelines; hence it is sometimes acceptable to skip some of its errors and warnings, as shown in the following examples.

Note

In the examples described in the following sections, rpmlint is run without any options, which produces a non-verbose output. For detailed explanations of each error or warning, you can run rpmlint -i instead.