From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur Subject: bug#30728: guix-install.sh doesn't work if run with "sudo" Date: Thu, 29 Mar 2018 10:04:32 +0200 Message-ID: <87d0znwbn3.fsf@lassieur.org> References: <87zi3lh6mb.fsf@lassieur.org> <871sgbdj2x.fsf@lassieur.org> <87d0zsn391.fsf@gmail.com> <87efk79s81.fsf@lassieur.org> <87woxyez9t.fsf@elephly.net> <87lgedx4qf.fsf@lassieur.org> <87k1txwlfb.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f1SYX-000660-1U for bug-guix@gnu.org; Thu, 29 Mar 2018 04:05:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f1SYR-0005ux-1s for bug-guix@gnu.org; Thu, 29 Mar 2018 04:05:09 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:50012) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f1SYQ-0005up-UT for bug-guix@gnu.org; Thu, 29 Mar 2018 04:05:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f1SYQ-0000aD-J8 for bug-guix@gnu.org; Thu, 29 Mar 2018 04:05:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-reply-to: <87k1txwlfb.fsf@gmail.com> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Chris Marusich Cc: 30728@debbugs.gnu.org Chris Marusich writes: > Clément Lassieur writes: > >> Ricardo Wurmus writes: >> >>> Clément Lassieur writes: >>> >>>>> The manual says (see: (guix) Binary Installation): >>>>> >>>>> 3. Make ‘root’’s profile available under ‘~/.guix-profile’: >>>>> >>>>> # ln -sf /var/guix/profiles/per-user/root/guix-profile \ >>>>> ~root/.guix-profile >>>> >>>> I think the manual is wrong here. This only makes sense if the user is >>>> 'root'. Otherwise, the user would expect Guix to be installed in their >>>> home, not in root's home. >>> >>> Step 2 says “As root, run: […]”. “~root” resolves to “/root”, not to >>> “$HOME/root”, so it even works when run as a regular user. >>> >>> The manual seems correct to me and this is what the script aims to >>> implement. >> >> But ~/.guix-profile may resolve to /home/user/.guix-profile. So it >> should be ~root/.guix-profile instead of ~/.guix-profile. > > Ah, I think I now see the cause of our miscommunication. > > It's possible to interpret the manual's use of ~ and $HOME to mean "the > unprivileged user's home directory", instead of "root's home directory". > I think that's a mistake in the manual, since the "ln" clearly makes > root's profile available under root's home directory, and the step > involving $HOME doesn't make sense unless $HOME expands to root's home > directory. > > I've updated my patch; it now also changes the following line... > > 3. Make ‘root’’s profile available under ‘~/.guix-profile’: > > ...to this: > > 3. Make ‘root’’s profile available under ‘~root/.guix-profile’: > > How does that sound? This fixes the documentation inconsistency, but I still think Guix shouldn't be installed in ~root (as I explain there: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30728#32).