Received: (at submit) by debbugs.gnu.org; 15 Apr 2025 08:24:16 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 15 04:24:15 2025 Received: from localhost ([127.0.0.1]:50476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1u4baZ-0007Ao-32 for submit <at> debbugs.gnu.org; Tue, 15 Apr 2025 04:24:15 -0400 Received: from lists.gnu.org ([2001:470:142::17]:57022) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <csantosb@HIDDEN>) id 1u4baU-0007AS-MB for submit <at> debbugs.gnu.org; Tue, 15 Apr 2025 04:24:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <csantosb@HIDDEN>) id 1u4baP-0005QJ-86 for guix-patches@HIDDEN; Tue, 15 Apr 2025 04:24:05 -0400 Received: from devianza.investici.org ([2c0f:f930:0:4::108]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <csantosb@HIDDEN>) id 1u4baM-0003RI-7O for guix-patches@HIDDEN; Tue, 15 Apr 2025 04:24:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1744705438; bh=8InCb6mxDelspKYi3kW7gyWDE449wluaHeabcYIrmMc=; h=From:To:Cc:Subject:Date:From; b=FTe2ExMB8GU8yw7XyqejcqF784aJrwZ9ekd4BF3DQtsVNtAO8qyuBe0mMeBe8Lvxu tfxG91t3ki5Ikb8P3qUSstqPArdCAADRdga0/6yYE+FmvHgB3qomGAa4h0gRpD/XZP bMbLwBOGGz7L3SWLmknMBSuoyNnhjC029njJtUGU= Received: from mx2.investici.org (unknown [127.0.0.1]) by devianza.investici.org (Postfix) with ESMTP id 4ZcHHf0NlMz6vLt; Tue, 15 Apr 2025 08:23:58 +0000 (UTC) Received: from [198.167.222.108] (mx2.investici.org [198.167.222.108]) (Authenticated sender: cayetano.santos@HIDDEN) by localhost (Postfix) with ESMTPSA id 4ZcHHd5sF8z6vLq; Tue, 15 Apr 2025 08:23:57 +0000 (UTC) From: Cayetano Santos <csantosb@HIDDEN> To: guix-patches@HIDDEN Subject: [PATCH] guix-install.sh: spin-off zzz-guix.sh script out of the installer. Date: Tue, 15 Apr 2025 10:19:53 +0200 Message-ID: <ef4d7602b74edd74f64934a4a629e9d3a78133f9.1744705193.git.csantosb@HIDDEN> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2c0f:f930:0:4::108; envelope-from=csantosb@HIDDEN; helo=devianza.investici.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit Cc: Cayetano Santos <csantosb@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.1 (/) The functionality in the install script remains the same, while this change will contribute to follow upgrades in zzz-guix.sh. Change-Id: Ieed963cccb445034532ec08ee2731926c791d26a --- When using guix on a foreign distribution, the zzz-guix.sh is copied to /etc/profile.d. When this file is renamed or updated, this modification remains unnoticed, as guix pull does not have any effect on that. This is a source of potential issues. Spinning-off the zzz-guix.sh out of the installer script mitigates this situation, as users will be able to manually update it, following changes. In current situation, users need to follow changes in the whole installer, searching for modifications in the relevant section, which is unfriendly. etc/guix-install.sh | 55 +-------------------------------------------- etc/zzz-guix.sh | 52 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 54 deletions(-) create mode 100644 etc/zzz-guix.sh diff --git a/etc/guix-install.sh b/etc/guix-install.sh index b5d833cd64..388d2cc9be 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -737,60 +737,7 @@ sys_create_init_profile() { # Define for better desktop integration # This will not take effect until the next shell or desktop session! [ -d "/etc/profile.d" ] || mkdir /etc/profile.d # Just in case - cat <<"EOF" > /etc/profile.d/zzz-guix.sh -# Explicitly initialize XDG base directory variables to ease compatibility -# with Guix System: see <https://issues.guix.gnu.org/56050#3>. -export XCURSOR_PATH="${XCURSOR_PATH:-/usr/local/share/icons:/usr/share/icons}" -export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}" -export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" -export XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}" -export XDG_DATA_DIRS="${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/}" -export XDG_CONFIG_DIRS="${XDG_CONFIG_DIRS:-/etc/xdg}" -export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}" -# no default for XDG_RUNTIME_DIR (depends on foreign distro for semantics) - -# `guix pull` profile -GUIX_PROFILE="$HOME/.config/guix/current" -export PATH="$GUIX_PROFILE/bin${PATH:+:}$PATH" -# Add to INFOPATH and MANPATH so the latest Guix documentation is available to -# info and man readers. When INFOPATH is unset, add a trailing colon so Emacs -# searches 'Info-default-directory-list'. When MANPATH is unset, add a -# trailing colon so the system default search path is used. -export INFOPATH="$GUIX_PROFILE/share/info:$INFOPATH" -export MANPATH="$GUIX_PROFILE/share/man:$MANPATH" -# Expose the latest Guix modules to Guile so guix shell and repls spawned by -# e.g. Geiser work out of the box. -export GUILE_LOAD_PATH="$GUIX_PROFILE/share/guile/site/3.0${GUILE_LOAD_PATH:+:}$GUILE_LOAD_PATH" -export GUILE_LOAD_COMPILED_PATH="$GUIX_PROFILE/lib/guile/3.0/site-ccache${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH" - -# User's default profile, if it exists -GUIX_PROFILE="$HOME/.guix-profile" -if [ -L "$GUIX_PROFILE" ]; then - . "$GUIX_PROFILE/etc/profile" - - # see info '(guix) Application Setup' - export GUIX_LOCPATH="$GUIX_PROFILE/lib/locale${GUIX_LOCPATH:+:}$GUIX_LOCPATH" - - # Documentation search paths may be handled by $GUIX_PROFILE/etc/profile if - # the user installs info and man readers via Guix. If the user doesn’t, - # explicitly add to them so documentation for software from ‘guix install’ - # is available to the system info and man readers. - case $INFOPATH in - *$GUIX_PROFILE/share/info*) ;; - *) export INFOPATH="$GUIX_PROFILE/share/info:$INFOPATH" ;; - esac - case $MANPATH in - *$GUIX_PROFILE/share/man*) ;; - *) export MANPATH="$GUIX_PROFILE/share/man:$MANPATH" - esac -fi - -# NOTE: Guix Home handles its own profile initialization in ~/.profile. See -# info '(guix) Configuring the Shell'. - -# Clean up after ourselves. -unset GUIX_PROFILE -EOF + cp zzz-guix.sh /etc/profile.d } sys_create_shell_completion() diff --git a/etc/zzz-guix.sh b/etc/zzz-guix.sh new file mode 100644 index 0000000000..2d635433bc --- /dev/null +++ b/etc/zzz-guix.sh @@ -0,0 +1,52 @@ +# Explicitly initialize XDG base directory variables to ease compatibility +# with Guix System: see <https://issues.guix.gnu.org/56050#3>. +export XCURSOR_PATH="${XCURSOR_PATH:-/usr/local/share/icons:/usr/share/icons}" +export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}" +export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +export XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}" +export XDG_DATA_DIRS="${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/}" +export XDG_CONFIG_DIRS="${XDG_CONFIG_DIRS:-/etc/xdg}" +export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}" +# no default for XDG_RUNTIME_DIR (depends on foreign distro for semantics) + +# `guix pull` profile +GUIX_PROFILE="$HOME/.config/guix/current" +export PATH="$GUIX_PROFILE/bin${PATH:+:}$PATH" +# Add to INFOPATH and MANPATH so the latest Guix documentation is available to +# info and man readers. When INFOPATH is unset, add a trailing colon so Emacs +# searches 'Info-default-directory-list'. When MANPATH is unset, add a +# trailing colon so the system default search path is used. +export INFOPATH="$GUIX_PROFILE/share/info:$INFOPATH" +export MANPATH="$GUIX_PROFILE/share/man:$MANPATH" +# Expose the latest Guix modules to Guile so guix shell and repls spawned by +# e.g. Geiser work out of the box. +export GUILE_LOAD_PATH="$GUIX_PROFILE/share/guile/site/3.0${GUILE_LOAD_PATH:+:}$GUILE_LOAD_PATH" +export GUILE_LOAD_COMPILED_PATH="$GUIX_PROFILE/lib/guile/3.0/site-ccache${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH" + +# User's default profile, if it exists +GUIX_PROFILE="$HOME/.guix-profile" +if [ -L "$GUIX_PROFILE" ]; then + . "$GUIX_PROFILE/etc/profile" + + # see info '(guix) Application Setup' + export GUIX_LOCPATH="$GUIX_PROFILE/lib/locale${GUIX_LOCPATH:+:}$GUIX_LOCPATH" + + # Documentation search paths may be handled by $GUIX_PROFILE/etc/profile if + # the user installs info and man readers via Guix. If the user doesn’t, + # explicitly add to them so documentation for software from ‘guix install’ + # is available to the system info and man readers. + case $INFOPATH in + *$GUIX_PROFILE/share/info*) ;; + *) export INFOPATH="$GUIX_PROFILE/share/info:$INFOPATH" ;; + esac + case $MANPATH in + *$GUIX_PROFILE/share/man*) ;; + *) export MANPATH="$GUIX_PROFILE/share/man:$MANPATH" + esac +fi + +# NOTE: Guix Home handles its own profile initialization in ~/.profile. See +# info '(guix) Configuring the Shell'. + +# Clean up after ourselves. +unset GUIX_PROFILE base-commit: 287aec56a53fbd66492711c375d0b39ccb6c1590 -- 2.49.0
Cayetano Santos <csantosb@HIDDEN>
:guix-patches@HIDDEN
.
Full text available.guix-patches@HIDDEN
:bug#77819
; Package guix-patches
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.