From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id pKxMF5o74mD4ogAAgWs5BA (envelope-from ) for ; Mon, 05 Jul 2021 00:52:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id QN6DEpo74mDKRAAAB5/wlQ (envelope-from ) for ; Sun, 04 Jul 2021 22:52:10 +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 A1A262497B for ; Mon, 5 Jul 2021 00:52:09 +0200 (CEST) Received: from localhost ([::1]:59688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0Ay8-0005gU-Aa for larch@yhetil.org; Sun, 04 Jul 2021 18:52:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0Ay1-0005gK-W1 for bug-guix@gnu.org; Sun, 04 Jul 2021 18:52:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60051) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0Ay1-00009p-NI for bug-guix@gnu.org; Sun, 04 Jul 2021 18:52:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m0Ay1-0008IJ-N6 for bug-guix@gnu.org; Sun, 04 Jul 2021 18:52:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#48111: tilde in Go package names (eg. sourcehut hosted packages) Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 04 Jul 2021 22:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48111 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Leo Prikler Cc: 48111@debbugs.gnu.org, raingloom Received: via spool by 48111-submit@debbugs.gnu.org id=B48111.162543907431830 (code B ref 48111); Sun, 04 Jul 2021 22:52:01 +0000 Received: (at 48111) by debbugs.gnu.org; 4 Jul 2021 22:51:14 +0000 Received: from localhost ([127.0.0.1]:43364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0AxG-0008HK-DE for submit@debbugs.gnu.org; Sun, 04 Jul 2021 18:51:14 -0400 Received: from out1.migadu.com ([91.121.223.63]:50732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0AxE-0008HB-8R for 48111@debbugs.gnu.org; Sun, 04 Jul 2021 18:51:13 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1625439070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=asWz7VW7UqX9xnffFZGw5axJppUjlzyAGZ/YSJtqWfw=; b=GVIWNjUq+H8rbxnhe7GTtz0Gf5RRjfwcK3e7aq5GBtOwHdKqbL90JTIgp8LSIK76p9vSRT p3VpjZUwCKKn/Cp7ZwRRV9VXSb9bpfo0xhlXM7v7jz6ie1mPXznWmAFKGzbXAmhya28zmm bUYlIumgd4cyhvJnsDlKHonQZmloZPo= References: <20210429195415.3f0dfaa9@riseup.net> <9ea8a08c75fc1a7b26f0380ba3a42161f3d5c570.camel@student.tugraz.at> Date: Sun, 04 Jul 2021 15:51:07 -0700 In-Reply-To: <9ea8a08c75fc1a7b26f0380ba3a42161f3d5c570.camel@student.tugraz.at> (Leo Prikler's message of "Fri, 30 Apr 2021 11:53:40 +0200") Message-ID: <86czrxae1w.fsf@mgsn.dev> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Auth-User: iskarian@mgsn.dev X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" Reply-to: Sarah Morgensen From: Sarah Morgensen via Bug reports for GNU Guix X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625439129; h=from:from:sender:sender:reply-to: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=asWz7VW7UqX9xnffFZGw5axJppUjlzyAGZ/YSJtqWfw=; b=XqIpWVAt18Bj8/AXfXJDKFQnGTMrWsQAiy39DaZnHpcgU74cHdlOfEtaZV3L5/XVWwHDWf MRw+FoATku4jzd9ows7ZzRgthgJTtEtdYz+bLDFBKKEabIlsijCOYt0Lrt57I6ELCFBubA zBx5JbD3kbSG0tn47M4a+HP8iL0XcerlznLMeQPqQ2W8+xSV3+YPbO2V1jvdZd8N1lbF0V RWCLcF1H6xCAgK5eV2sciJSqHr+77aJFi/Zqr2v7mj8r0P/BR8PjWYl2qGPFO06ePccQnt WK4KvQtqdGD2308dR4QbPNrgZ2YVm+gRPvpn5vzV6z8Yx/ifJEBMGjWjg81kXA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625439129; a=rsa-sha256; cv=none; b=Mg7ZEeyezlIoeeiaf9J7wiXL4mzFXCIkXY1lqpBuw7XqBlrlRDUInAz4bcIqbCFNWHAYUg dcLqGGfyid9JDqZa7Qm54gcsR+0ZEtonOiNhWANZI2ycKSOgd6K92Nqh+cXAHvDyAXVdQ4 H6Dfr3H9vWj28fYJlShkM8QMLiDXYLJvjDOnIhXq9pe+Br4EaffAWVQgzQ9JC1gQUgB4p/ aoqL7BWizn8v2ZhJehyt0GpT+ebaXN4Q0jIMtRKGXKGJy/t/6qNXfS87YJJL22sCS/0iq2 5fmzY+UdmrMa7ypWM5nklfZFmtoqcJpKAYx9wDqh9i/ZE2ME9da8UO1p4x452A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=GVIWNjUq; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -1.41 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=GVIWNjUq; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: A1A262497B X-Spam-Score: -1.41 X-Migadu-Scanner: scn0.migadu.com X-TUID: sG38ELRLNUyZ --=-=-= Content-Type: text/plain Hello, Leo Prikler writes: > Am Donnerstag, den 29.04.2021, 19:54 +0200 schrieb raingloom: >> Trying to import kineto and getting this error when building it: >> >> guix build: error: invalid character `~' in name >> `go-git-sr-ht-~sircmpwn-kineto-0.0.0-20210225135222-edd4fe31f16f- >> checkout.drv' >> >> I know the names are significant in go-build-system so I'm not sure >> how >> to work around the issue without breaking anything. As far as I can tell, the go-build-system doesn't care about the actual package names, just #:import-path and #:unpack-path. The names should only be significant to the go importer insofar as go-module->guix-package-name does not generate collisions. > The way Go works, I would hazard a guess, that > module git.sr.ht/~sircmpwn/kineto > and > module git.sr.ht/sircmpwn/kineto > name two different modules. However, as the latter can't exist since > sr.ht prefixes user names with ~, I think a name transformation, that > maps the former to the latter should be safe. On the other hand, since > this just affects store file names, we might instead want to map "~" to > "-" in the general case of it appearing anywhere. WDYT? It might be slightly uglier, but I think it's better to keep a consistent policy of "replace any invalid characters with a hyphen", as it is less likely to generate collisions and it provides a hint to the reader that there *is* a character there. I have attached a patch to do so below, verified that a recursive import of the package mentioned above builds without modification (well, I had to update a dependency...) and verified that there are not currently any go packages using a tilde in their name with: $ egrep -r '"go-[^"]*~[^"]*"' gnu/packages --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-import-go-Replace-tildes-with-hyphens-in-package-nam.patch Content-Description: import: go: Replace tildes with hyphens in package names. >From 2c942a06cf94acdca07f2a59736c89521953af0f Mon Sep 17 00:00:00 2001 Message-Id: <2c942a06cf94acdca07f2a59736c89521953af0f.1625436903.git.iskarian@mgsn.dev> From: Sarah Morgensen Date: Sun, 4 Jul 2021 15:00:15 -0700 Subject: [PATCH] import: go: Replace tildes with hyphens in package names. Fixes . * guix/import/go.scm (go-module->guix-package-name): Replace tildes with hyphens. --- guix/import/go.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guix/import/go.scm b/guix/import/go.scm index 5e23d6a2b3..d8f838f635 100644 --- a/guix/import/go.scm +++ b/guix/import/go.scm @@ -430,9 +430,9 @@ hence the need to derive this information." (define* (go-module->guix-package-name module-path #:optional version) "Converts a module's path to the canonical Guix format for Go packages. Optionally include a VERSION string to append to the name." - ;; Map dot, slash and underscore characters to hyphens. + ;; Map dot, slash, underscore and tilde characters to hyphens. (let ((module-path* (string-map (lambda (c) - (if (member c '(#\. #\/ #\_)) + (if (member c '(#\. #\/ #\_ #\~)) #\- c)) module-path))) base-commit: 9e63bafafbe7a7c2d9804fae62302ac8a7e90090 -- 2.31.1 --=-=-= Content-Type: text/plain -- Sarah --=-=-=--