From unknown Thu Jun 12 08:32:19 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#37523 <37523@debbugs.gnu.org> To: bug#37523 <37523@debbugs.gnu.org> Subject: Status: Print hint if build fails due to invalid character in package source base name Reply-To: bug#37523 <37523@debbugs.gnu.org> Date: Thu, 12 Jun 2025 15:32:19 +0000 retitle 37523 Print hint if build fails due to invalid character in package= source base name reassign 37523 guix submitter 37523 Hartmut Goebel severity 37523 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 26 12:02:00 2019 Received: (at submit) by debbugs.gnu.org; 26 Sep 2019 16:02:00 +0000 Received: from localhost ([127.0.0.1]:44454 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDWDQ-0000n8-2f for submit@debbugs.gnu.org; Thu, 26 Sep 2019 12:02:00 -0400 Received: from lists.gnu.org ([209.51.188.17]:60599) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iDWDO-0000le-5a for submit@debbugs.gnu.org; Thu, 26 Sep 2019 12:01:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34255) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDWDF-0003uk-5u for bug-guix@gnu.org; Thu, 26 Sep 2019 12:01:54 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iDWDD-000302-4Q for bug-guix@gnu.org; Thu, 26 Sep 2019 12:01:48 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:53985) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iDWDC-0002ss-VL for bug-guix@gnu.org; Thu, 26 Sep 2019 12:01:47 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46fKRp0nSHz1rKJp for ; Thu, 26 Sep 2019 18:01:42 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46fKRp0gKPz1qqkL for ; Thu, 26 Sep 2019 18:01:42 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id ObEvKQvkU26F for ; Thu, 26 Sep 2019 18:01:41 +0200 (CEST) Received: from hermia.goebel-consult.de (ppp-188-174-55-104.dynamic.mnet-online.de [188.174.55.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS for ; Thu, 26 Sep 2019 18:01:41 +0200 (CEST) Received: from thisbe.goebel-consult.de (hermia.goebel-consult.de [192.168.110.7]) by hermia.goebel-consult.de (Postfix) with ESMTP id 6A81E60084 for ; Thu, 26 Sep 2019 18:04:24 +0200 (CEST) To: bug-guix From: Hartmut Goebel Openpgp: preference=signencrypt Organization: crazy-compilers.com Subject: Print hint if build fails due to invalid character in package source base name Message-ID: <80714a9a-b70d-8810-0f1b-606b8a6b8743@crazy-compilers.com> Date: Thu, 26 Sep 2019 18:01:40 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.18.0.9 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Followup to : 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 = error message is > just a string, there=E2=80=99s no error code you can compare against. Example package raising this error: (use-modules (guix packages) (guix download) (guix build-system gnu)) (package =C2=A0 (name "kde-l10n-ca-valencia") =C2=A0 (version "14.11.80") =C2=A0 (source =C2=A0=C2=A0 (origin =C2=A0=C2=A0=C2=A0=C2=A0 (method url-fetch) =C2=A0=C2=A0=C2=A0=C2=A0 (uri (string-append "mirror://kde//Attic/applica= tions/" =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ver= sion "/src/kde-l10n/" =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "kd= e-l10n-ca@valencia-" version ".tar.xz")) =C2=A0=C2=A0=C2=A0=C2=A0 (sha256 (base32 "1mqadassxcm0m9r1l02m5vr4bbandn48xz8gifvxmb4wiz8i8d0w")))) =C2=A0 (build-system gnu-build-system) =C2=A0 (synopsis "") (description "") (license "") (home-page "")) --=20 Regards Hartmut Goebel | Hartmut Goebel | h.goebel@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible | From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 21 08:38:41 2020 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 To: Hartmut Goebel Subject: Re: bug#37523: Print hint if build fails due to invalid character in package source base name 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-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 37523 Cc: 37523@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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 From debbugs-submit-bounces@debbugs.gnu.org Mon Dec 21 09:16:18 2020 Received: (at 37523) by debbugs.gnu.org; 21 Dec 2020 14:16:18 +0000 Received: from localhost ([127.0.0.1]:46599 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1krLyz-0000F7-Ru for submit@debbugs.gnu.org; Mon, 21 Dec 2020 09:16:18 -0500 Received: from mail-out.m-online.net ([212.18.0.9]:39700) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1krLyv-0000Em-Qu for 37523@debbugs.gnu.org; Mon, 21 Dec 2020 09:16:17 -0500 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4D01jS4QVhz1qs0j; Mon, 21 Dec 2020 15:16:12 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4D01jS2l0hz1qr3y; Mon, 21 Dec 2020 15:16:12 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id j6BfV6onsQds; Mon, 21 Dec 2020 15:16:11 +0100 (CET) Received: from hermia.goebel-consult.de (ppp-188-174-60-135.dynamic.mnet-online.de [188.174.60.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Mon, 21 Dec 2020 15:16:11 +0100 (CET) Received: from lenashee.goebel-consult.de (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 60AC960031; Mon, 21 Dec 2020 15:16:18 +0100 (CET) Subject: Re: bug#37523: Print hint if build fails due to invalid character in package source base name To: zimoun References: <80714a9a-b70d-8810-0f1b-606b8a6b8743@crazy-compilers.com> <86lfdr9t67.fsf@gmail.com> From: Hartmut Goebel Organization: crazy-compilers.com Message-ID: <2f806ed7-dc2c-ee67-76ff-4483b5515f31@crazy-compilers.com> Date: Mon, 21 Dec 2020 15:16:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <86lfdr9t67.fsf@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 37523 Cc: 37523@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.9 (--) Hi,, thanks for picking this up. > Therefore, I am missing if this message “invalid character” 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. Since this check is done also for other store-items, I assume it does not make much sense to change the message in the C-code. So I assume the patch to improve this is to check the name on the Scheme side. (Or to make the da)emon return some meaningful error object. Anyhow I assume this is much more complicated and not a solution for now. -- Regards Hartmut Goebel | Hartmut Goebel | h.goebel@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |