From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id cFLPCbLpd2NPBwAAbAwnHQ (envelope-from ) for ; Fri, 18 Nov 2022 21:23:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id OLP3CLLpd2PE+gAAG6o9tA (envelope-from ) for ; Fri, 18 Nov 2022 21:23:14 +0100 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 0A4DC20DF6 for ; Fri, 18 Nov 2022 21:23:13 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ow7t9-0004PX-NZ; Fri, 18 Nov 2022 15:23:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ow7t8-0004PO-6X for guix-patches@gnu.org; Fri, 18 Nov 2022 15:23:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ow7t7-0001ZN-Sh for guix-patches@gnu.org; Fri, 18 Nov 2022 15:23:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ow7t7-0006kH-O6 for guix-patches@gnu.org; Fri, 18 Nov 2022 15:23:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#58621] [PATCH 0/3] import/utils: spdx-string->license: Match case-insensitively and support '+' operator. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 18 Nov 2022 20:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58621 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 58621-done@debbugs.gnu.org Received: via spool by 58621-done@debbugs.gnu.org id=D58621.166880293225753 (code D ref 58621); Fri, 18 Nov 2022 20:23:01 +0000 Received: (at 58621-done) by debbugs.gnu.org; 18 Nov 2022 20:22:12 +0000 Received: from localhost ([127.0.0.1]:38405 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow7sK-0006hJ-GM for submit@debbugs.gnu.org; Fri, 18 Nov 2022 15:22:12 -0500 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:39631) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ow7sJ-0006h6-4m for 58621-done@debbugs.gnu.org; Fri, 18 Nov 2022 15:22:11 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 804973200AF3; Fri, 18 Nov 2022 15:22:04 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 18 Nov 2022 15:22:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= philipmcgrath.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1668802924; x= 1668889324; bh=GoQLLjtiToqSsHZSkX/34716IWOFGX3s0W+uR5Fee2w=; b=V Ys9EuRIMyZdR17KwWbEVl3HVYU6ExXY4x/1H5inE3kTrcWfEoshCFwGAdvBYXdHG abo31KKT1ENv1v3TWPUcMlYglDy21rzudbNNmkCdqFbu8jPcyOOMVgcntLY7TP2w VomGNbRIoKIp5ZDFo5vB3Cge4tN+9ON4bfXDakoaxUaiMjx0m133kGB7J5RGcBx1 nOga1eMQuN6vYuOhMJWpJcCoad8ZZrQo5eO6Bg6HtL7b5B7l+XloBjmgBd5N7MdM RT1c5sdbAEH0tF2N0yzc+EVAhEIVz8Mx7T8m4WMGm8dfgOOOU6abX34NLeTGct4J ZE2+Zeqn4faSEbGyKIXew== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1668802924; x=1668889324; bh=GoQLLjtiToqSsHZSkX/34716IWOF GX3s0W+uR5Fee2w=; b=jgoS30zIcHjh02+DsZrdIbCrXWhMQ0ccMdPOHD89cXHd 4YggHrXxRaAnaUcdRlUrZ+NXbNS2xXCYFdMA93mYY7cCuytOn9tOueeDG+BoxYYE E0A++M+pjHGHrLwtrZwuES6Pqwazx/0q3Ea7AnizoZLRTsglOudiGDJvP7IrkOj0 BZLRumsRXGYGxhD6mzMlW8HhcM4csC9aYluAZV+Qrf96Qfl1TJSKMzFXdACQ3yeN DBUwJW4fJUoZXXXKvDe3S8/LNCNlltMoLqWjItjcNm6b2U80fDr5Bbd/Z2RdWq33 gQnoFzdU4ciTEkVOzZlfDJESPLRWQtXzV8wujqQo4Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrhedtgddufeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfgggtsehgtderredttdejnecuhfhrohhmpefrhhhilhhi phcuofgtifhrrghthhcuoehphhhilhhiphesphhhihhlihhpmhgtghhrrghthhdrtghomh eqnecuggftrfgrthhtvghrnhepgfffudekheeguefgveehgfegudegvddvhefhfedvheel heeguedugfdtleelgfelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomhepphhhihhlihhpsehphhhilhhiphhmtghgrhgrthhhrdgtohhm X-ME-Proxy: Feedback-ID: i2b1146f3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 18 Nov 2022 15:22:03 -0500 (EST) From: Philip McGrath Date: Fri, 18 Nov 2022 15:21:52 -0500 Message-ID: <7474321.EvYhyI6sBW@bastet> In-Reply-To: <877czscr61.fsf_-_@gnu.org> References: <13f3bbfbd88f0e9c984fd61a5c936de08d814ce0.1666146461.git.philip@philipmcgrath.com> <877czscr61.fsf_-_@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3724536.kQq0lBPeGt"; micalg="pgp-sha512"; protocol="application/pgp-signature" 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1668802993; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=GoQLLjtiToqSsHZSkX/34716IWOFGX3s0W+uR5Fee2w=; b=qA508hgVSFvAIw239aCA43bPk5UJK2oEfovhB+nQ6gXHHeckVBj756WmN/GcJMIuf6Jo0G rMNIYzCLHDq/utI07+jx9zO0huZ7RxRTQNquBVo6eUofEaZvtyc3GcRsWvEjU8M2fPJ+8V JMfdUZNbVQ/cVHIFfGhIxsuFBC7ezXy0MEfb2+KF8yb29PCWzmUdozAxL6FjGzP78U3mUz IH2io8fBltgfFYN/1MAff3nwvtmVXgS4mbPbtsL/ErhYlXAUJ1jrVLCHvzdjYSd67h8fLt OZbGfVmcFwEwM6wP+TEjWrLECu4SXe5SrA/q7n3TmA8DroeWAjVJ2WmpiTrdwg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1668802993; a=rsa-sha256; cv=none; b=nHxFc/i40FDoPeJSuc7ciROpOk/cgczrECJrZLwmbkst24BtPxJcaHtKcyo2yt404LBrft MCV+wJTOVZa/gnX/gQLg1pSVUTl8d4aY6KOXHRRPBzAs0Tf1jVPvsrnURCLPAr6/juNdQZ ALW7ZsIfTeR3ubRSH6YWzVOHzZT9StUoCidoHuu3DJtESG6XYuh9jD4vK2lqOZkBvbAId4 tXAmBZg4FPrjdjjBdvQahwkuoO8VwdNHgGIcvp0xIr19v21e9pWNST+zvVa9R38m85y+gr WhgR57pSl6Ffw4lniHpYg2PEqF3Efkgcy278utSkS7Tm1fC+n3sNtUeXfht16w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=fm1 header.b="V Ys9EuR"; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=jgoS30zI; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 0.79 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=fm1 header.b="V Ys9EuR"; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=jgoS30zI; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 0A4DC20DF6 X-Spam-Score: 0.79 X-Migadu-Scanner: scn1.migadu.com X-TUID: SoO1lBjjYNXL --nextPart3724536.kQq0lBPeGt Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8"; protected-headers="v1" From: Philip McGrath To: Ludovic =?ISO-8859-1?Q?Court=E8s?= Cc: 58621-done@debbugs.gnu.org Date: Fri, 18 Nov 2022 15:21:52 -0500 Message-ID: <7474321.EvYhyI6sBW@bastet> In-Reply-To: <877czscr61.fsf_-_@gnu.org> MIME-Version: 1.0 Hi, On Friday, November 18, 2022 8:45:26 AM EST Ludovic Court=C3=A8s wrote: > Hi, >=20 > Applied all three patches. I added trivial tests for > =E2=80=98spdx-string->license=E2=80=99 and changed =E2=80=98substring=E2= =80=99 to =E2=80=98string-drop-right=E2=80=99, > which I find clearer. >=20 Thanks! > Philip McGrath skribis: > > + (and (string-suffix? "+" str) > > + ;; We try the form with the + to support deprecated identifi= ers > > for + ;; GNU licenses (see above). Here, we handle other uses > > of +. + (spdx-string->license > > + (substring str 0 (- (string-length str) 1))))))) >=20 > I guess we can remove the =E2=80=9C+=E2=80=9D forms from the alist now? >=20 I think we still want the "+" forms in the alist so that we continue conver= t=20 "GPL-2.0+" as though it were "GPL-2.0-or-later", not "GPL-2.0-only". Some upstreams probably wrote "GPL-2.0" out of confusion even though they=20 intended to allow "any later version" (and maybe even said so in prose), wh= ich=20 is why the "+" operator was deprecated for GNU licenses. If upstream wrote "GPL-2.0+", though, that does communicate "or, at your=20 option, any later version"; since that's the more compatible case, it seeme= d=20 useful to retain that information when we have it. Ideally, upstream projects should move away from the deprecated identifiers= =20 (the Racket tooling I've written will complain), but they still seem to com= e=20 up often enough in the wild to be worth handling as special cases. =2DPhilip --nextPart3724536.kQq0lBPeGt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE9GWrrNY3rqwUFVXPygNjjfo/HHoFAmN36WAACgkQygNjjfo/ HHralQ//SPaXnii4vGL9ScS+8w0gj90NA4WFy+YkZvSxpEis5SldYRiUvy7M+lTa i7UFtTu0Q4KPdPgIjYaPW2KIxI/irBLp2mJNAxPlTVEo4KEYda92+Q4Q8kNeLxfL zFKUDB8JGt3lZXxQ+1vVMm+seqh2HydRxc3E97+IlDsPNe+78Q0KLK07YjsEQOrM tYvqGzHozsmrKwv3OCKJlvyZYQeIO3PiGX9PpeQJzrbrozFAk5TGCqaUU8wrReC3 N3fpeNthklP8QPNZsM8HQhWUpzrwoAtbpUBBUCaGBBI2ykHCQBW8dtpoPnGg8Lng 08MklUkQilPyttYoZk+BEPMX44v4z+d1jPZTLLBYt8lCB019ojnIGzRicqZTSu22 KerSwJBbzDuP3PjOrGoIpmUSP7Bj+w89XV9Cery+DYmODycjCoJYiQdQUXzTz/Ow lAIGQJxeNsxrCEDRHOu1kqe86UXqJnr1atjk6C0Kg+FAIB8zApYfvOtE1OsmwKPU D7SHD2ZaxXCY0QKYNrqiPznOOTozRqWXBE5X0UBzp7ax4lpz8Gqj8YbMK/e53jmN t55DtYvPFFWPEtmw9fb8hXxqkafWAB14bfBqak5PmbAwil4yAXOG34BxtJv4WbrZ 5Sn+O2kwWqyHL6cwMdNv0K24NAzv5cs5fBZksgfFbF0IH2p74NM= =MXwp -----END PGP SIGNATURE----- --nextPart3724536.kQq0lBPeGt--