From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 03 23:23:56 2025 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 ) id 1u0Xet-0002b2-8T for submit@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 ) id 1u0Xen-0002a0-6g for submit@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 ) id 1u0Xeh-0006sm-SO for guix-patches@gnu.org; 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 ) id 1u0Xef-0002hb-Sx for guix-patches@gnu.org; Thu, 03 Apr 2025 23:23:43 -0400 From: Hilton Chain 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== To: guix-patches@gnu.org Subject: [PATCH v4 2/6] system: /etc/profile: Rearrange to avoid search path duplication. Date: Fri, 4 Apr 2025 11:22:59 +0800 Message-ID: <94cf181828817e485cb92cf80365881fe8a8cf47.1743736516.git.hako@ultrarare.space> In-Reply-To: References: 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@ultrarare.space; 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-Debbugs-Envelope-To: submit Cc: Hilton Chain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 . -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 -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 . +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 . + 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 + 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 . -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 From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 03 23:27:03 2025 Received: (at control) by debbugs.gnu.org; 4 Apr 2025 03:27:04 +0000 Received: from localhost ([127.0.0.1]:36580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u0Xhv-0002oo-Bz for submit@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 ) id 1u0Xhr-0002oL-Ek for control@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@ultrarare.space> From: Hilton Chain To: control@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@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) merge 77035 77522 77523 77524 77525 77526 77527 77528 quit From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 14 11:12:28 2025 Received: (at 77525) by debbugs.gnu.org; 14 Apr 2025 15:12:28 +0000 Received: from localhost ([127.0.0.1]:48516 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u4LU4-0001Yh-1y for submit@debbugs.gnu.org; Mon, 14 Apr 2025 11:12:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48606) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u4LU0-0001YA-00; Mon, 14 Apr 2025 11:12:24 -0400 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 ) id 1u4LTr-00087U-Rw; Mon, 14 Apr 2025 11:12:16 -0400 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=RjwfGabnibUpsiqooQisWAYWxU1LNVAandEOa7RaiSA=; b=YUqMV3cR6S1SYCLA4jwq lo5U2IO9M2xaIaL7dLqVJgnV7VLu7bVNfLlzau3SEFK0Yz/1FB+Dw32ecVVPuyKeDheaiqYSfiKUR 0Ld6CRcrbiGxjVmEHulWSatEa/nwl8e+ZqDVprhRCoG5se5cCGQJ+u70Bk2YG6Bf+xnPVGiwXU0DR moeh0JTFLnU+e4CgVumeSS0J1hFkW0gF7rObAs405iqhcTZMTm/z+kLb2zTIICwDFTlV6QiYVBioe 2FInNBjnx7gCh86/ARcsGMWbDEQltegYgBOOvbZvlTbkLKySkWd/a1gsSRbQiO5dN87ccMhDfIud1 beJsHxs8EZxGCA==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Hilton Chain Subject: Re: [bug#77525] [PATCH v4 2/6] system: /etc/profile: Rearrange to avoid search path duplication. In-Reply-To: <94cf181828817e485cb92cf80365881fe8a8cf47.1743736516.git.hako@ultrarare.space> (Hilton Chain's message of "Fri, 4 Apr 2025 11:22:59 +0800") References: <94cf181828817e485cb92cf80365881fe8a8cf47.1743736516.git.hako@ultrarare.space> Date: Mon, 14 Apr 2025 17:12:12 +0200 Message-ID: <874iyqg4kz.fsf@gnu.org> 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: 77525 Cc: iyzsong@gmail.com, 77525@debbugs.gnu.org, =?utf-8?B?5a6L5paH5q2m?= , 77528@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Hilton, (Cc: =E5=AE=8B=E6=96=87=E6=AD=A6.) Hilton Chain writes: > * gnu/system.scm (operating-system-etc-service)[profile]: Set umask first. > Group environment variables setup with profile sourcing to avoid duplicat= ion. > Export $GUILE_LOAD_PATH and $GUILE_LOAD_COMPILED_PATH for =E2=80=98guix p= ull=E2=80=99 profile. > * gnu/system/shadow.scm (%default-bash-profile): Remove duplicated export= s. The last item does not say the whole story: > +++ b/gnu/system/shadow.scm > @@ -179,16 +179,6 @@ (define %default-bash-profile >=20=20 > # 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=3D/run/setuid-programs:$PATH > ")) I am the one who suggested to not invoke =E2=80=98guix package=E2=80=99 fro= m shell startup files: https://issues.guix.gnu.org/77035#8-lineno17 However, I hadn=E2=80=99t realized that this had previously been introduced= by =E5=AE=8B=E6=96=87=E6=AD=A6 in commit 40310efde9b4a4f2cf98081d6cd10f843685e= bb6. Since this patch essentially reverts this commit, could you share your thoughts on this, =E5=AE=8B=E6=96=87=E6=AD=A6? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 15 10:00:34 2025 Received: (at 77525) by debbugs.gnu.org; 15 Apr 2025 14:00:34 +0000 Received: from localhost ([127.0.0.1]:52871 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u4gq2-0004x9-CO for submit@debbugs.gnu.org; Tue, 15 Apr 2025 10:00:34 -0400 Received: from mail.envs.net ([5.199.136.28]:32802) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u4gpx-0004wr-0m; Tue, 15 Apr 2025 10:00:31 -0400 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 2C8A538A40B0; Tue, 15 Apr 2025 14:00:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1744725627; bh=k/zFEFcX3Aw4aUG5OKo5Ff3fyNNUEZC3/S4XK+jbQhk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=edIYemRi7sF7mxm9t8K7isOfSAzenNX8jtmPGAnmw0QQOxaLU9AJhjEqMZIMtOq6e dHtyGnGzlIM7f41TxILy0BSF3yoAHfz43g/BX8k60TmkN/fRnmtQPUB4QIwGPRd4p0 BBPCPsvSkYGy8rHJ2/1NeaOsJwU5/JwuyuF5Q+YItnlVBpiX8i4ZhCNifAnoM2B3j6 xXaw8w0OV9586eKaXHC5lZNFCOdqcI7VwxmAX4rbA+T+m3qfrlD9y0RJNqO1yka2M+ bJJIrQZnm+L7i2LOxOH6chRNEUO1w2jpYV4lmOsVLkn18k/oRx8tU4OKbtx8l5D5Rf uBGxcN6TaH1ezDY5sMxeCcKYSIzqVMO/5xWwnYvxb3rjr10dcrE1hVH4LY8gdYyvco bkuYKDDzbn5EULuYvcc7jzpP0pR0HHt0vnrcV1Dv2RxBA14GWcGsx9qtSBPTMnP/uo sJi9K+H6e12v8nzxY7GOyZimMF2f5DTNkW7QfhuRlzPfJYT/ALyoDjctvWnEyfapEo 2IoDBMj54rp5z1runbQdgi28wv4RKKD2bG0l5o9Wg5XHNk6ymTtpvnZewbZu5RhG+N QX09O6HMkkdjaiZY6gvzK9omX4lV727Y4QKtPlqdTJomv1hw7sSe70LGx7XMAEYnwi /Tn3A8JaRWSt7vXCCyqSrLgs= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id TLdjkbBB6Tsd; Tue, 15 Apr 2025 14:00:19 +0000 (UTC) Received: from localhost (unknown [112.44.73.128]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Tue, 15 Apr 2025 14:00:19 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id d48205de; Tue, 15 Apr 2025 14:05:06 +0000 (UTC) From: =?utf-8?B?5a6L5paH5q2m?= To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#77525] [PATCH v4 2/6] system: /etc/profile: Rearrange to avoid search path duplication. In-Reply-To: <874iyqg4kz.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Mon, 14 Apr 2025 17:12:12 +0200") References: <94cf181828817e485cb92cf80365881fe8a8cf47.1743736516.git.hako@ultrarare.space> <874iyqg4kz.fsf@gnu.org> Date: Tue, 15 Apr 2025 22:05:06 +0800 Message-ID: <877c3lplkd.fsf@envs.net> 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: 0.0 (/) X-Debbugs-Envelope-To: 77525 Cc: Hilton Chain , 77525@debbugs.gnu.org, 77528@debbugs.gnu.org, iyzsong@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ludovic Court=C3=A8s writes: > [...] > > The last item does not say the whole story: > >> +++ b/gnu/system/shadow.scm >> @@ -179,16 +179,6 @@ (define %default-bash-profile >>=20=20 >> # 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=3D/run/setuid-programs:$PATH >> ")) > > I am the one who suggested to not invoke =E2=80=98guix package=E2=80=99 f= rom shell > startup files: > > https://issues.guix.gnu.org/77035#8-lineno17 > > However, I hadn=E2=80=99t realized that this had previously been introduc= ed by > =E5=AE=8B=E6=96=87=E6=AD=A6 in commit 40310efde9b4a4f2cf98081d6cd10f84368= 5ebb6. > > Since this patch essentially reverts this commit, could you share your > thoughts on this, =E5=AE=8B=E6=96=87=E6=AD=A6? Hi, Sorry for that, it seems I had leave it partly commited in, without a news entry and documentation. The change about /etc/skel/.bash_profile in commit 40310e is to provide a sensible default to merge multiple profiles, which will fix . Users can easily change his own ~/.bash_profile to not invoke 'guix package', to avoid merge multiple profiles. Now I think it's better to remove it as the patch did, so we default to not merge search paths from multiple profiles, and document how to custom your ~/.bash_profile with 'guix package --search-paths` to merge them. Also mention the drawback when you choose to merge profiles for search paths, mainly ABI incompatible problems from plugins (GIO modules, Qt, etc.). Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 15 11:12:15 2025 Received: (at 77525) by debbugs.gnu.org; 15 Apr 2025 15:12:15 +0000 Received: from localhost ([127.0.0.1]:53527 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u4hxP-0002hA-26 for submit@debbugs.gnu.org; Tue, 15 Apr 2025 11:12:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48856) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u4hxI-0002g9-My; Tue, 15 Apr 2025 11:12:12 -0400 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 ) id 1u4hxB-0003NN-38; Tue, 15 Apr 2025 11:12:01 -0400 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=r473dFJIjNfE446lkf06vnUwgjAdJ6MAIz7C+OZOtQg=; b=osT09e0hXGwzTudfzg+R K8eE3v8TfovEnwfZ9auPS1OZgkt02Cmr7ELtjpjMKMoV1onOct1FWcOBdofNQovVFDhVrfjRsuKfv AcPWcWBhq2TZOXoM0pBjSCehEM8HzhjbifwaB96IbrGce+GbVyZR2p4MEe39rykuBG0KBVfduDNPg /GFJTv1ckBViej6slprN8RN6bTzM2DDuLq3v7G74CbJrUoI0BeiuKqCeclv5sAb7Kylw6xsXGUSUE Nz8D4qQ1hYA6mee8Z38jApMluFrnq0hNPVurQ1tSfipz7jWHAeXW0qZndFL0XEC148hrZNHED264w B/GQDJEXVYPhsg==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: =?utf-8?B?5a6L5paH5q2m?= Subject: Re: [bug#77525] [PATCH v4 2/6] system: /etc/profile: Rearrange to avoid search path duplication. In-Reply-To: <877c3lplkd.fsf@envs.net> (=?utf-8?B?IuWui+aWh+atpiIncw==?= message of "Tue, 15 Apr 2025 22:05:06 +0800") References: <94cf181828817e485cb92cf80365881fe8a8cf47.1743736516.git.hako@ultrarare.space> <874iyqg4kz.fsf@gnu.org> <877c3lplkd.fsf@envs.net> User-Agent: mu4e 1.12.9; emacs 29.4 X-URL: https://people.bordeaux.inria.fr/lcourtes/ X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu X-Revolutionary-Date: Sextidi 26 Germinal an 233 de la =?utf-8?Q?R=C3=A9vo?= =?utf-8?Q?lution=2C?= jour du Lilas Date: Tue, 15 Apr 2025 17:05:02 +0200 Message-ID: <878qo1fotd.fsf@gnu.org> 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: 77525 Cc: Hilton Chain , 77525@debbugs.gnu.org, 77528@debbugs.gnu.org, iyzsong@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) =E5=AE=8B=E6=96=87=E6=AD=A6 writes: > Hi, Sorry for that, it seems I had leave it partly commited in, without > a news entry and documentation. The change about > /etc/skel/.bash_profile in commit 40310e is to provide a sensible > default to merge multiple profiles, which will fix > . Users can easily change his own > ~/.bash_profile to not invoke 'guix package', to avoid merge multiple > profiles. > > Now I think it's better to remove it as the patch did, so we default to > not merge search paths from multiple profiles, OK, I see. Any thoughts on the patch series Hilton submitted? https://issues.guix.gnu.org/77035 Thanks for your feedback, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 18 22:09:13 2025 Received: (at 77525) by debbugs.gnu.org; 19 Apr 2025 02:09:13 +0000 Received: from localhost ([127.0.0.1]:54080 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u5xdl-0007QX-07 for submit@debbugs.gnu.org; Fri, 18 Apr 2025 22:09:12 -0400 Received: from mail.envs.net ([5.199.136.28]:57022) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u5xdd-0007Og-Dc for 77525@debbugs.gnu.org; Fri, 18 Apr 2025 22:09:04 -0400 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 4F06838A409F; Sat, 19 Apr 2025 02:08:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1745028538; bh=1ay1HKgakgocBCobjUANYzZ1mO6XWQlVEEGz0q1sTzs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=oYLOtpPjn5NiIuanIZIYj9fgX1um0gWXarHuU5VwyFeJ1PUVuX0DdeGjZHLzjvpcE eVVn7+tDb5uLIXmCZvGi2A4K17AvKQkXq9zX9imXSS6fg4nMeAx9bhFvJGfTM9gtTQ ea5Ri+sC5xCskJ2znKY2z4tqHDx5ioVAFjjZj56EzSQRqe4P3SLIgwYekDT7qkuuXD Xd9FxdKE0nKEkGxpTqRizr7aWQ3GL0hZWVSw0V24HbiZ5hNxHt3QoPfQeeV2MeO6HE PJWgSewkuE2ZYHXVJiWhibeKWsfJmO7VkHqUZLCqtPyJczEr4SzaU45DOlh5fTZLId ItkIJ0Gsjmp1k6GnRZjhJiTdteLzLPr4w7Jf4Br0q2iiU+o7CHrAVc/s4P4rgVHge4 kKL2qVz+CyjjCYec0jkvqEKyQlccXIZHzCWybRiXEHJFKQFiVz5IJPaAdT20p+qpm2 3/hAWOG5SXlU035T3c7CjOkKj8tgVomKyHvEOnjRNzvOiuVfjEYQd2/aMop64MUNg0 wzRngEe0EX3reIpWJPHfgden/YhcVRi7JauWwaBeUbZTLhOCyqWurHCR1TCAKnyRbF oRxDZKhKjAWDCPiJtdirvNJDM1Mm441k7ZWOtNx1rrVWBFTrb/3o7Zsra7YGAsRuIW n5A4y51F9egFTzVqpjHFtPO4= X-Virus-Scanned: Debian amavisd-new at mail.envs.net Received: from mail.envs.net ([127.0.0.1]) by localhost (mail.envs.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id akPpxmtpoYbg; Sat, 19 Apr 2025 02:08:55 +0000 (UTC) Received: from localhost (unknown [112.44.73.128]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.envs.net (Postfix) with ESMTPSA; Sat, 19 Apr 2025 02:08:54 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 61c29263; Sat, 19 Apr 2025 02:13:52 +0000 (UTC) From: =?utf-8?B?5a6L5paH5q2m?= To: Hilton Chain Subject: Re: [bug#77525] [PATCH v4 2/6] system: /etc/profile: Rearrange to avoid search path duplication. In-Reply-To: <94cf181828817e485cb92cf80365881fe8a8cf47.1743736516.git.hako@ultrarare.space> (Hilton Chain's message of "Fri, 4 Apr 2025 11:22:59 +0800") References: <94cf181828817e485cb92cf80365881fe8a8cf47.1743736516.git.hako@ultrarare.space> Date: Sat, 19 Apr 2025 10:13:52 +0800 Message-ID: <87fri4hp9b.fsf@envs.net> 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: 0.0 (/) X-Debbugs-Envelope-To: 77525 Cc: 77525@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hilton Chain writes: > * gnu/system.scm (operating-system-etc-service)[profile]: Set umask first. OK. > Group environment variables setup with profile sourcing to avoid duplicat= ion. It was already grouped in previous commit, maybe "Setup crucial variables from all the default profiles." > Export $GUILE_LOAD_PATH and $GUILE_LOAD_COMPILED_PATH for =E2=80=98guix p= ull=E2=80=99 profile. Could be a seperated commit, but maybe not needed? Since 'guix repl' would ensure it. > * gnu/system/shadow.scm (%default-bash-profile): Remove duplicated export= s. I think this better go into a seperated commit, and with comment or cookbook doc for the merge search paths from multiple profiles usage. > [...] > 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=3D\"$GUIX_PROFILE/bin:$PATH\" > + if [ ! \"$GUIX_PROFILE\" =3D \"$HOME/.config/guix/current\" ]; then > + # Crucial variables that could be missing in the profiles' 'etc/pr= ofile' > + # because they would require combining both profiles. > + # FIXME: See . > + case $XDG_DATA_DIRS in > + *$GUIX_PROFILE/share*) ;; > + *) export XDG_DATA_DIRS=3D\"$GUIX_PROFILE/share${XDG_DATA_DIRS:+= :}$XDG_DATA_DIRS\" ;; > + esac > + case $XDG_CONFIG_DIRS in > + *$GUIX_PROFILE/etc/xdg*) ;; > + *) export XDG_CONFIG_DIRS=3D\"$GUIX_PROFILE/etc/xdg${XDG_CONFIG_= DIRS:+:}$XDG_CONFIG_DIRS\" ;; > + esac > + # Make sure libXcursor finds cursors installed into user or system= profiles. > + # See Commit 2acfafff set XCURSORPATH contains user and system profiles, but not home profile as this patch did, this comment about 24445 can be removed. Otherwise, look good to me!