GNU bug report logs - #77819
[PATCH] guix-install.sh: spin-off zzz-guix.sh script out of the installer.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Cayetano Santos <csantosb@HIDDEN>; Keywords: patch; dated Tue, 15 Apr 2025 08:25:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 77819 <at> debbugs.gnu.org:


Received: (at 77819) by debbugs.gnu.org; 9 Nov 2025 12:26:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 09 07:26:33 2025
Received: from localhost ([127.0.0.1]:58706 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vI4V7-0008MI-HO
	for submit <at> debbugs.gnu.org; Sun, 09 Nov 2025 07:26:33 -0500
Received: from mailtransmit04.runbox.com ([2a0c:5a00:149::25]:47118)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <maxim@HIDDEN>)
 id 1vI4V4-0008MC-EN
 for 77819 <at> debbugs.gnu.org; Sun, 09 Nov 2025 07:26:32 -0500
Received: from mailtransmit03.runbox ([10.9.9.163] helo=aibo.runbox.com)
 by mailtransmit04.runbox.com with esmtps (TLS1.2) tls
 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93)
 (envelope-from <maxim@HIDDEN>)
 id 1vI4Uv-009wBL-8a; Sun, 09 Nov 2025 13:26:21 +0100
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
 d=guixotic.coop; s=selector2; h=Content-Type:MIME-Version:Message-ID:Date:
 References:In-Reply-To:Subject:Cc:To:From;
 bh=DqRQw6gr4k9yHr1duEna8C4RDnN9ccbZnZJny94SjLw=; b=gpHgfWQa6wnSS/9wADOpYZbM0M
 oLczP5S/mCEh/4xzO10dgQ+5BYb1cw+Ms44R2Rx8CLgH8IyEovbJ/EvsczyY4sgjjBws1voTEF0Q2
 V5vx9v72QliryPPIuPsVWfgtpKaTOmbHlEq2yqYGnynf9Ccdo7k1HxRzalEBauE5yeEmjUQn0LWfP
 buREquM3uFk46jnBnETeS4s9j3WBEeaJ+YfB9rlcD6My5SKZG9FYDaq//NpWKFOqvQVMzeUizP2i2
 XsevcqEwIiKOy+3tUPYgRR9ETaMLhyUm36FVlmGKZq89woj8/G8z3KNptEO9Tf072Do0H9VpEeqjY
 9ZYc6l2w==;
Received: from [10.9.9.72] (helo=submission01.runbox)
 by mailtransmit03.runbox with esmtp (Exim 4.86_2)
 (envelope-from <maxim@HIDDEN>)
 id 1vI4Uu-0007j4-R4; Sun, 09 Nov 2025 13:26:20 +0100
Received: by submission01.runbox with esmtpsa [Authenticated ID (1476852)]
 (TLS1.2:ECDHE_SECP256R1__RSA_SHA256__AES_256_GCM:256) (Exim 4.93)
 id 1vI4Up-007MGK-4n; Sun, 09 Nov 2025 13:26:17 +0100
From: Maxim Cournoyer <maxim@HIDDEN>
To: Cayetano Santos <csantosb@HIDDEN>
Subject: Re: [bug#77819] [PATCH] guix-install.sh: spin-off zzz-guix.sh
 script out of the installer.
In-Reply-To: <ef4d7602b74edd74f64934a4a629e9d3a78133f9.1744705193.git.csantosb@HIDDEN>
 (Cayetano Santos's message of "Tue, 15 Apr 2025 10:19:53 +0200")
Organization: Guixotic
References: <ef4d7602b74edd74f64934a4a629e9d3a78133f9.1744705193.git.csantosb@HIDDEN>
Date: Sun, 09 Nov 2025 21:26:10 +0900
Message-ID: <874ir39yu5.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 77819
Cc: 77819 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hi,

Cayetano Santos <csantosb@HIDDEN> writes:

> The functionality in the install script remains the same, while this
> change will contribute to follow upgrades in zzz-guix.sh.
>
> Change-Id: Ieed963cccb445034532ec08ee2731926c791d26a
> ---
>
> When using guix on a foreign distribution, the zzz-guix.sh is copied to /etc/profile.d.
>
> When this file is renamed or updated, this modification remains unnoticed, as guix pull does not have any effect on that. This is a source of potential issues.

I think it'll still largely remain unnoticed for most users, even if
it's in a separate file ;-).

> Spinning-off the zzz-guix.sh out of the installer script mitigates this situation, as users will be able to manually update it, following changes.

It's easier if you know you need to do that, yes.  But if you know, then
maybe extracting the hereto string from the installer script is not that
much difficult that copying a distinct file.

> In current situation, users need to follow changes in the whole installer, searching for modifications in the relevant section, which is unfriendly.

I agree this is suboptimal, but I don't think this change should be
accepted as-is, because it'd means people would now need to download
both guix-install.sh and the new zzz-guix.sh separately, breaking old
expectation that guix-install.sh is self-contained.

Perhaps guix-install.sh could download the separate zzz-guix.sh script
itself?

-- 
Thanks,
Maxim




Information forwarded to guix-patches@HIDDEN:
bug#77819; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 Apr 2025 08:24:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 15 04:24:15 2025
Received: from localhost ([127.0.0.1]:50476 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u4baZ-0007Ao-32
	for submit <at> debbugs.gnu.org; Tue, 15 Apr 2025 04:24:15 -0400
Received: from lists.gnu.org ([2001:470:142::17]:57022)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <csantosb@HIDDEN>)
 id 1u4baU-0007AS-MB
 for submit <at> debbugs.gnu.org; Tue, 15 Apr 2025 04:24:13 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <csantosb@HIDDEN>)
 id 1u4baP-0005QJ-86
 for guix-patches@HIDDEN; Tue, 15 Apr 2025 04:24:05 -0400
Received: from devianza.investici.org ([2c0f:f930:0:4::108])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <csantosb@HIDDEN>)
 id 1u4baM-0003RI-7O
 for guix-patches@HIDDEN; Tue, 15 Apr 2025 04:24:04 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org;
 s=stigmate; t=1744705438;
 bh=8InCb6mxDelspKYi3kW7gyWDE449wluaHeabcYIrmMc=;
 h=From:To:Cc:Subject:Date:From;
 b=FTe2ExMB8GU8yw7XyqejcqF784aJrwZ9ekd4BF3DQtsVNtAO8qyuBe0mMeBe8Lvxu
 tfxG91t3ki5Ikb8P3qUSstqPArdCAADRdga0/6yYE+FmvHgB3qomGAa4h0gRpD/XZP
 bMbLwBOGGz7L3SWLmknMBSuoyNnhjC029njJtUGU=
Received: from mx2.investici.org (unknown [127.0.0.1])
 by devianza.investici.org (Postfix) with ESMTP id 4ZcHHf0NlMz6vLt;
 Tue, 15 Apr 2025 08:23:58 +0000 (UTC)
Received: from [198.167.222.108] (mx2.investici.org [198.167.222.108])
 (Authenticated sender: cayetano.santos@HIDDEN) by localhost (Postfix)
 with ESMTPSA id 4ZcHHd5sF8z6vLq; 
 Tue, 15 Apr 2025 08:23:57 +0000 (UTC)
From: Cayetano Santos <csantosb@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] guix-install.sh: spin-off zzz-guix.sh script out of the
 installer.
Date: Tue, 15 Apr 2025 10:19:53 +0200
Message-ID: <ef4d7602b74edd74f64934a4a629e9d3a78133f9.1744705193.git.csantosb@HIDDEN>
X-Mailer: git-send-email 2.49.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=2c0f:f930:0:4::108;
 envelope-from=csantosb@HIDDEN; helo=devianza.investici.org
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
Cc: Cayetano Santos <csantosb@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)

The functionality in the install script remains the same, while this
change will contribute to follow upgrades in zzz-guix.sh.

Change-Id: Ieed963cccb445034532ec08ee2731926c791d26a
---

When using guix on a foreign distribution, the zzz-guix.sh is copied to /etc/profile.d.

When this file is renamed or updated, this modification remains unnoticed, as guix pull does not have any effect on that. This is a source of potential issues.

Spinning-off the zzz-guix.sh out of the installer script mitigates this situation, as users will be able to manually update it, following changes.

In current situation, users need to follow changes in the whole installer, searching for modifications in the relevant section, which is unfriendly.

 etc/guix-install.sh | 55 +--------------------------------------------
 etc/zzz-guix.sh     | 52 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 53 insertions(+), 54 deletions(-)
 create mode 100644 etc/zzz-guix.sh

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index b5d833cd64..388d2cc9be 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -737,60 +737,7 @@ sys_create_init_profile()
 { # Define for better desktop integration
   # This will not take effect until the next shell or desktop session!
     [ -d "/etc/profile.d" ] || mkdir /etc/profile.d # Just in case
-    cat <<"EOF" > /etc/profile.d/zzz-guix.sh
-# Explicitly initialize XDG base directory variables to ease compatibility
-# with Guix System: see <https://issues.guix.gnu.org/56050#3>.
-export XCURSOR_PATH="${XCURSOR_PATH:-/usr/local/share/icons:/usr/share/icons}"
-export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
-export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
-export XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}"
-export XDG_DATA_DIRS="${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/}"
-export XDG_CONFIG_DIRS="${XDG_CONFIG_DIRS:-/etc/xdg}"
-export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
-# no default for XDG_RUNTIME_DIR (depends on foreign distro for semantics)
-
-# `guix pull` profile
-GUIX_PROFILE="$HOME/.config/guix/current"
-export PATH="$GUIX_PROFILE/bin${PATH:+:}$PATH"
-# Add to INFOPATH and MANPATH so the latest Guix documentation is available to
-# info and man readers.  When INFOPATH is unset, add a trailing colon so Emacs
-# searches 'Info-default-directory-list'.  When MANPATH is unset, add a
-# trailing colon so the system default search path is used.
-export INFOPATH="$GUIX_PROFILE/share/info:$INFOPATH"
-export MANPATH="$GUIX_PROFILE/share/man:$MANPATH"
-# Expose the latest Guix modules to Guile so guix shell and repls spawned by
-# e.g. Geiser work out of the box.
-export GUILE_LOAD_PATH="$GUIX_PROFILE/share/guile/site/3.0${GUILE_LOAD_PATH:+:}$GUILE_LOAD_PATH"
-export GUILE_LOAD_COMPILED_PATH="$GUIX_PROFILE/lib/guile/3.0/site-ccache${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH"
-
-# User's default profile, if it exists
-GUIX_PROFILE="$HOME/.guix-profile"
-if [ -L "$GUIX_PROFILE" ]; then
-  . "$GUIX_PROFILE/etc/profile"
-
-  # see info '(guix) Application Setup'
-  export GUIX_LOCPATH="$GUIX_PROFILE/lib/locale${GUIX_LOCPATH:+:}$GUIX_LOCPATH"
-
-  # Documentation search paths may be handled by $GUIX_PROFILE/etc/profile if
-  # the user installs info and man readers via Guix.  If the user doesn’t,
-  # explicitly add to them so documentation for software from ‘guix install’
-  # is available to the system info and man readers.
-  case $INFOPATH in
-    *$GUIX_PROFILE/share/info*) ;;
-    *) export INFOPATH="$GUIX_PROFILE/share/info:$INFOPATH" ;;
-  esac
-  case $MANPATH in
-    *$GUIX_PROFILE/share/man*) ;;
-    *) export MANPATH="$GUIX_PROFILE/share/man:$MANPATH"
-  esac
-fi
-
-# NOTE: Guix Home handles its own profile initialization in ~/.profile. See
-# info '(guix) Configuring the Shell'.
-
-# Clean up after ourselves.
-unset GUIX_PROFILE
-EOF
+    cp zzz-guix.sh /etc/profile.d
 }
 
 sys_create_shell_completion()
diff --git a/etc/zzz-guix.sh b/etc/zzz-guix.sh
new file mode 100644
index 0000000000..2d635433bc
--- /dev/null
+++ b/etc/zzz-guix.sh
@@ -0,0 +1,52 @@
+# Explicitly initialize XDG base directory variables to ease compatibility
+# with Guix System: see <https://issues.guix.gnu.org/56050#3>.
+export XCURSOR_PATH="${XCURSOR_PATH:-/usr/local/share/icons:/usr/share/icons}"
+export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
+export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
+export XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}"
+export XDG_DATA_DIRS="${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/}"
+export XDG_CONFIG_DIRS="${XDG_CONFIG_DIRS:-/etc/xdg}"
+export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
+# no default for XDG_RUNTIME_DIR (depends on foreign distro for semantics)
+
+# `guix pull` profile
+GUIX_PROFILE="$HOME/.config/guix/current"
+export PATH="$GUIX_PROFILE/bin${PATH:+:}$PATH"
+# Add to INFOPATH and MANPATH so the latest Guix documentation is available to
+# info and man readers.  When INFOPATH is unset, add a trailing colon so Emacs
+# searches 'Info-default-directory-list'.  When MANPATH is unset, add a
+# trailing colon so the system default search path is used.
+export INFOPATH="$GUIX_PROFILE/share/info:$INFOPATH"
+export MANPATH="$GUIX_PROFILE/share/man:$MANPATH"
+# Expose the latest Guix modules to Guile so guix shell and repls spawned by
+# e.g. Geiser work out of the box.
+export GUILE_LOAD_PATH="$GUIX_PROFILE/share/guile/site/3.0${GUILE_LOAD_PATH:+:}$GUILE_LOAD_PATH"
+export GUILE_LOAD_COMPILED_PATH="$GUIX_PROFILE/lib/guile/3.0/site-ccache${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH"
+
+# User's default profile, if it exists
+GUIX_PROFILE="$HOME/.guix-profile"
+if [ -L "$GUIX_PROFILE" ]; then
+  . "$GUIX_PROFILE/etc/profile"
+
+  # see info '(guix) Application Setup'
+  export GUIX_LOCPATH="$GUIX_PROFILE/lib/locale${GUIX_LOCPATH:+:}$GUIX_LOCPATH"
+
+  # Documentation search paths may be handled by $GUIX_PROFILE/etc/profile if
+  # the user installs info and man readers via Guix.  If the user doesn’t,
+  # explicitly add to them so documentation for software from ‘guix install’
+  # is available to the system info and man readers.
+  case $INFOPATH in
+    *$GUIX_PROFILE/share/info*) ;;
+    *) export INFOPATH="$GUIX_PROFILE/share/info:$INFOPATH" ;;
+  esac
+  case $MANPATH in
+      *$GUIX_PROFILE/share/man*) ;;
+      *) export MANPATH="$GUIX_PROFILE/share/man:$MANPATH"
+  esac
+fi
+
+# NOTE: Guix Home handles its own profile initialization in ~/.profile. See
+# info '(guix) Configuring the Shell'.
+
+# Clean up after ourselves.
+unset GUIX_PROFILE

base-commit: 287aec56a53fbd66492711c375d0b39ccb6c1590
--
2.49.0





Acknowledgement sent to Cayetano Santos <csantosb@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#77819; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 9 Nov 2025 12:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.