Subject: bug#78152: closed (Re: bug#78152: [guix-daemon] Build user's pw_dir != HOME)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 07 May 2025 02:16:02 +0000

Your bug report

#78152: [guix-daemon] Build user's pw_dir != HOME

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
78152: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78152
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#78152: [guix-daemon] Build user's pw_dir != HOME
From: Maxim Cournoyer <[email-masked]>
To: Ludovic Courtès <[email-masked]>
Cc: [email-masked]
Date: Wed, 07 May 2025 11:15:37 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Ludovic,

Ludovic Courtès <[email-masked]> writes:

> Hi Maxim,
>
> Maxim Cournoyer <[email-masked]> writes:
>
>> There is a discrepancy in our build environment, where the build user's
>> directory is set to '/' while HOME is set to '/homeless-shelter'.
>> Normally both should match, and it trips some test suite that assumes
>> this to be the case, as with libssh's [0].
>>
>> Perhaps '/homeless-shelter' could be made to more simply be '/', or
>> pw_dir could be made to be '/homeless-shelter'.
>>
>> What do you think?
>
> As a rule of thumb, the build environment should never change so that
> things that derivations that succeeded one day still succeed years
> later.
>
> So my take is that we should live with this discrepancy forever and
> ever.

I was worried you'd say this :-).  But it's true, that it could be
annoying to have something fail with old daemon and pass with newer
ones, or vice-versa when using time-machine.

> (Note that the unprivileged daemon does introduce some discrepancies,
> and this is something we should fix as much as possible.)

Hm, perhaps if the 'as much as possible' != 'everything', we could use
this breaking opportunity to bundle a few changes like this one?

A way that could perhaps be used here would be to bump the daemon's
version, and expose this to the build so that some phases code can be
conditional to the daemon version.  Not very elegant, but it'd at least
allow us fixing this kind of issue in the daemon.

I'll close this issue for now, but if you have some thoughts on the
above idea, feel free to continue this discussion here!

-- 
Thanks,
Maxim

Subject: [guix-daemon] Build user's pw_dir != HOME
From: Maxim Cournoyer <[email-masked]>
To: bug-guix <[email-masked]>
Date: Wed, 30 Apr 2025 08:19:02 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

There is a discrepancy in our build environment, where the build user's
directory is set to '/' while HOME is set to '/homeless-shelter'.
Normally both should match, and it trips some test suite that assumes
this to be the case, as with libssh's [0].

Perhaps '/homeless-shelter' could be made to more simply be '/', or
pw_dir could be made to be '/homeless-shelter'.

What do you think?

[0]  https://gitlab.com/libssh/libssh-mirror/-/issues/302#note_2475036715

-- 
Thanks,
Maxim