From 3c68cd01f4728df4f696d396857e4f85cc091ecc Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Wed, 18 Dec 2024 19:49:44 -0800 Subject: [PATCH] Restructuring 'ALLOWED_SPDX_LICENSES' .. to show license classifications via comments Change-Id: Id18ee6a597457ecaaafbd24373d78aca09ba7058 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6055001 Commit-Queue: Jordan Brown Reviewed-by: Jordan Brown Reviewed-by: Rachael Newitt --- metadata/fields/custom/license_allowlist.py | 28 ++++++++++++--------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/metadata/fields/custom/license_allowlist.py b/metadata/fields/custom/license_allowlist.py index ac10e9f33a..d0ad644c3b 100644 --- a/metadata/fields/custom/license_allowlist.py +++ b/metadata/fields/custom/license_allowlist.py @@ -6,9 +6,15 @@ # These licenses are used to verify that code imported to Android complies with # their licensing requirements. Do not add entries to this list without approval. # Any licenses added should be a valid SPDX Identifier. For the full list of -# identifiers; see https://spdx.org/licenses/ +# identifiers; see https://spdx.org/licenses/. +# Licenses below are grouped by restrictiveness level and then alphabetically. ALLOWED_SPDX_LICENSES = frozenset([ - "APSL-2.0", + # other_ignorable. + "LZMA-SDK-9.22", + # permissive. + "GPL-2.0-with-classpath-exception", + "MIT-0", + # notice. "Apache-2.0", "BSD-2-Clause", "BSD-2-Clause-FreeBSD", @@ -16,24 +22,22 @@ ALLOWED_SPDX_LICENSES = frozenset([ "BSD-4-Clause", "BSD-4-Clause-UC", "BSD-Source-Code", - "GPL-2.0-with-classpath-exception", + "BSL-1.0", + "ICU", + "ISC", "MIT", - "MIT-0", "MIT-Modern-Variant", - "MPL-1.1", - "MPL-2.0", "NCSA", "OFL-1.1", "SGI-B-2.0", + "SunPro", "Unicode-3.0", "Unicode-DFS-2015", "Unicode-DFS-2016", "X11", "Zlib", - # Public Domain variants. - "ISC", - "ICU", - "LZMA-SDK-9.22", - "SunPro", - "BSL-1.0", + # reciprocal. TODO(b/385020146): Only allow for opensource projects. + "APSL-2.0", + "MPL-1.1", + "MPL-2.0", ])