Multiple alternative licenses and SPDX identifiers
Is your feature request related to a problem? Please describe the problem you're trying to solve.
Hello, I would like GitHub to properly detect licenses of software like @Nette (e.g. nette/schema license.
Describe the solution you'd like
Support SPDX license identifiers so we could cleary specify in license file supported licenses and whether they are combined with AND or OR
Describe alternatives you've considered
Currently working way (supported by GitHub) is adding multiple license files (e.g. license.bsd-3.md, license.gpl3.md) with content matching general text of these licenses. But it is unclear whether these licenses should by combined by AND or OR as it is not documented, it is unclear whether and how other tools for checking licenses and their compatibility support it and I am not aware there is a way to express "GPL-2.0 or newer version" etc.
Additional context
SPDX would help with cross-compatibility, deterministic license identification and provide more powerful way of expressing complex licensing rules.
SPDX requires only defining string like SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later in the license (or readme) file. I think licensee could detect that string, parse it with an already existing SPDX tool and return licenses from this string with 100% certainty.
Thank you for considering it
Yes this would be nice to have. For anyone wishing to work on it, https://spdx.github.io/spdx-spec/v2.3/SPDX-license-expressions/ is the right reference.
Licensee wouldn't return 100% certainty for https://github.com/nette/schema/blob/469e67c54f64f23b21a1d8f1c95400ddcd689968/license.md though as it has no way of knowing whether the custom text in that file actually corresponds to any declared licenses. Also specific to the nette/schema example, I see its composer.json file uses a custom (and implied) format to indicate disjunctive licenses, but an unambiguous SPDX license expression is also supported https://getcomposer.org/doc/04-schema.md#license
GitHub
📐 Validating data structures against a given Schema. - schema/license.md at 469e67c54f64f23b21a1d8f1c95400ddcd689968 · nette/schema
A Dependency Manager for PHP