From: "Thompson, David" <dthompson2@worcester.edu>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH] environment: container: Create dummy home directory and /etc/passwd.
Date: Sat, 26 Mar 2016 09:44:27 -0400 [thread overview]
Message-ID: <CAJ=RwfZ5OktQGHfmBXJmQvM9NLjM03=ueGatPEXuGzvkJS+-8A@mail.gmail.com> (raw)
In-Reply-To: <8737rnjxm7.fsf@gnu.org>
On Fri, Mar 18, 2016 at 5:16 PM, Ludovic Courtès <ludo@gnu.org> wrote:
> David Thompson <dthompson2@worcester.edu> 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 <dthompson2@worcester.edu>
>> 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
prev parent reply other threads:[~2016-03-26 13:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-18 12:41 [PATCH] environment: container: Create dummy home directory and /etc/passwd David Thompson
2016-03-18 21:16 ` Ludovic Courtès
2016-03-26 13:44 ` Thompson, David [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJ=RwfZ5OktQGHfmBXJmQvM9NLjM03=ueGatPEXuGzvkJS+-8A@mail.gmail.com' \
--to=dthompson2@worcester.edu \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).