From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] environment: container: Create dummy home directory and /etc/passwd. Date: Fri, 18 Mar 2016 22:16:00 +0100 Message-ID: <8737rnjxm7.fsf@gnu.org> References: <87wpp0hsbm.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57020) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ah1kc-0001Pm-Fj for guix-devel@gnu.org; Fri, 18 Mar 2016 17:16:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ah1kZ-0002OM-AI for guix-devel@gnu.org; Fri, 18 Mar 2016 17:16:06 -0400 In-Reply-To: <87wpp0hsbm.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> (David Thompson's message of "Fri, 18 Mar 2016 08:41:01 -0400") 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: David Thompson Cc: guix-devel@gnu.org David Thompson 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=3D$HOME/.gdbinit and then notice that I also have to =E2=80=9Cexport HOME=3D/home/foo=E2=80=9D inside the subshel= l, for instance. > From 5985be7a5b3b6a5d5a5d3eb3e95983ad96909f2e Mon Sep 17 00:00:00 2001 > From: David Thompson > 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=E2=80=99.