In the Linux Foundation CII "best practices" badge effort I'm noticing an 
interesting problem.  Some projects have *different* license situations for 
their source code and documentation, but there's no simple way to express that 
using SPDX License expressions.  Examples of projects where the license isn't 
easily expressed with SPDX expressions are:
https://bestpractices.coreinfrastructure.org/projects/1
https://bestpractices.coreinfrastructure.org/projects/137

I propose adding a new construct:
"(IF <Condition> THEN <License-Expression> [ELSE <License-Expression>])" to 
License expressions.
For starters, <Condition> can be:
DOCUMENTATION = True if & only if (iff) documentation
SOURCE = True if & only if (iff) source code

So "Source code under MIT, everything else under CC-BY-3.0 or later" becomes 
this license expression:
"(IF SOURCE THEN MIT ELSE CC-BY-3.0+)".

If there's no "else" and the condition is false, it'd be interpreted as the 
empty set of rights ("no rights"), so these would mean the same thing:
"MIT OR (IF DOCUMENTATION THEN CC-BY-3.0+)"
"(IF DOCUMENTATION THEN (MIT OR CC-BY-3.0+) ELSE MIT)"

I imagine Condition could be beefed up to allow AND/OR/NOT, file matching, 
jurisdiction matching, and comparisons with the current date (for timed 
releases in the future).  But that's for a later discussion.

--- David A. Wheeler

_______________________________________________
Spdx-tech mailing list
[email protected]
https://lists.spdx.org/mailman/listinfo/spdx-tech

Reply via email to