Add a file defining mapping of SPDX-2.0 license identifiers to Gentoo
ebuild licenses. This was originally discussed on Gentoo Bugzilla [1],
the submitted to the gentoo-dev ml [2].
The proposed file uses the common key-value format used for
configuration files. Currently only `spdx-to-ebuild` section is defined
but other kinds of mapping can be added in the future. As described
in the top comment, it provides the ability to map SPDX-2.0 license
identifiers along with the `+` and `WITH` operators to arbitrary
Gentoo LICENSE strings (including all-of and any-of groups).
The initial list is taken from cargo-ebuild's license.rs [3],
courtesy of Leonardo H. Neumann and Georgy Yakovlev. A parser for this
file format is implemented in pycargoebuild [4].
[1]
https://bugs.gentoo.org/706472
[2]
https://archives.gentoo.org/gentoo-dev/message/01924bb71411696dce04445d85da508d
[3]
https://gitweb.gentoo.org/proj/cargo-ebuild.git/tree/src/license.rs?id=b4314edc5bb672f5e94dcbc996f443e98fdb4dba
[4]
https://github.com/projg2/pycargoebuild/
Signed-off-by: Michał Górny <
[email protected]>
---
metadata/license-mapping.conf | 171 ++++++++++++++++++++++++++++++++++
1 file changed, 171 insertions(+)
create mode 100644 metadata/license-mapping.conf
diff --git a/metadata/license-mapping.conf b/metadata/license-mapping.conf
new file mode 100644
index 000000000000..c6608e450f4a
--- /dev/null
+++ b/metadata/license-mapping.conf
@@ -0,0 +1,171 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Mapping of SPDX-2.0 licenses to Gentoo repository licenses.
+#
+# Keys are <license-id>[+] [WITH <exception-id>].
+#
+# License and exception identifiers are case-insensitive but please follow
+# the case used in SPDX. "WITH" exceptions are matched exactly,
+# i.e. "Apache-2.0 WITH LLVM-exception" will not match plain "Apache-2.0".
+# The "+" operator prefers exact match but falls back to the variant without, +# i.e. if "MPL-1.0+" is not defined, the mapping for "MPL-1.0" is used.
+#
+# Values are ebuild-style LICENSE terms, po