From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aDAxIsHr9mFGzwAAgWs5BA (envelope-from ) for ; Sun, 30 Jan 2022 20:49:21 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id KAXIHsHr9mFk6wAAauVa8A (envelope-from ) for ; Sun, 30 Jan 2022 20:49:21 +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 12B5C34D41 for ; Sun, 30 Jan 2022 20:49:21 +0100 (CET) Received: from localhost ([::1]:42176 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nEGCO-0007T9-8l for larch@yhetil.org; Sun, 30 Jan 2022 14:49:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43702) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nEGC6-0007RP-Kf for bug-guix@gnu.org; Sun, 30 Jan 2022 14:49:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:44804) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nEGC6-0003Un-6x for bug-guix@gnu.org; Sun, 30 Jan 2022 14:49:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nEGC6-0000No-62 for bug-guix@gnu.org; Sun, 30 Jan 2022 14:49:02 -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:49:02 +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.16435720911396 (code B ref 52801); Sun, 30 Jan 2022 19:49:02 +0000 Received: (at 52801) by debbugs.gnu.org; 30 Jan 2022 19:48:11 +0000 Received: from localhost ([127.0.0.1]:37707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nEGBA-0000MJ-ST for submit@debbugs.gnu.org; Sun, 30 Jan 2022 14:48:11 -0500 Received: from mail-lj1-f175.google.com ([209.85.208.175]:34374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nEGB7-0000Lf-Sw for 52801@debbugs.gnu.org; Sun, 30 Jan 2022 14:48:02 -0500 Received: by mail-lj1-f175.google.com with SMTP id e9so16637935ljq.1 for <52801@debbugs.gnu.org>; Sun, 30 Jan 2022 11:48:01 -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=f7PEFm0WeBiDOrp3ECFEn0AgcFmKdVOCTyeMo8ovIdU=; b=Qr19z1Wb1KVHMd6msKoq0OWODUH1TyLrhwMCE//BOw7a7i2SGrmHGkRZMtkwWyjLcj 7poboer9oBNFUGWsWjm/dLIqjBAbyZ/D/wXy218XjouLDULqsf8FYGtONEdkMdNSAuUS 1cYJfVa8LubFJ4MmIWmJg0bzPkKfjMYaGlsclbKFx1GcdllAU02kK4B/8ZHgUQ1b8P5H abCjNFs20XHvRl8fM6vYHOv8I6U4/iiL0YPtNspxJHAqRyIhE0eiE2Bo46ETqeDIIplt aL7xOloVBKf4ckuxZhwddfldaJtkHCmOaiLYcwoYKfpNjkqqdUX1msW4PU+Xd1/YER8g GxJg== 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=f7PEFm0WeBiDOrp3ECFEn0AgcFmKdVOCTyeMo8ovIdU=; b=EA9tjR4tVtx8czzxw/6H4DKrq/MK781As2NdAHBkpiYDu/zqWWO4ld7QwofQk5DHIw 1QRyYRQOnPuWNFYRJixQ64T99umhX0/W4U84tb29XAueK4XS3FINsYucKEKX6YXJlRuG Qe6pVpfGkNE8CiLfQ3I73NYK0boh2LRAOtv2ExfqJJuojPFt8X0SEhml++2oMdYuSUHO WAX918bSQsa5VSX5nqYGCZuc29f1/1Z2wz0eAe8vVn3vsATtjzs+f1cIVKmr8+oOu2s5 CLXvAOry4Sd29MafPONSHlp0oO8VN7yO/0JPabw6ye1KVi83n1LSQ4ZqBBzr0rlNbW8H XVEQ== X-Gm-Message-State: AOAM531yMtiIhZLh5wAGvDWmoutqBryYBI1C+Jk0+wuUFf+UpzTlVtAE SFZ5oPv6ehfwyP4X+LoEBuYVou12wbzJ1T38n0MjiZZuvC0= X-Google-Smtp-Source: ABdhPJxLjS+p0HbSm7UCbYGkWtoOwm34uU1uVJpIkmG+Ipnkn9ktCOA4U3Iq8unUiv6kpXfl3py2NpqF/yL3PtzKmC4= X-Received: by 2002:a2e:88d4:: with SMTP id a20mr3514150ljk.187.1643572076107; Sun, 30 Jan 2022 11:47:56 -0800 (PST) MIME-Version: 1.0 References: <87h79l9kml.fsf@gnu.org> In-Reply-To: From: Grigory Shepelev Date: Sun, 30 Jan 2022 22:47:20 +0300 Message-ID: Content-Type: multipart/alternative; boundary="000000000000c25a2a05d6d1f17e" 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=1643572161; 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=f7PEFm0WeBiDOrp3ECFEn0AgcFmKdVOCTyeMo8ovIdU=; b=O24w0jYRwBtB/+r8UgGcVQUSlqVvKmVaFGAK6xYONllYxlekXHAWa4hqg+LSM8LpVXnW0z W1MQth1L8R54aBBq35VW78u1ZpOFRs0HBnuTrkWEwV862ciTdcU/zPkhx1NrfHmf9b0QW1 uIcgD+a5wXjPNIJi3nzlD4N6vRNRF9sbJ4j+tBCZ4FwYwrLWe11I2dr65wmtsalYgOIL54 auqKcheYPewggiSBn5r0VSPcDOimS7JcrOdvAPWRRhsoZXc6RnX4fxNY7PlKs29l47DUTV LnYfeJKpLalIic/A/t5cq55vmD0O3TJXW6e6afN/4BwjrQCS9MHZjp7EyNS9FQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1643572161; a=rsa-sha256; cv=none; b=n4PiL10Nh+71TOr0ydpVsHtA7ghBdbHNo4WGf/8coBk0TrLcfKMUQtDM/QmARiYIxk/vff 6YRhItEgTx6dGJdZJfN+9HRuO3OL5/kHP9fIU61pm+BBcmSBtvYRa2G+MLN8vv1XWeeijh 9er5uqesnLNW3vZYHeapazc51Ih7Iv+4A4snew2MjpXy/jqonTSUcUz5t0EhbBUgcoueg7 ZsHSpEC6IsFrHugY1mRSuSm5dUwukvvY304T3CWiU+g1EVi80jn6JDE8nu7F/zkOduxuI/ /OnoqBxQOjmL1GkLjV9gRMwZovOuz9bmf3yXKwnAYfXo7+HEEMhObz3exgQW+w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Qr19z1Wb; 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=Qr19z1Wb; 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: 12B5C34D41 X-Spam-Score: -1.03 X-Migadu-Scanner: scn1.migadu.com X-TUID: XEM3tCSPP8Zc --000000000000c25a2a05d6d1f17e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable That explains why the problem was raised on my desktop PC as well. It uses the same .gitconfig file. =D0=B2=D1=81, 30 =D1=8F=D0=BD=D0=B2. 2022 =D0=B3. =D0=B2 22:45, Grigory She= pelev : > 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 C= ourt=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.s= cm >> $ 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. >> > --000000000000c25a2a05d6d1f17e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
That explains why the problem was raised on my desktop PC = as well. It uses the same .gitconfig file.

=D0=B2=D1=81, 30 =D1=8F=D0=BD=D0=B2= . 2022 =D0=B3. =D0=B2 22:45, Grigory Shepelev <shegeley@gmail.com>:
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 rem= ember why I had to get into "git's guts". Something like: had= some problem with some exact project where my colleague used macOS or wind= ows 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 Co= urt=C3=A8s <ludo@gnu.o= rg>:
Hi,<= br>
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.
--000000000000c25a2a05d6d1f17e--