• [gentoo-dev] [PATCH] metadata: Add license-mapping.conf for SPDX licens

    From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Sun Nov 13 13:00:01 2022
    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 <mgorny@gentoo.org>
    ---
    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
  • From Ulrich Mueller@21:1/5 to All on Sun Nov 13 16:00:02 2022
    On Sun, 13 Nov 2022, Michał Górny wrote:

    +CC-PD = CC-PDDC

    This one is the wrong way around.

    +Fair = fairuse

    These are completely different.

    +LPPL-1.3a = LPPL-1.3

    Different version (SPDX doesn't have 1.3, and we don't have 1.3a).

    Looks like all versions of the FDL are missing?

    --=-=-Content-Type: application/pgp-signature; name="signature.asc"

    -----BEGIN PGP SIGNATURE-----

    iQFDBAEBCAAtFiEEtDnZ1O9xIP68rzDbUYgzUIhBXi4FAmNxBSEPHHVsbUBnZW50 b28ub3JnAAoJEFGIM1CIQV4uDkAH/id5gJtuskRMfUTRUgz9zBvvna4iRYPAU9yY nmjnr/U9VWlYu+GAQe9o1urKHxZVQtm2c0lKnRm8Y22KoFtm0Au0fu/OV574oszU rPa+44qtEARO5K6muyZhywbvCPKc0Q3xqYq/C4K0QFjDS9QiJ9ld5ugum4fDA2Il knUvUOFos1tfAtZNo6cZXRE71YhG/qcFaGbFTnEmwYm5G+BsMpYwzxnHPLpCZGO5 gyb6763GnU+OSojEo9c+lPWNbtYW8JLve+me9f6Eu94gBnjSPd4GW+qz5z5D0H5o cZYU7bbW3om52UAn8l7Z7Lr0JDSl0PdJXFikQgSXBePTXJyr3i0=kYCy
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?=@21:1/5 to Ulrich Mueller on Sun Nov 13 17:00:01 2022
    On Sun, 2022-11-13 at 15:54 +0100, Ulrich Mueller wrote:
    On Sun, 13 Nov 2022, Michał Górny wrote:

    +CC-PD = CC-PDDC

    This one is the wrong way around.

    Good catch, thanks. I've verified the list against SPDX license list
    and ::gentoo repo now, and removed "W3C-document" and "GPL-3-with- autoconf-exception" that we (no longer?) have.


    +Fair = fairuse

    These are completely different.

    Removed.


    +LPPL-1.3a = LPPL-1.3

    Different version (SPDX doesn't have 1.3, and we don't have 1.3a).

    Removed.

    Looks like all versions of the FDL are missing?

    To be honest, I'm wondering whether copying the list from cargo-ebuild
    is a good idea after all. Perhaps we should just copy the most common
    licenses (i.e. GPLs/BSD/MIT...) that are easy to match, and add other
    licenses as we need them (and verify in the process).

    I've created a PR to track the current status: https://github.com/gentoo/gentoo/pull/28256

    --
    Best regards,
    Michał Górny

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sam James@21:1/5 to All on Sun Nov 13 18:50:01 2022
    On 13 Nov 2022, at 11:58, Michał Górny <mgorny@gentoo.org> wrote:

    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 <mgorny@gentoo.org>
    ---
    metadata/license-mapping.conf | 171 ++++++++++++++++++++++++++++++++++
    1 file changed, 171 insertions(+)
    create mode 100644 metadata/license-mapping.conf


    I like the idea.

    If/when we do this:
    - Should this be in a GLEP?
    - It needs pkgcheck support for e.g. invalid entries, duplicates.


    -----BEGIN PGP SIGNATURE-----

    iNUEARYKAH0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCY3EthF8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MAAKCRBzhAn1IN+R kFVFAP0YMbY4Ev79K9RFkhmFoo/Pnhlb+5MSWyR9AOBBvbYxRwEAhQg6NimslHft ndp+LPZJGdZ44ksRaGqCq+ZPKYdL/gA=
    =Ojwj
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?=@21:1/5 to Sam James on Sun Nov 13 19:50:01 2022
    On Sun, 2022-11-13 at 17:46 +0000, Sam James wrote:

    On 13 Nov 2022, at 11:58, Michał Górny <mgorny@gentoo.org> wrote:

    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 <mgorny@gentoo.org>
    ---
    metadata/license-mapping.conf | 171 ++++++++++++++++++++++++++++++++++
    1 file changed, 171 insertions(+)
    create mode 100644 metadata/license-mapping.conf


    I like the idea.

    If/when we do this:
    - Should this be in a GLEP?


    I don't think we need a GLEP, the comment on top should be sufficient to explain how it's supposed to work.

    --
    Best regards,
    Michał Górny

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)