From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id GNInOR/OomCSTAEAgWs5BA (envelope-from ) for ; Mon, 17 May 2021 22:12:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id aGy1NB/OomAPHgAAbx9fmQ (envelope-from ) for ; Mon, 17 May 2021 20:12:15 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 93D3729B07 for ; Mon, 17 May 2021 22:12:15 +0200 (CEST) Received: from localhost ([::1]:42698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lijb4-0000R4-DB for larch@yhetil.org; Mon, 17 May 2021 16:12:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lijat-0000PS-CJ for guix-patches@gnu.org; Mon, 17 May 2021 16:12:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42334) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lijas-0000JD-AQ for guix-patches@gnu.org; Mon, 17 May 2021 16:12:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lijas-000212-6J for guix-patches@gnu.org; Mon, 17 May 2021 16:12:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48486] [PATCH] import: hackage: Prefix licenses with Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 May 2021 20:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48486 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48486@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16212822957710 (code B ref -1); Mon, 17 May 2021 20:12:02 +0000 Received: (at submit) by debbugs.gnu.org; 17 May 2021 20:11:35 +0000 Received: from localhost ([127.0.0.1]:53880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lijaL-00020B-OL for submit@debbugs.gnu.org; Mon, 17 May 2021 16:11:35 -0400 Received: from lists.gnu.org ([209.51.188.17]:43704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lijaI-000202-TK for submit@debbugs.gnu.org; Mon, 17 May 2021 16:11:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37322) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lijaG-0008Rk-Qq for guix-patches@gnu.org; Mon, 17 May 2021 16:11:25 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:40358 helo=mail.yoctocell.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lijaA-0008K8-SK for guix-patches@gnu.org; Mon, 17 May 2021 16:11:24 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1621282275; bh=eNqZdaLAgEnder+Ko8LJbMkJtqxUOv2WZKJvMhhcdcs=; h=From:To:Subject:Date; b=KjjwyRn2209W60h4uVbxXxKvntmhB+S86kXdVViSxVKLAF/bMSg4YVDy2UwWhGjFU 3+vQrZuFmNlTIz2CUWaHbhA1dAk6I2WpYmynDAoj1bQH9aYnkS0oaJyL7wlih9NppA ressX7cJtazLh5SXrCKs/pf+ch+j8J58qDOZiSL0= Message-Id: <309e06a20c461e996478acd4c5020f930eccc869.1621282211.git.public@yoctocell.xyz> Date: Mon, 17 May 2021 22:11:15 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=87.96.130.155; envelope-from=public@yoctocell.xyz; helo=mail.yoctocell.xyz X-Spam_score_int: 25 X-Spam_score: 2.5 X-Spam_bar: ++ X-Spam_report: (2.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FROM_SUSPICIOUS_NTLD=0.499, FROM_SUSPICIOUS_NTLD_FP=1.13, PDS_OTHER_BAD_TLD=1.999, RDNS_DYNAMIC=0.982, 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621282335; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=c7Jj0a+5i0+j0L7YlSo1EIid3CcwEYxcr0XoULeoHA0=; b=kXrd1tLB8FfJrZ94SeFGbtwXxfBhhEOwU3KY11nl0lZ2qDtOMtya0l0pa9Lvu4t4NRARhG XbQunobwhUcMN+lU92Qi3b0inoiD+EYdin+B9s4j6e1ASj84SGRWK2ofwPZZRU4erBIeXT poM1HVgA/tbqaF4lcrS4UlMJ98woiB7CMRDF/3z3jpFOAjHg4IHZWp6NRjWCzU68Rid/IJ AHm9PWhIWa0ftW5ZxqRU/gdiPKy5VObcu08tvVh/BuUz2v3WiqGpBR53KeqthMJrFIkBUC eAhx/9VpIWKEJzJe1Dr0FDS690TiHN6y+yRkX3V0OIQHVLwpslVwW75EsX6Cvw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621282335; a=rsa-sha256; cv=none; b=q5JuP695bFy8Zf8MjlgsWPlgTHvB7SL28HJInwYa3SRKbyRUxh+s44+g5d/VCXv+39EYqu IM2TkObJ7x2en+YqlT8dyHHOcEosGN1ga6S50DYSJwoZakl+PNaHLwvcwiHdpL45EnQ6z6 VxNVP1RM0SHLVW7DNCb0Yu2369RP4NABKuskPCNQhvea/iTxX75GstDEpgL1vTabikPZ3d 1uYMqb8MDER5hgLs2vyvkB9Lid/YoR4gwHDHq+SUpZa+QfiZJqZs6Gs3wzo+cKzW4qNxz2 rD9QVPMMXDzid0kimIhdgPRe/qpuT/2xM8kkC5ZOSd5XF777P0kSFxtk49ltZg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=KjjwyRn2; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -0.34 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=KjjwyRn2; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 93D3729B07 X-Spam-Score: -0.34 X-Migadu-Scanner: scn0.migadu.com X-TUID: o6xco1MeYRVA * guix/import/hackage.scm (string->license): Prefix the value of the license field with =E2=80=98license:=E2=80=99. * tests/hackage.scm (match-ghc-foo, match-ghc-foo-6, match-ghc-foo-revision= ): Adjust accordingly. --- guix/import/hackage.scm | 27 ++++++++++++++------------- tests/hackage.scm | 7 ++++--- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm index 9f992ffe8e..f94a1e7087 100644 --- a/guix/import/hackage.scm +++ b/guix/import/hackage.scm @@ -4,6 +4,7 @@ ;;; Copyright =C2=A9 2016 Nikita ;;; Copyright =C2=A9 2018 Ricardo Wurmus ;;; Copyright =C2=A9 2019 Robert Vollmert +;;; Copyright =C2=A9 2021 Xinglu Chen ;;; ;;; This file is part of GNU Guix. ;;; @@ -163,22 +164,22 @@ version." ;; https://www.haskell.org ;; /cabal/release/cabal-latest/doc/API/Cabal/Distribution-License.html. (match-lambda - ("GPL-2" 'gpl2) - ("GPL-3" 'gpl3) + ("GPL-2" 'license:gpl2) + ("GPL-3" 'license:gpl3) ("GPL" "'gpl??") - ("AGPL-3" 'agpl3) + ("AGPL-3" 'license:agpl3) ("AGPL" "'agpl??") - ("LGPL-2.1" 'lgpl2.1) - ("LGPL-3" 'lgpl3) + ("LGPL-2.1" 'license:lgpl2.1) + ("LGPL-3" 'license:lgpl3) ("LGPL" "'lgpl??") - ("BSD2" 'bsd-2) - ("BSD3" 'bsd-3) - ("BSD-3-Clause" 'bsd-3) - ("MIT" 'expat) - ("ISC" 'isc) - ("MPL" 'mpl2.0) - ("Apache-2.0" 'asl2.0) - ("PublicDomain" 'public-domain) + ("BSD2" 'license:bsd-2) + ("BSD3" 'license:bsd-3) + ("BSD-3-Clause" 'license:bsd-3) + ("MIT" 'license:expat) + ("ISC" 'license:isc) + ("MPL" 'license:mpl2.0) + ("Apache-2.0" 'license:asl2.0) + ("PublicDomain" 'license:public-domain) ((x) (string->license x)) ((lst ...) `(list ,@(map string->license lst))) (_ #f))) diff --git a/tests/hackage.scm b/tests/hackage.scm index 77e333cbfc..66a13d9881 100644 --- a/tests/hackage.scm +++ b/tests/hackage.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2015 Federico Beffa ;;; Copyright =C2=A9 2019 Robert Vollmert +;;; Copyright =C2=A9 2021 Xinglu Chen ;;; ;;; This file is part of GNU Guix. ;;; @@ -183,7 +184,7 @@ library ('home-page "http://test.org") ('synopsis (? string?)) ('description (? string?)) - ('license 'bsd-3))) + ('license 'license:bsd-3))) =20 (define* (eval-test-with-cabal test-cabal matcher #:key (cabal-environment= '())) (define port (open-input-string test-cabal)) @@ -232,7 +233,7 @@ library ('home-page "http://test.org") ('synopsis (? string?)) ('description (? string?)) - ('license 'bsd-3))) + ('license 'license:bsd-3))) =20 (test-assert "hackage->guix-package test 6" (eval-test-with-cabal test-cabal-6 match-ghc-foo-6)) @@ -362,7 +363,7 @@ executable cabal ('home-page "http://test.org") ('synopsis (? string?)) ('description (? string?)) - ('license 'bsd-3))) + ('license 'license:bsd-3))) =20 (test-assert "hackage->guix-package test cabal revision" (eval-test-with-cabal test-cabal-revision match-ghc-foo-revision)) base-commit: 938ffcbb0589adc07dc12c79eda3e1e2bb9e7cf8 --=20 2.31.1