From patchwork Tue Nov 2 10:03:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Attila Lendvai X-Patchwork-Id: 34211 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 08D6027BBE4; Tue, 2 Nov 2021 10:10:51 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 67C6327BBE3 for ; Tue, 2 Nov 2021 10:10:50 +0000 (GMT) Received: from localhost ([::1]:58228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mhqkj-00020w-5V for patchwork@mira.cbaines.net; Tue, 02 Nov 2021 06:10:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55792) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhqi3-0006ue-4R for guix-patches@gnu.org; Tue, 02 Nov 2021 06:08:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53466) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mhqi2-0000xl-R7 for guix-patches@gnu.org; Tue, 02 Nov 2021 06:08:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mhqi2-0003ny-HM for guix-patches@gnu.org; Tue, 02 Nov 2021 06:08:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#51566] [PATCH] guix: import: Add licences and their detection. Resent-From: Attila Lendvai Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 02 Nov 2021 10:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51566 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51566@debbugs.gnu.org Cc: Attila Lendvai X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163584764714578 (code B ref -1); Tue, 02 Nov 2021 10:08:02 +0000 Received: (at submit) by debbugs.gnu.org; 2 Nov 2021 10:07:27 +0000 Received: from localhost ([127.0.0.1]:36779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhqhO-0003n0-R9 for submit@debbugs.gnu.org; Tue, 02 Nov 2021 06:07:27 -0400 Received: from lists.gnu.org ([209.51.188.17]:49612) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mhqhJ-0003mp-9a for submit@debbugs.gnu.org; Tue, 02 Nov 2021 06:07:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhqhH-0006GP-Uq for guix-patches@gnu.org; Tue, 02 Nov 2021 06:07:17 -0400 Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]:37644) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mhqhG-0000ix-1x for guix-patches@gnu.org; Tue, 02 Nov 2021 06:07:15 -0400 Received: by mail-ed1-x536.google.com with SMTP id f8so52436730edy.4 for ; Tue, 02 Nov 2021 03:07:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=GXYfK0GjXIRc1FrQzMFm/Gz0JBMo1Bf+WNlH/8WL9oQ=; b=CxwotRC/AAdJb9WOcNOAoKn1CI4froLV5LmUsqjq3hdIoHmeyZese/uYHlgsULGyme dYqqNl8ipE5D/1dUHwRCdLXdo13yQwY5aM5VTsflGByGC84CoaxTYgSkomUCfYppDk1n niscy/KEfkLvUBWM8sg4DhqL8z+UqmSBg103UiKzw57pKdhQJ9EmD6QPfnpGdre5rxLj fuCf+567NckNrgoEeE8GIJAWPFqNtuj+vXsUwoWPSPyx9pRQzuYlmZQnIztzFYEsoaJN YYor7zPOOu0EfS38jwe/E4n+Crb724SXiW6n1NB/zPMapl89s6Rc89Dzy/mAV5sp3Uvg MBLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=GXYfK0GjXIRc1FrQzMFm/Gz0JBMo1Bf+WNlH/8WL9oQ=; b=za9ml+RFFEmI1oZ6tgnhbJGMujiSSeijQN1cGGmiI5PpFilQerNiqZ1m3GaUJcSWJZ hgRB8UT8mM9rFG3cmw9cyZQ9QntSRxEnoZIuyBuUcRQGdHNAbLBpRoCfIgOGR2PZzs3g u06dSDerU0hTJOQS1HYNyWaH1gArzqMl38ajOCx/cIBrrjA49i+FHCAO8klj5DyaWvMk 1l/wPFRIDkTCuDspuJ901tz/R+H5XjPNVXvzPZ0yVabMokSMGfRTNY9qpffrMkvvYxAt LDTPqvG1WZHqbIlpoDDg0XkNCu59YjA7C0OLwtTGo7bFIsUX18txag7LSqVm2C52q2PT THyQ== X-Gm-Message-State: AOAM533sY2L+JcfvSyyq7r9m8+0vaNLdGcX77zUHV2Q93QkJDhSkLhq7 6Y8R8H4C0yA54m36jDtwbhtQ4jz7ljg= X-Google-Smtp-Source: ABdhPJzNAvJz1VODCWl9/l6r4V3TunqEUdJnsj9DCZiXdCL+MzuRvj2gdDKWbbA1RNlQ0j0riTK4QA== X-Received: by 2002:a17:907:e8b:: with SMTP id ho11mr25759108ejc.430.1635847631193; Tue, 02 Nov 2021 03:07:11 -0700 (PDT) Received: from lelap.lan (catv-89-132-208-37.catv.broadband.hu. [89.132.208.37]) by smtp.gmail.com with ESMTPSA id z9sm11078576edb.70.2021.11.02.03.07.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Nov 2021 03:07:10 -0700 (PDT) From: Attila Lendvai Date: Tue, 2 Nov 2021 11:03:10 +0100 Message-Id: <20211102100315.2730-1-attila@lendvai.name> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::536; envelope-from=attila.lendvai@gmail.com; helo=mail-ed1-x536.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * guix/licenses.scm (json): New variable. * guix/import/utils.scm (spdx-string->license): Identify more. --- the added comments deliberately mention the alternative names to help with grep'ping. guix/import/utils.scm | 4 ++++ guix/licenses.scm | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/guix/import/utils.scm b/guix/import/utils.scm index a180742ca3..9ac3f3086d 100644 --- a/guix/import/utils.scm +++ b/guix/import/utils.scm @@ -152,6 +152,7 @@ (define (spdx-string->license str) ("CC0-1.0" 'license:cc0) ("CC-BY-2.0" 'license:cc-by2.0) ("CC-BY-3.0" 'license:cc-by3.0) + ("CC-BY-4.0" 'license:cc-by4.0) ("CC-BY-SA-2.0" 'license:cc-by-sa2.0) ("CC-BY-SA-3.0" 'license:cc-by-sa3.0) ("CC-BY-SA-4.0" 'license:cc-by-sa4.0) @@ -163,6 +164,7 @@ (define (spdx-string->license str) ("EPL-1.0" 'license:epl1.0) ("MIT" 'license:expat) ("FTL" 'license:freetype) + ("Freetype" 'license:freetype) ("GFDL-1.1" 'license:fdl1.1+) ("GFDL-1.2" 'license:fdl1.2+) ("GFDL-1.3" 'license:fdl1.3+) @@ -179,11 +181,13 @@ (define (spdx-string->license str) ("GPL-3.0-only" 'license:gpl3) ("GPL-3.0+" 'license:gpl3+) ("GPL-3.0-or-later" 'license:gpl3+) + ("HPND" 'license:hpnd) ("ISC" 'license:isc) ("IJG" 'license:ijg) ("Imlib2" 'license:imlib2) ("IPA" 'license:ipa) ("IPL-1.0" 'license:ibmpl1.0) + ("JSON" 'license:json) ("LAL-1.3" 'license:lal1.3) ("LGPL-2.0" 'license:lgpl2.0) ("LGPL-2.0-only" 'license:lgpl2.0) diff --git a/guix/licenses.scm b/guix/licenses.scm index c071aae4a9..ca0a1d8f6f 100644 --- a/guix/licenses.scm +++ b/guix/licenses.scm @@ -70,6 +70,7 @@ (define-module (guix licenses) ibmpl1.0 imlib2 ipa + json knuth lal1.3 lgpl2.0 lgpl2.0+ lgpl2.1 lgpl2.1+ lgpl3 lgpl3+ llgpl @@ -308,6 +309,8 @@ (define eupl1.2 "https://directory.fsf.org/wiki/License:EUPL-1.2" "https://www.gnu.org/licenses/license-list#EUPL-1.2")) +;; Some people call it the MIT license. For clarification see: +;; https://www.gnu.org/licenses/license-list.html#Expat (define expat (license "Expat" "http://directory.fsf.org/wiki/License:Expat" @@ -415,6 +418,13 @@ (define ipa "http://directory.fsf.org/wiki/License:IPA_Font_License" "https://www.gnu.org/licenses/license-list#IPAFONT")) +(define json + (license "JSON License" + "https://json.org/license.html" + "https://directory.fsf.org/wiki/License:JSON" + ;; "https://spdx.org/licenses/JSON.html" + )) + (define knuth (license "Donald Knuth's license for TeX" "http://www.ctan.org/license/knuth"