GNU bug report logs -
#52801
'autocrlf' in ~/.gitconfig can break "guix pull" checkouts
Previous Next
To reply to this bug, email your comments to 52801 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#52801
; Package
guix
.
(Sun, 26 Dec 2021 10:16:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Grigory Shepelev <shegeley <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Sun, 26 Dec 2021 10:16:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Today's guix pull gives the following bug.
[Message part 2 (text/html, inline)]
[bug.txt (text/plain, attachment)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#52801
; Package
guix
.
(Sun, 26 Dec 2021 11:23:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 52801 <at> debbugs.gnu.org (full text, mbox):
retitle 52801 Guile inconsistently misbehaves in case of escapes and carriage returns, breaking "guix pull"
severity 52801 important
thanks
Grigory Shepelev schreef op zo 26-12-2021 om 13:14 [+0300]:
Today's guix pull gives the following bug.
Seems like an instance of <https://issues.guix.gnu.org/52559#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!\"" read)
;; --> invalid character in escape sequence: #\return
Greetings,
Maxime.
Changed bug title to 'Guil misbehaves in case of escapes and carriage returns, sometimes breaking "guix pull"' from 'Bug report'
Request was from
Maxime Devos <maximedevos <at> telenet.be>
to
control <at> debbugs.gnu.org
.
(Sun, 26 Dec 2021 15:21:01 GMT)
Full text and
rfc822 format available.
Severity set to 'important' from 'normal'
Request was from
Maxime Devos <maximedevos <at> telenet.be>
to
control <at> debbugs.gnu.org
.
(Sun, 26 Dec 2021 15:21:01 GMT)
Full text and
rfc822 format available.
Changed bug title to 'Guile misbehaves in case of escapes and carriage returns, sometimes breaking "guix pull"' from 'Guil misbehaves in case of escapes and carriage returns, sometimes breaking "guix pull"'
Request was from
Maxime Devos <maximedevos <at> telenet.be>
to
control <at> debbugs.gnu.org
.
(Sun, 26 Dec 2021 15:23:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#52801
; Package
guix
.
(Sun, 30 Jan 2022 17:53:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 52801 <at> debbugs.gnu.org (full text, mbox):
Hi,
Grigory Shepelev <shegeley <at> gmail.com> skribis:
> shegeley <at> 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 <maximedevos <at> telenet.be> skribis:
> Seems like an instance of <https://issues.guix.gnu.org/52559#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!\"" read)
> ;; --> invalid character in escape sequence: #\return
That’s 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.scm
$ 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’.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#52801
; Package
guix
.
(Sun, 30 Jan 2022 19:47:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 52801 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Seems like the problem was in my .gitconfig file where "autocrlf = 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.
вс, 30 янв. 2022 г. в 20:52, Ludovic Courtès <ludo <at> gnu.org>:
> Hi,
>
> Grigory Shepelev <shegeley <at> gmail.com> skribis:
>
> > shegeley <at> 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 <maximedevos <at> telenet.be> skribis:
>
> > Seems like an instance of <https://issues.guix.gnu.org/52559#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!\"" read)
> > ;; --> invalid character in escape sequence: #\return
>
> That’s 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.scm
> $ 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’.
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#52801
; Package
guix
.
(Sun, 30 Jan 2022 19:49:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 52801 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
That explains why the problem was raised on my desktop PC as well. It uses
the same .gitconfig file.
вс, 30 янв. 2022 г. в 22:45, Grigory Shepelev <shegeley <at> gmail.com>:
> Seems like the problem was in my .gitconfig file where "autocrlf = 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.
>
> вс, 30 янв. 2022 г. в 20:52, Ludovic Courtès <ludo <at> gnu.org>:
>
>> Hi,
>>
>> Grigory Shepelev <shegeley <at> gmail.com> skribis:
>>
>> > shegeley <at> 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 <maximedevos <at> telenet.be> skribis:
>>
>> > Seems like an instance of <https://issues.guix.gnu.org/52559#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!\"" read)
>> > ;; --> invalid character in escape sequence: #\return
>>
>> That’s 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.scm
>> $ 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’.
>>
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#52801
; Package
guix
.
(Sun, 30 Jan 2022 21:07:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 52801 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Grigory Shepelev schreef op zo 30-01-2022 om 22:45 [+0300]:
> Seems like the problem was in my .gitconfig file where "autocrlf =
> true". I set it to "false", and cleared the cache. Then the "guix
> pull" started to work as expected.
According to
<https://github.com/libgit2/libgit2/blob/HEAD/include/git2/clone.h#L111>
and <https://libgit2.org/libgit2/#HEAD/type/git_checkout_options>,
we can tell libgit to not do CRLF conversion, which would make (guix git)
more robust.
Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#52801
; Package
guix
.
(Mon, 31 Jan 2022 12:50:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 52801 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
The issue can be closed I guess. Thanks for your assistance.
пн, 31 янв. 2022 г. в 00:06, Maxime Devos <maximedevos <at> telenet.be>:
> Grigory Shepelev schreef op zo 30-01-2022 om 22:45 [+0300]:
> > Seems like the problem was in my .gitconfig file where "autocrlf =
> > true". I set it to "false", and cleared the cache. Then the "guix
> > pull" started to work as expected.
>
> According to
> <https://github.com/libgit2/libgit2/blob/HEAD/include/git2/clone.h#L111>
> and <https://libgit2.org/libgit2/#HEAD/type/git_checkout_options>,
> we can tell libgit to not do CRLF conversion, which would make (guix git)
> more robust.
>
> Greetings,
> Maxime.
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-guix <at> gnu.org
:
bug#52801
; Package
guix
.
(Mon, 31 Jan 2022 13:22:01 GMT)
Full text and
rfc822 format available.
Message #32 received at 52801 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Grigory Shepelev schreef op ma 31-01-2022 om 15:48 [+0300]:
> The issue can be closed I guess. Thanks for your assistance.
> пн, 31 янв. 2022 г. в 00:06, Maxime Devos <maximedevos <at> telenet.be>:
> > Grigory Shepelev schreef op zo 30-01-2022 om 22:45 [+0300]:
> > > Seems like the problem was in my .gitconfig file where "autocrlf
> > =
> > > true". I set it to "false", and cleared the cache. Then the "guix
> > > pull" started to work as expected.
> >
> > According to
> >
> <https://github.com/libgit2/libgit2/blob/HEAD/include/git2/clone.h#L111
> > >
> > and <https://libgit2.org/libgit2/#HEAD/type/git_checkout_options>,
> > we can tell libgit to not do CRLF conversion, which would make
> > (guix git)
> > more robust.
I don't think that modifying some git settings should break "guix
pull",
so I wouldn't close yet.
Greetings,
Maxime
[Message part 2 (text/html, inline)]
[signature.asc (application/pgp-signature, inline)]
Changed bug title to ''autocrlf' in ~/.gitconfig can break "guix pull" checkouts' from 'Guile misbehaves in case of escapes and carriage returns, sometimes breaking "guix pull"'
Request was from
Ludovic Courtès <ludo <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Tue, 01 Feb 2022 08:46:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#52801
; Package
guix
.
(Tue, 01 Feb 2022 08:49:01 GMT)
Full text and
rfc822 format available.
Message #37 received at 52801 <at> debbugs.gnu.org (full text, mbox):
Hi Maxime,
Maxime Devos <maximedevos <at> telenet.be> skribis:
> Grigory Shepelev schreef op zo 30-01-2022 om 22:45 [+0300]:
>> Seems like the problem was in my .gitconfig file where "autocrlf =
>> true". I set it to "false", and cleared the cache. Then the "guix
>> pull" started to work as expected.
>
> According to
> <https://github.com/libgit2/libgit2/blob/HEAD/include/git2/clone.h#L111>
> and <https://libgit2.org/libgit2/#HEAD/type/git_checkout_options>,
> we can tell libgit to not do CRLF conversion, which would make (guix git)
> more robust.
Indeed. Looks like Guile-Git doesn’t expose checkout options yet, so
doing that would be the first step.
Maybe Guix should just ignore ~/.gitconfig altogether?
Thanks,
Ludo’.
This bug report was last modified 3 years and 133 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.