guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] environment: container: Create dummy home directory and /etc


From: Ludovic Courtès
Subject: Re: [PATCH] environment: container: Create dummy home directory and /etc/passwd.
Date: Fri, 18 Mar 2016 22:16:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

David Thompson <address@hidden> skribis:

> In my recent adventures using 'guix environment --container --network',
> I noticed that certain tools *really* want to read user information out
> of /etc/passwd, such as 'git clone' over SSH.  I initially hacked around
> this by adding code to create a dummy home directory and /etc/passwd in
> the Bash script I was running inside the container.  After a little
> thought, I came to the conclusion that 'guix environment --container'
> should just do this automatically so that the container more closely
> resembles a real GNU/Linux system.

Yeah, I grumble when I pass --expose=$HOME/.gdbinit and then notice that
I also have to “export HOME=/home/foo” inside the subshell, for
instance.

> From 5985be7a5b3b6a5d5a5d3eb3e95983ad96909f2e Mon Sep 17 00:00:00 2001
> From: David Thompson <address@hidden>
> Date: Thu, 17 Mar 2016 23:19:25 -0400
> Subject: [PATCH] environment: container: Create dummy home directory and
>  /etc/passwd.
>
> * guix/scripts/environment.scm (launch-environment/container): Change
> $HOME to the current user's home directory instead of
> /homeless-shelter.  Create a dummy /etc/passwd with a single entry for
> the current user.

[...]

> +            ;; Create a dummy home directory with the same path as on the
> +            ;; host.

s/with the same path/under the same name/  :-)

Perhaps we should add a sentence in the manual about this dummy $HOME?

Otherwise LGTM, thanks!

Ludo’.



reply via email to

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