Subject: bug#67707: Fresh installation leaks details about ISO build environment

From: Ludovic Courtès <[email-masked]>
Date: Mon, 05 May 2025 08:44:21 +0200

Hi,

Rutherther via Bug reports for GNU Guix <[email-masked]> writes:

> What I had in mind in the first place was replacing it just in the
> install.scm, I didn't even think about changing it here.

Oh right, it’s probably best to change it there.  Something like this?

diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index 15ea401f1c..50320a6698 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -35,6 +35,11 @@ (define-module (gnu system install)
   #:use-module ((guix packages) #:select (package-version supported-package?))
   #:use-module (guix platform)
   #:use-module (guix utils)
+  #:use-module (guix packages)
+  #:use-module ((guix channels)
+                #:select (%default-guix-channel
+                          channel
+                          channel-commit))
   #:use-module (gnu installer)
   #:use-module (gnu system locale)
   #:use-module (gnu services avahi)
@@ -392,7 +397,13 @@ (define* (%installation-services #:key (system (or (and=>
 
                      ;; Install and run the current Guix rather than an older
                      ;; snapshot.
-                     (guix (current-guix))))
+                     (guix (let ((guix (current-guix)))
+                             (package
+                               (inherit guix)
+                               (source (channel
+                                        (inherit %default-guix-channel)
+                                        (commit (channel-commit
+                                                 (package-source guix))))))))))
 
            ;; Start udev so that useful device nodes are available.
            ;; Use device-mapper rules for cryptsetup & co; enable the CRDA for

> Related to this issue, I am playing with an idea to introduce a new
> option to guix system reconfigure that would skip the forward update
> check. While it makes sense, especially lately it shows how problematic
> it can get. […]

I’m not sure I follow: even if one uses a mirror of Savannah, downgrade
prevention works fine.  Or are you referring to some other motivation?

Thanks,
Ludo’.