guix pull to old commit fails due to unsupported manifest format

  • Done
  • quality assurance status badge
Details
5 participants
  • Arun Isaac
  • Josselin Poiret
  • Ludovic Courtès
  • (
  • zimoun
Owner
unassigned
Submitted by
Arun Isaac
Severity
important
A
A
Arun Isaac wrote on 20 Aug 2022 11:37
(address . bug-guix@gnu.org)
87k0735k84.fsf@systemreboot.net
When I guix pull to 6f75565b4ec3b8a7247699c327a3b3196c787f76, activate
the profile and run guix describe, it fails with an "unsupported
manifest format" error.

Toggle snippet (7 lines)
$ guix pull --commit=6f75565b4ec3b8a7247699c327a3b3196c787f76 -p
/tmp/test
$ source /tmp/test/etc/profile
$ guix describe
guix describe: error: unsupported manifest format

This happens because my guix-daemon writes a version 4 manifest and the
guix from commit 6f75565b4ec3b8a7247699c327a3b3196c787f76 only
understands a version 3 manifest.

This may be related to https://issues.guix.gnu.org/56545
(
CMAR8ZG5GOHP.1JV1OBJ4ILIP6@guix-aspire
Toggle quote (12 lines)
> Commit 4ff12d1de7cd617b791996ee7ca1240660b4c20e introduced that bug,
> which was fixed in c9fbd40785a99e13a59d8e530830ce85220a9871:
>
> https://issues.guix.gnu.org/56441
>
> ‘guix describe’ should show that you’re using a commit in that range.
>
> The solution is to run ‘time-machine’ from a commit outside that range,
> for instance with:
>
> guix time-machine -- time-machine -C channels.scm -- whatever

-- (
A
A
Arun Isaac wrote on 20 Aug 2022 11:45
87h7275ju2.fsf@systemreboot.net
Toggle quote (3 lines)
>> Commit 4ff12d1de7cd617b791996ee7ca1240660b4c20e introduced that bug,
>> which was fixed in c9fbd40785a99e13a59d8e530830ce85220a9871:

The failing commit 6f75565b4ec3b8a7247699c327a3b3196c787f76 is not in
that range, if that's what you are saying.
(
CMAS6K8X8GJ7.2SYAYIMAKEXZ4@guix-aspire
Oops, I didn't read the issue properly and assumed it was just a
duplicate of the time-machine unsupported manifest format bug by
someone who doesn't know about the workaround (there have been a
few of those); sorry!

-- (
J
J
Josselin Poiret wrote on 21 Aug 2022 09:00
87v8qmulmk.fsf@jpoiret.xyz
Hi Arun,

Arun Isaac <arunisaac@systemreboot.net> writes:

Toggle quote (4 lines)
> This happens because my guix-daemon writes a version 4 manifest and the
> guix from commit 6f75565b4ec3b8a7247699c327a3b3196c787f76 only
> understands a version 3 manifest.

From what I can gather from looking at the code, the patch at [1]
should've fixed this issue. If that's not the case I suggest re-opening
it.


--
Josselin Poiret
Z
Z
zimoun wrote on 29 Aug 2022 16:59
(name . Ludovic Courtès)(address . ludo@gnu.org)
87v8qbumcn.fsf@gmail.com
Hi Arun,

On sam., 20 août 2022 at 15:07, Arun Isaac <arunisaac@systemreboot.net> wrote:
Toggle quote (16 lines)
> When I guix pull to 6f75565b4ec3b8a7247699c327a3b3196c787f76, activate
> the profile and run guix describe, it fails with an "unsupported
> manifest format" error.
>
> --8<---------------cut here---------------start------------->8---
> $ guix pull --commit=6f75565b4ec3b8a7247699c327a3b3196c787f76 -p
> /tmp/test
> $ source /tmp/test/etc/profile
> $ guix describe
> guix describe: error: unsupported manifest format
> --8<---------------cut here---------------end--------------->8---
>
> This happens because my guix-daemon writes a version 4 manifest and the
> guix from commit 6f75565b4ec3b8a7247699c327a3b3196c787f76 only
> understands a version 3 manifest.

I do not think it is related to guix-daemon and I think it is expected;
indeed it could be considered as a bug. The command-line,

guix pull --commit=xyz -p /tmp/test

writes /tmp/test/manifest using the current Guix (say manifest 4) and
not using Guix at commit xyz (say manifest 3). Contrary to “guix
time-machine --commit=xyz”.

Toggle snippet (34 lines)
$ cat ~/.cache/guix/inferiors/cfcv5rt7xiax6pvdqwoad3hdrsqrpl34z2tufvtcb7nspeum5cba/manifest
;; This file was automatically generated and is for internal use only.
;; It cannot be passed to the '--manifest' option.
;; Run 'guix package --export-manifest' if you want to export a file
;; suitable for '--manifest'.

(manifest
(version 3)
(packages
(("guix"
"6f75565"
"out"
"/gnu/store/3nfgbg6nd6vq9im8fp97h6h5zm1rvhzh-guix-6f75565b4"
(propagated-inputs ())
(search-paths ())
(properties
(source
(repository
(version 0)
(url "https://git.savannah.gnu.org/git/guix.git")
(branch #f)
(commit
"6f75565b4ec3b8a7247699c327a3b3196c787f76")
(name guix)
(introduction
(channel-introduction
(version 0)
(commit
"9edb3f66fd807b096b48283debdcddccfea34bad")
(signer
"BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA"))))))))))


Cheers,
simon
A
A
Arun Isaac wrote on 29 Aug 2022 21:37
87y1v6yh75.fsf@systemreboot.net
Thanks, Josselin! I have asked at #56441 whether it may be reopened.
A
A
Arun Isaac wrote on 29 Aug 2022 21:41
(name . Ludovic Courtès)(address . ludo@gnu.org)
87v8qaygzo.fsf@systemreboot.net
Hi zimoun,

Toggle quote (9 lines)
> I do not think it is related to guix-daemon and I think it is expected;
> indeed it could be considered as a bug. The command-line,
>
> guix pull --commit=xyz -p /tmp/test
>
> writes /tmp/test/manifest using the current Guix (say manifest 4) and
> not using Guix at commit xyz (say manifest 3). Contrary to “guix
> time-machine --commit=xyz”.

Ah, that makes sense! Any ideas as to how this issue might be fixed?

Thanks,
Arun
Z
Z
zimoun wrote on 29 Aug 2022 23:36
878rn6vij2.fsf@gmail.com
Hi,

On mar., 30 août 2022 at 01:07, Arun Isaac <arunisaac@systemreboot.net> wrote:

Toggle quote (2 lines)
> Thanks, Josselin! I have asked at #56441 whether it may be reopened.

From my understanding, it is another side effect of
4ff12d1de7cd617b791996ee7ca1240660b4c20e. Commit
9b8c442b254b82196fe2492142b3c3bbbd891a1b is the parent of 4ff12d.


Using a recent commit,

Toggle snippet (8 lines)
$ guix describe
Generation 6 août 19 2022 12:36:01 (current)
guix 65cabb0
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: 65cabb010e3388d10f9b25ec560bfcfab5f810d4

‘generate-package-cache’ passes…

Toggle snippet (8 lines)
$ guix pull --commit=9b8c442b254b82196fe2492142b3c3bbbd891a1b -p /tmp/old-ko-describe

[...]

$ /tmp/old-ko-describe/bin/guix describe
guix describe: error: unsupported manifest format

…but not “guix describe”. Indeed, version 4:

Toggle snippet (6 lines)
$ cat /tmp/old-ko-describe/manifest | grep -A 1 '(manifest'
(manifest
(version 4)


Note that,

Toggle snippet (27 lines)
$ guix pull --commit=4ff12d1de7cd617b791996ee7ca1240660b4c20e -p /tmp/old-ok

$ /tmp/old-ok/bin/guix describe
Generation 1 août 29 2022 22:49:56 (current)
guix 4ff12d1
repository URL: https://git.savannah.gnu.org/git/guix.git
commit: 4ff12d1de7cd617b791996ee7ca1240660b4c20e

$ /tmp/old-ok/bin/guix pull --commit=9b8c442b254b82196fe2492142b3c3bbbd891a1b -p /tmp/old-ko
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
Building from this channel:
guix https://git.savannah.gnu.org/git/guix.git 9b8c442
Computing Guix derivation for 'x86_64-linux'... -
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0%
The following derivation will be built:
/gnu/store/r5qk23fibxn5ryd2k7b8qkbryqv4m3ds-profile.drv

building package cache...
|builder for `/gnu/store/19nk2x26s0dp68r7d36ifbg0ck0q3xps-guix-package-cache.drv' failed to produce output path `/gnu/store/axqgrls563slnp76x60dqlv7sdwcm2ly-guix-package-cache'
build of /gnu/store/19nk2x26s0dp68r7d36ifbg0ck0q3xps-guix-package-cache.drv failed
View build log at '/var/log/guix/drvs/19/nk2x26s0dp68r7d36ifbg0ck0q3xps-guix-package-cache.drv.gz'.
cannot build derivation `/gnu/store/r5qk23fibxn5ryd2k7b8qkbryqv4m3ds-profile.drv': 1 dependencies couldn't be built
guix pull: error: build of `/gnu/store/r5qk23fibxn5ryd2k7b8qkbryqv4m3ds-profile.drv' failed


Well, it appears to me easier if bug#57306 remains closed since ’guix
time-machine’ is fixed; as it was the subject.


Cheers,
simon

A
A
Arun Isaac wrote on 30 Aug 2022 18:42
87mtbly97h.fsf@systemreboot.net
Hi zimoun,

Toggle quote (3 lines)
> Well, it appears to me easier if bug#57306 remains closed since ’guix
> time-machine’ is fixed; as it was the subject.

I think you mean that bug #56441 should remain closed. Bug #56441 was
about guix time-machine. Bug #57306 is the current bug about guix pull.

Regards,
Arun
Z
Z
zimoun wrote on 30 Aug 2022 19:20
86k06pd4xj.fsf@gmail.com
Hi,

On Tue, 30 Aug 2022 at 22:12, Arun Isaac <arunisaac@systemreboot.net> wrote:

Toggle quote (3 lines)
> I think you mean that bug #56441 should remain closed. Bug #56441 was
> about guix time-machine. Bug #57306 is the current bug about guix pull.

Yes, sorry for the confusion.


Cheers,
simon
L
L
Ludovic Courtès wrote on 31 Aug 2022 12:35
control message for bug #57306
(address . control@debbugs.gnu.org)
871qswd7kp.fsf@gnu.org
severity 57306 important
quit
L
L
Ludovic Courtès wrote on 31 Aug 2022 13:06
Re: bug#57306: guix pull to old commit fails due to unsupported manifest format
(name . Arun Isaac)(address . arunisaac@systemreboot.net)
87bks0brkj.fsf@gnu.org
Hi,

Arun Isaac <arunisaac@systemreboot.net> skribis:

Toggle quote (11 lines)
>> I do not think it is related to guix-daemon and I think it is expected;
>> indeed it could be considered as a bug. The command-line,
>>
>> guix pull --commit=xyz -p /tmp/test
>>
>> writes /tmp/test/manifest using the current Guix (say manifest 4) and
>> not using Guix at commit xyz (say manifest 3). Contrary to “guix
>> time-machine --commit=xyz”.
>
> Ah, that makes sense! Any ideas as to how this issue might be fixed?

I fixed it in 67a6828b2bb821274757f686f7c685b664339a96 using the same
trick as earlier.

Thanks!

Ludo’.
Closed
Z
Z
zimoun wrote on 31 Aug 2022 15:15
(address . 57306-done@debbugs.gnu.org)
86zgfkblks.fsf@gmail.com
Hi Ludo,

On Wed, 31 Aug 2022 at 13:06, Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (3 lines)
> I fixed it in 67a6828b2bb821274757f686f7c685b664339a96 using the same
> trick as earlier.

It means version 3 is used all the time, right? Well, I miss when or
where version 4 is used then.

Toggle snippet (43 lines)
$ for i in $(seq 4 9); \
do
grep -A 5 '(manifest' \
/var/guix/profiles/per-user/simon/current-guix-$i-link/manifest \
;done
(manifest
(version 3)
(packages
(("guix"
"06493e7"
"out"
(manifest
(version 4)
(packages
(("guix"
"8f0d45c"
"out"
(manifest
(version 4)
(packages
(("guix"
"65cabb0"
"out"
(manifest
(version 4)
(packages
(("guix"
"67a6828"
"out"
(manifest
(version 3)
(packages
(("guix"
"0bb0e84"
"out"
(manifest
(version 3)
(packages
(("guix"
"23152ff"
"out"

From my understanding, set #:format-version to 3 should only be
considered when <hash> is a parent/ancestor of current commit in
’--commit=<hash>’.

Well, I do not remember all the discussion about --allow-downgrades.
For instance, why is

$ guix pull --commit=6f75565b -p /tmp/test

not complaining about downgrade? Because it is a downgrade. :-)


I think version 3 should be only used when the option --allow-downgrades
is provided.


Cheers,
simon
Closed
A
A
Arun Isaac wrote on 31 Aug 2022 15:38
(name . Ludovic Courtès)(address . ludo@gnu.org)
8735dcy1mk.fsf@systemreboot.net
Toggle quote (3 lines)
> I fixed it in 67a6828b2bb821274757f686f7c685b664339a96 using the same
> trick as earlier.

Works now, thank you!
Closed
L
L
Ludovic Courtès wrote on 1 Sep 2022 09:42
(name . zimoun)(address . zimon.toutoune@gmail.com)
87y1v37d87.fsf@gnu.org
Hi,

zimoun <zimon.toutoune@gmail.com> skribis:

Toggle quote (7 lines)
> On Wed, 31 Aug 2022 at 13:06, Ludovic Courtès <ludo@gnu.org> wrote:
>
>> I fixed it in 67a6828b2bb821274757f686f7c685b664339a96 using the same
>> trick as earlier.
>
> It means version 3 is used all the time, right?

Yes.

Toggle quote (2 lines)
> Well, I miss when or where version 4 is used then.

Generations that were created with a slightly older Guix have a
version-4 manifest.

Toggle quote (4 lines)
> From my understanding, set #:format-version to 3 should only be
> considered when <hash> is a parent/ancestor of current commit in
> ’--commit=<hash>’.

Here #:format-version 3 is unconditional. That avoids having to make
assumptions about whether or not the target commit understands newer
format versions.

But you’re right: a refinement would be to use version 3 only when
targeting an ancestor. I don’t think it’s worth the trouble though.

Toggle quote (7 lines)
> Well, I do not remember all the discussion about --allow-downgrades.
> For instance, why is
>
> $ guix pull --commit=6f75565b -p /tmp/test
>
> not complaining about downgrade? Because it is a downgrade. :-)

Whether it’s a downgrade depends on what’s in /tmp/test when you run it.

Thanks,
Ludo’.
Closed
Z
Z
zimoun wrote on 1 Sep 2022 10:50
(name . Ludovic Courtès)(address . ludo@gnu.org)
86r10vbhqz.fsf@gmail.com
Hi Ludo,

Thanks for explaining.

On Thu, 01 Sep 2022 at 09:42, Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (9 lines)
>> It means version 3 is used all the time, right?
>
> Yes.
>
>> Well, I miss when or where version 4 is used then.
>
> Generations that were created with a slightly older Guix have a
> version-4 manifest.

It means that the manifest of ~/.config/current is fixed “forever“ to
version 3. And version 4 is only used by other profiles, e.g., created
by ’guix package’.


Toggle quote (11 lines)
>> From my understanding, set #:format-version to 3 should only be
>> considered when <hash> is a parent/ancestor of current commit in
>> ’--commit=<hash>’.
>
> Here #:format-version 3 is unconditional. That avoids having to make
> assumptions about whether or not the target commit understands newer
> format versions.
>
> But you’re right: a refinement would be to use version 3 only when
> targeting an ancestor. I don’t think it’s worth the trouble though.

Ok, yeah it makes sense. The question could be revisited when the
manifest of the profile ~/.config/current would require a version
update.


Cheers,
simon
Closed
?