On Fri, Mar 18, 2016 at 5:16 PM, Ludovic Courtès <[email protected]> wrote: > David Thompson <[email protected]> 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 <[email protected]> >> 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?
Done and pushed. Thanks! - Dave
