Subject: Re: bug#49801: Guix time machine provenance/manifest reproducibility issue?

From: zimoun <[email-masked]>
Date: Tue, 17 Aug 2021 14:11:32 +0200

Hi,

Thanks for the report.

On Sun, 01 Aug 2021 at 02:21, Denis 'GNUtoo' Carikli <[email-masked]> wrote:

> Diffing the two provenance files gives that:
>> +++
>> bfxvk59q0m034iyq5zkk841zkisayyjl-tarball-pack/gnu/store/216jiimdyw7zyx8s9b3fz67aw69ydkvw-profile/manifest
>> 1970-01-01 01:00:01.000000000 +0100 @@ -15,9 +15,10 @@ (repository
>>              (version 0)
>>              (url "https://git.savannah.gnu.org/git/guix.git")
>> -            (branch "master")
>> +            (branch #f)
>>              (commit
>>                "f9bd4621dd92a9415276706b476b9bd2973411fa")
>> +            (name guix)
>>              (introduction
>>                (channel-introduction
>>                  (version 0)

Well, I think it comes from ’channel-list’ in the ’time-machine’.
Specifically, it reads in guix/scripts/pull.scm:

--8<---------------cut here---------------start------------->8---
                      (channel (inherit guix)
                               (url url) (commit commit) (branch #f)))
--8<---------------cut here---------------end--------------->8---

other said, the name of the branch is “lost”.  Hum, I do not know if
this is done on purpose or not.  Maybe this change

--8<---------------cut here---------------start------------->8---
             (cons (match ref
                     (('commit . commit)
                      (channel (inherit guix)
                               (url url) (commit commit))
                     (('branch . branch)
                      (channel (inherit guix)
                               (url url) (commit #f) (branch branch)))
                     (#f
                      (channel (inherit guix) (url url))))
                   (remove guix-channel? channels))
--8<---------------cut here---------------end--------------->8---

is enough.  But, I do not know what would happens for:

  guix pull --commit=<hash>

where <hash> is not a commit from the branch master.

All the best,
simon