unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#44015] [PATCH] Fix license name mismatches
@ 2020-10-15 16:42 Helio Machado
  2020-10-17 20:32 ` bug#44015: " Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Helio Machado @ 2020-10-15 16:42 UTC (permalink / raw)
  To: 44015


[-- Attachment #1.1: Type: text/plain, Size: 279 bytes --]

This patch fixes some license name mismatches between
@file{guix/licenses.scm} and @file[guix/import/utils.scm}
(spdx-string->license).

Additionally, it would be nice to standardize all the license names and,
maybe, pull the data from [SPDX][1].

[1]: https://spdx.org/licenses

[-- Attachment #1.2: Type: text/html, Size: 466 bytes --]

[-- Attachment #2: 0001-guix-Fix-license-naming-mismatches.patch --]
[-- Type: application/octet-stream, Size: 4341 bytes --]

From 8288a57468f817318f9f2faf382806d9ca40fdf3 Mon Sep 17 00:00:00 2001
From: Helio Machado <0x2b3bfa0+git@googlemail.com>
Date: Thu, 15 Oct 2020 18:32:59 +0200
Subject: [PATCH] guix: Fix license naming mismatches

* guix/licenses.scm:
Add missing CUA-OPL-1.0 and a small notice
pointing to guix/import/utils.scm.

* guix/import/utils.scm (spdx-string->license):
Rename licenses to fit the internal names and
add a small notice pointing to guix/licenses.scm
---
 guix/import/utils.scm | 14 +++++++++-----
 guix/licenses.scm     | 10 ++++++++++
 2 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/guix/import/utils.scm b/guix/import/utils.scm
index 0cfa1f8321..145515c489 100644
--- a/guix/import/utils.scm
+++ b/guix/import/utils.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2017, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
 ;;; Copyright © 2019 Robert Vollmert <rob@vllmrt.net>
+;;; Copyright © 2020 Helio Machado <0x2b3bfa0+guix@googlemail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -124,9 +125,12 @@ of the string VERSION is replaced by the symbol 'version."
   ;; https://spdx.org/licenses/
   ;; The psfl, gfl1.0, nmap, repoze
   ;; licenses doesn't have SPDX identifiers
+  ;;
+  ;; Please update guix/licenses.scm when modifying
+  ;; this list to avoid mismatches.
   (match str
-    ("AGPL-1.0"                    'license:agpl-1.0)
-    ("AGPL-3.0"                    'license:agpl-3.0)
+    ("AGPL-1.0"                    'license:agpl1)
+    ("AGPL-3.0"                    'license:agpl3)
     ("Apache-1.1"                  'license:asl1.1)
     ("Apache-2.0"                  'license:asl2.0)
     ("BSL-1.0"                     'license:boost1.0)
@@ -166,8 +170,8 @@ of the string VERSION is replaced by the symbol 'version."
     ("LGPL-2.0+"                   'license:lgpl2.0+)
     ("LGPL-2.1"                    'license:lgpl2.1)
     ("LGPL-2.1+"                   'license:lgpl2.1+)
-    ("LGPL-3.0"                    'license:lgpl3.0)
-    ("LGPL-3.0+"                   'license:lgpl3.0+)
+    ("LGPL-3.0"                    'license:lgpl3)
+    ("LGPL-3.0+"                   'license:lgpl3+)
     ("MPL-1.0"                     'license:mpl1.0)
     ("MPL-1.1"                     'license:mpl1.1)
     ("MPL-2.0"                     'license:mpl2.0)
@@ -175,7 +179,7 @@ of the string VERSION is replaced by the symbol 'version."
     ("NCSA"                        'license:ncsa)
     ("OpenSSL"                     'license:openssl)
     ("OLDAP-2.8"                   'license:openldap2.8)
-    ("CUA-OPL-1.0"                 'license:opl1.0)
+    ("CUA-OPL-1.0"                 'license:cua-opl1.0)
     ("QPL-1.0"                     'license:qpl)
     ("Ruby"                        'license:ruby)
     ("SGI-B-2.0"                   'license:sgifreeb2.0)
diff --git a/guix/licenses.scm b/guix/licenses.scm
index 5038f75638..63010a7231 100644
--- a/guix/licenses.scm
+++ b/guix/licenses.scm
@@ -15,6 +15,7 @@
 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
 ;;; Copyright © 2020 André Batista <nandre@riseup.net>
+;;; Copyright © 2020 Helio Machado <0x2b3bfa0+guix@googlemail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -49,6 +50,7 @@
             artistic2.0 clarified-artistic
             copyleft-next
             cpl1.0
+            cua-opl1.0
             edl1.0
             epl1.0
             epl2.0
@@ -117,6 +119,9 @@
 ;;; https://github.com/NixOS/nixpkgs/blob/master/lib/licenses.nix
 ;;; https://www.gnu.org/licenses/license-list
 ;;;
+;;; Please update spdx-string->license from guix/import/utils.scm
+;;; when modifying this list to avoid mismatches.
+;;;
 ;;; Code:
 
 (define agpl1
@@ -269,6 +274,11 @@ at URI, which may be a file:// URI pointing the package's tree."
            "http://directory.fsf.org/wiki/License:CPLv1.0"
            "https://www.gnu.org/licenses/license-list#CommonPublicLicense10"))
 
+(define cua-opl1.0
+  (license "CUA Office Public License v1.0"
+           "https://spdx.org/licenses/CUA-OPL-1.0.html"
+           "https://opensource.org/licenses/CUA-OPL-1.0"))
+
 (define edl1.0
   (license "EDL 1.0"
            "http://directory.fsf.org/wiki/License:EDLv1.0"
-- 
2.24.3 (Apple Git-128)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#44015: [PATCH] Fix license name mismatches
  2020-10-15 16:42 [bug#44015] [PATCH] Fix license name mismatches Helio Machado
@ 2020-10-17 20:32 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2020-10-17 20:32 UTC (permalink / raw)
  To: Helio Machado; +Cc: 44015-done

Hi,

Helio Machado <0x2b3bfa0@gmail.com> skribis:

> From 8288a57468f817318f9f2faf382806d9ca40fdf3 Mon Sep 17 00:00:00 2001
> From: Helio Machado <0x2b3bfa0+git@googlemail.com>
> Date: Thu, 15 Oct 2020 18:32:59 +0200
> Subject: [PATCH] guix: Fix license naming mismatches
>
> * guix/licenses.scm:
> Add missing CUA-OPL-1.0 and a small notice
> pointing to guix/import/utils.scm.
>
> * guix/import/utils.scm (spdx-string->license):
> Rename licenses to fit the internal names and
> add a small notice pointing to guix/licenses.scm

I tweaked the commit log to more closely follow our conventions and
applied it.  Thanks!

Ludo’.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-17 20:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-15 16:42 [bug#44015] [PATCH] Fix license name mismatches Helio Machado
2020-10-17 20:32 ` bug#44015: " Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).