Closed Artoria2e5 closed 9 years ago
Autobuild provides a scheme for handling SPDX-listed licenses. Licenses outside of the list will be put in the software packages doc
directory.
Licenses are defined in an array $PKGLICENSE
. The array contains one or more SPDX-compatible license strings.
Standards:
A package named spdx-licenses
should exist. It would be installed to /usr/share/spdx-licenses
, with all the contents of http://git.spdx.org/license-list.git.
We will delete all the deprecated*
files, as well as MAC-OS/Git Generated files. The *.xls
files will also be deleted.
We are going to dump the table exceptions
of spdx_licenselist_v2.1.ods
to a text file. More specifically, We dump the exception text to exceptions/ExceptionIdentifier.txt
.
Since exceptions are typically used with one or more specific licenses, we may add the last line as a shell pattern (to use with [[ == ]]
and case
) to check.
if an exception comes with a ^Use With:
line, more preferably in the last line, autobuild will treat the rest of this line as a shell glob and give a warning on mismatch.
Note: Some exceptions are just often used with a certain license, so we only throw warnings. (The real reason is I can't find a nice way to express ^Commonly used with
. Wait, what did I say?)
All explicitly defined other licenses will be ignored and autobuild will attempt to copy all the license text (that means @(COPYING|LICENSE)*
) to the package's doc
dir. The license should not be split.
If the PKGLICENSE
value is left blank, autobuild will try to compare the license files found with those defined in spdx-licenses
to find a match. If it fails, it falls back to the doc
.
Basically the PKGLICENSE
array will be dumped with abcommaprint
, where AB_COMMA
is ', '
.
RPM has a license
list and we will dump it there; for DPKG we have a Long-Description
stuff.
Edit: We use a much simpler method to deal with exceptions, by providing only a native list.
Multiple PMs traditionally handles this in different ways.
A proposal with basic license text to be shipped with AOSC OS3, named by SPDX 2.0 https://spdx.org/licenses/ Licence code will be written in 16 hours.