Product SiteDocumentation Site

2.4. Testing a Package

This section shows how to use the rpmlint utility to test an RPM package. rpmlint can be used to test spec files, binary packages, and source packages. It is highly recommended to run rpmlint every time you make changes to the package.

2.4.1. Testing a Spec File

These steps show how to test a spec file of a package with the rpmlint utility.
Procedure 2.4. Testing a spec file with rpmlint
  1. If you have not previously installed the rpmlint package, install it now with the following command:
     yum install -y rpmlint 
  2. To test a spec file with rpmlint, run the following command:
     rpmlint package.spec 
    By checking the spec file for correctness with the above command, rpmlint is able to catch many errors that can be often found in new or significantly changed spec files.
  3. If the error messages reported with the above command are not clear enough, use the -i option, which provides more information on each error:
     rpmlint -i package.spec 
    Refer to the Fedora Packaging Guidelines for information on what rpmlint errors can be typically ignored.