Licenses

All ebuilds must specify a LICENSE (note the American English spelling) variable. The license names listed in this variable must match files existing in the repository's licenses/ directory.

The value of this variable should include all licenses pertaining to the files installed by the package. If some parts of the package are installed only conditionally, or their license depends on the USE flag combination, you can use USE conditionals in LICENSE:

LICENSE="LGPL-2.1+ tools? ( GPL-2+ )"

If the package sources include additional files that are not installed, their license should not be listed. However, if those files are used at build time, then the license must not impose any restrictions that could prevent users from building the software. Please also note that some licenses may impose additional restrictons, e.g. fetch and/or mirroring restriction.

If the application is multi-license (either of several licenses can be used) then use the following syntax:

LICENSE="|| ( foo bar )"

Determining the correct license

To establish the correct value of LICENSE, you need to trace the licenses of all installed files. Normally, the licenses of output files (compiled executables, generated files) are implied by the licenses of the relevant input files.

When looking for license information, the following should be considered:

  1. COPYING* and LICENSE* files distributed with the package
  2. explicit statements in documentation
  3. explicit license notices in source and data files

The latter (more specific) options take precedence over the former. In particular, COPYING* files are frequently included as hardcopies of applicable licenses but the exact application of licenses and their versions are specified elsewhere.

Please watch for license conflicts. If the license indicated by the package is incompatible with the licenses used by its sources (e.g. BSD/MIT package including GPL sources), please contact the licenses team for guidance. Do not add packages that seem to include license term violations.

GPL-x vs GPL-x+

FSF licenses (GPL, LGPL, AGPL, FDL) occur in two variants: the 'vN only' and 'vN or later' variants. In Gentoo, the licenses of the latter variants are denoted by appending a plus sign (+) to their respective license notations of the former variant, e.g. GPL-2+ and GPL-2.

Determining the correct variant usually requires looking for copyright notices in the code. For example, the following copyright notice indicates GPL-2+ license:

 * This program is free software; you can redistribute it and/or 
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of 
 * the License, or (at your option) any later version.

Adding New Licenses

If your package's license is not already in the tree, you must add the license before committing the package. When adding the license, use a plain text file (UTF-8 encoded) if at all possible. Some licenses are PDF files rather than plain text — this should only be done if we are legally required to do so. Finally you need to check if your license should be added to a license group as listed in $PORTDIR/profiles/license_groups. For more information see the GLEP 23.

It is not normally necessary to mail the gentoo-dev list or licenses@gentoo.org before adding a new license. You should only do so if the license could be considered 'questionable' or if you are unsure as to the meaning of any part of it.