guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is the default $HOME /homeless-shelter?


From: Jesse Gibbons
Subject: Re: Why is the default $HOME /homeless-shelter?
Date: Sun, 17 Nov 2019 15:58:47 -0700
User-agent: Evolution 3.30.5

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]