From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thompson, David" Subject: Re: [PATCH] environment: container: Create dummy home directory and /etc/passwd. Date: Sat, 26 Mar 2016 09:44:27 -0400 Message-ID: References: <87wpp0hsbm.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> <8737rnjxm7.fsf@gnu.org> 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]:32930) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajoVy-0007zY-MW for guix-devel@gnu.org; Sat, 26 Mar 2016 09:44:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ajoVx-0007U8-Nb for guix-devel@gnu.org; Sat, 26 Mar 2016 09:44:30 -0400 Received: from mail-qk0-x233.google.com ([2607:f8b0:400d:c09::233]:34875) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajoVx-0007Tq-Jb for guix-devel@gnu.org; Sat, 26 Mar 2016 09:44:29 -0400 Received: by mail-qk0-x233.google.com with SMTP id o6so58227659qkc.2 for ; Sat, 26 Mar 2016 06:44:28 -0700 (PDT) In-Reply-To: <8737rnjxm7.fsf@gnu.org> 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: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Cc: guix-devel On Fri, Mar 18, 2016 at 5:16 PM, Ludovic Court=C3=A8s wrote: > 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 tha= t > I also have to =E2=80=9Cexport HOME=3D/home/foo=E2=80=9D inside the subsh= ell, 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 t= he >> + ;; 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