GNU logs - #76082, boring messages


Message sent to andrew@HIDDEN, janneke@HIDDEN, ludo@HIDDEN, tanguy@HIDDEN, vagrant@HIDDEN, guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#76082] [PATCH 0/9] Improve profile initialization on foreign distros plus misc improvements
Resent-From: Liam Hupfer <liam@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: andrew@HIDDEN, janneke@HIDDEN, ludo@HIDDEN, tanguy@HIDDEN, vagrant@HIDDEN, guix-patches@HIDDEN
Resent-Date: Thu, 06 Feb 2025 04:09:02 +0000
Resent-Message-ID: <handler.76082.B.17388148986225 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 76082
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 76082 <at> debbugs.gnu.org
Cc: Liam Hupfer <liam@HIDDEN>, Andrew Tropin <andrew@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN>, Vagrant Cascadian <vagrant@HIDDEN>
X-Debbugs-Original-To: guix-patches@HIDDEN
X-Debbugs-Original-Xcc: Andrew Tropin <andrew@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN>, Vagrant Cascadian <vagrant@HIDDEN>
Received: via spool by submit <at> debbugs.gnu.org id=B.17388148986225
          (code B ref -1); Thu, 06 Feb 2025 04:09:02 +0000
Received: (at submit) by debbugs.gnu.org; 6 Feb 2025 04:08:18 +0000
Received: from localhost ([127.0.0.1]:53572 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tftBa-0001cL-Ao
	for submit <at> debbugs.gnu.org; Wed, 05 Feb 2025 23:08:18 -0500
Received: from lists.gnu.org ([2001:470:142::17]:38656)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <liam@HIDDEN>) id 1tftBV-0001ba-Gn
 for submit <at> debbugs.gnu.org; Wed, 05 Feb 2025 23:08:15 -0500
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 <liam@HIDDEN>) id 1tftB5-0006TL-HE
 for guix-patches@HIDDEN; Wed, 05 Feb 2025 23:07:52 -0500
Received: from out-183.mta0.migadu.com ([2001:41d0:1004:224b::b7])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <liam@HIDDEN>) id 1tftB2-0003su-GA
 for guix-patches@HIDDEN; Wed, 05 Feb 2025 23:07:47 -0500
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpfr.net; s=key1;
 t=1738814856;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding;
 bh=zzBZGsdwMx4Hn7vFE3kDoZ+JaiSZI9uKJcQ3dPnjaoE=;
 b=I5nIlOYwSJ9JRKs1T12hs6YGe42o+S7iCJRRM80PVmi7Ona1OAHF/l+4a+gm9xHJR4UCYj
 8kClSYTyoUz+UG9eYKxaciA5zMo+InjBTmUQ4t8lqvmh5K7xy8E1WtUIPJ1J7VvWDChLbw
 aHmtG6F08JKiVCaHDsF7UyRscZBWSgFc7EeZrEiaNvBIdi01zuaiJD6y7H6TFNtCTLZ7Dq
 Jk0KU0mnSg73BBzB2NIT24E9E3wDcALc7RY/VHqYdHsckjUrYsiE/XmE+Ynxn1xFhn6EOa
 J4I41tJraaPp00+P3TqMJH/oKR74/APTaDkYq1PeF9vza92YX7Sp7Qbgfek8FQ==
From: Liam Hupfer <liam@HIDDEN>
Date: Wed,  5 Feb 2025 22:07:20 -0600
Message-ID: <cover.1738814583.git.liam@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
Received-SPF: pass client-ip=2001:41d0:1004:224b::b7;
 envelope-from=liam@HIDDEN; helo=out-183.mta0.migadu.com
X-Spam_score_int: -16
X-Spam_score: -1.7
X-Spam_bar: -
X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1,
 DKIM_SIGNED=0.1, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
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 (/)

Hi Guix!  Hope those who attended enjoyed Guix Days and FOSDEM.  Looks
like the Whippet talk is the first recording from the DMC track to go
up!

This series modifies the /etc/profile.d/zzz-guix.sh deployed by
guix-install.sh (and tweaks Guix Home’s setup-environment script) to
make search path initialization a little more consistent based on my
experiences using Guix on NixOS and Ubuntu. Currently, new users tend to
end up with numerous duplicate search path entries, which can be
confusing when trying to grok profiles and search paths early on.

Ironically, NixOS and Ubuntu both ship “native” Guix packages.  I
figured I should start by improving the upstream installation script,
though, since it tends to inspire foreign distros’ Guix package recipes.
While I’m here, I did some general tidying as well.

The most contentious change is the removal of any attempt to initialize
Guix Home from /etc/profile.d/.  The rationale here is that Guix Home
has more in common with Guix System than the ‘guix pull’ and default
imperative user profiles.  Guix Home can do arbitrary things at profile
initialization.  It initializes itself in ~/.profile by default and
documents shell configuration to source ~.profile if the user doesn’t
also manage their shell with Guix Home.  Since Guix Home can manage
itself, we can keep it self-contained rather than trying to keep
/etc/profile.d/zzz-guix.sh in lockstep with Guix Home’s dedicated
initialization code.

I tested the updated install script in a Debian container via Incus (LXD
successor) and the updates to Guix Home via ‘./pre-inst-env guix home
container home-test.scm’ with a small home environment.  Additional
testing is appreciated, of course!

Along with the Guix Home team, Vagrant is Cc’d since these changes may
inform changes to the Debian package (thank you for developing it,
btw!).  I help maintain the NixOS module and plan to update it
accordingly once these changes make it through review.

Thanks!

Liam Hupfer (9):
  home: services: setup-environment: Use GUIX_PROFILE.
  home: services: Unset variables after profile init.
  home: services: setup-environment: Set GUIX_LOCPATH.
  guix-install.sh: Remove system-level Guix Home initialization.
  guix-install.sh: Improve Guix profile sourcing.
  guix-install.sh: Add to MANPATH.
  guix-install.sh: Appease shellcheck.
  guix-install.sh: Add msg helpers and use stderr consistently.
  guix-install.sh: Check for existing installation before downloading.

 etc/guix-install.sh          | 264 ++++++++++++++++++++---------------
 gnu/home/services.scm        |  32 +++--
 gnu/home/services/shells.scm |   3 +-
 3 files changed, 171 insertions(+), 128 deletions(-)


base-commit: 52c05f3b120e641c8bd2d68cfcf0d6af947de27b
-- 
2.47.1





Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Liam Hupfer <liam@HIDDEN>
Subject: bug#76082: Acknowledgement ([PATCH 0/9] Improve profile
 initialization on foreign distros plus misc improvements)
Message-ID: <handler.76082.B.17388148986225.ack <at> debbugs.gnu.org>
References: <cover.1738814583.git.liam@HIDDEN>
X-Gnu-PR-Message: ack 76082
X-Gnu-PR-Package: guix-patches
X-Gnu-PR-Keywords: patch
Reply-To: 76082 <at> debbugs.gnu.org
Date: Thu, 06 Feb 2025 04:09:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

As you requested using X-Debbugs-CC, your message was also forwarded to
  Andrew Tropin <andrew@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, =
Ludovic Court=C3=A8s <ludo@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN=
g>, Vagrant Cascadian <vagrant@HIDDEN>
(after having been given a bug report number, if it did not have one).

Your message has been sent to the package maintainer(s):
 guix-patches@HIDDEN

If you wish to submit further information on this problem, please
send it to 76082 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
76082: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D76082
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to andrew@HIDDEN, janneke@HIDDEN, ludo@HIDDEN, tanguy@HIDDEN, vagrant@HIDDEN, guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#76082] [PATCH 1/9] home: services: setup-environment: Use GUIX_PROFILE.
Resent-From: Liam Hupfer <liam@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: andrew@HIDDEN, janneke@HIDDEN, ludo@HIDDEN, tanguy@HIDDEN, vagrant@HIDDEN, guix-patches@HIDDEN
Resent-Date: Thu, 06 Feb 2025 04:26:02 +0000
Resent-Message-ID: <handler.76082.B76082.17388159349466 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 76082
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 76082 <at> debbugs.gnu.org
Cc: Liam Hupfer <liam@HIDDEN>, Andrew Tropin <andrew@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN>, Vagrant Cascadian <vagrant@HIDDEN>
X-Debbugs-Original-Xcc: Andrew Tropin <andrew@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN>, Vagrant Cascadian <vagrant@HIDDEN>
Received: via spool by 76082-submit <at> debbugs.gnu.org id=B76082.17388159349466
          (code B ref 76082); Thu, 06 Feb 2025 04:26:02 +0000
Received: (at 76082) by debbugs.gnu.org; 6 Feb 2025 04:25:34 +0000
Received: from localhost ([127.0.0.1]:53600 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tftSI-0002Sb-EL
	for submit <at> debbugs.gnu.org; Wed, 05 Feb 2025 23:25:34 -0500
Received: from out-171.mta0.migadu.com ([91.218.175.171]:61196)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <liam@HIDDEN>) id 1tftSF-0002SJ-6r
 for 76082 <at> debbugs.gnu.org; Wed, 05 Feb 2025 23:25:32 -0500
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpfr.net; s=key1;
 t=1738815922;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=gD9taRrXx1IHdbkvXIeQgchX6Q4e86rvdFcrPhkskMw=;
 b=p4RMizB7o5M60y9P19QV7Ddfhoy0KDPMixW01lVVV8rD3qoMMd//owwUixdH2qbFuD1oze
 bDhERCumGx6bChV0dPphpmzGYr0vk3RA4DHOBpKY6eBTeFm5+VnkL9UhDrvpbXs60yKhiS
 87RPP1rpx1xZs7nnpAgUaCMibbfIRe0OYqs0Ew17Se1zujixG+sHop+heuWr39BBtE/bmu
 VJqC4A5uC1Ir2idQ8Jtfg3EfoquSOLfIufpIWPnZltm8g5Dx/YpqO+JOMJHVwVhdspCbfg
 jB/ZS7LcaW8fGmN4gKo+0eF+l/lfXiUxNfpAoMjoJKvIZZ5P3BlNCSSXWo3JsQ==
From: Liam Hupfer <liam@HIDDEN>
Date: Wed,  5 Feb 2025 22:24:57 -0600
Message-ID: <2094e26655b1bdd87417b090ddda9761a0458d38.1738815703.git.liam@HIDDEN>
In-Reply-To: <cover.1738814583.git.liam@HIDDEN>
References: <cover.1738814583.git.liam@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Spam-Score: -0.7 (/)
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 (-)

setup-environment already defines this variable. Use it since it’s more
concise.

* gnu/home/services.scm (environment-variables->setup-environment-script):
Use GUIX_PROFILE.

Change-Id: Ib75d8df6294976f4e95cfa7d607dc0ba21ddd258
---
 gnu/home/services.scm | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/gnu/home/services.scm b/gnu/home/services.scm
index 39c9033ad6..bbf2ba2404 100644
--- a/gnu/home/services.scm
+++ b/gnu/home/services.scm
@@ -277,28 +277,28 @@ (define (environment-variables->setup-environment-script vars)
                              (display "\
 HOME_ENVIRONMENT=$HOME/.guix-home
 GUIX_PROFILE=\"$HOME_ENVIRONMENT/profile\"
-PROFILE_FILE=\"$HOME_ENVIRONMENT/profile/etc/profile\"
+PROFILE_FILE=\"$GUIX_PROFILE/etc/profile\"
 [ -f $PROFILE_FILE ] && . $PROFILE_FILE
 
 case $XDG_DATA_DIRS in
-  *$HOME_ENVIRONMENT/profile/share*) ;;
-  *) export XDG_DATA_DIRS=$HOME_ENVIRONMENT/profile/share:$XDG_DATA_DIRS ;;
+  *$GUIX_PROFILE/share*) ;;
+  *) export XDG_DATA_DIRS=$GUIX_PROFILE/share:$XDG_DATA_DIRS ;;
 esac
 case $MANPATH in
-  *$HOME_ENVIRONMENT/profile/share/man*) ;;
-  *) export MANPATH=$HOME_ENVIRONMENT/profile/share/man:$MANPATH
+  *$GUIX_PROFILE/share/man*) ;;
+  *) export MANPATH=$GUIX_PROFILE/share/man:$MANPATH
 esac
 case $INFOPATH in
-  *$HOME_ENVIRONMENT/profile/share/info*) ;;
-  *) export INFOPATH=$HOME_ENVIRONMENT/profile/share/info:$INFOPATH ;;
+  *$GUIX_PROFILE/share/info*) ;;
+  *) export INFOPATH=$GUIX_PROFILE/share/info:$INFOPATH ;;
 esac
 case $XDG_CONFIG_DIRS in
-  *$HOME_ENVIRONMENT/profile/etc/xdg*) ;;
-  *) export XDG_CONFIG_DIRS=$HOME_ENVIRONMENT/profile/etc/xdg:$XDG_CONFIG_DIRS ;;
+  *$GUIX_PROFILE/etc/xdg*) ;;
+  *) export XDG_CONFIG_DIRS=$GUIX_PROFILE/etc/xdg:$XDG_CONFIG_DIRS ;;
 esac
 case $XCURSOR_PATH in
-  *$HOME_ENVIRONMENT/profile/share/icons*) ;;
-  *) export XCURSOR_PATH=$HOME_ENVIRONMENT/profile/share/icons:$XCURSOR_PATH ;;
+  *$GUIX_PROFILE/share/icons*) ;;
+  *) export XCURSOR_PATH=$GUIX_PROFILE/share/icons:$XCURSOR_PATH ;;
 esac
 
 " port)

base-commit: 52c05f3b120e641c8bd2d68cfcf0d6af947de27b
-- 
2.47.1





Message sent to andrew@HIDDEN, janneke@HIDDEN, ludo@HIDDEN, tanguy@HIDDEN, vagrant@HIDDEN, guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#76082] [PATCH 2/9] home: services: Unset variables after profile init.
Resent-From: Liam Hupfer <liam@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: andrew@HIDDEN, janneke@HIDDEN, ludo@HIDDEN, tanguy@HIDDEN, vagrant@HIDDEN, guix-patches@HIDDEN
Resent-Date: Thu, 06 Feb 2025 04:27:01 +0000
Resent-Message-ID: <handler.76082.B76082.17388159689548 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 76082
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 76082 <at> debbugs.gnu.org
Cc: Liam Hupfer <liam@HIDDEN>, Andrew Tropin <andrew@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN>, Vagrant Cascadian <vagrant@HIDDEN>
X-Debbugs-Original-Xcc: Andrew Tropin <andrew@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN>, Vagrant Cascadian <vagrant@HIDDEN>
Received: via spool by 76082-submit <at> debbugs.gnu.org id=B76082.17388159689548
          (code B ref 76082); Thu, 06 Feb 2025 04:27:01 +0000
Received: (at 76082) by debbugs.gnu.org; 6 Feb 2025 04:26:08 +0000
Received: from localhost ([127.0.0.1]:53608 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tftSp-0002Tv-Tx
	for submit <at> debbugs.gnu.org; Wed, 05 Feb 2025 23:26:08 -0500
Received: from out-174.mta0.migadu.com ([2001:41d0:1004:224b::ae]:28123)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <liam@HIDDEN>) id 1tftSo-0002TC-3R
 for 76082 <at> debbugs.gnu.org; Wed, 05 Feb 2025 23:26:06 -0500
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpfr.net; s=key1;
 t=1738815953;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=Dwiy5+CqTIh8K5J1sqV4Ik5ui8H+88jsUR933dn+I0k=;
 b=ObfvIDr4abTluIOr8/doI+/kkUU18Udz3nUKD5BqataIqIFx6kqfpa8lY5WPyVnEJHkspC
 fa+2QUiVNVCd9f8KKnuywAixKvrTYtXojis3gODcY5fdS718Q7MdvjO1FluDiqaPauKxob
 v8Miwv1TVAwLnPBzbtLKf2QbJFK96MwM9RfBtWREcU4B0gUmBrhaN9YRoBEpb8tx4TMWte
 MOeuwz6J0ysZkSgdevBsou/oXmRx2TsvnGwDPtHN/vD+//UaHva4KJpDTcyWNiWd9rsmKf
 fUHFg/7gBvdiY/qXm19IrtKayXK4TEavWS9Bc+xqb/ZCoBNFnJ7u8eq4trTbnw==
From: Liam Hupfer <liam@HIDDEN>
Date: Wed,  5 Feb 2025 22:24:58 -0600
Message-ID: <25ffb457020cb7ad0bbc9b9ff62736ed01ff0002.1738815703.git.liam@HIDDEN>
In-Reply-To: <cover.1738814583.git.liam@HIDDEN>
References: <cover.1738814583.git.liam@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Spam-Score: -0.0 (/)
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.0 (-)

While they aren’t exported, these temporary variables show up in the
resulting shell, cluttering tab completion and declare -p.

* gnu/home/services.scm (environment-variables->setup-environment-script):
Unset shell variables.
* gnu/home/services/shells.scm (add-shell-profile-file): Likewise.

Change-Id: Ibb634849d9f38c1a9a44c0d493e92231364de958
---
 gnu/home/services.scm        | 6 +++++-
 gnu/home/services/shells.scm | 3 ++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/gnu/home/services.scm b/gnu/home/services.scm
index bbf2ba2404..165bc33b05 100644
--- a/gnu/home/services.scm
+++ b/gnu/home/services.scm
@@ -275,7 +275,8 @@ (define (environment-variables->setup-environment-script vars)
                            (lambda (port)
                              (set-port-encoding! port "UTF-8")
                              (display "\
-HOME_ENVIRONMENT=$HOME/.guix-home
+# NOTE: Set HOME_ENVIRONMENT before sourcing (home-shell-profile-service-type ensures
+# ~/.profile does)
 GUIX_PROFILE=\"$HOME_ENVIRONMENT/profile\"
 PROFILE_FILE=\"$GUIX_PROFILE/etc/profile\"
 [ -f $PROFILE_FILE ] && . $PROFILE_FILE
@@ -301,6 +302,9 @@ (define (environment-variables->setup-environment-script vars)
   *) export XCURSOR_PATH=$GUIX_PROFILE/share/icons:$XCURSOR_PATH ;;
 esac
 
+# Keep the shell environment clean.
+unset GUIX_PROFILE PROFILE_FILE
+
 " port)
                              (display
                               #$(environment-variable-shell-definitions vars)
diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm
index ee6b09f17c..bab5730c3d 100644
--- a/gnu/home/services/shells.scm
+++ b/gnu/home/services/shells.scm
@@ -89,7 +89,8 @@ (define (add-shell-profile-file config)
        "\
 HOME_ENVIRONMENT=$HOME/.guix-home
 . $HOME_ENVIRONMENT/setup-environment
-$HOME_ENVIRONMENT/on-first-login\n"
+$HOME_ENVIRONMENT/on-first-login
+unset HOME_ENVIRONMENT\n"
        (serialize-configuration
         config
         (filter-configuration-fields
-- 
2.47.1





Message sent to andrew@HIDDEN, janneke@HIDDEN, ludo@HIDDEN, tanguy@HIDDEN, vagrant@HIDDEN, guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#76082] [PATCH 3/9] home: services: setup-environment: Set GUIX_LOCPATH.
Resent-From: Liam Hupfer <liam@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: andrew@HIDDEN, janneke@HIDDEN, ludo@HIDDEN, tanguy@HIDDEN, vagrant@HIDDEN, guix-patches@HIDDEN
Resent-Date: Thu, 06 Feb 2025 04:27:02 +0000
Resent-Message-ID: <handler.76082.B76082.17388159709563 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 76082
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 76082 <at> debbugs.gnu.org
Cc: Liam Hupfer <liam@HIDDEN>, Andrew Tropin <andrew@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN>, Vagrant Cascadian <vagrant@HIDDEN>
X-Debbugs-Original-Xcc: Andrew Tropin <andrew@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN>, Vagrant Cascadian <vagrant@HIDDEN>
Received: via spool by 76082-submit <at> debbugs.gnu.org id=B76082.17388159709563
          (code B ref 76082); Thu, 06 Feb 2025 04:27:02 +0000
Received: (at 76082) by debbugs.gnu.org; 6 Feb 2025 04:26:10 +0000
Received: from localhost ([127.0.0.1]:53612 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tftSs-0002UB-EE
	for submit <at> debbugs.gnu.org; Wed, 05 Feb 2025 23:26:10 -0500
Received: from out-183.mta0.migadu.com ([2001:41d0:1004:224b::b7]:49772)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <liam@HIDDEN>) id 1tftSp-0002TK-SI
 for 76082 <at> debbugs.gnu.org; Wed, 05 Feb 2025 23:26:09 -0500
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpfr.net; s=key1;
 t=1738815961;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=wpr6NW4QiGsCipzVYr2heGtKWx9jjpszb+m4KvOMUCs=;
 b=ODPar6Oy8ntuTsmJAidDAUl4p2HMiwttvSlQ5Vanoq5o8vzmVqrujrd3jI0ZGciMEUf2X5
 AJdqlAo/fPM799VJieJa35+PqMk7ghfQYNuR+qQ4XQEfDt/vk7JejqHxqs/28iTwjKJe1t
 yaJypQc3xd1EotFqvq/qAFybGftAiyQB1l47dKh4qwIOugy9qsGecObsWpkPni1SID0cRN
 4gDEcLz7D4gcXjUsYy1bJzBIrchdtTsTzu/e/PY+4dLyo4hfg6INifk53l67kTrHl/jeZW
 5kaZgEvQSCG890PephDBgfM0doonhlHv36j351XIUPKQPma0LX0zCJPgd91MZQ==
From: Liam Hupfer <liam@HIDDEN>
Date: Wed,  5 Feb 2025 22:24:59 -0600
Message-ID: <f3b1a81be5e919c63d329ef6ffd768239bee69b2.1738815703.git.liam@HIDDEN>
In-Reply-To: <cover.1738814583.git.liam@HIDDEN>
References: <cover.1738814583.git.liam@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Spam-Score: -0.0 (/)
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.0 (-)

Locales installed via Guix Home should be exposed to Guix packages by
default.

* gnu/home/services.scm (environment-variables->setup-environment-script):
Set GUIX_LOCPATH.

Change-Id: Ic61f0832312479ba36f471d92a12e7b4e296389f
---
 gnu/home/services.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gnu/home/services.scm b/gnu/home/services.scm
index 165bc33b05..9f50635d5c 100644
--- a/gnu/home/services.scm
+++ b/gnu/home/services.scm
@@ -281,6 +281,10 @@ (define (environment-variables->setup-environment-script vars)
 PROFILE_FILE=\"$GUIX_PROFILE/etc/profile\"
 [ -f $PROFILE_FILE ] && . $PROFILE_FILE
 
+case $GUIX_LOCPATH in
+  *$GUIX_PROFILE/lib/locale*) ;;
+  *) export GUIX_LOCPATH=$GUIX_PROFILE/lib/locale:$GUIX_LOCPATH ;;
+esac
 case $XDG_DATA_DIRS in
   *$GUIX_PROFILE/share*) ;;
   *) export XDG_DATA_DIRS=$GUIX_PROFILE/share:$XDG_DATA_DIRS ;;
-- 
2.47.1





Message sent to andrew@HIDDEN, janneke@HIDDEN, ludo@HIDDEN, tanguy@HIDDEN, vagrant@HIDDEN, guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#76082] [PATCH 4/9] guix-install.sh: Remove system-level Guix Home initialization.
Resent-From: Liam Hupfer <liam@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: andrew@HIDDEN, janneke@HIDDEN, ludo@HIDDEN, tanguy@HIDDEN, vagrant@HIDDEN, guix-patches@HIDDEN
Resent-Date: Thu, 06 Feb 2025 04:27:02 +0000
Resent-Message-ID: <handler.76082.B76082.17388159799587 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 76082
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 76082 <at> debbugs.gnu.org
Cc: Liam Hupfer <liam@HIDDEN>, Andrew Tropin <andrew@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN>, Vagrant Cascadian <vagrant@HIDDEN>
X-Debbugs-Original-Xcc: Andrew Tropin <andrew@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN>, Vagrant Cascadian <vagrant@HIDDEN>
Received: via spool by 76082-submit <at> debbugs.gnu.org id=B76082.17388159799587
          (code B ref 76082); Thu, 06 Feb 2025 04:27:02 +0000
Received: (at 76082) by debbugs.gnu.org; 6 Feb 2025 04:26:19 +0000
Received: from localhost ([127.0.0.1]:53616 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tftT1-0002UY-1B
	for submit <at> debbugs.gnu.org; Wed, 05 Feb 2025 23:26:19 -0500
Received: from out-174.mta1.migadu.com ([95.215.58.174]:34530)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <liam@HIDDEN>) id 1tftSx-0002U9-OX
 for 76082 <at> debbugs.gnu.org; Wed, 05 Feb 2025 23:26:16 -0500
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpfr.net; s=key1;
 t=1738815968;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=O9zkvneAmJ+V4qq5A+eouBKmG7vDmZNOVG1n/AZ5JMw=;
 b=WcM9W82z+bHtU5v0iKfOBz7yofBVpU7KCYi6sZbpcdy1neWiMwJEfPzcXCowKghPhwg6HP
 idl2vG1JVbv6P4fy9wQE4U0c+zvYULA6vPfZqA4ktUDQTqkHuxVd1Maqlc3anqlmUGjZf4
 +a4i3giUUh8mj9cNGDPh2IUPuBLEdwtSaIgWxkua3fz1jepoP5TT7HXLLaYWjzGqnyia/1
 zN1ARPo7HXMdKF+NxgE16RPlLAUh9Xk2TbgDOWrG+FfC2FiiIYu9VtwkK6MrHgQZiVIZia
 tt9Oaw4McpKRg3flaoyuopDi0xP8ql7FvnHdigtXnl5YuQfl1CErR0wo9r9EPQ==
From: Liam Hupfer <liam@HIDDEN>
Date: Wed,  5 Feb 2025 22:25:00 -0600
Message-ID: <e63a2a0b73f6d0147ccb4fe814dd9c6e6ecd14ff.1738815703.git.liam@HIDDEN>
In-Reply-To: <cover.1738814583.git.liam@HIDDEN>
References: <cover.1738814583.git.liam@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Spam-Score: -0.7 (/)
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 (-)

Guix Home handles its own profile initialization in ~/.profile and
documents shell setup accordingly.  It does more than what is done here,
including running an on-first-login script to start a user Shepherd
instance.  In general, changes and improvements to Guix Home
initialization are unlikely to propagate to the foreign distro install
script, since many Guix contributors only use Guix via Guix System and
Guix Home does not depend on system-level initialization anyway.

Avoid partially initializing Guix Home in /etc/profile.d to keep search
path variables free of redundant entries.  Instead, leave a comment
directing users to the relevant manual section.

* etc/guix-install.sh (sys_create_init_profile): Remove system-level
Guix Home initialization.

Change-Id: Ib78aa0382268a789298d4980ee394d99a602a5ca
---
 etc/guix-install.sh | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 22d54c0c83..8dda149edf 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -665,10 +665,8 @@ GUIX_LOCPATH="$GUIX_PROFILE/lib/locale${GUIX_LOCPATH:+:}$GUIX_LOCPATH"
 # searches 'Info-default-directory-list'.
 export INFOPATH="$_GUIX_PROFILE/share/info:$GUIX_PROFILE/share/info:$INFOPATH"
 
-GUIX_PROFILE="$HOME/.guix-home/profile"
-[ -f "$GUIX_PROFILE/etc/profile" ] && . "$GUIX_PROFILE/etc/profile"
-[ -L "$GUIX_PROFILE" ] && \
-GUIX_LOCPATH="$GUIX_PROFILE/lib/locale${GUIX_LOCPATH:+:}$GUIX_LOCPATH"
+# NOTE: Guix Home handles its own profile initialization in ~/.profile. See
+# info '(guix) Configuring the Shell'.
 
 export GUIX_LOCPATH
 
-- 
2.47.1





Message sent to andrew@HIDDEN, janneke@HIDDEN, ludo@HIDDEN, tanguy@HIDDEN, vagrant@HIDDEN, guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#76082] [PATCH 5/9] guix-install.sh: Improve Guix profile sourcing.
Resent-From: Liam Hupfer <liam@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: andrew@HIDDEN, janneke@HIDDEN, ludo@HIDDEN, tanguy@HIDDEN, vagrant@HIDDEN, guix-patches@HIDDEN
Resent-Date: Thu, 06 Feb 2025 04:27:03 +0000
Resent-Message-ID: <handler.76082.B76082.17388159829604 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 76082
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 76082 <at> debbugs.gnu.org
Cc: Liam Hupfer <liam@HIDDEN>, Andrew Tropin <andrew@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN>, Vagrant Cascadian <vagrant@HIDDEN>
X-Debbugs-Original-Xcc: Andrew Tropin <andrew@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN>, Vagrant Cascadian <vagrant@HIDDEN>
Received: via spool by 76082-submit <at> debbugs.gnu.org id=B76082.17388159829604
          (code B ref 76082); Thu, 06 Feb 2025 04:27:03 +0000
Received: (at 76082) by debbugs.gnu.org; 6 Feb 2025 04:26:22 +0000
Received: from localhost ([127.0.0.1]:53620 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tftT3-0002Uq-N0
	for submit <at> debbugs.gnu.org; Wed, 05 Feb 2025 23:26:22 -0500
Received: from out-178.mta1.migadu.com ([2001:41d0:203:375::b2]:22176)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <liam@HIDDEN>) id 1tftT1-0002UM-1P
 for 76082 <at> debbugs.gnu.org; Wed, 05 Feb 2025 23:26:19 -0500
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpfr.net; s=key1;
 t=1738815972;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=VRwAYy6Q5fx0DBU7LA8wbxgxc9fhIesnYV/BG+h0dgw=;
 b=lbP8oxQGFcmA87wStqyeYNr9uGpNbitJzda8UEnkRKl19aVfGz/9drkTkFHX6ECQC3QaF/
 T+5cdjGwcMxTExAo7OH/EK540UKSBSvtCuaRB8P+VXcllu9xLjT2475EoEhkMyKykxcJnS
 EKnWjRIAMoa/EUr/gDcKJO5jIpMvv02VFol00EL/qQrYpRwvVJu0C3kXN7IwdErPd3S/OY
 pG3IfKb+XXm3+ig70V4a9A3su95MIriLQqNqg9PS7Jhf/fbBD30fZUzDZv3F6lIgV3K+N9
 gDt2F7+G6HzykvIx5/YtIYgw2W45tpxxYIhAEiYm/N717ymB9MKGt7+Ht1v+Bg==
From: Liam Hupfer <liam@HIDDEN>
Date: Wed,  5 Feb 2025 22:25:01 -0600
Message-ID: <1c3233c704528b298ba3fb884bc8ab29b8b84001.1738815703.git.liam@HIDDEN>
In-Reply-To: <cover.1738814583.git.liam@HIDDEN>
References: <cover.1738814583.git.liam@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Spam-Score: -0.0 (/)
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.0 (-)

Make both profiles use GUIX_PROFILE and reorder some code so each
profile is handled in one contiguous block.  The user’s profile now
takes precedence over the ‘guix pull’ profile on INFOPATH.  If the user
already has an info reader in their Guix profile, don’t add a duplicate
entry to INFOPATH.  If the user doesn’t have an imperative
~/.guix-profile (i.e. they manage software with Guix Home and ‘guix
shell’), don’t add an unnecessary entry to INFOPATH.  Clean up after
ourselves by unsetting the temporary GUIX_PROFILE variable, which only
needs to be set when sourcing.

* etc/guix-install.sh (sys_create_init_profile): Improve Guix profile
sourcing.

Change-Id: Ibceb354012d23d24deeb39b1ec02790873396a6b
---
 etc/guix-install.sh | 50 +++++++++++++++++++++++++++------------------
 1 file changed, 30 insertions(+), 20 deletions(-)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 8dda149edf..9a1d898b4b 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -649,31 +649,41 @@ 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_PROFILE: `guix pull` profile
-_GUIX_PROFILE="$HOME/.config/guix/current"
-export PATH="$_GUIX_PROFILE/bin${PATH:+:}$PATH"
-
-# GUIX_PROFILE: User's default profile and home profile
+# `guix pull` profile
+GUIX_PROFILE="$HOME/.config/guix/current"
+export PATH="$GUIX_PROFILE/bin${PATH:+:}$PATH"
+# Add to INFOPATH so the latest Guix documentation is available to info
+# readers. When INFOPATH is unset, add a trailing colon so that Emacs searches
+# 'Info-default-directory-list'.
+export INFOPATH="$GUIX_PROFILE/share/info:$INFOPATH"
+# 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"
-[ -f "$GUIX_PROFILE/etc/profile" ] && . "$GUIX_PROFILE/etc/profile"
-[ -L "$GUIX_PROFILE" ] && \
-GUIX_LOCPATH="$GUIX_PROFILE/lib/locale${GUIX_LOCPATH:+:}$GUIX_LOCPATH"
-
-# Export INFOPATH so that the updated info pages can be found
-# and read by both /usr/bin/info and/or $GUIX_PROFILE/bin/info
-# When INFOPATH is unset, add a trailing colon so that Emacs
-# searches 'Info-default-directory-list'.
-export INFOPATH="$_GUIX_PROFILE/share/info:$GUIX_PROFILE/share/info:$INFOPATH"
+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"
+
+  # INFOPATH may be handled by $GUIX_PROFILE/etc/profile if the user installs
+  # an info reader via Guix. If the user doesn’t, explicitly add to INFOPATH
+  # so documentation for software from ‘guix install’ is available to the
+  # system info reader.
+  case $INFOPATH in
+    *$GUIX_PROFILE/share/info*) ;;
+    *) export INFOPATH="$GUIX_PROFILE/share/info:$INFOPATH" ;;
+  esac
+fi
 
 # NOTE: Guix Home handles its own profile initialization in ~/.profile. See
 # info '(guix) Configuring the Shell'.
 
-export GUIX_LOCPATH
-
-# Make Guix modules available
-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"
-
+# Clean up after ourselves.
+unset GUIX_PROFILE
 EOF
 }
 
-- 
2.47.1





Message sent to andrew@HIDDEN, janneke@HIDDEN, ludo@HIDDEN, tanguy@HIDDEN, vagrant@HIDDEN, guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#76082] [PATCH 6/9] guix-install.sh: Add to MANPATH.
Resent-From: Liam Hupfer <liam@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: andrew@HIDDEN, janneke@HIDDEN, ludo@HIDDEN, tanguy@HIDDEN, vagrant@HIDDEN, guix-patches@HIDDEN
Resent-Date: Thu, 06 Feb 2025 04:27:03 +0000
Resent-Message-ID: <handler.76082.B76082.17388159899630 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 76082
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 76082 <at> debbugs.gnu.org
Cc: Liam Hupfer <liam@HIDDEN>, Andrew Tropin <andrew@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN>, Vagrant Cascadian <vagrant@HIDDEN>
X-Debbugs-Original-Xcc: Andrew Tropin <andrew@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN>, Vagrant Cascadian <vagrant@HIDDEN>
Received: via spool by 76082-submit <at> debbugs.gnu.org id=B76082.17388159899630
          (code B ref 76082); Thu, 06 Feb 2025 04:27:03 +0000
Received: (at 76082) by debbugs.gnu.org; 6 Feb 2025 04:26:29 +0000
Received: from localhost ([127.0.0.1]:53624 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tftTB-0002VC-5o
	for submit <at> debbugs.gnu.org; Wed, 05 Feb 2025 23:26:29 -0500
Received: from out-189.mta0.migadu.com ([91.218.175.189]:32232)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <liam@HIDDEN>) id 1tftT8-0002Uo-Qh
 for 76082 <at> debbugs.gnu.org; Wed, 05 Feb 2025 23:26:27 -0500
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpfr.net; s=key1;
 t=1738815975;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=kypTrG0mBI960bpkZ3UA/8d0V1+bT2uT4LbEbHjs3mI=;
 b=iF7xx7ah4xtdUMoFYTIo+cyrazqUp51JkA706dy01ZRkOUg5B5ss3CWKmu5Fy/HwDs/ojx
 7RNLNy4rmhRROyZHkuHo+bsWEgJnFTkUyWT+H2F/ThYTOc8AV0A9IBfnf7C0efFxwisTmr
 TD7iTS0C8SOoRfk2IMQqrOQextqYKA7siK5lSRSUQev3Vodhiouo18oEcEC5S7t8yw3icK
 xZq3UvMlaYQ8fO0tuX6HJxHfyFS5WeAzVy/TWbShdgT+eIpnSArEXm4Fhz8r+gIfg4ofdv
 2W+UJF1RnblG3VRolimpBKdXStpXh2e/yi2v9HmB5E/9Zrn8limP2sqwPhIlIQ==
From: Liam Hupfer <liam@HIDDEN>
Date: Wed,  5 Feb 2025 22:25:02 -0600
Message-ID: <ff18c002f88537656d38869ff92a7707fe2ba96c.1738815703.git.liam@HIDDEN>
In-Reply-To: <cover.1738814583.git.liam@HIDDEN>
References: <cover.1738814583.git.liam@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Spam-Score: -0.7 (/)
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 (-)

Guix and Guix-provided software also have man pages.  If the user
doesn’t install man-db via Guix, they should still be able to read
Guix-provided man pages.

* etc/guix-install.sh (sys_create_init_profile): Add to MANPATH.

Change-Id: Ibceb354012d23d24deeb39b1ec02790873396a6b
---
 etc/guix-install.sh | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 9a1d898b4b..ef338e89f7 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -652,10 +652,12 @@ export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
 # `guix pull` profile
 GUIX_PROFILE="$HOME/.config/guix/current"
 export PATH="$GUIX_PROFILE/bin${PATH:+:}$PATH"
-# Add to INFOPATH so the latest Guix documentation is available to info
-# readers. When INFOPATH is unset, add a trailing colon so that Emacs searches
-# 'Info-default-directory-list'.
+# 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"
@@ -669,14 +671,18 @@ if [ -L "$GUIX_PROFILE" ]; then
   # see info '(guix) Application Setup'
   export GUIX_LOCPATH="$GUIX_PROFILE/lib/locale${GUIX_LOCPATH:+:}$GUIX_LOCPATH"
 
-  # INFOPATH may be handled by $GUIX_PROFILE/etc/profile if the user installs
-  # an info reader via Guix. If the user doesn’t, explicitly add to INFOPATH
-  # so documentation for software from ‘guix install’ is available to the
-  # system info reader.
+  # 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
-- 
2.47.1





Message sent to andrew@HIDDEN, janneke@HIDDEN, ludo@HIDDEN, tanguy@HIDDEN, vagrant@HIDDEN, guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#76082] [PATCH 7/9] guix-install.sh: Appease shellcheck.
Resent-From: Liam Hupfer <liam@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: andrew@HIDDEN, janneke@HIDDEN, ludo@HIDDEN, tanguy@HIDDEN, vagrant@HIDDEN, guix-patches@HIDDEN
Resent-Date: Thu, 06 Feb 2025 04:27:04 +0000
Resent-Message-ID: <handler.76082.B76082.17388159929645 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 76082
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 76082 <at> debbugs.gnu.org
Cc: Liam Hupfer <liam@HIDDEN>, Andrew Tropin <andrew@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN>, Vagrant Cascadian <vagrant@HIDDEN>
X-Debbugs-Original-Xcc: Andrew Tropin <andrew@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN>, Vagrant Cascadian <vagrant@HIDDEN>
Received: via spool by 76082-submit <at> debbugs.gnu.org id=B76082.17388159929645
          (code B ref 76082); Thu, 06 Feb 2025 04:27:04 +0000
Received: (at 76082) by debbugs.gnu.org; 6 Feb 2025 04:26:32 +0000
Received: from localhost ([127.0.0.1]:53628 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tftTD-0002VV-Rj
	for submit <at> debbugs.gnu.org; Wed, 05 Feb 2025 23:26:32 -0500
Received: from out-188.mta0.migadu.com ([2001:41d0:1004:224b::bc]:11198)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <liam@HIDDEN>) id 1tftTC-0002Uz-4n
 for 76082 <at> debbugs.gnu.org; Wed, 05 Feb 2025 23:26:30 -0500
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpfr.net; s=key1;
 t=1738815983;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=pXoYAJ2jkuSbXIr5MzMfJw48oFj2bqK+SfPywCZ580Q=;
 b=q68/6+saT8ez+8t8bWolrZjilPP1ob/XIzOM1KE7wtQ40Ztt4FaZtxCMRXPXPaCtVuUck5
 EuTsi2qEoeo4mW9M8vxG9JSI6JnSnmTdk4QJgpCEG4Od6IkEtJEBApk4qSwdtSYmEvC4rQ
 4tuY01bPViTs+WWKe83J2RzO/qGAexwhU5eI+Ga1wWcJpA3YKYIz9gVTOuUGQFNmABpDzg
 Vs2HpyLJWdFB2s1bspB8OnjuOuztA1367ilwboeT6QELSfLENc8lwAKxcWs+VsRQmR9rq6
 Aey0CAfSsP5mmXBhs/cftGY0N2+bFM0E65sVWPaaeHsFouIFfBJJ+j1NCUzSXQ==
From: Liam Hupfer <liam@HIDDEN>
Date: Wed,  5 Feb 2025 22:25:03 -0600
Message-ID: <470303f6526912c2f03a4661c0e4afa8aa538b4e.1738815703.git.liam@HIDDEN>
In-Reply-To: <cover.1738814583.git.liam@HIDDEN>
References: <cover.1738814583.git.liam@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Spam-Score: -0.0 (/)
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.0 (-)

* etc/guix-install.sh: Appease shellcheck.

Change-Id: I24f0d13bb254c08d4fe45f5aa3b74bbc6a9a9d88
---
 etc/guix-install.sh | 31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index ef338e89f7..340c3a394f 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -51,8 +51,8 @@
 # installation required the user to extract Guix packs under /gnu to
 # satisfy its dependencies.
 
-if [ "x$BASH_VERSION" = "x" ]
-then
+# shellcheck disable=2268 # try to support vintage shells
+if [ "x$BASH_VERSION" = "x" ]; then
     exec bash "$0" "$@"
 fi
 
@@ -85,6 +85,7 @@ REQUIRE=(
 
 # Add variables using form FOO_INIT_REQUIRE when init system FOO dependencies
 # should be checked.
+# shellcheck disable=2034 # interpolated by add_init_sys_require
 SYSV_INIT_REQUIRE=(
     "daemonize"
 )
@@ -159,7 +160,7 @@ chk_require()
 add_init_sys_require()
 { # Add the elements of FOO_INIT_SYS to REQUIRE
     local init_require="${INIT_SYS}_REQUIRE[@]"
-    if [[ ! -z "$init_require" ]]; then
+    if [[ -n "$init_require" ]]; then
         # Have to add piecemeal because ${!foo[@]} performs direct array key
         # expansion, not indirect plain array expansion.
         for r in "${!init_require}"; do
@@ -398,7 +399,9 @@ sys_create_store()
        ~root/.config/guix/current
 
     GUIX_PROFILE=~root/.config/guix/current
-    # shellcheck disable=SC1090
+    # The profile just prepends to search paths, which is not needed for
+    # effective linting.
+    # shellcheck disable=SC1091
     source "${GUIX_PROFILE}/etc/profile"
     _msg "${PAS}activated root profile at ${GUIX_PROFILE}"
 }
@@ -435,12 +438,12 @@ sys_create_build_user()
     for i in $(seq -w 1 10); do
         if id "guixbuilder${i}" &>/dev/null; then
             _msg "${INF}user is already in the system, reset"
-            usermod -g guixbuild -G guixbuild${KVMGROUP}     \
+            usermod -g guixbuild -G guixbuild"$KVMGROUP"     \
                     -d /var/empty -s "$(which nologin)" \
                     -c "Guix build user $i"             \
                     "guixbuilder${i}";
         else
-            useradd -g guixbuild -G guixbuild${KVMGROUP}     \
+            useradd -g guixbuild -G guixbuild"$KVMGROUP"     \
                     -d /var/empty -s "$(which nologin)" \
                     -c "Guix build user $i" --system    \
                     "guixbuilder${i}";
@@ -453,7 +456,7 @@ sys_delete_build_user()
 {
     for i in $(seq -w 1 10); do
         if id -u "guixbuilder${i}" &>/dev/null; then
-            userdel -f guixbuilder${i}
+            userdel -f guixbuilder"$i"
         fi
     done
 
@@ -559,7 +562,7 @@ sys_delete_guix_daemon()
     local local_bin
     local var_guix
 
-    _debug "--- [ $FUNCNAME ] ---"
+    _debug "--- [ ${FUNCNAME[0]} ] ---"
 
     info_path="/usr/local/share/info"
     local_bin="/usr/local/bin"
@@ -703,7 +706,7 @@ sys_create_shell_completion()
 
     { # Just in case
         for dir_shell in $bash_completion $zsh_completion $fish_completion; do
-            [ -d "$dir_shell" ] || mkdir -p $dir_shell
+            [ -d "$dir_shell" ] || mkdir -p "$dir_shell"
         done;
 
         # Don't use globing here as we also need to delete the files when
@@ -737,8 +740,10 @@ sys_customize_bashrc()
 
     for bashrc in /home/*/.bashrc /root/.bashrc; do
         test -f "$bashrc" || continue
+        # shellcheck disable=SC2016 # intended search for variable reference
         grep -Fq '$GUIX_ENVIRONMENT' "$bashrc" && continue
         cp "${bashrc}" "${bashrc}.bak"
+        # shellcheck disable=SC2016,SC2028 # intended literal shell output
         echo '
 # Automatically added by the Guix install script.
 if [ -n "$GUIX_ENVIRONMENT" ]; then
@@ -788,11 +793,7 @@ sys_delete_user_profiles()
     rm -rf ~root/.cache/guix
 
     _msg "${INF}removing .guix-profile, .cache/guix and .config/guix of all /home users"
-    for user in `ls -1 /home`; do
-        rm -f /home/$user/.guix-profile
-        rm -rf /home/$user/.cache/guix
-        rm -rf /home/$user/.config/guix
-    done
+    rm -rf /home/*/{.guix-profile,{.cache,.config}/guix}
 }
 
 welcome()
@@ -940,7 +941,7 @@ main()
         if [ '--uninstall' = "${uninstall_flag}" ]; then
             main_uninstall
         else
-            echo "unsupported parameters: $@"
+            echo "unsupported parameters: $*"
             exit 1
         fi
     fi
-- 
2.47.1





Message sent to andrew@HIDDEN, janneke@HIDDEN, ludo@HIDDEN, tanguy@HIDDEN, vagrant@HIDDEN, guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#76082] [PATCH 8/9] guix-install.sh: Add msg helpers and use stderr consistently.
Resent-From: Liam Hupfer <liam@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: andrew@HIDDEN, janneke@HIDDEN, ludo@HIDDEN, tanguy@HIDDEN, vagrant@HIDDEN, guix-patches@HIDDEN
Resent-Date: Thu, 06 Feb 2025 04:27:04 +0000
Resent-Message-ID: <handler.76082.B76082.17388160029677 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 76082
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 76082 <at> debbugs.gnu.org
Cc: Liam Hupfer <liam@HIDDEN>, Andrew Tropin <andrew@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN>, Vagrant Cascadian <vagrant@HIDDEN>
X-Debbugs-Original-Xcc: Andrew Tropin <andrew@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN>, Vagrant Cascadian <vagrant@HIDDEN>
Received: via spool by 76082-submit <at> debbugs.gnu.org id=B76082.17388160029677
          (code B ref 76082); Thu, 06 Feb 2025 04:27:04 +0000
Received: (at 76082) by debbugs.gnu.org; 6 Feb 2025 04:26:42 +0000
Received: from localhost ([127.0.0.1]:53634 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tftTJ-0002Vn-BC
	for submit <at> debbugs.gnu.org; Wed, 05 Feb 2025 23:26:42 -0500
Received: from out-181.mta1.migadu.com ([2001:41d0:203:375::b5]:42811)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <liam@HIDDEN>) id 1tftTF-0002V8-Pi
 for 76082 <at> debbugs.gnu.org; Wed, 05 Feb 2025 23:26:35 -0500
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpfr.net; s=key1;
 t=1738815987;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=7CTPVy6CW1o1JoPPQ2/JPV47f0kTyuwunrDqSGq91i8=;
 b=rnQtlxxAQIlZEonaNpIttw2smkS7dDSC8IoLWzDKAvb6QOHHYpgy3Ay9tBoi3JCJZKJznQ
 YIZAB0x/1/CdAAznNtOSQt8NbNdS0a73zmplonp531tL3oG5EyLygbCzLg2Iuyq8bksvna
 qO8bOHRjPnOb3ba3MQfzkwF2V2ja7+ndH8pqMqmIB3DsYVjvkOplgo4ThTP5/pCOuOiwiW
 JowwZAKSYkru0LO7EHYsHb/DvwS475tZJkDf7mhmfTF9reqm210W7tKfEBh3pQv/WSM5Th
 IqDftTUnil0//kyeJ8+KCZqLaPuO8R+lKSH0EJzfCuUCtK2PPTM8F+ZaOL/YWQ==
From: Liam Hupfer <liam@HIDDEN>
Date: Wed,  5 Feb 2025 22:25:04 -0600
Message-ID: <15ab3b91f03b6d46fc1014b073576a4006da3de3.1738815703.git.liam@HIDDEN>
In-Reply-To: <cover.1738814583.git.liam@HIDDEN>
References: <cover.1738814583.git.liam@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Spam-Score: -0.0 (/)
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.0 (-)

Add helpers to avoid repeated manual concatenation.

_err and _msg "$ERR are used interchangeably with their only difference
being output stream; convert all errors to use _err.

* etc/guix-install.sh: Add msg helpers and consolidate errors to stderr.

Change-Id: I06e97ccc50d108ed9e279ae80c6b2386d7b8c36b
---
 etc/guix-install.sh | 149 ++++++++++++++++++++++++--------------------
 1 file changed, 82 insertions(+), 67 deletions(-)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 340c3a394f..7a731962b3 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -110,7 +110,7 @@ GPG_SIGNING_KEYS[127547]=27D586A4F8900854329FF09F1260E46482E63562 # maxim
 
 _err()
 { # All errors go to stderr.
-    printf "[%s]: %s\n" "$(date +%s.%3N)" "$1"
+    printf "[%s]: ${ERR}%s\n" "$(date +%s.%3N)" "$1"
 }
 
 _msg()
@@ -118,6 +118,21 @@ _msg()
     printf "[%s]: %s\n" "$(date +%s.%3N)" "$1"
 }
 
+_msg_pass()
+{
+    _msg "$PAS$1"
+}
+
+_msg_warn()
+{
+    _msg "$WAR$1"
+}
+
+_msg_info()
+{
+    _msg "$INF$1"
+}
+
 _debug()
 {
     if [ "${DEBUG}" = '1' ]; then
@@ -127,7 +142,7 @@ _debug()
 
 die()
 {
-    _err "${ERR}$*"
+    _err "$*"
     exit 1
 }
 
@@ -154,7 +169,7 @@ chk_require()
 
     [ "${#warn}" -ne 0 ] && die "Missing commands: ${warn[*]}."
 
-    _msg "${PAS}verification of required commands completed"
+    _msg_pass "verification of required commands completed"
 }
 
 add_init_sys_require()
@@ -195,7 +210,7 @@ Would you like me to fetch it for you?"; then
         fi
 	# If we reach this point, the key is (still) missing.  Report further
 	# missing keys, if any, but then abort the installation.
-        _err "${ERR}Missing OpenPGP public key ($gpg_key_id).
+        _err "Missing OpenPGP public key ($gpg_key_id).
 Fetch it with this command:
 
   wget \"https://sv.gnu.org/people/viewgpg.php?user_id=$user_id\" -O - | \
@@ -227,24 +242,24 @@ chk_term()
 chk_init_sys()
 { # Return init system type name.
     if [[ $(/sbin/init --version 2>/dev/null) =~ upstart ]]; then
-        _msg "${INF}init system is: upstart"
+        _msg_info "init system is: upstart"
         INIT_SYS="upstart"
         return 0
     elif [[ $(systemctl 2>/dev/null) =~ -\.mount ]]; then
-        _msg "${INF}init system is: systemd"
+        _msg_info "init system is: systemd"
         INIT_SYS="systemd"
         return 0
     elif [[ -f /etc/init.d/cron && ! -h /etc/init.d/cron ]]; then
-        _msg "${INF}init system is: sysv-init"
+        _msg_info "init system is: sysv-init"
         INIT_SYS="sysv-init"
         return 0
     elif [[ $(openrc --version 2>/dev/null) =~ \(OpenRC ]]; then
-        _msg "${INF}init system is: OpenRC"
+        _msg_info "init system is: OpenRC"
         INIT_SYS="openrc"
         return 0
     else
         INIT_SYS="NA"
-        _err "${ERR}Init system could not be detected."
+        _err "Init system could not be detected."
     fi
 }
 
@@ -291,12 +306,12 @@ chk_sys_nscd()
 { # Check if nscd is up and suggest to start it or install it
     if [ "$(type -P pidof)" ]; then
         if [ ! "$(pidof nscd)" ]; then
-            _msg "${WAR}We recommend installing and/or starting your distribution 'nscd' service"
-            _msg "${WAR}Please read 'info guix \"Application Setup\"' about \"Name Service Switch\""
+            _msg_warn "We recommend installing and/or starting your distribution 'nscd' service"
+            _msg_warn "Please read 'info guix \"Application Setup\"' about \"Name Service Switch\""
         fi
     else
-        _msg "${INF}We cannot determine if your distribution 'nscd' service is running"
-        _msg "${INF}Please read 'info guix \"Application Setup\"' about \"Name Service Switch\""
+        _msg_info "We cannot determine if your distribution 'nscd' service is running"
+        _msg_info "Please read 'info guix \"Application Setup\"' about \"Name Service Switch\""
     fi
 }
 
@@ -334,7 +349,7 @@ guix_get_bin_list()
     default_ver="guix-binary-${latest_ver}.${ARCH_OS}"
 
     if [[ "${#bin_ver_ls}" -ne "0" ]]; then
-        _msg "${PAS}Release for your system: ${default_ver}"
+        _msg_pass "Release for your system: ${default_ver}"
     else
         die "Could not obtain list of Guix releases."
     fi
@@ -352,21 +367,21 @@ guix_get_bin()
 
     _debug "--- [ ${FUNCNAME[0]} ] ---"
 
-    _msg "${INF}Downloading Guix release archive"
+    _msg_info "Downloading Guix release archive"
 
     wget --help | grep -q '\--show-progress' \
         && wget_args=("--no-verbose" "--show-progress")
 
     if wget "${wget_args[@]}" -P "$dl_path" \
             "${url}/${bin_ver}.tar.xz" "${url}/${bin_ver}.tar.xz.sig"; then
-        _msg "${PAS}download completed."
+        _msg_pass "download completed."
     else
         die "could not download ${url}/${bin_ver}.tar.xz."
     fi
 
     pushd "${dl_path}" >/dev/null
     if gpg --verify "${bin_ver}.tar.xz.sig" >/dev/null 2>&1; then
-        _msg "${PAS}Signature is valid."
+        _msg_pass "Signature is valid."
         popd >/dev/null
     else
         die "could not verify the signature."
@@ -382,18 +397,18 @@ sys_create_store()
 
     if [[ -e /var/guix && -e /gnu ]]; then
         if [ -n "$GUIX_ALLOW_OVERWRITE" ]; then
-            _msg "${WAR}Overwriting existing installation!"
+            _msg_warn "Overwriting existing installation!"
         else
             die "A previous Guix installation was found.  Refusing to overwrite."
         fi
     fi
 
     cd "$tmp_path"
-    _msg "${INF}Installing /var/guix and /gnu..."
+    _msg_info "Installing /var/guix and /gnu..."
     # Strip (skip) the leading ‘.’ component, which fails on read-only ‘/’.
     tar --extract --strip-components=1 --file "$pkg" -C /
 
-    _msg "${INF}Linking the root user's profile"
+    _msg_info "Linking the root user's profile"
     mkdir -p ~root/.config/guix
     ln -sf /var/guix/profiles/per-user/root/current-guix \
        ~root/.config/guix/current
@@ -403,18 +418,18 @@ sys_create_store()
     # effective linting.
     # shellcheck disable=SC1091
     source "${GUIX_PROFILE}/etc/profile"
-    _msg "${PAS}activated root profile at ${GUIX_PROFILE}"
+    _msg_pass "activated root profile at ${GUIX_PROFILE}"
 }
 
 sys_delete_store()
 {
-    _msg "${INF}removing /var/guix"
+    _msg_info "removing /var/guix"
     rm -rf /var/guix
 
-    _msg "${INF}removing /gnu"
+    _msg_info "removing /gnu"
     rm -rf /gnu
 
-    _msg "${INF}removing ~root/.config/guix"
+    _msg_info "removing ~root/.config/guix"
     rm -rf ~root/.config/guix
 }
 
@@ -424,20 +439,20 @@ sys_create_build_user()
     _debug "--- [ ${FUNCNAME[0]} ] ---"
 
     if getent group guixbuild > /dev/null; then
-        _msg "${INF}group guixbuild exists"
+        _msg_info "group guixbuild exists"
     else
         groupadd --system guixbuild
-        _msg "${PAS}group <guixbuild> created"
+        _msg_pass "group <guixbuild> created"
     fi
 
     if getent group kvm > /dev/null; then
-        _msg "${INF}group kvm exists and build users will be added to it"
+        _msg_info "group kvm exists and build users will be added to it"
         local KVMGROUP=,kvm
     fi
 
     for i in $(seq -w 1 10); do
         if id "guixbuilder${i}" &>/dev/null; then
-            _msg "${INF}user is already in the system, reset"
+            _msg_info "user is already in the system, reset"
             usermod -g guixbuild -G guixbuild"$KVMGROUP"     \
                     -d /var/empty -s "$(which nologin)" \
                     -c "Guix build user $i"             \
@@ -447,7 +462,7 @@ sys_create_build_user()
                     -d /var/empty -s "$(which nologin)" \
                     -c "Guix build user $i" --system    \
                     "guixbuilder${i}";
-            _msg "${PAS}user added <guixbuilder${i}>"
+            _msg_pass "user added <guixbuilder${i}>"
         fi
     done
 }
@@ -460,7 +475,7 @@ sys_delete_build_user()
         fi
     done
 
-    _msg "${INF}delete group guixbuild"
+    _msg_info "delete group guixbuild"
     if getent group guixbuild &>/dev/null; then
         groupdel -f guixbuild
     fi
@@ -486,7 +501,7 @@ sys_enable_guix_daemon()
                  /etc/init/ &&
                   configure_substitute_discovery /etc/init/guix-daemon.conf &&
                   start guix-daemon; } &&
-                _msg "${PAS}enabled Guix daemon via upstart"
+                _msg_pass "enabled Guix daemon via upstart"
             ;;
         systemd)
             { install_unit()
@@ -511,7 +526,7 @@ sys_enable_guix_daemon()
 
               systemctl daemon-reload &&
                   systemctl start  guix-daemon; } &&
-                _msg "${PAS}enabled Guix daemon via systemd"
+                _msg_pass "enabled Guix daemon via systemd"
             ;;
         sysv-init)
             { mkdir -p /etc/init.d;
@@ -524,7 +539,7 @@ sys_enable_guix_daemon()
               update-rc.d guix-daemon defaults &&
                   update-rc.d guix-daemon enable &&
                   service guix-daemon start; } &&
-                _msg "${PAS}enabled Guix daemon via sysv"
+                _msg_pass "enabled Guix daemon via sysv"
             ;;
         openrc)
             { mkdir -p /etc/init.d;
@@ -536,15 +551,15 @@ sys_enable_guix_daemon()
 
               rc-update add guix-daemon default &&
                   rc-service guix-daemon start; } &&
-                _msg "${PAS}enabled Guix daemon via OpenRC"
+                _msg_pass "enabled Guix daemon via OpenRC"
             ;;
         NA|*)
-            _msg "${ERR}unsupported init system; run the daemon manually:"
+            _err "unsupported init system; run the daemon manually:"
             echo "  ~root/.config/guix/current/bin/guix-daemon --build-users-group=guixbuild"
             ;;
     esac
 
-    _msg "${INF}making the guix command available to other users"
+    _msg_info "making the guix command available to other users"
 
     [ -e "$local_bin" ] || mkdir -p "$local_bin"
     ln -sf "${var_guix}/bin/guix"  "$local_bin"
@@ -570,28 +585,28 @@ sys_delete_guix_daemon()
 
     case "$INIT_SYS" in
         upstart)
-            _msg "${INF}stopping guix-daemon"
+            _msg_info "stopping guix-daemon"
             stop guix-daemon
-            _msg "${INF}removing guix-daemon"
+            _msg_info "removing guix-daemon"
             rm /etc/init/guix-daemon.conf
             ;;
 
         systemd)
             if [ -f /etc/systemd/system/guix-daemon.service ]; then
-                _msg "${INF}disabling guix-daemon"
+                _msg_info "disabling guix-daemon"
                 systemctl disable guix-daemon
-                _msg "${INF}stopping guix-daemon"
+                _msg_info "stopping guix-daemon"
                 systemctl stop guix-daemon
-                _msg "${INF}removing guix-daemon"
+                _msg_info "removing guix-daemon"
                 rm -f /etc/systemd/system/guix-daemon.service
             fi
 
             if [ -f /etc/systemd/system/gnu-store.mount ]; then
-                _msg "${INF}disabling gnu-store.mount"
+                _msg_info "disabling gnu-store.mount"
                 systemctl disable gnu-store.mount
-                _msg "${INF}stopping gnu-store.mount"
+                _msg_info "stopping gnu-store.mount"
                 systemctl stop gnu-store.mount
-                _msg "${INF}removing gnu-store.mount"
+                _msg_info "removing gnu-store.mount"
                 rm -f /etc/systemd/system/gnu-store.mount
             fi
             systemctl daemon-reload
@@ -603,16 +618,16 @@ sys_delete_guix_daemon()
             rm -rf /etc/init.d/guix-daemon
             ;;
         NA|*)
-            _msg "${ERR}unsupported init system; disable, stop and remove the daemon manually:"
+            _err "unsupported init system; disable, stop and remove the daemon manually:"
             echo "  ~root/.config/guix/current/bin/guix-daemon --build-users-group=guixbuild"
             ;;
     esac
 
 
-    _msg "${INF}removing $local_bin/guix"
+    _msg_info "removing $local_bin/guix"
     rm -f "$local_bin"/guix
 
-    _msg "${INF}removing $info_path/guix*"
+    _msg_info "removing $info_path/guix*"
     rm -f "$info_path"/guix*
 }
 
@@ -629,10 +644,10 @@ project's build farms?"; then
 	    local key=~root/.config/guix/current/share/guix/$host.pub
 	    [ -f "$key" ] \
 		&& guix archive --authorize < "$key" \
-		&& _msg "${PAS}Authorized public key for $host"
+		&& _msg_pass "Authorized public key for $host"
 	done
     else
-        _msg "${INF}Skipped authorizing build farm public keys"
+        _msg_info "Skipped authorizing build farm public keys"
     fi
 }
 
@@ -715,7 +730,7 @@ sys_create_shell_completion()
         ln -sf ${var_guix}/etc/bash_completion.d/guix-daemon "$bash_completion";
         ln -sf ${var_guix}/share/zsh/site-functions/_guix "$zsh_completion";
         ln -sf ${var_guix}/share/fish/vendor_completions.d/guix.fish "$fish_completion"; } &&
-        _msg "${PAS}installed shell completion"
+        _msg_pass "installed shell completion"
 }
 
 sys_delete_shell_completion()
@@ -726,7 +741,7 @@ sys_delete_shell_completion()
     zsh_completion=/usr/share/zsh/site-functions
     fish_completion=/usr/share/fish/vendor_completions.d
 
-    _msg "${INF}removing shell completion"
+    _msg_info "removing shell completion"
 
     rm -f "$bash_completion"/guix;
     rm -f "$bash_completion"/guix-daemon;
@@ -753,7 +768,7 @@ if [ -n "$GUIX_ENVIRONMENT" ]; then
 fi
 ' >> "$bashrc"
     done
-    _msg "${PAS}Bash shell prompt successfully customized for Guix"
+    _msg_pass "Bash shell prompt successfully customized for Guix"
 }
 
 sys_maybe_setup_selinux()
@@ -782,17 +797,17 @@ sys_maybe_setup_selinux()
 
 sys_delete_init_profile()
 {
-    _msg "${INF}removing /etc/profile.d/guix.sh"
+    _msg_info "removing /etc/profile.d/guix.sh"
     rm -f /etc/profile.d/guix.sh
 }
 
 sys_delete_user_profiles()
 {
-    _msg "${INF}removing ~root/.guix-profile"
+    _msg_info "removing ~root/.guix-profile"
     rm -f ~root/.guix-profile
     rm -rf ~root/.cache/guix
 
-    _msg "${INF}removing .guix-profile, .cache/guix and .config/guix of all /home users"
+    _msg_info "removing .guix-profile, .cache/guix and .config/guix of all /home users"
     rm -rf /home/*/{.guix-profile,{.cache,.config}/guix}
 }
 
@@ -841,8 +856,8 @@ EOF
     if [ "$char" ]; then
 	echo
 	echo "...that ($char) was not a return!"
-	_msg "${WAR}Use newlines to automate installation, e.g.: yes '' | ${0##*/}"
-	_msg "${WAR}Any other method is unsupported and likely to break in future."
+	_msg_warn "Use newlines to automate installation, e.g.: yes '' | ${0##*/}"
+	_msg_warn "Any other method is unsupported and likely to break in future."
     fi
 }
 
@@ -861,7 +876,7 @@ main_install()
     chk_sys_arch
     chk_sys_nscd
 
-    _msg "${INF}system is ${ARCH_OS}"
+    _msg_info "system is ${ARCH_OS}"
 
     umask 0022
     tmp_path="$(mktemp -t -d guix.XXXXXX)"
@@ -874,7 +889,7 @@ main_install()
         if ! [[ $GUIX_BINARY_FILE_NAME =~ $ARCH_OS ]]; then
             _err "$ARCH_OS not in ${GUIX_BINARY_FILE_NAME}; aborting"
         fi
-        _msg "${INF}Using manually provided binary ${GUIX_BINARY_FILE_NAME}"
+        _msg_info "Using manually provided binary ${GUIX_BINARY_FILE_NAME}"
         GUIX_BINARY_FILE_NAME=$(realpath "$GUIX_BINARY_FILE_NAME")
     fi
 
@@ -887,14 +902,14 @@ main_install()
     sys_create_shell_completion
     sys_customize_bashrc
 
-    _msg "${INF}cleaning up ${tmp_path}"
+    _msg_info "cleaning up ${tmp_path}"
     rm -r "${tmp_path}"
 
-    _msg "${PAS}Guix has successfully been installed!"
-    _msg "${INF}Run 'info guix' to read the manual."
+    _msg_pass "Guix has successfully been installed!"
+    _msg_info "Run 'info guix' to read the manual."
 
     # Required to source /etc/profile in desktop environments.
-    _msg "${INF}Please log out and back in to complete the installation."
+    _msg_info "Please log out and back in to complete the installation."
  }
 
 main_uninstall()
@@ -908,7 +923,7 @@ main_uninstall()
     chk_init_sys
     chk_sys_arch
 
-    _msg "${INF}system is ${ARCH_OS}"
+    _msg_info "system is ${ARCH_OS}"
 
     # stop the build, package system.
     sys_delete_guix_daemon
@@ -922,12 +937,12 @@ main_uninstall()
     sys_delete_shell_completion
 
     # these directories are created on the fly during usage.
-    _msg "${INF}removing /etc/guix"
+    _msg_info "removing /etc/guix"
     rm -rf /etc/guix
-    _msg "${INF}removing /var/log/guix"
+    _msg_info "removing /var/log/guix"
     rm -rf /var/log/guix
 
-    _msg "${PAS}Guix has successfully been uninstalled!"
+    _msg_pass "Guix has successfully been uninstalled!"
 }
 
 main()
-- 
2.47.1





Message sent to andrew@HIDDEN, janneke@HIDDEN, ludo@HIDDEN, tanguy@HIDDEN, vagrant@HIDDEN, guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#76082] [PATCH 9/9] guix-install.sh: Check for existing installation before downloading.
Resent-From: Liam Hupfer <liam@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: andrew@HIDDEN, janneke@HIDDEN, ludo@HIDDEN, tanguy@HIDDEN, vagrant@HIDDEN, guix-patches@HIDDEN
Resent-Date: Thu, 06 Feb 2025 04:27:05 +0000
Resent-Message-ID: <handler.76082.B76082.17388160039685 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 76082
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 76082 <at> debbugs.gnu.org
Cc: Liam Hupfer <liam@HIDDEN>, Andrew Tropin <andrew@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN>, Vagrant Cascadian <vagrant@HIDDEN>
X-Debbugs-Original-Xcc: Andrew Tropin <andrew@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN>, Vagrant Cascadian <vagrant@HIDDEN>
Received: via spool by 76082-submit <at> debbugs.gnu.org id=B76082.17388160039685
          (code B ref 76082); Thu, 06 Feb 2025 04:27:05 +0000
Received: (at 76082) by debbugs.gnu.org; 6 Feb 2025 04:26:43 +0000
Received: from localhost ([127.0.0.1]:53636 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tftTO-0002W7-Ga
	for submit <at> debbugs.gnu.org; Wed, 05 Feb 2025 23:26:42 -0500
Received: from out-189.mta1.migadu.com ([2001:41d0:203:375::bd]:42369)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <liam@HIDDEN>) id 1tftTJ-0002VT-3L
 for 76082 <at> debbugs.gnu.org; Wed, 05 Feb 2025 23:26:37 -0500
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpfr.net; s=key1;
 t=1738815990;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=jf0lWL+Q51AXR8iJHOrYfOcwvNwOczb6iewcDMc3Z4Y=;
 b=E9wvFNnBDvqzanmcZludj3IoklDNAanJY2na22pmwWWCOl05/01RZ4KlfqXECNcEDYJKWK
 20T6fN5soppN9J+MJVJrmYutsrw055FiZFCxZCPL8O8uiQ8CwiXbjQdypJaXx50nfxPlkv
 By85HTHa+2dceCrVg8SWz9v9QwVuHpq74YL/N9vK1ssOvwpSRiQcrPhAUD1cYtfQxxYIxd
 f6XCZkJgNoROhIJQ57hV9iScEiwjrCqysyntpE2FzWbhg9ofEyusEFq6hBRI9EDQxu5pbf
 AvKRcv/9SoB8YlA21N3FPPkem97GvdUntycvtMlugCPUdXwRo5EawzQRtAlgjQ==
From: Liam Hupfer <liam@HIDDEN>
Date: Wed,  5 Feb 2025 22:25:05 -0600
Message-ID: <3bdb2d798b0ef6ffbba1f20e7263e47be6e9b9e3.1738815703.git.liam@HIDDEN>
In-Reply-To: <cover.1738814583.git.liam@HIDDEN>
References: <cover.1738814583.git.liam@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Spam-Score: -0.0 (/)
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.0 (-)

Previously, the check came after guix_get_bin.  There’s no need to fetch
the rather large release archive if there’s an existing installation, so
check first.  Refactor the check into a function similar to other
preflight checks.

* etc/guix-install.sh: Check for existing installation before
downloading.

Change-Id: I5506fb1cacdc88bd6355e8dfa1f690acf7886c1f
---
 etc/guix-install.sh | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 7a731962b3..297a726ad6 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -315,6 +315,19 @@ chk_sys_nscd()
     fi
 }
 
+chk_existing()
+{ # Avoid clobbering existing installations.
+    _debug "--- [ ${FUNCNAME[0]} ] ---"
+
+    if [[ -e /var/guix && -e /gnu ]]; then
+        if [ -n "$GUIX_ALLOW_OVERWRITE" ]; then
+            _msg_warn "Overwriting existing installation!"
+        else
+            die "A previous Guix installation was found.  Refusing to overwrite."
+        fi
+    fi
+}
+
 # Configure substitute discovery according to user's preferences.
 # $1 is the installed service file to edit.
 configure_substitute_discovery() {
@@ -393,16 +406,6 @@ sys_create_store()
     local pkg="$1"
     local tmp_path="$2"
 
-    _debug "--- [ ${FUNCNAME[0]} ] ---"
-
-    if [[ -e /var/guix && -e /gnu ]]; then
-        if [ -n "$GUIX_ALLOW_OVERWRITE" ]; then
-            _msg_warn "Overwriting existing installation!"
-        else
-            die "A previous Guix installation was found.  Refusing to overwrite."
-        fi
-    fi
-
     cd "$tmp_path"
     _msg_info "Installing /var/guix and /gnu..."
     # Strip (skip) the leading ‘.’ component, which fails on read-only ‘/’.
@@ -875,6 +878,7 @@ main_install()
     chk_gpg_keyring
     chk_sys_arch
     chk_sys_nscd
+    chk_existing
 
     _msg_info "system is ${ARCH_OS}"
 
-- 
2.47.1





Message sent:


MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: bug#76082: closed ([PATCH 0/9] Improve profile initialization on
 foreign distros plus misc improvements)
CC: tracker <at> debbugs.gnu.org
Message-ID: <handler.76082.D76082.174014559324017.ackdone <at> debbugs.gnu.org>
References: <87wmdj76ms.fsf@HIDDEN> <cover.1738814583.git.liam@HIDDEN>
X-Gnu-PR-Message: closed 76082
X-Gnu-PR-Package: guix-patches
X-Gnu-PR-Keywords: patch
Date: Fri, 21 Feb 2025 13:47:02 +0000
Content-Type: multipart/mixed; boundary="----------=_1740145622-24256-0"

This is a multi-part message in MIME format...

------------=_1740145622-24256-0
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=utf-8

Your message dated Fri, 21 Feb 2025 14:46:19 +0100
with message-id <87wmdj76ms.fsf@HIDDEN>
and subject line Re: [bug#76082] [PATCH 0/9] Improve profile initialization=
 on foreign distros plus misc improvements
has caused the debbugs.gnu.org bug report #76082,
regarding [PATCH 0/9] Improve profile initialization on foreign distros plu=
s misc improvements
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@HIDDEN)


--=20
76082: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D76082
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems

------------=_1740145622-24256-0
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at submit) by debbugs.gnu.org; 6 Feb 2025 04:08:18 +0000
Received: from localhost ([127.0.0.1]:53572 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tftBa-0001cL-Ao
	for submit <at> debbugs.gnu.org; Wed, 05 Feb 2025 23:08:18 -0500
Received: from lists.gnu.org ([2001:470:142::17]:38656)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <liam@HIDDEN>) id 1tftBV-0001ba-Gn
 for submit <at> debbugs.gnu.org; Wed, 05 Feb 2025 23:08:15 -0500
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 <liam@HIDDEN>) id 1tftB5-0006TL-HE
 for guix-patches@HIDDEN; Wed, 05 Feb 2025 23:07:52 -0500
Received: from out-183.mta0.migadu.com ([2001:41d0:1004:224b::b7])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <liam@HIDDEN>) id 1tftB2-0003su-GA
 for guix-patches@HIDDEN; Wed, 05 Feb 2025 23:07:47 -0500
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpfr.net; s=key1;
 t=1738814856;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding;
 bh=zzBZGsdwMx4Hn7vFE3kDoZ+JaiSZI9uKJcQ3dPnjaoE=;
 b=I5nIlOYwSJ9JRKs1T12hs6YGe42o+S7iCJRRM80PVmi7Ona1OAHF/l+4a+gm9xHJR4UCYj
 8kClSYTyoUz+UG9eYKxaciA5zMo+InjBTmUQ4t8lqvmh5K7xy8E1WtUIPJ1J7VvWDChLbw
 aHmtG6F08JKiVCaHDsF7UyRscZBWSgFc7EeZrEiaNvBIdi01zuaiJD6y7H6TFNtCTLZ7Dq
 Jk0KU0mnSg73BBzB2NIT24E9E3wDcALc7RY/VHqYdHsckjUrYsiE/XmE+Ynxn1xFhn6EOa
 J4I41tJraaPp00+P3TqMJH/oKR74/APTaDkYq1PeF9vza92YX7Sp7Qbgfek8FQ==
From: Liam Hupfer <liam@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 0/9] Improve profile initialization on foreign distros plus
 misc improvements
Date: Wed,  5 Feb 2025 22:07:20 -0600
Message-ID: <cover.1738814583.git.liam@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Debbugs-Cc: Andrew Tropin <andrew@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN>, Vagrant Cascadian <vagrant@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
Received-SPF: pass client-ip=2001:41d0:1004:224b::b7;
 envelope-from=liam@HIDDEN; helo=out-183.mta0.migadu.com
X-Spam_score_int: -16
X-Spam_score: -1.7
X-Spam_bar: -
X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1,
 DKIM_SIGNED=0.1, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
Cc: Liam Hupfer <liam@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 (/)

Hi Guix!  Hope those who attended enjoyed Guix Days and FOSDEM.  Looks
like the Whippet talk is the first recording from the DMC track to go
up!

This series modifies the /etc/profile.d/zzz-guix.sh deployed by
guix-install.sh (and tweaks Guix Home’s setup-environment script) to
make search path initialization a little more consistent based on my
experiences using Guix on NixOS and Ubuntu. Currently, new users tend to
end up with numerous duplicate search path entries, which can be
confusing when trying to grok profiles and search paths early on.

Ironically, NixOS and Ubuntu both ship “native” Guix packages.  I
figured I should start by improving the upstream installation script,
though, since it tends to inspire foreign distros’ Guix package recipes.
While I’m here, I did some general tidying as well.

The most contentious change is the removal of any attempt to initialize
Guix Home from /etc/profile.d/.  The rationale here is that Guix Home
has more in common with Guix System than the ‘guix pull’ and default
imperative user profiles.  Guix Home can do arbitrary things at profile
initialization.  It initializes itself in ~/.profile by default and
documents shell configuration to source ~.profile if the user doesn’t
also manage their shell with Guix Home.  Since Guix Home can manage
itself, we can keep it self-contained rather than trying to keep
/etc/profile.d/zzz-guix.sh in lockstep with Guix Home’s dedicated
initialization code.

I tested the updated install script in a Debian container via Incus (LXD
successor) and the updates to Guix Home via ‘./pre-inst-env guix home
container home-test.scm’ with a small home environment.  Additional
testing is appreciated, of course!

Along with the Guix Home team, Vagrant is Cc’d since these changes may
inform changes to the Debian package (thank you for developing it,
btw!).  I help maintain the NixOS module and plan to update it
accordingly once these changes make it through review.

Thanks!

Liam Hupfer (9):
  home: services: setup-environment: Use GUIX_PROFILE.
  home: services: Unset variables after profile init.
  home: services: setup-environment: Set GUIX_LOCPATH.
  guix-install.sh: Remove system-level Guix Home initialization.
  guix-install.sh: Improve Guix profile sourcing.
  guix-install.sh: Add to MANPATH.
  guix-install.sh: Appease shellcheck.
  guix-install.sh: Add msg helpers and use stderr consistently.
  guix-install.sh: Check for existing installation before downloading.

 etc/guix-install.sh          | 264 ++++++++++++++++++++---------------
 gnu/home/services.scm        |  32 +++--
 gnu/home/services/shells.scm |   3 +-
 3 files changed, 171 insertions(+), 128 deletions(-)


base-commit: 52c05f3b120e641c8bd2d68cfcf0d6af947de27b
-- 
2.47.1




------------=_1740145622-24256-0
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at 76082-done) by debbugs.gnu.org; 21 Feb 2025 13:46:33 +0000
Received: from localhost ([127.0.0.1]:57295 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tlTMO-0006FH-Fb
	for submit <at> debbugs.gnu.org; Fri, 21 Feb 2025 08:46:33 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:56428)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1tlTML-0006E6-H8
 for 76082-done <at> debbugs.gnu.org; Fri, 21 Feb 2025 08:46:30 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1tlTMF-0005cx-2P; Fri, 21 Feb 2025 08:46:23 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To:
 From; bh=RcbKNksJqBZ+fEjOGNr/ywvgdfpfgZXgDWKIjBcJ1hM=; b=R2E0nxGheymkzRwxzSa3
 OGH44Ykc1Cq0GFKDJExwFtrvp9Q73HX3cmvzPrtEQGIuCdXNI2QnotOiILUBc4EkV5FXAk4e/NxhR
 g1A8s6oYFN98ppOQL/wZEc+KN1m7AWtgeiY/Mzrn2ShFZK0jhZsxIqwWn7+j56hchUcKlbeX+yyih
 4kWoUodMVyaJ2hDtjBTQz7tg2Tv/FojML233yXf7Koq+XkpQHGW74zrV8sMzCHDInAchmK4R5UsFH
 XWnOhHe8Hf/D6FAZ/csSuJAZyrMOKE+ODwCBC+u73wij3/pNrJtuRzCHxS0iXV5CmEJ0oYGL6GTM9
 4v6lbh7clCnMow==;
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Liam Hupfer <liam@HIDDEN>
Subject: Re: [bug#76082] [PATCH 0/9] Improve profile initialization on
 foreign distros plus misc improvements
In-Reply-To: <cover.1738814583.git.liam@HIDDEN> (Liam Hupfer's message of
 "Wed, 5 Feb 2025 22:07:20 -0600")
References: <cover.1738814583.git.liam@HIDDEN>
Date: Fri, 21 Feb 2025 14:46:19 +0100
Message-ID: <87wmdj76ms.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 76082-done
Cc: Vagrant Cascadian <vagrant@HIDDEN>,
 Tanguy Le Carrour <tanguy@HIDDEN>,
 Janneke Nieuwenhuizen <janneke@HIDDEN>, 76082-done <at> debbugs.gnu.org,
 Andrew Tropin <andrew@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: -3.3 (---)

Hi Liam,

Liam Hupfer <liam@HIDDEN> skribis:

> Hi Guix!  Hope those who attended enjoyed Guix Days and FOSDEM.  Looks
> like the Whippet talk is the first recording from the DMC track to go
> up!

:-)  Good time in Brussels!

>   home: services: setup-environment: Use GUIX_PROFILE.
>   home: services: Unset variables after profile init.
>   home: services: setup-environment: Set GUIX_LOCPATH.
>   guix-install.sh: Remove system-level Guix Home initialization.
>   guix-install.sh: Improve Guix profile sourcing.
>   guix-install.sh: Add to MANPATH.
>   guix-install.sh: Appease shellcheck.
>   guix-install.sh: Add msg helpers and use stderr consistently.
>   guix-install.sh: Check for existing installation before downloading.

This all looks reasonable and largely safe to me to I went ahead and
applied it.

Everyone else: please speak up if you think something needs to be
adjusted or discussed.

Thanks!

Ludo=E2=80=99.


------------=_1740145622-24256-0--


Message sent:


MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Liam Hupfer <liam@HIDDEN>
Subject: bug#76082: closed (Re: [bug#76082] [PATCH 0/9] Improve profile
 initialization on foreign distros plus misc improvements)
Message-ID: <handler.76082.D76082.174014559324017.notifdone <at> debbugs.gnu.org>
References: <87wmdj76ms.fsf@HIDDEN> <cover.1738814583.git.liam@HIDDEN>
X-Gnu-PR-Message: they-closed 76082
X-Gnu-PR-Package: guix-patches
X-Gnu-PR-Keywords: patch
Reply-To: 76082 <at> debbugs.gnu.org
Date: Fri, 21 Feb 2025 13:47:02 +0000
Content-Type: multipart/mixed; boundary="----------=_1740145622-24256-1"

This is a multi-part message in MIME format...

------------=_1740145622-24256-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"

Your bug report

#76082: [PATCH 0/9] Improve profile initialization on foreign distros plus =
misc improvements

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 76082 <at> debbugs.gnu.org.

--=20
76082: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D76082
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems

------------=_1740145622-24256-1
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at 76082-done) by debbugs.gnu.org; 21 Feb 2025 13:46:33 +0000
Received: from localhost ([127.0.0.1]:57295 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tlTMO-0006FH-Fb
	for submit <at> debbugs.gnu.org; Fri, 21 Feb 2025 08:46:33 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:56428)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1tlTML-0006E6-H8
 for 76082-done <at> debbugs.gnu.org; Fri, 21 Feb 2025 08:46:30 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1tlTMF-0005cx-2P; Fri, 21 Feb 2025 08:46:23 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To:
 From; bh=RcbKNksJqBZ+fEjOGNr/ywvgdfpfgZXgDWKIjBcJ1hM=; b=R2E0nxGheymkzRwxzSa3
 OGH44Ykc1Cq0GFKDJExwFtrvp9Q73HX3cmvzPrtEQGIuCdXNI2QnotOiILUBc4EkV5FXAk4e/NxhR
 g1A8s6oYFN98ppOQL/wZEc+KN1m7AWtgeiY/Mzrn2ShFZK0jhZsxIqwWn7+j56hchUcKlbeX+yyih
 4kWoUodMVyaJ2hDtjBTQz7tg2Tv/FojML233yXf7Koq+XkpQHGW74zrV8sMzCHDInAchmK4R5UsFH
 XWnOhHe8Hf/D6FAZ/csSuJAZyrMOKE+ODwCBC+u73wij3/pNrJtuRzCHxS0iXV5CmEJ0oYGL6GTM9
 4v6lbh7clCnMow==;
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Liam Hupfer <liam@HIDDEN>
Subject: Re: [bug#76082] [PATCH 0/9] Improve profile initialization on
 foreign distros plus misc improvements
In-Reply-To: <cover.1738814583.git.liam@HIDDEN> (Liam Hupfer's message of
 "Wed, 5 Feb 2025 22:07:20 -0600")
References: <cover.1738814583.git.liam@HIDDEN>
Date: Fri, 21 Feb 2025 14:46:19 +0100
Message-ID: <87wmdj76ms.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 76082-done
Cc: Vagrant Cascadian <vagrant@HIDDEN>,
 Tanguy Le Carrour <tanguy@HIDDEN>,
 Janneke Nieuwenhuizen <janneke@HIDDEN>, 76082-done <at> debbugs.gnu.org,
 Andrew Tropin <andrew@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: -3.3 (---)

Hi Liam,

Liam Hupfer <liam@HIDDEN> skribis:

> Hi Guix!  Hope those who attended enjoyed Guix Days and FOSDEM.  Looks
> like the Whippet talk is the first recording from the DMC track to go
> up!

:-)  Good time in Brussels!

>   home: services: setup-environment: Use GUIX_PROFILE.
>   home: services: Unset variables after profile init.
>   home: services: setup-environment: Set GUIX_LOCPATH.
>   guix-install.sh: Remove system-level Guix Home initialization.
>   guix-install.sh: Improve Guix profile sourcing.
>   guix-install.sh: Add to MANPATH.
>   guix-install.sh: Appease shellcheck.
>   guix-install.sh: Add msg helpers and use stderr consistently.
>   guix-install.sh: Check for existing installation before downloading.

This all looks reasonable and largely safe to me to I went ahead and
applied it.

Everyone else: please speak up if you think something needs to be
adjusted or discussed.

Thanks!

Ludo=E2=80=99.


------------=_1740145622-24256-1
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at submit) by debbugs.gnu.org; 6 Feb 2025 04:08:18 +0000
Received: from localhost ([127.0.0.1]:53572 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tftBa-0001cL-Ao
	for submit <at> debbugs.gnu.org; Wed, 05 Feb 2025 23:08:18 -0500
Received: from lists.gnu.org ([2001:470:142::17]:38656)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <liam@HIDDEN>) id 1tftBV-0001ba-Gn
 for submit <at> debbugs.gnu.org; Wed, 05 Feb 2025 23:08:15 -0500
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 <liam@HIDDEN>) id 1tftB5-0006TL-HE
 for guix-patches@HIDDEN; Wed, 05 Feb 2025 23:07:52 -0500
Received: from out-183.mta0.migadu.com ([2001:41d0:1004:224b::b7])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <liam@HIDDEN>) id 1tftB2-0003su-GA
 for guix-patches@HIDDEN; Wed, 05 Feb 2025 23:07:47 -0500
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpfr.net; s=key1;
 t=1738814856;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding;
 bh=zzBZGsdwMx4Hn7vFE3kDoZ+JaiSZI9uKJcQ3dPnjaoE=;
 b=I5nIlOYwSJ9JRKs1T12hs6YGe42o+S7iCJRRM80PVmi7Ona1OAHF/l+4a+gm9xHJR4UCYj
 8kClSYTyoUz+UG9eYKxaciA5zMo+InjBTmUQ4t8lqvmh5K7xy8E1WtUIPJ1J7VvWDChLbw
 aHmtG6F08JKiVCaHDsF7UyRscZBWSgFc7EeZrEiaNvBIdi01zuaiJD6y7H6TFNtCTLZ7Dq
 Jk0KU0mnSg73BBzB2NIT24E9E3wDcALc7RY/VHqYdHsckjUrYsiE/XmE+Ynxn1xFhn6EOa
 J4I41tJraaPp00+P3TqMJH/oKR74/APTaDkYq1PeF9vza92YX7Sp7Qbgfek8FQ==
From: Liam Hupfer <liam@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 0/9] Improve profile initialization on foreign distros plus
 misc improvements
Date: Wed,  5 Feb 2025 22:07:20 -0600
Message-ID: <cover.1738814583.git.liam@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Debbugs-Cc: Andrew Tropin <andrew@HIDDEN>, Janneke Nieuwenhuizen <janneke@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>, Tanguy Le Carrour <tanguy@HIDDEN>, Vagrant Cascadian <vagrant@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
Received-SPF: pass client-ip=2001:41d0:1004:224b::b7;
 envelope-from=liam@HIDDEN; helo=out-183.mta0.migadu.com
X-Spam_score_int: -16
X-Spam_score: -1.7
X-Spam_bar: -
X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1,
 DKIM_SIGNED=0.1, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
Cc: Liam Hupfer <liam@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 (/)

Hi Guix!  Hope those who attended enjoyed Guix Days and FOSDEM.  Looks
like the Whippet talk is the first recording from the DMC track to go
up!

This series modifies the /etc/profile.d/zzz-guix.sh deployed by
guix-install.sh (and tweaks Guix Home’s setup-environment script) to
make search path initialization a little more consistent based on my
experiences using Guix on NixOS and Ubuntu. Currently, new users tend to
end up with numerous duplicate search path entries, which can be
confusing when trying to grok profiles and search paths early on.

Ironically, NixOS and Ubuntu both ship “native” Guix packages.  I
figured I should start by improving the upstream installation script,
though, since it tends to inspire foreign distros’ Guix package recipes.
While I’m here, I did some general tidying as well.

The most contentious change is the removal of any attempt to initialize
Guix Home from /etc/profile.d/.  The rationale here is that Guix Home
has more in common with Guix System than the ‘guix pull’ and default
imperative user profiles.  Guix Home can do arbitrary things at profile
initialization.  It initializes itself in ~/.profile by default and
documents shell configuration to source ~.profile if the user doesn’t
also manage their shell with Guix Home.  Since Guix Home can manage
itself, we can keep it self-contained rather than trying to keep
/etc/profile.d/zzz-guix.sh in lockstep with Guix Home’s dedicated
initialization code.

I tested the updated install script in a Debian container via Incus (LXD
successor) and the updates to Guix Home via ‘./pre-inst-env guix home
container home-test.scm’ with a small home environment.  Additional
testing is appreciated, of course!

Along with the Guix Home team, Vagrant is Cc’d since these changes may
inform changes to the Debian package (thank you for developing it,
btw!).  I help maintain the NixOS module and plan to update it
accordingly once these changes make it through review.

Thanks!

Liam Hupfer (9):
  home: services: setup-environment: Use GUIX_PROFILE.
  home: services: Unset variables after profile init.
  home: services: setup-environment: Set GUIX_LOCPATH.
  guix-install.sh: Remove system-level Guix Home initialization.
  guix-install.sh: Improve Guix profile sourcing.
  guix-install.sh: Add to MANPATH.
  guix-install.sh: Appease shellcheck.
  guix-install.sh: Add msg helpers and use stderr consistently.
  guix-install.sh: Check for existing installation before downloading.

 etc/guix-install.sh          | 264 ++++++++++++++++++++---------------
 gnu/home/services.scm        |  32 +++--
 gnu/home/services/shells.scm |   3 +-
 3 files changed, 171 insertions(+), 128 deletions(-)


base-commit: 52c05f3b120e641c8bd2d68cfcf0d6af947de27b
-- 
2.47.1




------------=_1740145622-24256-1--



Last modified: Fri, 21 Feb 2025 14:00:06 UTC

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