Subject: bug#74112: closed (Re: [bug#74112] bug#74204: Guix is not reproducible)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 05 Nov 2024 15:26:02 +0000

Your bug report

#74112: [PATCH] Fix determinism issue in guix package

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
74112: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74112
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#74112] bug#74204: Guix is not reproducible
From: Hilton Chain <[email-masked]>
To: Jakob Kirsch <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Tue, 05 Nov 2024 23:25:29 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello again,

On Tue, 05 Nov 2024 18:31:04 +0800,
Hilton Chain via Guix-patches via wrote:
>
> Hi Jakob,
>
> On Tue, 05 Nov 2024 02:38:34 +0800,
> Jakob Kirsch via Bug reports for GNU Guix wrote:
> >
> > I've recently noticed that `guix challenge guix` fails since guix isn't
> > reproducible at the moment. As someone pointed out on XMPP, this is due to
> > parallelism issues with Guile so running `guix build guix --no-grafts
> > --cores=1 --check` reliably produces the same output.
> >
> > I've sent a simple patch in #74112 to address this and I think this is
> > important since the main guix package should definitely be reproducible so it
> > can be trusted.
>
> I can confirm the reproducibility issue.
>
> I have two x86_64-linux machines building guix to verify the fix, I'll apply
> your patch once they produce matching outputs.

Took me quite a while to build 5 rounds. :)

--8<---------------cut here---------------start------------->8---
$ guix hash --serializer=nar /gnu/store/fs7x07jfn7igpkwv3alrs9by21q70y13-guix-1.4.0-26.5ab3c4c
0kh87wb4qn97kwzrf4igal71cjvv143j6jr2y3dwfzcy1madj1ll
--8<---------------cut here---------------end--------------->8---

Applied #74112 as 4c56d0cccdc44e12484b26332715f54768738c5f, thanks!

Subject: [PATCH] Fix determinism issue in guix package
From: Jakob Kirsch <[email-masked]>
To: [email-masked]
Date: Wed, 30 Oct 2024 19:06:57 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

I've recently noticed that `guix challenge guix` returns different hashes for each substitute server and also every build with `guix build --no-grafts guix` fails.
Running `guix build --no-grafts guix --cores=1` seems to reliably produce the same hash though. As someone pointed out on XMPP, Guile seems to have issues with parallel builds so this patch disables them for the guix package.

I think this has high importance because the main guix package should be reproducible in order to trust the whole chain of packages.
From 0f3df56dd0c430c09ba2839c9e2d5b32948201ae Mon Sep 17 00:00:00 2001
Message-ID: <0f3d[email-masked]>
From: Jakob Kirsch <[email-masked]>
Date: Wed, 30 Oct 2024 19:02:15 +0100
Subject: [PATCH v1] gnu: guix: Fix determinism issue

* gnu/packages/package-management.scm (guix): Fix determinism issue by disabling parallel build.

Change-Id: Ie28e16ed1f15cbc0da0c0d70b2c461e2baa3ff0a
---
 gnu/packages/package-management.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
index 1763d2d59f..478a74385b 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -199,7 +199,8 @@ (define-public guix
                 (file-name (string-append "guix-" version "-checkout"))))
       (build-system gnu-build-system)
       (arguments
-       `(#:configure-flags (list
+       `(#:parallel-build? #false ; for reproducibility
+         #:configure-flags (list

                             ;; Provide channel metadata for 'guix describe'.
                             ;; Don't pass '--with-channel-url' and

base-commit: d6f775c30c6f47e174f6110d1089edc6315600e4
--
2.46.0