From ec896334d0f8b0ef988e0e03076df803a2be0ca2 Mon Sep 17 00:00:00 2001 From: lelia Date: Thu, 29 Aug 2024 19:25:50 -0400 Subject: [PATCH 1/4] Update SPDX license list, source for license data Signed-off-by: lelia --- checks/raw/license.go | 143 ++++++++++++++++++++++++------------------ 1 file changed, 81 insertions(+), 62 deletions(-) diff --git a/checks/raw/license.go b/checks/raw/license.go index af0f83d92fb..ce0527a8399 100644 --- a/checks/raw/license.go +++ b/checks/raw/license.go @@ -387,25 +387,8 @@ type fsfOsiLicenseType struct { Name string } -// (there's no magic here) -// created from the table at https://spdx.org/licenses -// 1) convert table to CSV and convert to json -// (inspired from inspired from https://stackoverflow.com/questions/17912307/u-ufeff-in-python-string) -// -// cat SPDX-license-IDs-202211131030CST.csv | \ -// python -c \ -// 'import csv, json, sys; print(json.dumps([dict(r) for r in csv.DictReader(sys.stdin)]))' | \ -// sed 's/\\ufeff//g' > SPDX-license-IDs-202211131030CST.json -// -// 2) convert json to go lang compatible map -// -// cat SPDX-license-IDs-202211131030CST.json | \ -// jq -c '.[] | select((."FSF Free/Libre?"=="Y") or (."OSI Approved?"=="Y")) | \ -// [."Identifier",."Full Name"]' | \ -// sed 's/","/": \{ Name: "/;s/\["/"/;s/"\]/" },/' | \ -// sed 's/[- ]only//g;s/[- ]or[- ]later//g' | \ -// sort | \ -// uniq +// SPDX license list avaliable here: https://spdx.org/licenses (OSI approved / FSF licenses only) +// JSON formatted list: https://github.com/spdx/license-list-data/blob/main/json/licenses.json var fsfOsiApprovedLicenseMap = map[string]fsfOsiLicenseType{ "0BSD": {Name: "BSD Zero Clause License"}, "AAL": {Name: "Attribution Assurance License"}, @@ -414,30 +397,36 @@ var fsfOsiApprovedLicenseMap = map[string]fsfOsiLicenseType{ "AFL-2.0": {Name: "Academic Free License v2.0"}, "AFL-2.1": {Name: "Academic Free License v2.1"}, "AFL-3.0": {Name: "Academic Free License v3.0"}, + "AGPL-1.0": {Name: "Affero General Public License v1.0"}, + "AGPL-3.0-only": {Name: "GNU Affero General Public License v3.0 only"}, + "AGPL-3.0-or-later": {Name: "GNU Affero General Public License v3.0 or later"}, "AGPL-3.0": {Name: "GNU Affero General Public License v3.0"}, + "Apache-1.0": {Name: "Apache License 1.0"}, + "Apache-1.1": {Name: "Apache License 1.1"}, + "Apache-2.0": {Name: "Apache License 2.0"}, "APL-1.0": {Name: "Adaptive Public License 1.0"}, "APSL-1.0": {Name: "Apple Public Source License 1.0"}, "APSL-1.1": {Name: "Apple Public Source License 1.1"}, "APSL-1.2": {Name: "Apple Public Source License 1.2"}, "APSL-2.0": {Name: "Apple Public Source License 2.0"}, - "Apache-1.0": {Name: "Apache License 1.0"}, - "Apache-1.1": {Name: "Apache License 1.1"}, - "Apache-2.0": {Name: "Apache License 2.0"}, - "Artistic-1.0": {Name: "Artistic License 1.0"}, - "Artistic-1.0-Perl": {Name: "Artistic License 1.0 (Perl)"}, "Artistic-1.0-cl8": {Name: "Artistic License 1.0 w/clause 8"}, + "Artistic-1.0-Perl": {Name: "Artistic License 1.0 (Perl)"}, + "Artistic-1.0": {Name: "Artistic License 1.0"}, "Artistic-2.0": {Name: "Artistic License 2.0"}, + "BitTorrent-1.1": {Name: "BitTorrent Open Source License v1.1"}, + "BlueOak-1.0.0": {Name: "Blue Oak Model License 1.0.0"}, "BSD-1-Clause": {Name: "BSD 1-Clause License"}, - "BSD-2-Clause": {Name: "BSD 2-Clause \"Simplified\" License"}, + "BSD-2-Clause-FreeBSD": {Name: "BSD 2-Clause FreeBSD License"}, + "BSD-2-Clause-NetBSD": {Name: "BSD 2-Clause NetBSD License"}, "BSD-2-Clause-Patent": {Name: "BSD-2-Clause Plus Patent License"}, - "BSD-3-Clause": {Name: "BSD 3-Clause \"New\" or \"Revised\" License"}, + "BSD-2-Clause": {Name: "BSD 2-Clause \"Simplified\" License"}, "BSD-3-Clause-Clear": {Name: "BSD 3-Clause Clear License"}, "BSD-3-Clause-LBNL": {Name: "Lawrence Berkeley National Labs BSD variant license"}, + "BSD-3-Clause": {Name: "BSD 3-Clause \"New\" or \"Revised\" License"}, "BSD-4-Clause": {Name: "BSD 4-Clause \"Original\" or \"Old\" License"}, "BSL-1.0": {Name: "Boost Software License 1.0"}, - "BitTorrent-1.1": {Name: "BitTorrent Open Source License v1.1"}, - "CAL-1.0": {Name: "Cryptographic Autonomy License 1.0"}, "CAL-1.0-Combined-Work-Exception": {Name: "Cryptographic Autonomy License 1.0 (Combined Work Exception)"}, + "CAL-1.0": {Name: "Cryptographic Autonomy License 1.0"}, "CATOSL-1.1": {Name: "Computer Associates Trusted Open Source License 1.1"}, "CC-BY-4.0": {Name: "Creative Commons Attribution 4.0 International"}, "CC-BY-SA-4.0": {Name: "Creative Commons Attribution Share Alike 4.0 International"}, @@ -450,90 +439,118 @@ var fsfOsiApprovedLicenseMap = map[string]fsfOsiLicenseType{ "CERN-OHL-P-2.0": {Name: "CERN Open Hardware Licence Version 2 - Permissive"}, "CERN-OHL-S-2.0": {Name: "CERN Open Hardware Licence Version 2 - Strongly Reciprocal"}, "CERN-OHL-W-2.0": {Name: "CERN Open Hardware Licence Version 2 - Weakly Reciprocal"}, + "ClArtistic": {Name: "Clarified Artistic License"}, "CNRI-Python": {Name: "CNRI Python License"}, + "Condor-1.1": {Name: "Condor Public License v1.1"}, "CPAL-1.0": {Name: "Common Public Attribution License 1.0"}, "CPL-1.0": {Name: "Common Public License 1.0"}, "CUA-OPL-1.0": {Name: "CUA Office Public License v1.0"}, - "ClArtistic": {Name: "Clarified Artistic License"}, - "Condor-1.1": {Name: "Condor Public License v1.1"}, "ECL-1.0": {Name: "Educational Community License v1.0"}, "ECL-2.0": {Name: "Educational Community License v2.0"}, + "eCos-2.0": {Name: "eCos license version 2.0"}, "EFL-1.0": {Name: "Eiffel Forum License v1.0"}, "EFL-2.0": {Name: "Eiffel Forum License v2.0"}, + "Entessa": {Name: "Entessa Public License v1.0"}, "EPL-1.0": {Name: "Eclipse Public License 1.0"}, "EPL-2.0": {Name: "Eclipse Public License 2.0"}, "EUDatagrid": {Name: "EU DataGrid Software License"}, "EUPL-1.1": {Name: "European Union Public License 1.1"}, "EUPL-1.2": {Name: "European Union Public License 1.2"}, - "Entessa": {Name: "Entessa Public License v1.0"}, - "FSFAP": {Name: "FSF All Permissive License"}, - "FTL": {Name: "Freetype Project License"}, "Fair": {Name: "Fair License"}, "Frameworx-1.0": {Name: "Frameworx Open License 1.0"}, + "FSFAP": {Name: "FSF All Permissive License"}, + "FTL": {Name: "Freetype Project License"}, + "GFDL-1.1-only": {Name: "GNU Free Documentation License v1.1 only"}, + "GFDL-1.1-or-later": {Name: "GNU Free Documentation License v1.1 or later"}, "GFDL-1.1": {Name: "GNU Free Documentation License v1.1"}, + "GFDL-1.2-only": {Name: "GNU Free Documentation License v1.2 only"}, + "GFDL-1.2-or-later": {Name: "GNU Free Documentation License v1.2 or later"}, "GFDL-1.2": {Name: "GNU Free Documentation License v1.2"}, + "GFDL-1.3-only": {Name: "GNU Free Documentation License v1.3 only"}, + "GFDL-1.3-or-later": {Name: "GNU Free Documentation License v1.3 or later"}, "GFDL-1.3": {Name: "GNU Free Documentation License v1.3"}, - "GPL-2.0": {Name: "GNU General Public License v2.0"}, - "GPL-3.0": {Name: "GNU General Public License v3.0"}, + "gnuplot": {Name: "gnuplot License"}, + "GPL-2.0-only": {Name: "GNU General Public License v2.0 only"}, + "GPL-2.0-or-later": {Name: "GNU General Public License v2.0 or later"}, + "GPL-2.0": {Name: "GNU General Public License v2.0 only"}, + "GPL-2.0+": {Name: "GNU General Public License v2.0 or later"}, + "GPL-3.0-only": {Name: "GNU General Public License v3.0 only"}, + "GPL-3.0-or-later": {Name: "GNU General Public License v3.0 or later"}, + "GPL-3.0-with-GCC-exception": {Name: "GNU General Public License v3.0 w/GCC Runtime Library exception"}, + "GPL-3.0": {Name: "GNU General Public License v3.0 only"}, + "GPL-3.0+": {Name: "GNU General Public License v3.0 or later"}, "HPND": {Name: "Historical Permission Notice and Disclaimer"}, + "ICU": {Name: "ICU License"}, "IJG": {Name: "Independent JPEG Group License"}, + "iMatix": {Name: "iMatix Standard Function Library Agreement"}, + "Imlib2": {Name: "Imlib2 License"}, + "Intel": {Name: "Intel Open Source License"}, "IPA": {Name: "IPA Font License"}, "IPL-1.0": {Name: "IBM Public License v1.0"}, "ISC": {Name: "ISC License"}, - "Imlib2": {Name: "Imlib2 License"}, - "Intel": {Name: "Intel Open Source License"}, "Jam": {Name: "Jam License"}, - "LGPL-2.0": {Name: "GNU Library General Public License v2"}, - "LGPL-2.1": {Name: "GNU Lesser General Public License v2.1"}, - "LGPL-3.0": {Name: "GNU Lesser General Public License v3.0"}, + "LGPL-2.0-only": {Name: "GNU Library General Public License v2 only"}, + "LGPL-2.0-or-later": {Name: "GNU Library General Public License v2 or later"}, + "LGPL-2.0": {Name: "GNU Library General Public License v2 only"}, + "LGPL-2.0+": {Name: "GNU Library General Public License v2 or later"}, + "LGPL-2.1-only": {Name: "GNU Lesser General Public License v2.1 only"}, + "LGPL-2.1-or-later": {Name: "GNU Lesser General Public License v2.1 or later"}, + "LGPL-2.1": {Name: "GNU Lesser General Public License v2.1 only"}, + "LGPL-2.1+": {Name: "GNU Lesser General Public License v2.1 or later"}, + "LGPL-3.0-only": {Name: "GNU Lesser General Public License v3.0 only"}, + "LGPL-3.0-or-later": {Name: "GNU Lesser General Public License v3.0 or later"}, + "LGPL-3.0": {Name: "GNU Lesser General Public License v3.0 only"}, + "LGPL-3.0+": {Name: "GNU Lesser General Public License v3.0 or later"}, + "LiLiQ-P-1.1": {Name: "Licence Libre du Québec – Permissive version 1.1"}, + "LiLiQ-R-1.1": {Name: "Licence Libre du Québec – Réciprocité version 1.1"}, + "LiLiQ-Rplus-1.1": {Name: "Licence Libre du Québec – Réciprocité forte version 1.1"}, "LPL-1.0": {Name: "Lucent Public License Version 1.0"}, "LPL-1.02": {Name: "Lucent Public License v1.02"}, "LPPL-1.2": {Name: "LaTeX Project Public License v1.2"}, "LPPL-1.3a": {Name: "LaTeX Project Public License v1.3a"}, "LPPL-1.3c": {Name: "LaTeX Project Public License v1.3c"}, - "LiLiQ-P-1.1": {Name: "Licence Libre du Québec – Permissive version 1.1"}, - "LiLiQ-R-1.1": {Name: "Licence Libre du Québec – Réciprocité version 1.1"}, - "LiLiQ-Rplus-1.1": {Name: "Licence Libre du Québec – Réciprocité forte version 1.1"}, - "MIT": {Name: "MIT License"}, + "MirOS": {Name: "The MirOS Licence"}, "MIT-0": {Name: "MIT No Attribution"}, "MIT-Modern-Variant": {Name: "MIT License Modern Variant"}, + "MIT": {Name: "MIT License"}, + "Motosoto": {Name: "Motosoto License"}, "MPL-1.0": {Name: "Mozilla Public License 1.0"}, "MPL-1.1": {Name: "Mozilla Public License 1.1"}, - "MPL-2.0": {Name: "Mozilla Public License 2.0"}, "MPL-2.0-no-copyleft-exception": {Name: "Mozilla Public License 2.0 (no copyleft exception)"}, + "MPL-2.0": {Name: "Mozilla Public License 2.0"}, "MS-PL": {Name: "Microsoft Public License"}, "MS-RL": {Name: "Microsoft Reciprocal License"}, - "MirOS": {Name: "The MirOS Licence"}, - "Motosoto": {Name: "Motosoto License"}, "MulanPSL-2.0": {Name: "Mulan Permissive Software License, Version 2"}, "Multics": {Name: "Multics License"}, "NASA-1.3": {Name: "NASA Open Source Agreement 1.3"}, + "Naumen": {Name: "Naumen Public License"}, "NCSA": {Name: "University of Illinois/NCSA Open Source License"}, "NGPL": {Name: "Nethack General Public License"}, + "Nokia": {Name: "Nokia Open Source License"}, "NOSL": {Name: "Netizen Open Source License"}, "NPL-1.0": {Name: "Netscape Public License v1.0"}, "NPL-1.1": {Name: "Netscape Public License v1.1"}, "NPOSL-3.0": {Name: "Non-Profit Open Software License 3.0"}, "NTP": {Name: "NTP License"}, - "Naumen": {Name: "Naumen Public License"}, - "Nokia": {Name: "Nokia Open Source License"}, + "Nunit": {Name: "Nunit License"}, "OCLC-2.0": {Name: "OCLC Research Public License 2.0"}, "ODbL-1.0": {Name: "Open Data Commons Open Database License v1.0"}, "OFL-1.0": {Name: "SIL Open Font License 1.0"}, - "OFL-1.1": {Name: "SIL Open Font License 1.1"}, - "OFL-1.1-RFN": {Name: "SIL Open Font License 1.1 with Reserved Font Name"}, "OFL-1.1-no-RFN": {Name: "SIL Open Font License 1.1 with no Reserved Font Name"}, + "OFL-1.1-RFN": {Name: "SIL Open Font License 1.1 with Reserved Font Name"}, + "OFL-1.1": {Name: "SIL Open Font License 1.1"}, "OGTSL": {Name: "Open Group Test Suite License"}, "OLDAP-2.3": {Name: "Open LDAP Public License v2.3"}, "OLDAP-2.7": {Name: "Open LDAP Public License v2.7"}, "OLDAP-2.8": {Name: "Open LDAP Public License v2.8"}, + "OLFL-1.3": {Name: "Open Logistics Foundation License Version 1.3"}, + "OpenSSL": {Name: "OpenSSL License"}, "OSET-PL-2.1": {Name: "OSET Public License version 2.1"}, "OSL-1.0": {Name: "Open Software License 1.0"}, "OSL-1.1": {Name: "Open Software License 1.1"}, "OSL-2.0": {Name: "Open Software License 2.0"}, "OSL-2.1": {Name: "Open Software License 2.1"}, "OSL-3.0": {Name: "Open Software License 3.0"}, - "OpenSSL": {Name: "OpenSSL License"}, "PHP-3.0": {Name: "PHP License v3.0"}, "PHP-3.01": {Name: "PHP License v3.01"}, "PostgreSQL": {Name: "PostgreSQL License"}, @@ -545,30 +562,32 @@ var fsfOsiApprovedLicenseMap = map[string]fsfOsiLicenseType{ "RSCPL": {Name: "Ricoh Source Code Public License"}, "Ruby": {Name: "Ruby License"}, "SGI-B-2.0": {Name: "SGI Free Software License B v2.0"}, + "SimPL-2.0": {Name: "Simple Public License 2.0"}, "SISSL": {Name: "Sun Industry Standards Source License v1.1"}, + "Sleepycat": {Name: "Sleepycat License"}, "SMLNJ": {Name: "Standard ML of New Jersey License"}, "SPL-1.0": {Name: "Sun Public License v1.0"}, - "SimPL-2.0": {Name: "Simple Public License 2.0"}, - "Sleepycat": {Name: "Sleepycat License"}, + "StandardML-NJ": {Name: "Standard ML of New Jersey License"}, "UCL-1.0": {Name: "Upstream Compatibility License v1.0"}, - "UPL-1.0": {Name: "Universal Permissive License v1.0"}, + "Unicode-3.0": {Name: "Unicode License v3"}, "Unicode-DFS-2016": {Name: "Unicode License Agreement - Data Files and Software (2016)"}, "Unlicense": {Name: "The Unlicense"}, - "VSL-1.0": {Name: "Vovida Software License v1.0"}, + "UPL-1.0": {Name: "Universal Permissive License v1.0"}, "Vim": {Name: "Vim License"}, + "VSL-1.0": {Name: "Vovida Software License v1.0"}, + "W3C-20150513": {Name: "W3C Software Notice and Document License (2015-05-13)"}, "W3C": {Name: "W3C Software Notice and License (2002-12-31)"}, - "WTFPL": {Name: "Do What The F*ck You Want To Public License"}, "Watcom-1.0": {Name: "Sybase Open Watcom Public License 1.0"}, + "WTFPL": {Name: "Do What The F*ck You Want To Public License"}, + "wxWindows": {Name: "wxWindows Library License"}, "X11": {Name: "X11 License"}, "XFree86-1.1": {Name: "XFree86 License 1.1"}, + "xinetd": {Name: "xinetd License"}, "Xnet": {Name: "X.Net License"}, "YPL-1.1": {Name: "Yahoo! Public License v1.1"}, - "ZPL-2.0": {Name: "Zope Public License 2.0"}, - "ZPL-2.1": {Name: "Zope Public License 2.1"}, "Zend-2.0": {Name: "Zend License v2.0"}, "Zimbra-1.3": {Name: "Zimbra Public License v1.3"}, "Zlib": {Name: "zlib License"}, - "gnuplot": {Name: "gnuplot License"}, - "iMatix": {Name: "iMatix Standard Function Library Agreement"}, - "xinetd": {Name: "xinetd License"}, + "ZPL-2.0": {Name: "Zope Public License 2.0"}, + "ZPL-2.1": {Name: "Zope Public License 2.1"}, } From 6924110e7cb53c8570bbc7b18851e04ad7038582 Mon Sep 17 00:00:00 2001 From: lelia Date: Thu, 29 Aug 2024 20:30:53 -0400 Subject: [PATCH 2/4] Fix typo found by golangci-lint Signed-off-by: lelia --- checks/raw/license.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/checks/raw/license.go b/checks/raw/license.go index ce0527a8399..bd8aa4b0e21 100644 --- a/checks/raw/license.go +++ b/checks/raw/license.go @@ -387,7 +387,7 @@ type fsfOsiLicenseType struct { Name string } -// SPDX license list avaliable here: https://spdx.org/licenses (OSI approved / FSF licenses only) +// SPDX license list available here: https://spdx.org/licenses (OSI approved / FSF licenses only) // JSON formatted list: https://github.com/spdx/license-list-data/blob/main/json/licenses.json var fsfOsiApprovedLicenseMap = map[string]fsfOsiLicenseType{ "0BSD": {Name: "BSD Zero Clause License"}, From 7151612ef00971ff7a8246c61344439b5959e9c5 Mon Sep 17 00:00:00 2001 From: lelia Date: Fri, 30 Aug 2024 11:54:43 -0400 Subject: [PATCH 3/4] Fix alphabetization to conform with existing sort logic Signed-off-by: lelia --- checks/raw/license.go | 112 +++++++++++++++++++++--------------------- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/checks/raw/license.go b/checks/raw/license.go index bd8aa4b0e21..c7f6fa02d1e 100644 --- a/checks/raw/license.go +++ b/checks/raw/license.go @@ -398,35 +398,35 @@ var fsfOsiApprovedLicenseMap = map[string]fsfOsiLicenseType{ "AFL-2.1": {Name: "Academic Free License v2.1"}, "AFL-3.0": {Name: "Academic Free License v3.0"}, "AGPL-1.0": {Name: "Affero General Public License v1.0"}, + "AGPL-3.0": {Name: "GNU Affero General Public License v3.0"}, "AGPL-3.0-only": {Name: "GNU Affero General Public License v3.0 only"}, "AGPL-3.0-or-later": {Name: "GNU Affero General Public License v3.0 or later"}, - "AGPL-3.0": {Name: "GNU Affero General Public License v3.0"}, - "Apache-1.0": {Name: "Apache License 1.0"}, - "Apache-1.1": {Name: "Apache License 1.1"}, - "Apache-2.0": {Name: "Apache License 2.0"}, "APL-1.0": {Name: "Adaptive Public License 1.0"}, "APSL-1.0": {Name: "Apple Public Source License 1.0"}, "APSL-1.1": {Name: "Apple Public Source License 1.1"}, "APSL-1.2": {Name: "Apple Public Source License 1.2"}, "APSL-2.0": {Name: "Apple Public Source License 2.0"}, - "Artistic-1.0-cl8": {Name: "Artistic License 1.0 w/clause 8"}, - "Artistic-1.0-Perl": {Name: "Artistic License 1.0 (Perl)"}, + "Apache-1.0": {Name: "Apache License 1.0"}, + "Apache-1.1": {Name: "Apache License 1.1"}, + "Apache-2.0": {Name: "Apache License 2.0"}, "Artistic-1.0": {Name: "Artistic License 1.0"}, + "Artistic-1.0-Perl": {Name: "Artistic License 1.0 (Perl)"}, + "Artistic-1.0-cl8": {Name: "Artistic License 1.0 w/clause 8"}, "Artistic-2.0": {Name: "Artistic License 2.0"}, - "BitTorrent-1.1": {Name: "BitTorrent Open Source License v1.1"}, - "BlueOak-1.0.0": {Name: "Blue Oak Model License 1.0.0"}, "BSD-1-Clause": {Name: "BSD 1-Clause License"}, + "BSD-2-Clause": {Name: "BSD 2-Clause \"Simplified\" License"}, "BSD-2-Clause-FreeBSD": {Name: "BSD 2-Clause FreeBSD License"}, "BSD-2-Clause-NetBSD": {Name: "BSD 2-Clause NetBSD License"}, "BSD-2-Clause-Patent": {Name: "BSD-2-Clause Plus Patent License"}, - "BSD-2-Clause": {Name: "BSD 2-Clause \"Simplified\" License"}, + "BSD-3-Clause": {Name: "BSD 3-Clause \"New\" or \"Revised\" License"}, "BSD-3-Clause-Clear": {Name: "BSD 3-Clause Clear License"}, "BSD-3-Clause-LBNL": {Name: "Lawrence Berkeley National Labs BSD variant license"}, - "BSD-3-Clause": {Name: "BSD 3-Clause \"New\" or \"Revised\" License"}, "BSD-4-Clause": {Name: "BSD 4-Clause \"Original\" or \"Old\" License"}, "BSL-1.0": {Name: "Boost Software License 1.0"}, - "CAL-1.0-Combined-Work-Exception": {Name: "Cryptographic Autonomy License 1.0 (Combined Work Exception)"}, + "BitTorrent-1.1": {Name: "BitTorrent Open Source License v1.1"}, + "BlueOak-1.0.0": {Name: "Blue Oak Model License 1.0.0"}, "CAL-1.0": {Name: "Cryptographic Autonomy License 1.0"}, + "CAL-1.0-Combined-Work-Exception": {Name: "Cryptographic Autonomy License 1.0 (Combined Work Exception)"}, "CATOSL-1.1": {Name: "Computer Associates Trusted Open Source License 1.1"}, "CC-BY-4.0": {Name: "Creative Commons Attribution 4.0 International"}, "CC-BY-SA-4.0": {Name: "Creative Commons Attribution Share Alike 4.0 International"}, @@ -439,118 +439,115 @@ var fsfOsiApprovedLicenseMap = map[string]fsfOsiLicenseType{ "CERN-OHL-P-2.0": {Name: "CERN Open Hardware Licence Version 2 - Permissive"}, "CERN-OHL-S-2.0": {Name: "CERN Open Hardware Licence Version 2 - Strongly Reciprocal"}, "CERN-OHL-W-2.0": {Name: "CERN Open Hardware Licence Version 2 - Weakly Reciprocal"}, - "ClArtistic": {Name: "Clarified Artistic License"}, "CNRI-Python": {Name: "CNRI Python License"}, - "Condor-1.1": {Name: "Condor Public License v1.1"}, "CPAL-1.0": {Name: "Common Public Attribution License 1.0"}, "CPL-1.0": {Name: "Common Public License 1.0"}, "CUA-OPL-1.0": {Name: "CUA Office Public License v1.0"}, + "ClArtistic": {Name: "Clarified Artistic License"}, + "Condor-1.1": {Name: "Condor Public License v1.1"}, "ECL-1.0": {Name: "Educational Community License v1.0"}, "ECL-2.0": {Name: "Educational Community License v2.0"}, - "eCos-2.0": {Name: "eCos license version 2.0"}, "EFL-1.0": {Name: "Eiffel Forum License v1.0"}, "EFL-2.0": {Name: "Eiffel Forum License v2.0"}, - "Entessa": {Name: "Entessa Public License v1.0"}, "EPL-1.0": {Name: "Eclipse Public License 1.0"}, "EPL-2.0": {Name: "Eclipse Public License 2.0"}, "EUDatagrid": {Name: "EU DataGrid Software License"}, "EUPL-1.1": {Name: "European Union Public License 1.1"}, "EUPL-1.2": {Name: "European Union Public License 1.2"}, - "Fair": {Name: "Fair License"}, - "Frameworx-1.0": {Name: "Frameworx Open License 1.0"}, + "Entessa": {Name: "Entessa Public License v1.0"}, "FSFAP": {Name: "FSF All Permissive License"}, "FTL": {Name: "Freetype Project License"}, + "Fair": {Name: "Fair License"}, + "Frameworx-1.0": {Name: "Frameworx Open License 1.0"}, + "GFDL-1.1": {Name: "GNU Free Documentation License v1.1"}, "GFDL-1.1-only": {Name: "GNU Free Documentation License v1.1 only"}, "GFDL-1.1-or-later": {Name: "GNU Free Documentation License v1.1 or later"}, - "GFDL-1.1": {Name: "GNU Free Documentation License v1.1"}, + "GFDL-1.2": {Name: "GNU Free Documentation License v1.2"}, "GFDL-1.2-only": {Name: "GNU Free Documentation License v1.2 only"}, "GFDL-1.2-or-later": {Name: "GNU Free Documentation License v1.2 or later"}, - "GFDL-1.2": {Name: "GNU Free Documentation License v1.2"}, + "GFDL-1.3": {Name: "GNU Free Documentation License v1.3"}, "GFDL-1.3-only": {Name: "GNU Free Documentation License v1.3 only"}, "GFDL-1.3-or-later": {Name: "GNU Free Documentation License v1.3 or later"}, - "GFDL-1.3": {Name: "GNU Free Documentation License v1.3"}, - "gnuplot": {Name: "gnuplot License"}, - "GPL-2.0-only": {Name: "GNU General Public License v2.0 only"}, - "GPL-2.0-or-later": {Name: "GNU General Public License v2.0 or later"}, "GPL-2.0": {Name: "GNU General Public License v2.0 only"}, "GPL-2.0+": {Name: "GNU General Public License v2.0 or later"}, + "GPL-2.0-only": {Name: "GNU General Public License v2.0 only"}, + "GPL-2.0-or-later": {Name: "GNU General Public License v2.0 or later"}, + "GPL-3.0": {Name: "GNU General Public License v3.0 only"}, + "GPL-3.0+": {Name: "GNU General Public License v3.0 or later"}, "GPL-3.0-only": {Name: "GNU General Public License v3.0 only"}, "GPL-3.0-or-later": {Name: "GNU General Public License v3.0 or later"}, "GPL-3.0-with-GCC-exception": {Name: "GNU General Public License v3.0 w/GCC Runtime Library exception"}, - "GPL-3.0": {Name: "GNU General Public License v3.0 only"}, - "GPL-3.0+": {Name: "GNU General Public License v3.0 or later"}, "HPND": {Name: "Historical Permission Notice and Disclaimer"}, "ICU": {Name: "ICU License"}, "IJG": {Name: "Independent JPEG Group License"}, - "iMatix": {Name: "iMatix Standard Function Library Agreement"}, - "Imlib2": {Name: "Imlib2 License"}, - "Intel": {Name: "Intel Open Source License"}, "IPA": {Name: "IPA Font License"}, "IPL-1.0": {Name: "IBM Public License v1.0"}, "ISC": {Name: "ISC License"}, + "Imlib2": {Name: "Imlib2 License"}, + "Intel": {Name: "Intel Open Source License"}, "Jam": {Name: "Jam License"}, - "LGPL-2.0-only": {Name: "GNU Library General Public License v2 only"}, - "LGPL-2.0-or-later": {Name: "GNU Library General Public License v2 or later"}, "LGPL-2.0": {Name: "GNU Library General Public License v2 only"}, "LGPL-2.0+": {Name: "GNU Library General Public License v2 or later"}, - "LGPL-2.1-only": {Name: "GNU Lesser General Public License v2.1 only"}, - "LGPL-2.1-or-later": {Name: "GNU Lesser General Public License v2.1 or later"}, + "LGPL-2.0-only": {Name: "GNU Library General Public License v2 only"}, + "LGPL-2.0-or-later": {Name: "GNU Library General Public License v2 or later"}, "LGPL-2.1": {Name: "GNU Lesser General Public License v2.1 only"}, "LGPL-2.1+": {Name: "GNU Lesser General Public License v2.1 or later"}, - "LGPL-3.0-only": {Name: "GNU Lesser General Public License v3.0 only"}, - "LGPL-3.0-or-later": {Name: "GNU Lesser General Public License v3.0 or later"}, + "LGPL-2.1-only": {Name: "GNU Lesser General Public License v2.1 only"}, + "LGPL-2.1-or-later": {Name: "GNU Lesser General Public License v2.1 or later"}, "LGPL-3.0": {Name: "GNU Lesser General Public License v3.0 only"}, "LGPL-3.0+": {Name: "GNU Lesser General Public License v3.0 or later"}, - "LiLiQ-P-1.1": {Name: "Licence Libre du Québec – Permissive version 1.1"}, - "LiLiQ-R-1.1": {Name: "Licence Libre du Québec – Réciprocité version 1.1"}, - "LiLiQ-Rplus-1.1": {Name: "Licence Libre du Québec – Réciprocité forte version 1.1"}, + "LGPL-3.0-only": {Name: "GNU Lesser General Public License v3.0 only"}, + "LGPL-3.0-or-later": {Name: "GNU Lesser General Public License v3.0 or later"}, "LPL-1.0": {Name: "Lucent Public License Version 1.0"}, "LPL-1.02": {Name: "Lucent Public License v1.02"}, "LPPL-1.2": {Name: "LaTeX Project Public License v1.2"}, "LPPL-1.3a": {Name: "LaTeX Project Public License v1.3a"}, "LPPL-1.3c": {Name: "LaTeX Project Public License v1.3c"}, - "MirOS": {Name: "The MirOS Licence"}, + "LiLiQ-P-1.1": {Name: "Licence Libre du Québec – Permissive version 1.1"}, + "LiLiQ-R-1.1": {Name: "Licence Libre du Québec – Réciprocité version 1.1"}, + "LiLiQ-Rplus-1.1": {Name: "Licence Libre du Québec – Réciprocité forte version 1.1"}, + "MIT": {Name: "MIT License"}, "MIT-0": {Name: "MIT No Attribution"}, "MIT-Modern-Variant": {Name: "MIT License Modern Variant"}, - "MIT": {Name: "MIT License"}, - "Motosoto": {Name: "Motosoto License"}, "MPL-1.0": {Name: "Mozilla Public License 1.0"}, "MPL-1.1": {Name: "Mozilla Public License 1.1"}, - "MPL-2.0-no-copyleft-exception": {Name: "Mozilla Public License 2.0 (no copyleft exception)"}, "MPL-2.0": {Name: "Mozilla Public License 2.0"}, + "MPL-2.0-no-copyleft-exception": {Name: "Mozilla Public License 2.0 (no copyleft exception)"}, "MS-PL": {Name: "Microsoft Public License"}, "MS-RL": {Name: "Microsoft Reciprocal License"}, + "MirOS": {Name: "The MirOS Licence"}, + "Motosoto": {Name: "Motosoto License"}, "MulanPSL-2.0": {Name: "Mulan Permissive Software License, Version 2"}, "Multics": {Name: "Multics License"}, "NASA-1.3": {Name: "NASA Open Source Agreement 1.3"}, - "Naumen": {Name: "Naumen Public License"}, "NCSA": {Name: "University of Illinois/NCSA Open Source License"}, "NGPL": {Name: "Nethack General Public License"}, - "Nokia": {Name: "Nokia Open Source License"}, "NOSL": {Name: "Netizen Open Source License"}, "NPL-1.0": {Name: "Netscape Public License v1.0"}, "NPL-1.1": {Name: "Netscape Public License v1.1"}, "NPOSL-3.0": {Name: "Non-Profit Open Software License 3.0"}, "NTP": {Name: "NTP License"}, + "Naumen": {Name: "Naumen Public License"}, + "Nokia": {Name: "Nokia Open Source License"}, "Nunit": {Name: "Nunit License"}, "OCLC-2.0": {Name: "OCLC Research Public License 2.0"}, "ODbL-1.0": {Name: "Open Data Commons Open Database License v1.0"}, "OFL-1.0": {Name: "SIL Open Font License 1.0"}, - "OFL-1.1-no-RFN": {Name: "SIL Open Font License 1.1 with no Reserved Font Name"}, - "OFL-1.1-RFN": {Name: "SIL Open Font License 1.1 with Reserved Font Name"}, "OFL-1.1": {Name: "SIL Open Font License 1.1"}, + "OFL-1.1-RFN": {Name: "SIL Open Font License 1.1 with Reserved Font Name"}, + "OFL-1.1-no-RFN": {Name: "SIL Open Font License 1.1 with no Reserved Font Name"}, "OGTSL": {Name: "Open Group Test Suite License"}, "OLDAP-2.3": {Name: "Open LDAP Public License v2.3"}, "OLDAP-2.7": {Name: "Open LDAP Public License v2.7"}, "OLDAP-2.8": {Name: "Open LDAP Public License v2.8"}, "OLFL-1.3": {Name: "Open Logistics Foundation License Version 1.3"}, - "OpenSSL": {Name: "OpenSSL License"}, "OSET-PL-2.1": {Name: "OSET Public License version 2.1"}, "OSL-1.0": {Name: "Open Software License 1.0"}, "OSL-1.1": {Name: "Open Software License 1.1"}, "OSL-2.0": {Name: "Open Software License 2.0"}, "OSL-2.1": {Name: "Open Software License 2.1"}, "OSL-3.0": {Name: "Open Software License 3.0"}, + "OpenSSL": {Name: "OpenSSL License"}, "PHP-3.0": {Name: "PHP License v3.0"}, "PHP-3.01": {Name: "PHP License v3.01"}, "PostgreSQL": {Name: "PostgreSQL License"}, @@ -562,32 +559,35 @@ var fsfOsiApprovedLicenseMap = map[string]fsfOsiLicenseType{ "RSCPL": {Name: "Ricoh Source Code Public License"}, "Ruby": {Name: "Ruby License"}, "SGI-B-2.0": {Name: "SGI Free Software License B v2.0"}, - "SimPL-2.0": {Name: "Simple Public License 2.0"}, "SISSL": {Name: "Sun Industry Standards Source License v1.1"}, - "Sleepycat": {Name: "Sleepycat License"}, "SMLNJ": {Name: "Standard ML of New Jersey License"}, "SPL-1.0": {Name: "Sun Public License v1.0"}, + "SimPL-2.0": {Name: "Simple Public License 2.0"}, + "Sleepycat": {Name: "Sleepycat License"}, "StandardML-NJ": {Name: "Standard ML of New Jersey License"}, "UCL-1.0": {Name: "Upstream Compatibility License v1.0"}, + "UPL-1.0": {Name: "Universal Permissive License v1.0"}, "Unicode-3.0": {Name: "Unicode License v3"}, "Unicode-DFS-2016": {Name: "Unicode License Agreement - Data Files and Software (2016)"}, "Unlicense": {Name: "The Unlicense"}, - "UPL-1.0": {Name: "Universal Permissive License v1.0"}, - "Vim": {Name: "Vim License"}, "VSL-1.0": {Name: "Vovida Software License v1.0"}, - "W3C-20150513": {Name: "W3C Software Notice and Document License (2015-05-13)"}, + "Vim": {Name: "Vim License"}, "W3C": {Name: "W3C Software Notice and License (2002-12-31)"}, - "Watcom-1.0": {Name: "Sybase Open Watcom Public License 1.0"}, + "W3C-20150513": {Name: "W3C Software Notice and Document License (2015-05-13)"}, "WTFPL": {Name: "Do What The F*ck You Want To Public License"}, - "wxWindows": {Name: "wxWindows Library License"}, + "Watcom-1.0": {Name: "Sybase Open Watcom Public License 1.0"}, "X11": {Name: "X11 License"}, "XFree86-1.1": {Name: "XFree86 License 1.1"}, - "xinetd": {Name: "xinetd License"}, "Xnet": {Name: "X.Net License"}, "YPL-1.1": {Name: "Yahoo! Public License v1.1"}, + "ZPL-2.0": {Name: "Zope Public License 2.0"}, + "ZPL-2.1": {Name: "Zope Public License 2.1"}, "Zend-2.0": {Name: "Zend License v2.0"}, "Zimbra-1.3": {Name: "Zimbra Public License v1.3"}, "Zlib": {Name: "zlib License"}, - "ZPL-2.0": {Name: "Zope Public License 2.0"}, - "ZPL-2.1": {Name: "Zope Public License 2.1"}, + "eCos-2.0": {Name: "eCos license version 2.0"}, + "gnuplot": {Name: "gnuplot License"}, + "iMatix": {Name: "iMatix Standard Function Library Agreement"}, + "wxWindows": {Name: "wxWindows Library License"}, + "xinetd": {Name: "xinetd License"}, } From a30e4fc35709b9913dc97127e82f590a8f3cf0c7 Mon Sep 17 00:00:00 2001 From: lelia Date: Thu, 5 Sep 2024 11:46:13 -0400 Subject: [PATCH 4/4] Reintroduce comment for using curl cmd Signed-off-by: lelia --- checks/raw/license.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/checks/raw/license.go b/checks/raw/license.go index c7f6fa02d1e..8986509956a 100644 --- a/checks/raw/license.go +++ b/checks/raw/license.go @@ -389,6 +389,17 @@ type fsfOsiLicenseType struct { // SPDX license list available here: https://spdx.org/licenses (OSI approved / FSF licenses only) // JSON formatted list: https://github.com/spdx/license-list-data/blob/main/json/licenses.json +// +// To filter and format the supported licenses, you can try the following curl command: +// +// curl https://raw.githubusercontent.com/spdx/license-list-data/main/json/licenses.json | \ +// jq -c '.licenses[] | select((.isOsiApproved == true) or (.isFsfLibre == true)) | [.licenseId,.name]' | \ +// sed 's/","/": \{ Name: "/;s/\["/"/;s/"\]/" },/' | \ +// sort | \ +// uniq +// +// NOTE: You may need to do additional sorting by hand to match the current alphabetization. + var fsfOsiApprovedLicenseMap = map[string]fsfOsiLicenseType{ "0BSD": {Name: "BSD Zero Clause License"}, "AAL": {Name: "Attribution Assurance License"},