Contents

Determining the governing license(s) for a piece of software is a large part of the work done by packagers and package reviewers. We want to make certain that we have permission from the authors to build, redistribute, and (if necessary) modify their software.

Licensecheck

The licensecheck package (which you will have installed if you followed the directions in setup) can detect many of the licenses commonly used by open source projects. Run it like this:

licensecheck -r [directory]

where directory will typically be the result of unpacking an upstream tarball. Examine the output to find the relevant license(s). The license field applies only to the contents of the final binary RPM, so you can ignore files that are only used during the build, such as config.guess or test-only files.

Multiple licenses

If more than one license is in play, then determine whether any license is subsumed by another. For example, suppose some source files are distributed under the GPL version 2 or any later version (GPLv2+), and other source files are distributed under the GPL version 3 or any later version (GPLv3+). Since any file covered by GPLv3+ is also covered by GPLv2+, we can discard the GPLv2+ part and list the license as simply GPLv3+, since that is the more restrictive license of the two.

If there are multiple licenses in play that do not subsume one another, then all of them must be listed in the License: field, separated by and; e.g., MIT and BSD. In that case, the packaging guidelines require the spec file to contain a comment explaining which files are covered by which licenses. It is also acceptable to include a file in %license that explains the license situation.