Your company here — click to reach over 10,000 unique daily visitors

license-validate - Man Page

validates the string in the License tag in the SPEC file


license-validate [-h] [--old] [--file FILE] [--package PACKAGE] [--verbose] license

positional arguments: license license string. E.g., 'GPL or MIT'.


-h,  --help

Show help message and exit.

--file FILE

Read the grammar from this file. Default is /usr/share/fedora-license-data/grammar.lark. And if this default does not exists then script reads ./full-grammar.lark.


Validate using old Fedora’s shortnames. Otherwise SPDX expression is assumed.

--package PACKAGE

You can optionaly pass name of the package (name of src.rpm). Normally, when package uses not-allowed license, license-validate prints error and exit with non-zero code. But if PACKAGE is known to use otherwise not-allowed license as an exception, then license-validate does not print error and exit with zero status code.

--verbose,  -v

Print more human friendly messages. Otherwise just exits with error code zero if license is valid otherwise with error code 1 if license is invalid.


Validates whether license is in approved set for the distribution.

This script does not check source files and does not check whether the license is actually correct. For this purpose you may use licensecheck.


Miroslav Suchý <msuchy@redhat.com>


04/11/2024 License Validate