From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id oPfvLIil4F+iHgAA0tVLHw (envelope-from ) for ; Mon, 21 Dec 2020 13:39:20 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id sNnUKIil4F+mKgAA1q6Kng (envelope-from ) for ; Mon, 21 Dec 2020 13:39:20 +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 31DE39403C9 for ; Mon, 21 Dec 2020 13:39:20 +0000 (UTC) Received: from localhost ([::1]:43416 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krLPC-0004Dm-Hn for larch@yhetil.org; Mon, 21 Dec 2020 08:39:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56576) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krLOx-0004Bt-0U for bug-guix@gnu.org; Mon, 21 Dec 2020 08:39:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34975) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krLOw-0001EJ-OX for bug-guix@gnu.org; Mon, 21 Dec 2020 08:39:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1krLOw-0006Go-JU for bug-guix@gnu.org; Mon, 21 Dec 2020 08:39:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#37523: Print hint if build fails due to invalid character in package source base name Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 21 Dec 2020 13:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37523 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Hartmut Goebel Received: via spool by 37523-submit@debbugs.gnu.org id=B37523.160855792124028 (code B ref 37523); Mon, 21 Dec 2020 13:39:02 +0000 Received: (at 37523) by debbugs.gnu.org; 21 Dec 2020 13:38:41 +0000 Received: from localhost ([127.0.0.1]:46521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1krLOW-0006FC-6X for submit@debbugs.gnu.org; Mon, 21 Dec 2020 08:38:41 -0500 Received: from mail-wm1-f45.google.com ([209.85.128.45]:53265) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1krLOP-0006ER-Fq for 37523@debbugs.gnu.org; Mon, 21 Dec 2020 08:38:34 -0500 Received: by mail-wm1-f45.google.com with SMTP id k10so9908489wmi.3 for <37523@debbugs.gnu.org>; Mon, 21 Dec 2020 05:38:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=IeWp4X3v+ni5H6NTbcHozg4uAkrEdeJFbB2wOVdo1kY=; b=HjrSS9RMRCj1RW/+ei5AiP9sy8boXtkLtYwEsOuZxbMGQMKYvKvT2kQoLqCmbH3+h6 g6DVygMpv1Ma9WOB6wq8XRAhxjb1LKKfIKPII7MDktWxw9Y46qujmMPLXkR0UdiPfOmz BQ8Lq2/EyOQImZxYbUBqrK53LriZI74WwiFUF4vAmbyLiIPdv+KzLufoR2tEbI1ydgCL DcODuCAyhsuWuxM/NFyIpmui4bJ4KAkMYplu6fYY4BopMWTLI5d5NLnpdFu+/b4DV2Aq nx+knJL2ZIfLVlLt6Goc4eXcEpU/8jljBJqDzIcvwHiz3+zMdPYJ3PIJLMbFty0nB2+v KJDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=IeWp4X3v+ni5H6NTbcHozg4uAkrEdeJFbB2wOVdo1kY=; b=q3t0oY1W3G3Y3c6uihiMbgLonO49nMs+u5LRwjDSB4lF1aQWSiv79IDw3W1eQCLUWd nJNq7rL80P9pW21viuf+ZB5jjPT2Y5wsDKaQIIE3R421VqsBXcpz2CG66jOcq/cacmED FtzGj4o6fbnZAsGGrFO/nUQpsYTsrBN2e0h8Agk/vY4Fey8LfiEPSJqOAlwYQHJKtHD/ Ozj54LZYcWD6DrZjHD+fcgUryye4DBUexzQCDXU5RV12a+M/8AAIjxfeeWV7tEdx4us+ y727J3vgvnCxdh+mq0mBEsAkO+ft8fvdSfSK2pxgF8oiihCWnj6yEN8xQFqrfLRV7j/e ihYA== X-Gm-Message-State: AOAM530ZisRauqc6kvwqBWV50Be8CpnaPVk8xZLk8zxYTG2MWIZyLMKh VqOPag7idDzl0Uocy1zn8+HRUQiBqdI= X-Google-Smtp-Source: ABdhPJzDPoXtK8TmWrudwY2VG3+jUP5Da1ZJrNNnUJTS4MPMboVJqzuE1LL54ymP/tuys2TCesc2/Q== X-Received: by 2002:a7b:c1d7:: with SMTP id a23mr16491642wmj.62.1608557903415; Mon, 21 Dec 2020 05:38:23 -0800 (PST) Received: from lili (oul69-1-82-232-2-3.fbx.proxad.net. [82.232.2.3]) by smtp.gmail.com with ESMTPSA id g191sm25141007wmg.39.2020.12.21.05.38.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 05:38:22 -0800 (PST) From: zimoun References: <80714a9a-b70d-8810-0f1b-606b8a6b8743@crazy-compilers.com> Date: Mon, 21 Dec 2020 14:37:20 +0100 In-Reply-To: <80714a9a-b70d-8810-0f1b-606b8a6b8743@crazy-compilers.com> (Hartmut Goebel's message of "Thu, 26 Sep 2019 18:01:40 +0200") Message-ID: <86lfdr9t67.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: , Cc: 37523@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.22 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=gmail.com header.s=20161025 header.b=HjrSS9RM; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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: 31DE39403C9 X-Spam-Score: -1.22 X-Migadu-Scanner: scn1.migadu.com X-TUID: 2qFAhprKuvWW Hi, On Thu, 26 Sep 2019 at 18:01, Hartmut Goebel = wrote: > guix shall print a hint if building fails due to the package source base > name containing a character invalid in a store filename (e.g. "@" or "%"). > > Currently, when building such a package, one gets an error message like: > > guix build: error: invalid character `@' in name `kde-l10n-ca@valencia-14= .11.80.tar.xz.drv' > > > guix build should catch this error and print a hint like: > > You may add a =E2=80=98file-name=E2=80=99 field to the package source to = work around > this. > > > Ludovic Court=C3=A8s wrote on Sun Sep 08 22:07:10+0200 2019 > >> Unfortunately it cannot really be caught. I mean, you could catch >> =E2=80=98&store-protocol-error=E2=80=99 error conditions, but then the e= rror message is >> just a string, there=E2=80=99s no error code you can compare against. If I read correctly, the error is raised by nix/libstore/store-api.cc: --8<---------------cut here---------------start------------->8--- void checkStoreName(const string & name) { string validChars =3D "+-._?=3D"; /* Disallow names starting with a dot for possible security reasons (e.g., "." and ".."). */ if (string(name, 0, 1) =3D=3D ".") throw Error(format("invalid name: `%1%'") % name); foreach (string::const_iterator, i, name) if (!((*i >=3D 'A' && *i <=3D 'Z') || (*i >=3D 'a' && *i <=3D 'z') || (*i >=3D '0' && *i <=3D '9') || validChars.find(*i) !=3D string::npos)) { throw Error(format("invalid character `%1%' in name `%2%'") % *i % name); } } --8<---------------cut here---------------end--------------->8--- Therefore, I am missing if this message =E2=80=9Cinvalid character=E2=80=9D= should be improved or if the check of the name should be done before on the Scheme side. Well, I am missing what could be the path to improve the situation, if it needs. All the best, simon