From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:44019) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jI9cF-0006KK-B7 for guix-patches@gnu.org; Sat, 28 Mar 2020 07:27:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jI9cE-0001du-3H for guix-patches@gnu.org; Sat, 28 Mar 2020 07:27:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55949) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jI9cE-0001dn-0b for guix-patches@gnu.org; Sat, 28 Mar 2020 07:27:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jI9cD-000868-SN for guix-patches@gnu.org; Sat, 28 Mar 2020 07:27:01 -0400 Subject: [bug#34638] [PATCH v2 2/4] linux-container: Add 'start-child-in-container'. Resent-Message-ID: References: <20190419140427.15183-1-mail@cbaines.net> <20190419140427.15183-2-mail@cbaines.net> <87ftdvea8d.fsf@gnu.org> From: Christopher Baines In-reply-to: <87ftdvea8d.fsf@gnu.org> Date: Sat, 28 Mar 2020 11:26:40 +0000 Message-ID: <87mu80sosv.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 34638@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Christopher Baines 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 procedur= e. > > [...] > >> +(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=E2=80=99d change (extra-environment-variables '()) to: > > (environment-variables (environ)) > > I always find it too hard to reason about =E2=80=9Cextra=E2=80=9D thing; = it=E2=80=99s just more > convenient as an interface to specify the whole thing rather than a list > of =E2=80=9Cextras=E2=80=9D. 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=3D/tmp, and that's just to avoid issues with (guix profiles). Does that make sense? Backtrace: 6 (apply-smob/1 #) In ice-9/boot-9.scm: 705:2 5 (call-with-prompt ("prompt") # #) In ice-9/eval.scm: 619:8 4 (_ #(#(#))) 293:34 3 (_ #(#(#) ("/gnu/store/ai= n1rvg7vrrcr85v0fgpyjm8k2sflxpz-guix-1.0.1-15.0984481/bin/.guix-real" "repl"= "-t" "machi?"))) 159:9 2 (_ #(#(#) ("/gnu/store/ai= n1rvg7vrrcr85v0fgpyjm8k2sflxpz-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 u= i)) #f) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl5/NHBfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XfXhxAAp4e9MN7waIdKAiqb+wTQZrwvNzzPutFMWJiao99q+TMI7EEoIwPwBJBi V/+cG769CtrTSvRpYi2/BjCaeFVNwGbXcXFzSMsFbFzZ9WFDkPQXI5IzU4UxbQ8/ JssHQqEr+OiSVsgjcLQxYleXT8UOB9ejoLRvIiQ86QJoDDMOj8ZminlLzu9yeMR8 sHojdMM79D2NvSbaiKEpzgOaWsoPKvP0B8oqm7qWyGXYsSql8Iz5/8XbCuWlwyVi lftYl/8FCAfS5Emtm25+L4iRN1oTphfaD/QIa3JrPDoc/eewYS+NKsyuIGBUELwO wnIyxbbW+hEoYz35v0mT6K4YJTJiPdTCmK/N+9MAco9cQyOYkL0zBB/ZtNoNgyXJ OE1r4w3dkEuN0fFEjiRH9MtPcgw5ZdsWKaqzznW9qV7fTIuo5NiRY+2wf7Zcc1Ws Gg6ORRnmOq89wy73fEOQUVygcxgT8T3pD6TuQ0wkOo2zfFs/QSlEZzz/QB/8iiL8 D8YPhpvFwi437pGkl403BOKn8/ssCVLUWjFCV0RmWNLOVtLjaIOAU+c0DfCkPGD8 mdSLOwqa7eEcZAHVO705ZIp7Lm6gYPEJ/Jk7iEK/bMBpNjAexLW7NYqWEdnalUtv lE5W/Qphf48ARQswn6qivbDsiVw0yfIZqc3fbb1XpA2wtLobovE= =ThB4 -----END PGP SIGNATURE----- --=-=-=--