From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesse Gibbons Subject: Re: Why is the default $HOME /homeless-shelter? Date: Sun, 17 Nov 2019 15:58:47 -0700 Message-ID: <7321d3a52b24c3b44dd5c1241afffc0992192a88.camel@gmail.com> References: <87h832i3n3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:47604) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iWTVN-00056h-T6 for guix-devel@gnu.org; Sun, 17 Nov 2019 17:58:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iWTVM-0007Hj-Sk for guix-devel@gnu.org; Sun, 17 Nov 2019 17:58:53 -0500 In-Reply-To: <87h832i3n3.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 =?ISO-8859-1?Q?Court=E8s?= Cc: guix-devel mailing list On Sun, 2019-11-17 at 22:39 +0100, Ludovic Courtès wrote: > Hi! > > Because it’s always been this way! :-) > > This is inherited from Nix. The rationale is that there’s no home > directory in build environments, and perhaps Eelco Dolstra and others > back then found that setting ‘HOME’ to a non-existing directory broke > fewer builds that leaving it unset. > > HTH, > Ludo’. Is this documented or speculation? What packages could break if $HOME is set to somewhere in /tmp? Considering these packages are usually written without knowing GuixSD exists, if a package install script depends on HOME I would think it would try to use $HOME as a directory expecting it to exist. Since it is /homeless-shelter by default, and /homeless-shelter does not exist on a default GuixSD install, we observe that most of the packages that depend on HOME need to be modified to set HOME, and the location of the new HOME is often inconsistently decided. If it is documented, I will admit defeat. If the reason Nix doesn't set HOME isn't documented, I think I will try setting HOME to a subdirectory of /tmp taking the target's hash and name into account. If that doesn't break anything, I think I will send a patch for core-updates. I would expect the patch to trigger a mass rebuild of every package. Hopefully that can be tested rigorously before core-updates is merged into master, and we will no longer need to change HOME when an install script depends on it. If anyone objects, please respond sooner rather than later.