From unknown Sat Jun 14 03:48:27 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#77523 <77523@debbugs.gnu.org> To: bug#77523 <77523@debbugs.gnu.org> Subject: Status: [PATCH v4 1/6] system: /etc/profile: Group profile sourcing. Reply-To: bug#77523 <77523@debbugs.gnu.org> Date: Sat, 14 Jun 2025 10:48:27 +0000 retitle 77523 [PATCH v4 1/6] system: /etc/profile: Group profile sourcing. reassign 77523 guix-patches submitter 77523 Hilton Chain severity 77523 normal tag 77523 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 03 23:23:51 2025 Received: (at submit) by debbugs.gnu.org; 4 Apr 2025 03:23:51 +0000 Received: from localhost ([127.0.0.1]:36537 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u0Xeo-0002ab-QE for submit@debbugs.gnu.org; Thu, 03 Apr 2025 23:23:51 -0400 Received: from lists.gnu.org ([2001:470:142::17]:49132) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u0Xel-0002Zy-Tf for submit@debbugs.gnu.org; Thu, 03 Apr 2025 23:23:48 -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 1u0Xeg-0006sO-BD for guix-patches@gnu.org; Thu, 03 Apr 2025 23:23:42 -0400 Received: from mx.boiledscript.com ([2a01:4f8:10b:392::42]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u0Xee-0002hH-HF for guix-patches@gnu.org; Thu, 03 Apr 2025 23:23:42 -0400 From: Hilton Chain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=mail; t=1743737017; 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=d0tH94RRK/KrRDzwZPVwFrDUHNaidGFC1Mjnjv4ImOs=; b=Gk+xzcD+xBISwfLKRgaiORzZIR+sJ3NlkLciSgUm9Nm1sfzzJEf3rRoEEr5QT4hHA6KGs5 3vbbsIDb1nIeFwVG5dppzGYKemCuI8v4l/jngLcSNVo9n4vuJYzi7is+EjdPHRVHzOTgSc Ai2lPQGDGMssuX23SwnXZYp20CujwkQmMeuF8v3sn7LtOS2E4HeNLt/IMYzr55oNE750p0 45pEigS9GC4J7C6n4KmjotUrkehnKp6QfwNT+ddbeNbiW7rO4EDrrfWshP/mcBYC5mxBnj b37zZX8ziveEc2eIuFSydwmUPVb2olkLjmWz2py/rgQR6UukTm3Ly9UdvIc2Dg== To: guix-patches@gnu.org Subject: [PATCH v4 1/6] system: /etc/profile: Group profile sourcing. Date: Fri, 4 Apr 2025 11:22:58 +0800 Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a01:4f8:10b:392::42; 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, 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]: Group sourcing of all default profiles. Order Guix Home search paths before the default user profile. Rename iteration variable to GUIX_PROFILE. Change-Id: I18eac738a5dfade84da2effdd6211119c6fdd96f --- gnu/system.scm | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/gnu/system.scm b/gnu/system.scm index 0d98e5a036..c166222854 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -1074,10 +1074,6 @@ (define* (operating-system-etc-service os) # Ignore the default value of 'PATH'. unset PATH -# Load the system profile's settings. -GUIX_PROFILE=/run/current-system/profile ; \\ -. /run/current-system/profile/etc/profile - # Since 'lshd' does not use pam_env, /etc/environment must be explicitly # loaded when someone logs in via SSH. See . # We need 'PATH' to be defined here, for 'cat' and 'cut'. Do this before @@ -1086,24 +1082,22 @@ (define* (operating-system-etc-service os) -a -z \"$LINUX_MODULE_DIRECTORY\" ] then . /etc/environment - export `cat /etc/environment | cut -d= -f1` + export `/run/current-system/profile/bin/cut -d= -f1 < /etc/environment` fi -# Arrange so that ~/.config/guix/current comes first, -# and guix-home comes before guix-profile. -for profile in \"$HOME/.guix-profile\" \\ - \"$HOME/.guix-home/profile\" \\ - \"$HOME/.config/guix/current\" +# Set up environment for all default profiles. +for GUIX_PROFILE in \"/run/current-system/profile\" \\ + \"$HOME/.guix-home/profile\" \\ + \"$HOME/.guix-profile\" \\ + \"$HOME/.config/guix/current\" do - if [ -f \"$profile/etc/profile\" ] + if [ -f \"$GUIX_PROFILE/etc/profile\" ] then - # Load the user profile's settings. - GUIX_PROFILE=\"$profile\" ; \\ - . \"$profile/etc/profile\" + . \"$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=\"$profile/bin:$PATH\" + export PATH=\"$GUIX_PROFILE/bin:$PATH\" fi done -- 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 Fri Apr 18 21:33:14 2025 Received: (at 77523) by debbugs.gnu.org; 19 Apr 2025 01:33:14 +0000 Received: from localhost ([127.0.0.1]:53848 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u5x4x-0002Pw-4N for submit@debbugs.gnu.org; Fri, 18 Apr 2025 21:33:13 -0400 Received: from mail.envs.net ([5.199.136.28]:54036) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u5x4q-0002OI-Ex for 77523@debbugs.gnu.org; Fri, 18 Apr 2025 21:33:08 -0400 Received: from localhost (mail.envs.net [127.0.0.1]) by mail.envs.net (Postfix) with ESMTP id 4D96A38A409F; Sat, 19 Apr 2025 01:33:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=envs.net; s=modoboa; t=1745026382; bh=mWkqeaeGdkp692zW/fJK6AA1efJcRzFDjIMj9mo7dkU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=qPwCtEbolKWHF+C91DDgKbAWlBDONjNubQrnG4zIxEQBPh3n8YrcYfUw0OmgOTdxW yxaomN/By7f1QnRHu0JdoRFMulrIlkdjhPYVx5tcs+eU65726iGS1V+p3ZMHveQ43n S4rIXglpHs3aYjneYO+YNACr+qcqvt7G2uqyfC2esdC8kD6xPhFN0EIBdM86MNJxYo FVH8vOjHrK9E0MY2DPUBaRhJgPwqcLhoR7EVTLxsYCBD3pcftv3B9jqp58Nk/TMGTa RJYXdq4bapMInVkSFmrKejc1911oZkPamWV1/uxAndO8f3zM87Otvxx37xZdLoSHVq zZV9irKCDhpLrv9UU2OV7+1Csfe9uv5V2GP9PE5W37Ewn7t7QkR3vmKDCIIYAiD0L8 s5LKD8jqDsa8E1K1WRFQkVUD84Typ3SdRyYKi6LsUI8N7KJy6qun9GiATtb+inr/lx O9zELdPFrsS4XR2P68FHE+TtB2FuVi0pj1WERKjimc31grDTqM6zPbGsHkhd6MjQAK I3e6PxObyr5crjX9RLFBkpf91XW0updatScQj4ry46+pyEEItkAnXBfRyXmPfE0W06 jMv6gTsNdxyvJzxG5Pvu30/r557Wtr1+phazcmA/0AspWWg8gK+sDH+XeQepWFAzIs rgZl3koBVDmC33Qv/tR/97b4= 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 HGijDCSE3iHT; Sat, 19 Apr 2025 01:32:59 +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 01:32:58 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 08fa0f11; Sat, 19 Apr 2025 01:37:54 +0000 (UTC) From: =?utf-8?B?5a6L5paH5q2m?= To: Hilton Chain Subject: Re: [bug#77523] [PATCH v4 1/6] system: /etc/profile: Group profile sourcing. In-Reply-To: (Hilton Chain's message of "Fri, 4 Apr 2025 11:22:58 +0800") References: Date: Sat, 19 Apr 2025 09:37:54 +0800 Message-ID: <87ldrxgcct.fsf@envs.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 77523 Cc: 77523@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 (-) Hi, Hilton Chain writes: > * gnu/system.scm (operating-system-etc-service)[profile]: Group sourcing of > all default profiles. > Order Guix Home search paths before the default user profile. Seems reversed, maybe "Prefer search paths of the default user profile over the home profile. > Rename iteration variable to GUIX_PROFILE. > > Change-Id: I18eac738a5dfade84da2effdd6211119c6fdd96f > --- > gnu/system.scm | 24 +++++++++--------------- > 1 file changed, 9 insertions(+), 15 deletions(-) > > diff --git a/gnu/system.scm b/gnu/system.scm > index 0d98e5a036..c166222854 100644 > --- a/gnu/system.scm > +++ b/gnu/system.scm > @@ -1074,10 +1074,6 @@ (define* (operating-system-etc-service os) > # Ignore the default value of 'PATH'. > unset PATH > > -# Load the system profile's settings. > -GUIX_PROFILE=/run/current-system/profile ; \\ > -. /run/current-system/profile/etc/profile > - > # Since 'lshd' does not use pam_env, /etc/environment must be explicitly > # loaded when someone logs in via SSH. See . > # We need 'PATH' to be defined here, for 'cat' and 'cut'. Do this before This "We need ... to allow variables to be overridden." comment should be removed, since it's for the previous "Load the system profile's settings.". > [...] > -# Arrange so that ~/.config/guix/current comes first, > -# and guix-home comes before guix-profile. > -for profile in \"$HOME/.guix-profile\" \\ > - \"$HOME/.guix-home/profile\" \\ > - \"$HOME/.config/guix/current\" > +# Set up environment for all default profiles. > +for GUIX_PROFILE in \"/run/current-system/profile\" \\ > + \"$HOME/.guix-home/profile\" \\ > + \"$HOME/.guix-profile\" \\ > + \"$HOME/.config/guix/current\" > do > - if [ -f \"$profile/etc/profile\" ] > + if [ -f \"$GUIX_PROFILE/etc/profile\" ] > then > - # Load the user profile's settings. > - GUIX_PROFILE=\"$profile\" ; \\ > - . \"$profile/etc/profile\" > + . \"$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=\"$profile/bin:$PATH\" > + export PATH=\"$GUIX_PROFILE/bin:$PATH\" > fi > done Since we are here, I think we can append "unset GUIX_PROFILE" after the for loop to show it no longer needed, and avoid possibly wrong usages.