From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: =?utf-8?B?4oCYc3Vkb+KAmQ==?= leaves PATH =?utf-8?Q?unchanged?= =?utf-8?Q?=E2=80=A6?= so what? Date: Thu, 17 Jan 2019 12:14:18 +0100 Message-ID: <87h8e7h6yd.fsf@elephly.net> References: <87y37jwp1p.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:49331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gk5d5-00044Y-SW for guix-devel@gnu.org; Thu, 17 Jan 2019 06:14:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gk5d3-0001MH-Pf for guix-devel@gnu.org; Thu, 17 Jan 2019 06:14:35 -0500 In-reply-to: <87y37jwp1p.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org Ludovic Court=C3=A8s writes: > Hello Guix, > > I=E2=80=99m not sure if this is a bug, but on Guix System, =E2=80=98sudo= =E2=80=99 leaves PATH > unchanged: > > --8<---------------cut here---------------start------------->8--- > $ sudo env|grep '^PATH=3D'|sha1sum > 5236ce49c388ade7c3e8f767d8136c1c38a97c6a - > $ env|grep '^PATH=3D'|sha1sum > 5236ce49c388ade7c3e8f767d8136c1c38a97c6a - > --8<---------------cut here---------------end--------------->8--- > > I think that=E2=80=99s because the shell spawned by =E2=80=98sudo=E2=80= =99 is not a login shell, > so ~root/.bash_profile and other files that define/modify environment > variables are not sourced. So I think this is expected behavior. Yes, this is expected and desired behaviour. Sysadmins generally use =E2=80=9Csu -=E2=80=9D or =E2=80=9Csudo -i=E2=80=9D to get a =E2=80=9Cprope= r=E2=80=9D root login shell because of this. > However, it trips up many people. In particular, people are surprised > that =E2=80=9Csudo guix system reconfigure =E2=80=A6=E2=80=9D does not us= e ~root/.config/guix, > and instead uses theirs (or /run/current-system/profile/=E2=80=A6). > > My take on this is that this is normal behavior, but that we should > maybe recommend =E2=80=9Csudo -i guix system reconfigure =E2=80=A6=E2=80= =9D instead of > =E2=80=9Csudo guix system reconfigure=E2=80=9D in the manual, and/or add = a warning in > the manual. Why would we want to recommend the use of the root user=E2=80=99s installat= ion of Guix, though? I usually don=E2=80=99t care at all about the root user= =E2=80=99s Guix. -- Ricardo