From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id ODnbF9Dr9mEO1wAAgWs5BA (envelope-from ) for ; Sun, 30 Jan 2022 20:49:36 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id iK9oFNDr9mGSCAAAauVa8A (envelope-from ) for ; Sun, 30 Jan 2022 20:49:36 +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 D8E1226573 for ; Sun, 30 Jan 2022 20:49:35 +0100 (CET) Received: from localhost ([::1]:42900 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nEGCd-00080u-4X for larch@yhetil.org; Sun, 30 Jan 2022 14:49:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43508) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nEGAJ-0005NH-PL for bug-guix@gnu.org; Sun, 30 Jan 2022 14:47:15 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:44793) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nEGA9-0003O1-Ui for bug-guix@gnu.org; Sun, 30 Jan 2022 14:47:11 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nEGA9-0000IC-RD for bug-guix@gnu.org; Sun, 30 Jan 2022 14:47:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#52801: Guile misbehaves in case of escapes and carriage returns, sometimes breaking "guix pull" Resent-From: Grigory Shepelev Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 30 Jan 2022 19:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52801 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 52801-submit@debbugs.gnu.org id=B52801.16435720041099 (code B ref 52801); Sun, 30 Jan 2022 19:47:01 +0000 Received: (at 52801) by debbugs.gnu.org; 30 Jan 2022 19:46:44 +0000 Received: from localhost ([127.0.0.1]:37696 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nEG9s-0000He-9p for submit@debbugs.gnu.org; Sun, 30 Jan 2022 14:46:44 -0500 Received: from mail-lj1-f181.google.com ([209.85.208.181]:38669) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nEG9p-0000HQ-GC for 52801@debbugs.gnu.org; Sun, 30 Jan 2022 14:46:42 -0500 Received: by mail-lj1-f181.google.com with SMTP id e17so16613841ljk.5 for <52801@debbugs.gnu.org>; Sun, 30 Jan 2022 11:46:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=J6lysnLRDiFQEIMmN8N3todoLKZpGNjy2epzVwAV+FA=; b=fFYaUsG3JF3ktRXbodHB3fbrVD0y7eeO7wrzYmze46EONfkGKDmZbqtxs2HIDFvPNJ Enj92P7HYVNYpDsesPP3nCCDsZythDbHQFwyAtE3JU06D7yLCWnq7Sitbm8Z0MbG4gcy CYMWmrVyChzkPLpqTeGltIABCZo1esB6JybKFvJ0hymnjC3YP4z/BicAWFBxlfqwIjHU qUMwcKl3uDevEyRt0HvVNQTifJ03iglkgG7SaT8m3D/LTHQjEQbo5uNmofNGtdgd9YN3 6xeSC72Or0SdNMpOKDF5zUZaBEyPRJNM64D7d/NE/AoBn3VY+j9L6r4Hky/SuXqtbD3A MMRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=J6lysnLRDiFQEIMmN8N3todoLKZpGNjy2epzVwAV+FA=; b=K6gCN470208GNhOKH0WkuUdpWMVHwkRX8iKx/aKtDUNGXR7x7SJSB3YqhqIwUQR+zC B4IOX6c0U++Fpym71/bO8PK3DAR2935YrGmOgz8UI0glXSZ79Uh1a+d3FqILlOIJ9zOs cwfLtUCTJae0piffcCdEb98LAzCg0UUFkUNkLrgVBcnH+BG7w7g4HKCTwTK43ZuFdBAt xqFaKOd4jmW9QQRZfeyoy9dYkSLh8mQjay5C7R1eTDE5Met0pGDZXcGs0pu5bAEwt/TF MIzz0hTdEPnxiNxAiOYx8BlT46c+9sy91T6I/THw17VGhu/PRG3LiuNWMX/LOo45QOjy RTkA== X-Gm-Message-State: AOAM531CtFgUme5mA4cPv7LuYofiyuEQM3L3Osk7vpjbdBV7U6NqKg+i TPUtHqS4Z+3Nlmy+PPrEozpf1O+fjnxRRwEJ20I= X-Google-Smtp-Source: ABdhPJz4U0oBS4vaTvYmzyKXz+EhIFc9zb+cZlFZMNbzT2wcUjj1d5PqapR7+hz+XXhOyyT4Mnzhie2HC22NMyjxWsc= X-Received: by 2002:a2e:93c9:: with SMTP id p9mr11883676ljh.397.1643571995057; Sun, 30 Jan 2022 11:46:35 -0800 (PST) MIME-Version: 1.0 References: <87h79l9kml.fsf@gnu.org> In-Reply-To: <87h79l9kml.fsf@gnu.org> From: Grigory Shepelev Date: Sun, 30 Jan 2022 22:45:59 +0300 Message-ID: Content-Type: multipart/alternative; boundary="000000000000eda12205d6d1ec25" 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: 52801@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" 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=1643572176; 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=J6lysnLRDiFQEIMmN8N3todoLKZpGNjy2epzVwAV+FA=; b=CwdaJs1EYJDhwOOZtaWMEibmA+PYUAKFwFgnyqugrW3yOION/Ham5/31j6jBd4Cs4LXNz5 rnfI1Mf8XBgiQjzKFGDiAEV0n+CjoWWeP1HO3pT3MRAg7yq5yRbTgXwJeyYN+9E3iOG+fs SQ2e1IQ/LSpy+QWBmJLrUUeMOTApMcAMKiBtquQJssx2GKdQ5lI8OW5+2X8ksssWU0cwrO /0SZMqDoKLpjU1BQeEa42+gwFPWCOAjip8eR71HmflmOghvjkectEWDzAbMBHZyLGUL4cJ iXd5AX2tbMPntf6G9Su0l1B8mc5dWED6crgSkcxf7wXdcHjirAivV+Pa5HHt3w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643572176; a=rsa-sha256; cv=none; b=BN4MzEtQI79s5pI+1V2x8kmqC20UQ1xYGZw2K0z8WGdyFks7eMAir7jAh33xJnvl1IUn7u GbsNfRFHk8VGrjHqawY+9rWwoTMm1XCtt3BKd/W2uvVQPa84v3KOqcfFNdkucK527aG18q Up+85DHwQhoydqH8jvS2Pe8uWKteSI9NWdyAAW5+mfzjZklPtbCaXJbo+Fqcjum9f8LHm7 lFvn61De2VCjcY2Yd3C7zZjK0wMW8bNhwpWWRGBTqakXwC+LpwWOdvhivRjZu/X3FZHI0r kA3nKvPRKKsXxcXIWxcD0teKYd2QJ2ytnNUYACwhKNcm6DY7DA7CMH7HUIEgiA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=fFYaUsG3; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.03 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=fFYaUsG3; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: D8E1226573 X-Spam-Score: -1.03 X-Migadu-Scanner: scn1.migadu.com X-TUID: Jg6YI0DkBPCr --000000000000eda12205d6d1ec25 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Seems like the problem was in my .gitconfig file where "autocrlf =3D true".= I set it to "false", and cleared the cache. Then the "guix pull" started to work as expected. I don't even remember why I had to get into "git's guts". Something like: had some problem with some exact project where my colleague used macOS or windows and some files that came from git had some problems with that. =D0=B2=D1=81, 30 =D1=8F=D0=BD=D0=B2. 2022 =D0=B3. =D0=B2 20:52, Ludovic Cou= rt=C3=A8s : > Hi, > > Grigory Shepelev skribis: > > > shegeley@zone51 ~$ guix pull > > Updating channel 'nonguix' from Git repository at ' > https://gitlab.com/nonguix/nonguix'... > > Updating channel 'guix' from Git repository at ' > https://git.savannah.gnu.org/git/guix.git'... > > Building from these channels: > > guix https://git.savannah.gnu.org/git/guix.git 2495582 > > nonguix https://gitlab.com/nonguix/nonguix 39e4b41 > > Computing Guix derivation for 'x86_64-linux'... -ice-9/read.scm:126:4: > In procedure read-string: > > gnu/packages/virtualization.scm:640:1: invalid character in escape > sequence: #\return > > guix pull: error: You found a bug: the program > '/gnu/store/w1hd6ab7f92y0f2r1ah4yyvi205a71bc-compute-guix-derivation' > > failed to compute the derivation for Guix (version: > "2495582e08cf411163f0799d290fda5101141949"; system: "x86_64-linux"; > > host version: "1dfe8c372163d481ebebb97dd3b4cafa49906b28"; pull-version: > 1). > > Maxime Devos skribis: > > > Seems like an instance of . > > I took the liberty of renaming the bug report appropriately. > > > > Anyway, here's the minimal reproducer: > > > > Run the following in a REPL: > > (call-with-input-string "\"Hello\\\rcarriage return!\"" read) > > ;; --> invalid character in escape sequence: #\return > > That=E2=80=99s expected. Conversely, this one works: > > (call-with-input-string "\"Hello \\\nnewline!\"" read) > > What was in gnu/packages/virtualization.scm:640:1 at that point? > > --8<---------------cut here---------------start------------->8--- > $ git ls-tree 2495582e08cf411163f0799d290fda5101141949 -- gnu/packages > 040000 tree 8070c9587f76797cf16800522688ded39c956d00 gnu/packages > $ git ls-tree 8070c9587f76797cf16800522688ded39c956d00 |grep virtuali > 100644 blob 20ffb4a481239349078e2a2864d1bd873dfcd143 virtualization.sc= m > $ git show 20ffb4a481239349078e2a2864d1bd873dfcd143 |head -649 |tail -10 > "/run/setuid-programs:/run/current-system/profile/sbin:\ > /run/current-system/profile/bin")))) > (add-after 'bootstrap 'patch-sphinx-version-detection > (lambda _ > ;; The build system runs 'sphinx-build --version' to verify > that > ;; the Sphinx is recent enough, but does not expect the > ;; .sphinx-build-real executable name created by the Sphinx > wrapper. > (substitute* "configure" > (("\\$SPHINX --version 2>&1") > "$SPHINX --version 2>&1 \ > --8<---------------cut here---------------end--------------->8--- > > AFAICS, this was a regular \n (not \r) following backslash. > > Did the issue magically disappear? > > Grigory, could it be that libgit2 somehow converted \n to \r\n on your > machine, or that you manually accesses files under > ~/.cache/guix/checkouts? > > Thanks, > Ludo=E2=80=99. > --000000000000eda12205d6d1ec25 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Seems like the problem was in my .gitconfig file wher= e "autocrlf =3D true". I set it to "false", and cleared= the cache. Then the "guix pull" started to work as expected.
I don't even remember why I had to get into "git's= guts". Something like: had some problem with some exact project where= my colleague used macOS or windows and some files that came from git had s= ome problems with that.

=D0=B2=D1=81, 30 =D1=8F=D0=BD=D0=B2. 2022 = =D0=B3. =D0=B2 20:52, Ludovic Court=C3=A8s <ludo@gnu.org>:
Hi,

Grigory Shepelev <shegeley@gmail.com> skribis:

> shegeley@zone51 ~$ guix pull
> Updating channel 'nonguix' from Git repository at 'https://gitlab.com/nonguix/nonguix'...
> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
> Building from these channels:
>=C2=A0 =C2=A0guix=C2=A0 =C2=A0 =C2=A0 https://git.savan= nah.gnu.org/git/guix.git 2495582
>=C2=A0 =C2=A0nonguix=C2=A0 =C2=A0https://gitlab.com/nonguix/no= nguix=C2=A0 =C2=A0 =C2=A0 =C2=A0 39e4b41
> Computing Guix derivation for 'x86_64-linux'... -ice-9/read.sc= m:126:4: In procedure read-string:
> gnu/packages/virtualization.scm:640:1: invalid character in escape seq= uence: #\return
> guix pull: error: You found a bug: the program '/gnu/store/w1hd6ab= 7f92y0f2r1ah4yyvi205a71bc-compute-guix-derivation'
> failed to compute the derivation for Guix (version: "2495582e08cf= 411163f0799d290fda5101141949"; system: "x86_64-linux";
> host version: "1dfe8c372163d481ebebb97dd3b4cafa49906b28"; pu= ll-version: 1).

Maxime Devos <maximedevos@telenet.be> skribis:

> Seems like an instance of <https://issues.guix.gnu.org/5= 2559#15>.
> I took the liberty of renaming the bug report appropriately.
>
> Anyway, here's the minimal reproducer:
>
> Run the following in a REPL:
> (call-with-input-string "\"Hello\\\rcarriage return!\"&= quot; read)
> ;; --> invalid character in escape sequence: #\return

That=E2=80=99s expected.=C2=A0 Conversely, this one works:

=C2=A0 (call-with-input-string "\"Hello \\\nnewline!\""= read)

What was in gnu/packages/virtualization.scm:640:1 at that point?

--8<---------------cut here---------------start------------->8---
$ git ls-tree 2495582e08cf411163f0799d290fda5101141949 -- gnu/packages
040000 tree 8070c9587f76797cf16800522688ded39c956d00=C2=A0 =C2=A0 gnu/packa= ges
$ git ls-tree 8070c9587f76797cf16800522688ded39c956d00 |grep virtuali
100644 blob 20ffb4a481239349078e2a2864d1bd873dfcd143=C2=A0 =C2=A0 virtualiz= ation.scm
$ git show 20ffb4a481239349078e2a2864d1bd873dfcd143 |head -649 |tail -10 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "/run/setuid-p= rograms:/run/current-system/profile/sbin:\
/run/current-system/profile/bin"))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(add-after 'bootstrap 'patch-sphi= nx-version-detection
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(lambda _
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; The build system runs &#= 39;sphinx-build --version' to verify that
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; the Sphinx is recent eno= ugh, but does not expect the
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; .sphinx-build-real execu= table name created by the Sphinx wrapper.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(substitute* "configur= e"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(("\\$SPHINX --= version 2>&1")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "$SPHINX --ver= sion 2>&1 \
--8<---------------cut here---------------end--------------->8---

AFAICS, this was a regular \n (not \r) following backslash.

Did the issue magically disappear?

Grigory, could it be that libgit2 somehow converted \n to \r\n on your
machine, or that you manually accesses files under
~/.cache/guix/checkouts?

Thanks,
Ludo=E2=80=99.
--000000000000eda12205d6d1ec25--