On Fri, Oct 13, 2017 at 01:46:22PM -0700, W. Trevor King wrote: > It would be nice if the FSF had an API…
And with the mock API in [1] moving along, now we can pretend they do :). So here's a more structured comparison between FSF and OSI tags: OSI IDs and tags, keyed by SPDX ID, falling back to OSI ID: $ curl -s https://api.opensource.org/licenses/ | jq -S '[.[] | .spdx = [.identifiers[]? | select(.scheme == "SPDX") | .identifier][0]? | {"key": (.spdx // "OSI:" + .id), "value": {"osi": {"id": .id, "tags": .keywords}}}] | from_entries' > osi.json FSF IDs, SPDX IDs, and FSF tags, from a pull with wking/fsf-api's next branch [2]: $ (echo '['; A=; for x in *.json; do if test licenses.json = "$x"; then continue; fi; test -n "$A" && echo ','; A=1; jq ".id = \"${x/.json/}\"" $x; done; echo ']') | jq -S '[.[] | {"key": (.identifiers.spdx // "FSF:" + .id), "value": {"fsf": {"id": .id, "tags": .tags}}}] | from_entries' >fsf.json What is OSI-approved or FSF-libre, but not both (with interleaved comments)? $ jq --slurpfile fsf fsf.json '[to_entries[] | .value.fsf = $fsf[0][.key].fsf | .fsf = ((.value.fsf.tags // []) | contains(["libre"])) | .osi = ((.value.osi.tags // []) | contains(["osi-approved"])) | select((.fsf or .osi) and (.fsf and .osi | not))] | from_entries' osi.json { "AAL": { "osi": { "id": "AAL", "tags": [ "osi-approved", "discouraged", "redundant" ] }, "fsf": null }, Entries like this mean the SPDX AAL maps to OSI's AAL, which the OSI approved, but that the FSF has no ID for that license. "APL-1.0": { "osi": { "id": "APL-1.0", "tags": [ "osi-approved", "miscellaneous" ] }, "fsf": null }, "Artistic-1.0": { "osi": { "id": "Artistic-1.0", "tags": [ "osi-approved", "discouraged", "obsolete" ] }, "fsf": { "id": "ArtisticLicense", "tags": [ "non-free" ] } }, Entries like this mean the OSI approved (but now discourages the use of) the Artistic-1.0 license, but the FSF considers it non-free [3]. "BSD-2-Clause": { "osi": { "id": "BSD-2", "tags": [ "osi-approved", "popular", "permissive" ] }, "fsf": null }, "CATOSL-1.1": { "osi": { "id": "CATOSL-1.1", "tags": [ "discouraged", "non-reusable", "osi-approved" ] }, "fsf": null }, "CNRI-Python": { "osi": { "id": "CNRI-Python", "tags": [ "discouraged", "non-reusable", "osi-approved" ] }, "fsf": null }, "CUA-OPL-1.0": { "osi": { "id": "CUA-OPL-1.0", "tags": [ "discouraged", "non-reusable", "osi-approved" ] }, "fsf": null }, "ECL-1.0": { "osi": { "id": "ECL-1.0", "tags": [ "discouraged", "obsolete", "osi-approved" ] }, "fsf": null }, "EFL-1.0": { "osi": { "id": "EFL-1.0", "tags": [ "osi-approved", "discouraged", "obsolete" ] }, "fsf": null }, "Entessa": { "osi": { "id": "Entessa", "tags": [ "discouraged", "non-reusable", "osi-approved" ] }, "fsf": null }, "Fair": { "osi": { "id": "Fair", "tags": [ "osi-approved", "discouraged", "redundant" ] }, "fsf": null }, "Frameworx-1.0": { "osi": { "id": "Frameworx-1.0", "tags": [ "discouraged", "non-reusable", "osi-approved" ] }, "fsf": null }, "LPL-1.0": { "osi": { "id": "LPL-1.0", "tags": [ "osi-approved", "discouraged", "obsolete" ] }, "fsf": null }, "LPPL-1.3c": { "osi": { "id": "LPPL-1.3c", "tags": [ "discouraged", "non-reusable", "osi-approved" ] }, "fsf": null }, "MPL-1.0": { "osi": { "id": "MPL-1.0", "tags": [ "osi-approved", "discouraged", "obsolete" ] }, "fsf": null }, "MirOS": { "osi": { "id": "MirOS", "tags": [ "osi-approved" ] }, "fsf": null }, "Motosoto": { "osi": { "id": "Motosoto", "tags": [ "discouraged", "non-reusable", "osi-approved" ] }, "fsf": null }, "Multics": { "osi": { "id": "Multics", "tags": [ "discouraged", "non-reusable", "osi-approved" ] }, "fsf": null }, "NASA-1.3": { "osi": { "id": "NASA-1.3", "tags": [ "osi-approved", "special-purpose" ] }, "fsf": { "id": "NASA", "tags": [ "non-free" ] } }, "NGPL": { "osi": { "id": "NGPL", "tags": [ "discouraged", "non-reusable", "osi-approved" ] }, "fsf": null }, "NPOSL-3.0": { "osi": { "id": "NPOSL-3.0", "tags": [ "osi-approved" ] }, "fsf": null }, "NTP": { "osi": { "id": "NTP", "tags": [ "osi-approved" ] }, "fsf": null }, "Naumen": { "osi": { "id": "Naumen", "tags": [ "discouraged", "non-reusable", "osi-approved" ] }, "fsf": null }, "OCLC-2.0": { "osi": { "id": "OCLC-2.0", "tags": [ "discouraged", "non-reusable", "osi-approved" ] }, "fsf": null }, "OGTSL": { "osi": { "id": "OGTSL", "tags": [ "osi-approved" ] }, "fsf": null }, "OSI:CECILL-2.1": { "osi": { "id": "CECILL-2.1", "tags": [ "osi-approved" ] }, "fsf": null }, Entries like this have no SPDX entry, so instead of using the SPDX ID for the key they use an ‘OSI:…’ placeholder. They may have an FSF analog, but without an SPDX ID to bridge the gap (or direct FSF ↔ OSI ID map), we don't know what it is. "OSI:CVW": { "osi": { "id": "CVW", "tags": [ "discouraged", "retired", "osi-approved" ] }, "fsf": null }, "OSI:LiLiQ-P-1.1": { "osi": { "id": "LiLiQ-P-1.1", "tags": [ "osi-approved", "international", "permissive" ] }, "fsf": null }, "OSI:LiLiQ-R+": { "osi": { "id": "LiLiQ-R+", "tags": [ "international", "osi-approved", "copyleft" ] }, "fsf": null }, "OSI:LiLiQ-R-1.1": { "osi": { "id": "LiLiQ-R-1.1", "tags": [ "international", "osi-approved", "copyleft" ] }, "fsf": null }, "OSI:OPL-2.1": { "osi": { "id": "OPL-2.1", "tags": [ "osi-approved", "special-purpose" ] }, "fsf": null }, "OSI:UPL": { "osi": { "id": "UPL", "tags": [ "osi-approved" ] }, "fsf": null }, "OSI:jabberpl": { "osi": { "id": "jabberpl", "tags": [ "discouraged", "retired", "osi-approved" ] }, "fsf": null }, "PHP-3.0": { "osi": { "id": "PHP-3.0", "tags": [ "discouraged", "non-reusable", "osi-approved" ] }, "fsf": null }, "PostgreSQL": { "osi": { "id": "PostgreSQL", "tags": [ "osi-approved", "discouraged", "redundant" ] }, "fsf": null }, "RPL-1.1": { "osi": { "id": "RPL-1.1", "tags": [ "discouraged", "obsolete", "osi-approved" ] }, "fsf": null }, "RPL-1.5": { "osi": { "id": "RPL-1.5", "tags": [ "osi-approved" ] }, "fsf": null }, "RSCPL": { "osi": { "id": "RSCPL", "tags": [ "discouraged", "non-reusable", "osi-approved" ] }, "fsf": null }, "SISSL": { "osi": { "id": "SISSL", "tags": [ "discouraged", "retired", "osi-approved" ] }, "fsf": null }, "SimPL-2.0": { "osi": { "id": "Simple-2.0", "tags": [ "osi-approved" ] }, "fsf": null }, "VSL-1.0": { "osi": { "id": "VSL-1.0", "tags": [ "discouraged", "non-reusable", "osi-approved" ] }, "fsf": null }, "WXwindows": { "osi": { "id": "WXwindows", "tags": [ "discouraged", "non-reusable", "osi-approved" ] }, "fsf": null }, "Watcom-1.0": { "osi": { "id": "Watcom-1.0", "tags": [ "discouraged", "non-reusable", "osi-approved" ] }, "fsf": { "id": "Watcom", "tags": [ "non-free" ] } }, "Xnet": { "osi": { "id": "Xnet", "tags": [ "osi-approved", "discouraged", "redundant" ] }, "fsf": null } } And here at the licenses that the FSF considers free but which have no (known) OSI entry (with an interleaved comment): $ jq --slurpfile osi osi.json '[to_entries[] | select($osi[0][.key] | not) | select(.value.fsf.tags | contains(["libre"]))] | from_entries' fsf.json { "AFL-1.1": { "fsf": { "id": "AcademicFreeLicense1.1", "tags": [ "libre" ] } }, "AFL-1.2": { "fsf": { "id": "AcademicFreeLicense1.2", "tags": [ "libre" ] } }, "AFL-2.0": { "fsf": { "id": "AcademicFreeLicense2.0", "tags": [ "libre" ] } }, "AFL-2.1": { "fsf": { "id": "AcademicFreeLicense2.1", "tags": [ "libre" ] } }, "AGPL-1.0": { "fsf": { "id": "AGPLv1.0", "tags": [ "libre" ] } }, "Apache-1.0": { "fsf": { "id": "apache1", "tags": [ "libre" ] } }, "BSD-2-Clause-FreeBSD": { "fsf": { "id": "FreeBSD", "tags": [ "fdl-compatible", "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "BSD-3-Clause-Clear": { "fsf": { "id": "clearbsd", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "BSD-4-Clause": { "fsf": { "id": "OriginalBSD", "tags": [ "libre" ] } }, "BitTorrent-1.1": { "fsf": { "id": "bittorrent", "tags": [ "libre" ] } }, "CC-BY-4.0": { "fsf": { "id": "ccby", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "CC-BY-SA-4.0": { "fsf": { "id": "ccbysa", "tags": [ "libre" ] } }, "CC0-1.0": { "fsf": { "id": "CC0", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "CECILL-2.0": { "fsf": { "id": "CeCILL", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "CECILL-B": { "fsf": { "id": "CeCILL-B", "tags": [ "libre" ] } }, "CECILL-C": { "fsf": { "id": "CeCILL-C", "tags": [ "libre" ] } }, "ClArtistic": { "fsf": { "id": "ClarifiedArtistic", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "Condor-1.1": { "fsf": { "id": "Condor", "tags": [ "libre" ] } }, "EPL-2.0": { "fsf": { "id": "EPL2", "tags": [ "libre" ] } }, "FSF:ACDL": { "fsf": { "id": "ACDL", "tags": [ "libre" ] } }, Entries like this have no SPDX ID, so instead of using the SPDX ID for the key they use an ‘FSF:…’ placeholder. They may have an OSI analog, but without an SPDX ID to bridge the gap (or direct FSF ↔ OSI ID map), we don't know what it is. "FSF:Arphic": { "fsf": { "id": "Arphic", "tags": [ "libre" ] } }, "FSF:CryptixGeneralLicense": { "fsf": { "id": "CryptixGeneralLicense", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "FSF:FreeArt": { "fsf": { "id": "FreeArt", "tags": [ "libre" ] } }, "FSF:GPLFonts": { "fsf": { "id": "GPLFonts", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "FSF:GPLOther": { "fsf": { "id": "GPLOther", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "FSF:OpenPublicationL": { "fsf": { "id": "OpenPublicationL", "tags": [ "libre" ] } }, "FSF:PerlLicense": { "fsf": { "id": "PerlLicense", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "FSF:Phorum": { "fsf": { "id": "Phorum", "tags": [ "libre" ] } }, "FSF:PublicDomain": { "fsf": { "id": "PublicDomain", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "FSF:Python": { "fsf": { "id": "Python", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "FSF:Python1.6a2": { "fsf": { "id": "Python1.6a2", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "FSF:Python1.6b1": { "fsf": { "id": "Python1.6b1", "tags": [ "libre" ] } }, "FSF:Python2.1": { "fsf": { "id": "Python2.1", "tags": [ "libre" ] } }, "FSF:SISSL": { "fsf": { "id": "SISSL", "tags": [ "libre" ] } }, "FSF:Unicode": { "fsf": { "id": "Unicode", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "FSF:WebM": { "fsf": { "id": "WebM", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "FSF:Zope": { "fsf": { "id": "Zope", "tags": [ "libre" ] } }, "FSF:dsl": { "fsf": { "id": "dsl", "tags": [ "libre" ] } }, "FSF:ecfonts": { "fsf": { "id": "ecfonts", "tags": [ "libre" ] } }, "FSF:informal": { "fsf": { "id": "informal", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "FSF:josl": { "fsf": { "id": "josl", "tags": [ "libre" ] } }, "FSFAP": { "fsf": { "id": "GNUAllPermissive", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "FTL": { "fsf": { "id": "freetype", "tags": [ "gpl-3-compatible", "libre" ] } }, "GFDL-1.1": { "fsf": { "id": "FDLv1.1", "tags": [ "fdl-compatible", "libre" ] } }, "GFDL-1.2": { "fsf": { "id": "FDLv1.2", "tags": [ "fdl-compatible", "libre" ] } }, "GFDL-1.3": { "fsf": { "id": "FDLv1.3", "tags": [ "fdl-compatible", "libre" ] } }, "GPL-2.0+ WITH eCos-exception-2.0": { "fsf": { "id": "eCos2.0", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "IJG": { "fsf": { "id": "ijg", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "Imlib2": { "fsf": { "id": "imlib", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "LPPL-1.2": { "fsf": { "id": "LPPL-1.2", "tags": [ "libre" ] } }, "LPPL-1.3a": { "fsf": { "id": "LPPL-1.3a", "tags": [ "libre" ] } }, "NOSL": { "fsf": { "id": "NOSL", "tags": [ "libre" ] } }, "NPL-1.0": { "fsf": { "id": "NPL-1.0", "tags": [ "libre" ] } }, "NPL-1.1": { "fsf": { "id": "NPL-1.1", "tags": [ "libre" ] } }, "ODbL-1.0": { "fsf": { "id": "ODbl", "tags": [ "libre" ] } }, "OLDAP-2.3": { "fsf": { "id": "oldOpenLDAP", "tags": [ "libre" ] } }, "OLDAP-2.7": { "fsf": { "id": "newOpenLDAP", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "OSL-1.1": { "fsf": { "id": "OSL-1.1", "tags": [ "libre" ] } }, "OSL-2.0": { "fsf": { "id": "OSL-2.0", "tags": [ "libre" ] } }, "OpenSSL": { "fsf": { "id": "OpenSSL", "tags": [ "libre" ] } }, "PHP-3.01": { "fsf": { "id": "PHP-3.01", "tags": [ "libre" ] } }, "Ruby": { "fsf": { "id": "Ruby", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "SGI-B-2.0": { "fsf": { "id": "SGIFreeB", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "SMLNJ": { "fsf": { "id": "StandardMLofNJ", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "UPL-1.0": { "fsf": { "id": "UPL", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "Unlicense": { "fsf": { "id": "Unlicense", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "Vim": { "fsf": { "id": "Vim", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "WTFPL": { "fsf": { "id": "WTFPL", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "X11": { "fsf": { "id": "X11License", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "XFree86-1.1": { "fsf": { "id": "XFree861.1License", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "YPL-1.1": { "fsf": { "id": "Yahoo", "tags": [ "libre" ] } }, "ZPL-2.1": { "fsf": { "id": "Zope2.1", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "Zend-2.0": { "fsf": { "id": "Zend", "tags": [ "libre" ] } }, "Zimbra-1.3": { "fsf": { "id": "Zimbra", "tags": [ "libre" ] } }, "gnuplot": { "fsf": { "id": "gnuplot", "tags": [ "libre" ] } }, "iMatix": { "fsf": { "id": "iMatix", "tags": [ "gpl-2-compatible", "gpl-3-compatible", "libre" ] } }, "xinetd": { "fsf": { "id": "xinetd", "tags": [ "libre" ] } } } Both fsf-api [4] and api.opensource.org [5,6] are non-canonical, so take all of the above with a grain of salt. That said, wking/fsf-api [7] and OpenSourceOrg/licenses [8] patches are welcome, so there's no reason for leave something broken :). Cheers, Trevor [1]: https://github.com/wking/fsf-api [2]: https://github.com/wking/fsf-api/tree/next [3]: https://www.gnu.org/licenses/license-list.html#ArtisticLicense [4]: https://github.com/wking/fsf-api/blob/964e386bcdbbee3f86dfe3a70fe842855f564b21/README.md#fsf-license-metadata-api [5]: https://github.com/OpenSourceOrg/licenses/tree/f7ff223f9694ca0d5114fc82e43c74b5c5087891#is-this-authoritative [6]: https://github.com/OpenSourceOrg/licenses/issues/47 [7]: https://github.com/wking/fsf-api/blob/964e386bcdbbee3f86dfe3a70fe842855f564b21/CONTRIBUTING.md [8]: https://github.com/OpenSourceOrg/licenses/blob/f7ff223f9694ca0d5114fc82e43c74b5c5087891/CONTRIBUTING.md#contributing -- This email may be signed or encrypted with GnuPG (http://www.gnupg.org). For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Spdx-tech mailing list Spdx-tech@lists.spdx.org https://lists.spdx.org/mailman/listinfo/spdx-tech