unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 34638@debbugs.gnu.org
Subject: [bug#34638] [PATCH v2 2/4] linux-container: Add 'start-child-in-container'.
Date: Sat, 28 Mar 2020 11:26:40 +0000	[thread overview]
Message-ID: <87mu80sosv.fsf@cbaines.net> (raw)
In-Reply-To: <87ftdvea8d.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2429 bytes --]


Ludovic Courtès <ludo@gnu.org> writes:

> Christopher Baines <mail@cbaines.net> skribis:
>
>> This new procedure is similar to open-pipe* in (ice-9 popen), but using
>> run-container from (gnu build linux-container).
>>
>> * gnu/build/linux-container.scm (start-child-in-container): New procedure.
>
> [...]
>
>> +(define* (start-child-in-container command
>> +                                   #:key read? write?
>> +                                   (root 'temporary)
>> +                                   (mounts '())
>> +                                   (namespaces %namespaces)
>> +                                   (host-uids 1)
>> +                                   (extra-environment-variables '()))
>
> Please add a docstring.  :-)
>
> I’d change (extra-environment-variables '()) to:
>
>   (environment-variables (environ))
>
> I always find it too hard to reason about “extra” thing; it’s just more
> convenient as an interface to specify the whole thing rather than a list
> of “extras”.

I had a go at this, but I think trying to copy the environment variables
from the host Guix to the inferior one caused problems, at least this
backtrace appears when calling open-inferior/container and I'm guessing
it comes from the inferior guix.

I think calling it environment-variables and having it be '() is OK, the
only change I can see being made elsewhere is that
open-inferior/container adds HOME=/tmp, and that's just to avoid issues
with (guix profiles).

Does that make sense?


Backtrace:
           6 (apply-smob/1 #<catch-closure 7f77e0a889a0>)
In ice-9/boot-9.scm:
    705:2  5 (call-with-prompt ("prompt") #<procedure 7f77e0a9f560 at ice-9/eval.scm:330:13 ()> #<procedure default-prompt-handler (k proc)>)
In ice-9/eval.scm:
    619:8  4 (_ #(#(#<directory (guile-user) 7f77e0717140>)))
   293:34  3 (_ #(#(#<directory (guile-user) 7f77e0717140>) ("/gnu/store/ain1rvg7vrrcr85v0fgpyjm8k2sflxpz-guix-1.0.1-15.0984481/bin/.guix-real" "repl" "-t" "machi?")))
    159:9  2 (_ #(#(#<directory (guile-user) 7f77e0717140>) ("/gnu/store/ain1rvg7vrrcr85v0fgpyjm8k2sflxpz-guix-1.0.1-15.0984481/bin/.guix-real" "repl" "-t" "machi?")))
In ice-9/boot-9.scm:
   2803:6  1 (resolve-interface _ #:select _ #:hide _ #:prefix _ #:renamer _ #:version _)
In unknown file:
           0 (scm-error misc-error #f "~A ~S" ("no code for module" (guix ui)) #f)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

  reply	other threads:[~2020-03-28 11:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-24 16:12 [bug#34638] [PATCH 0/4] Isolated inferiors Christopher Baines
2019-02-24 16:18 ` [bug#34638] [PATCH 1/4] utils: Add #:base-directory to call-with-temporary-directory Christopher Baines
2019-02-24 16:18   ` [bug#34638] [PATCH 2/4] linux-container: Add 'start-child-in-container' Christopher Baines
2019-03-14 18:17     ` Ludovic Courtès
2019-04-19 14:16       ` Christopher Baines
2019-02-24 16:18   ` [bug#34638] [PATCH 3/4] inferior: Add a shared-directory field to <inferior> Christopher Baines
2019-02-24 16:18   ` [bug#34638] [PATCH 4/4] inferior: Add 'open-inferior/container' Christopher Baines
2019-03-14 19:35 ` [bug#34638] [PATCH 0/4] Isolated inferiors Ludovic Courtès
2019-04-19 14:04 ` [bug#34638] [PATCH v2 1/4] utils: Add #:base-directory to call-with-temporary-directory Christopher Baines
2019-04-19 14:04   ` [bug#34638] [PATCH v2 2/4] linux-container: Add 'start-child-in-container' Christopher Baines
2020-03-26  9:28     ` Ludovic Courtès
2020-03-28 11:26       ` Christopher Baines [this message]
2020-03-28 12:20         ` Ludovic Courtès
2019-04-19 14:04   ` [bug#34638] [PATCH v2 3/4] inferior: Add a shared-directory field to <inferior> Christopher Baines
2020-03-26  9:30     ` Ludovic Courtès
2019-04-19 14:04   ` [bug#34638] [PATCH v2 4/4] inferior: Add 'open-inferior/container' Christopher Baines
2020-03-26  9:32     ` Ludovic Courtès
2020-03-26  9:22   ` [bug#34638] [PATCH v2 1/4] utils: Add #:base-directory to call-with-temporary-directory Ludovic Courtès

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=87mu80sosv.fsf@cbaines.net \
    --to=mail@cbaines.net \
    --cc=34638@debbugs.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).