GNU logs - #77525, boring messages


Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#77525] [PATCH v4 2/6] system: /etc/profile: Rearrange to avoid search path duplication.
Resent-From: Hilton Chain <hako@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Fri, 04 Apr 2025 03:24:05 +0000
Resent-Message-ID: <handler.77525.B.17437370369989 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 77525
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 77525 <at> debbugs.gnu.org
Cc: Hilton Chain <hako@HIDDEN>
X-Debbugs-Original-To: guix-patches@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.17437370369989
          (code B ref -1); Fri, 04 Apr 2025 03:24:05 +0000
Received: (at submit) by debbugs.gnu.org; 4 Apr 2025 03:23:56 +0000
Received: from localhost ([127.0.0.1]:36541 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u0Xet-0002b2-8T
	for submit <at> debbugs.gnu.org; Thu, 03 Apr 2025 23:23:55 -0400
Received: from lists.gnu.org ([2001:470:142::17]:49146)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <hako@HIDDEN>)
 id 1u0Xen-0002a0-6g
 for submit <at> debbugs.gnu.org; Thu, 03 Apr 2025 23:23:49 -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 <hako@HIDDEN>)
 id 1u0Xeh-0006sm-SO
 for guix-patches@HIDDEN; Thu, 03 Apr 2025 23:23:43 -0400
Received: from mx.boiledscript.com ([88.99.243.112])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <hako@HIDDEN>)
 id 1u0Xef-0002hb-Sx
 for guix-patches@HIDDEN; Thu, 03 Apr 2025 23:23:43 -0400
From: Hilton Chain <hako@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space;
 s=mail; t=1743737019;
 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=E2TOJ35Cov5wFIkREoQgpNdalmX8Iee+ZPO530mXw1c=;
 b=cSTsedYNCVNwdB8ksTDy11zHF2Ni9j49dXpsSdR0vv4h6sN1OMah8HZ0a/5DNDzJnHUilh
 ZAWtg2mvc3Zx5JQieLlTBllb/fu2kdY4XZcw0JFSdUmGH9jPg+rrtHTnGgFc5mUVbgwkF4
 YpCv51vD7ebg9NZ9x219NKbChb45wyJtTJr0RSA7V+TcNxa1GaHN9oDO7RvJXEv402/B0T
 x39wm0BcBP14BbnVGWrbzNS96cmh5ETEg1CufV70oYLh/xUNjAMEOfygOen5D097pJFvrr
 wLUL6ElpJkJgOymW/WGaMN50KSvCzRSy7+8zH0p9+Y3CULmbGJweqJCZ5BGDdw==
Date: Fri,  4 Apr 2025 11:22:59 +0800
Message-ID: <94cf181828817e485cb92cf80365881fe8a8cf47.1743736516.git.hako@HIDDEN>
In-Reply-To: <cover.1743736516.git.hako@HIDDEN>
References: <cover.1743736516.git.hako@HIDDEN>
MIME-Version: 1.0
X-MS-Reactions: disallow
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=88.99.243.112; envelope-from=hako@HIDDEN;
 helo=mx.boiledscript.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 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_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.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: -0.0 (/)

* gnu/system.scm (operating-system-etc-service)[profile]: Set umask first.
Group environment variables setup with profile sourcing to avoid duplication.
Export $GUILE_LOAD_PATH and $GUILE_LOAD_COMPILED_PATH for ‘guix pull’ profile.
* gnu/system/shadow.scm (%default-bash-profile): Remove duplicated exports.

Change-Id: I42ae153b9cd47ca24448fa18ce7f80a5e5c06621
---
 gnu/system.scm        | 96 +++++++++++++++++++++++++++++--------------
 gnu/system/shadow.scm | 10 -----
 2 files changed, 65 insertions(+), 41 deletions(-)

diff --git a/gnu/system.scm b/gnu/system.scm
index c166222854..46e6729e74 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -1060,16 +1060,9 @@ (define* (operating-system-etc-service os)
         ;; Startup file for POSIX-compliant login shells, which set system-wide
         ;; environment variables.
         (profile    (mixed-text-file "profile"  "\
-# Crucial variables that could be missing in the profiles' 'etc/profile'
-# because they would require combining both profiles.
-# FIXME: See <http://bugs.gnu.org/20255>.
-export MANPATH=$HOME/.guix-profile/share/man:/run/current-system/profile/share/man
-export INFOPATH=$HOME/.guix-profile/share/info:/run/current-system/profile/share/info
-export XDG_DATA_DIRS=$HOME/.guix-profile/share:/run/current-system/profile/share
-export XDG_CONFIG_DIRS=$HOME/.guix-profile/etc/xdg:/run/current-system/profile/etc/xdg
-
-# Make sure libXcursor finds cursors installed into user or system profiles.  See <http://bugs.gnu.org/24445>
-export XCURSOR_PATH=$HOME/.icons:$HOME/.guix-profile/share/icons:/run/current-system/profile/share/icons
+# Set the umask, notably for users logging in via 'lsh'.
+# See <http://bugs.gnu.org/22650>.
+umask 022
 
 # Ignore the default value of 'PATH'.
 unset PATH
@@ -1091,32 +1084,73 @@ (define* (operating-system-etc-service os)
                     \"$HOME/.guix-profile\"        \\
                     \"$HOME/.config/guix/current\"
 do
-  if [ -f \"$GUIX_PROFILE/etc/profile\" ]
-  then
+  if [ -f \"$GUIX_PROFILE/etc/profile\" ]; then
     . \"$GUIX_PROFILE/etc/profile\"
-  else
-    # At least define this one so that basic things just work
-    # when the user installs their first package.
-    export PATH=\"$GUIX_PROFILE/bin:$PATH\"
+    if [ ! \"$GUIX_PROFILE\" = \"$HOME/.config/guix/current\" ]; then
+      # Crucial variables that could be missing in the profiles' 'etc/profile'
+      # because they would require combining both profiles.
+      # FIXME: See <http://bugs.gnu.org/20255>.
+      case $XDG_DATA_DIRS in
+        *$GUIX_PROFILE/share*) ;;
+        *) export XDG_DATA_DIRS=\"$GUIX_PROFILE/share${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS\" ;;
+      esac
+      case $XDG_CONFIG_DIRS in
+        *$GUIX_PROFILE/etc/xdg*) ;;
+        *) export XDG_CONFIG_DIRS=\"$GUIX_PROFILE/etc/xdg${XDG_CONFIG_DIRS:+:}$XDG_CONFIG_DIRS\" ;;
+      esac
+      # Make sure libXcursor finds cursors installed into user or system profiles.
+      # See <http://bugs.gnu.org/24445>
+      case $XCURSOR_PATH in
+        *$GUIX_PROFILE/share/icons*) ;;
+        *) export XCURSOR_PATH=\"$GUIX_PROFILE/share/icons${XCURSOR_PATH:+:}$XCURSOR_PATH\" ;;
+      esac
+      # Allow Hunspell-based applications (IceCat, LibreOffice, etc.) to find
+      # dictionaries.
+      case $DICPATH in
+        *$GUIX_PROFILE/share/hunspell*) ;;
+        *) export DICPATH=\"$GUIX_PROFILE/share/hunspell${DICPATH:+:}$DICPATH\" ;;
+      esac
+      # Allow GStreamer-based applications to find plugins.
+      case $GST_PLUGIN_PATH in
+        *$GUIX_PROFILE/lib/gstreamer-1.0*) ;;
+        *) export GST_PLUGIN_PATH=\"$GUIX_PROFILE/lib/gstreamer-1.0${GST_PLUGIN_PATH:+:}$GST_PLUGIN_PATH\" ;;
+      esac
+    fi
+  fi
+  if [ \"$GUIX_PROFILE\" = \"$HOME/.config/guix/current\" ]; then
+    # Expose the latest Guix modules to Guile so guix shell and repls spawned by
+    # e.g. Geiser work out of the box.
+    case $GUILE_LOAD_PATH in
+      *$GUIX_PROFILE/share/guile/site/3.0*) ;;
+      *) export GUILE_LOAD_PATH=\"$GUIX_PROFILE/share/guile/site/3.0${GUILE_LOAD_PATH:+:}$GUILE_LOAD_PATH\" ;;
+    esac
+    case $GUILE_LOAD_COMPILED_PATH in
+      *$GUIX_PROFILE/lib/guile/3.0/site-ccache*) ;;
+      *) export GUILE_LOAD_COMPILED_PATH=\"$GUIX_PROFILE/lib/guile/3.0/site-ccache${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH\" ;;
+    esac
   fi
+  # Make basic things just work when the user installs their first package.
+  case $PATH in
+    *$GUIX_PROFILE/bin*) ;;
+    *) export PATH=\"$GUIX_PROFILE/bin${PATH:+:}$PATH\" ;;
+  esac
+  # When INFOPATH is unset, add a trailing colon so Emacs searches
+  # 'Info-default-directory-list'.
+  case $INFOPATH in
+    *$GUIX_PROFILE/share/info*) ;;
+    *) export INFOPATH=\"$GUIX_PROFILE/share/info:$INFOPATH\" ;;
+  esac
+  # When MANPATH is unset, add a trailing colon so the system default search
+  # path is used.
+  case $MANPATH in
+    *$GUIX_PROFILE/share/man*) ;;
+    *) export MANPATH=\"$GUIX_PROFILE/share/man:$MANPATH\" ;;
+  esac
 done
 
-# Prepend privileged programs.
+# Prepend search paths not in a profile.
 export PATH=/run/privileged/bin:$PATH
-
-# Arrange so that ~/.config/guix/current/share/info comes first.
-export INFOPATH=\"$HOME/.config/guix/current/share/info:$INFOPATH\"
-
-# Set the umask, notably for users logging in via 'lsh'.
-# See <http://bugs.gnu.org/22650>.
-umask 022
-
-# Allow Hunspell-based applications (IceCat, LibreOffice, etc.) to
-# find dictionaries.
-export DICPATH=\"$HOME/.guix-profile/share/hunspell:/run/current-system/profile/share/hunspell\"
-
-# Allow GStreamer-based applications to find plugins.
-export GST_PLUGIN_PATH=\"$HOME/.guix-profile/lib/gstreamer-1.0\"
+export XCURSOR_PATH=\"$HOME/.icons:$XCURSOR_PATH\"
 
 if [ -n \"$BASH_VERSION\" -a -f /etc/bashrc ]
 then
diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm
index b68a818871..cdb804da18 100644
--- a/gnu/system/shadow.scm
+++ b/gnu/system/shadow.scm
@@ -179,16 +179,6 @@ (define %default-bash-profile
 
 # Honor per-interactive-shell startup file
 if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
-
-# Merge search-paths from multiple profiles, the order matters.
-eval \"$(guix package --search-paths \\
--p $HOME/.config/guix/current \\
--p $HOME/.guix-home/profile \\
--p $HOME/.guix-profile \\
--p /run/current-system/profile)\"
-
-# Prepend setuid programs.
-export PATH=/run/setuid-programs:$PATH
 "))
 
 (define %default-zprofile
-- 
2.49.0





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: Hilton Chain <hako@HIDDEN>
Subject: bug#77525: Acknowledgement ([PATCH v4 2/6] system: /etc/profile:
 Rearrange to avoid search path duplication.)
Message-ID: <handler.77525.B.17437370369989.ack <at> debbugs.gnu.org>
References: <94cf181828817e485cb92cf80365881fe8a8cf47.1743736516.git.hako@HIDDEN>
X-Gnu-PR-Message: ack 77525
X-Gnu-PR-Package: guix-patches
X-Gnu-PR-Keywords: patch
Reply-To: 77525 <at> debbugs.gnu.org
Date: Fri, 04 Apr 2025 03:24:06 +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.

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 77525 <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
77525: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D77525
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


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


Received: (at control) by debbugs.gnu.org; 4 Apr 2025 03:27:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 03 23:27:03 2025
Received: from localhost ([127.0.0.1]:36580 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u0Xhv-0002oo-Bz
	for submit <at> debbugs.gnu.org; Thu, 03 Apr 2025 23:27:03 -0400
Received: from mx.boiledscript.com ([2a01:4f8:10b:392::42]:47190)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <hako@HIDDEN>)
 id 1u0Xhr-0002oL-Ek
 for control <at> debbugs.gnu.org; Thu, 03 Apr 2025 23:27:00 -0400
Date: Fri, 04 Apr 2025 11:26:02 +0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space;
 s=mail; t=1743737217;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type;
 bh=1cb6Pxl7vmZdVWKjwiEtbTf2vtKoBRAoWds+NG/Amsw=;
 b=LkIp6WkNK5NOiyZhomWJTqWD6aHdo7i/tJW1qI40rFJ8dTTeeydesXZTyT5zMNiEJCBvpZ
 8TFSzdwfiZqPT+Hjp1cVB2p9YdCLNxn2BFoUJohIMhtqtVnBQVsBpoHRO5FIAnq9xZ+JoV
 4glte2IjroLB7xg2E12QlgY23cOauNUvRPakKeRI6KgEtJ9hMbpWrbGHBaMU37pWKvFMqR
 zKC+Ut6PRH6rw6IfBs4wmDGOCaaxCJtwEuLstPS+TcO9ubmaoQMk0oUO0rdk7CUkXi2sf8
 8k7rcfdCenQkmSS81LKAgfFtGOH3fMvirUDtiNHOzJ4gIwDE2F710GQJIFZpbQ==
Message-ID: <87plhsppyt.wl-hako@HIDDEN>
From: Hilton Chain <hako@HIDDEN>
To: control <at> debbugs.gnu.org
Subject: Control message
MIME-Version: 1.0
X-MS-Reactions: disallow
Content-Type: text/plain; charset=US-ASCII
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: control
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 (-)

merge 77035 77522 77523 77524 77525 77526 77527 77528
quit





Last modified: Fri, 4 Apr 2025 03:30:02 UTC

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