You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SPDX validation should consider arbitrary expressions in format <KNOWN-LICENSE-ID>"+" as valid #110
SPDX license expression allow the following Simple license expressions:
An SPDX License List Short Form Identifier with a unary "+" operator suffix to represent the current version of the license or any later version. For example: CDDL-1.0+
changed the title [-]SPDX validation should consider `<LICENSE-ID>+` that are not in the database[/-][+]SPDX validation should consider `<LICENSE-ID>+` as valid[/+]on Feb 13, 2025
changed the title [-]SPDX validation should consider `<LICENSE-ID>+` as valid[/-][+]SPDX validation should consider arbitrary expressins in format `<KNOWN-LICENSE-ID>+` as valid[/+]on Feb 13, 2025
changed the title [-]SPDX validation should consider arbitrary expressins in format `<KNOWN-LICENSE-ID>+` as valid[/-][+]SPDX validation should consider arbitrary expressins in format `<KNOWN-LICENSE-ID>"+"` as valid[/+]on Feb 13, 2025
changed the title [-]SPDX validation should consider arbitrary expressins in format `<KNOWN-LICENSE-ID>"+"` as valid[/-][+]SPDX validation should consider arbitrary expressions in format `<KNOWN-LICENSE-ID>"+"` as valid[/+]on Feb 13, 2025
The "+" format license identifiers were deprecated in favor of "or-later" long ago (Identifier list version 2.0rc2). I do no know the exact date but the latest version of the list in GitHub is v2.4 from 2016.
In recap, if you see examples of real usage of an unsupported trailing +, report them and we will add proper licenses (or alternative SPDX license keys) for them. I do not want to support a deprecated blanket generic + trailing/suffix otherwise. It was deprecated for a purpose, chiefly for its lack of purpose as a generic thing.
Versions of the License.
4.1. New Versions. Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License.
4.2. Effect of New Versions. You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward.
SPDX-License-Identifier: AFL-3.0+ OR Apache-2.0+ OR BSD-3-Clause+ OR CC-BY-4.0+ OR CDDL-1.0+ OR GPL-2.0-or-later OR MIT+
In particular when a license has no version and no steward, this is pretty naive and ill informed IMHO. These will be treated as exceptions and detected correctly in ScanCode with custom rules, and as a last resort as alternative license keys, but I would not want to maintain generic code warts for a few rare weird stuffs.
@jkowalleck I want to make sure we support these rare cases alright, either as detection rules or alternative keys, so we can keep this open. It is unfortunate that the SPDX spec and related docs provide weird examples by using the nonsensical CDDL-1.0+ in various places when this is redundant and essentially incorrect.
And because of these warts, there are actual parsers that go to some length to support this for zero actual benefits.
The same way GPL-2.0-or-later+ would make no sense.
Activity
[-]SPDX validation should consider `<LICENSE-ID>+` that are not in the database[/-][+]SPDX validation should consider `<LICENSE-ID>+` as valid[/+][-]SPDX validation should consider `<LICENSE-ID>+` as valid[/-][+]SPDX validation should consider arbitrary expressins in format `<KNOWN-LICENSE-ID>+` as valid[/+][-]SPDX validation should consider arbitrary expressins in format `<KNOWN-LICENSE-ID>+` as valid[/-][+]SPDX validation should consider arbitrary expressins in format `<KNOWN-LICENSE-ID>"+"` as valid[/+][-]SPDX validation should consider arbitrary expressins in format `<KNOWN-LICENSE-ID>"+"` as valid[/-][+]SPDX validation should consider arbitrary expressions in format `<KNOWN-LICENSE-ID>"+"` as valid[/+]mjherzog commentedon Feb 13, 2025
The "+" format license identifiers were deprecated in favor of "or-later" long ago (Identifier list version 2.0rc2). I do no know the exact date but the latest version of the list in GitHub is v2.4 from 2016.
pombredanne commentedon Feb 13, 2025
@jkowalleck We are not treating a trailing "+" as special. Instead, it needs to be included as an alternative license symbol. For instance see:
https://github.com/aboutcode-org/scancode-toolkit/blob/e795bc6e1e531a0657b7be2363ec746520a5ae64/src/licensedcode/data/licenses/gpl-2.0-plus.LICENSE#L12
Here
CDDL-1.0+is not a great example in all cases, because it the CDDL already allows other versions as shown below https://scancode-licensedb.aboutcode.org/cddl-1.0.htmlIn recap, if you see examples of real usage of an unsupported trailing +, report them and we will add proper licenses (or alternative SPDX license keys) for them. I do not want to support a deprecated blanket generic + trailing/suffix otherwise. It was deprecated for a purpose, chiefly for its lack of purpose as a generic thing.
pombredanne commentedon Feb 13, 2025
And example of a fairly rare and fairly poor licensing statement is this:
SPDX-License-Identifier: AFL-3.0+ OR Apache-2.0+ OR BSD-3-Clause+ OR CC-BY-4.0+ OR CDDL-1.0+ OR GPL-2.0-or-later OR MIT+In particular when a license has no version and no steward, this is pretty naive and ill informed IMHO. These will be treated as exceptions and detected correctly in ScanCode with custom rules, and as a last resort as alternative license keys, but I would not want to maintain generic code warts for a few rare weird stuffs.
jkowalleck commentedon Feb 13, 2025
Thanks for the explanation.
I would be okay with closing this ticket
pombredanne commentedon Feb 13, 2025
@jkowalleck I want to make sure we support these rare cases alright, either as detection rules or alternative keys, so we can keep this open. It is unfortunate that the SPDX spec and related docs provide weird examples by using the nonsensical
CDDL-1.0+in various places when this is redundant and essentially incorrect.And because of these warts, there are actual parsers that go to some length to support this for zero actual benefits.
The same way
GPL-2.0-or-later+would make no sense.