From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur Subject: bug#30728: Modification for guix installation script. Date: Mon, 26 Mar 2018 14:59:30 +0200 Message-ID: <87bmfb9eml.fsf__23144.1912161701$1522069102$gmane$org@lassieur.org> References: <87d0zr9r76.fsf@lassieur.org> <87fu4ngq0a.fsf@elephly.net> 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]:46055) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f0RjN-0001vp-DM for bug-guix@gnu.org; Mon, 26 Mar 2018 09:00:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f0RjH-0000B7-Pk for bug-guix@gnu.org; Mon, 26 Mar 2018 09:00:09 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:45828) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f0RjH-0000Au-M7 for bug-guix@gnu.org; Mon, 26 Mar 2018 09:00:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f0RjH-0003rr-EU for bug-guix@gnu.org; Mon, 26 Mar 2018 09:00:03 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-reply-to: <87fu4ngq0a.fsf@elephly.net> 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: Ricardo Wurmus , Marius Bakke Cc: guix-devel@gnu.org, 30728@debbugs.gnu.org, Tatiana Sholokhova Hi Ricardo and Marius, Marius Bakke writes: > The binary installation tarball only comes with a profile for 'root'. Indeed, but it's easy to copy it for any user isn't it? > The problem is that the installation script assumes $HOME will expand to > ~root when sourcing the profile, but as you found that isn't always the > case. > > ~root/.guix-profile is "hard-coded" many other places in the script, so > Tatianas solution seems sensible to me. Ricardo Wurmus writes: > Hi Clément, > >> As I said to Chris (Cc'ed), I don't think it's a good idea to install >> Guix in root's home directory. Instead, we should probably honor the >> USER and HOME environment variables, so that the command can be run as a >> non-root user (with sudo) in a consistent way. What do you think? > > The script should be run as root as it follows the manual’s > instructions, which tell people to install Guix for the root user and > then make it available system-wide. > > This is why I think that it would be correct to install it to the root’s > home directory and not to the sudoing user’s HOME. > > Or am I missing something? Thank you both for your comments. :-) What I dislike with the present state of things is the need for Guix to be installed within root's directory. For two reasons : 1. I don't think a command should ever install something in another user's home directory. The home directory of a user is for things that are specific to that user, I believe. 2. Users need to update the root profile if they want to update the Guix daemon, which is cumbersome. The systemd configuration file must know where to find the Guix daemon. If it's not in ~root, it must be in the user's home directory. Either way, the Guix daemon, which is system-wide, still depends on a user. (A way to make the daemon user-independant would be to add a new command that would update, say, /var/guix/guix-daemon, with the systemd configuration file pointing to it.) I personally prefer that the Guix daemon points to my home directory because I don't want to update root's profile. Some other people might prefer that it points to ~root because they might later delete their profile and want Guix to keep working. Do we have to take a decision here? Can't we just let the user decide by letting them customize their environment variables? I think it is the point of environment variables: giving freedom to users.