From patchwork Sun Feb 24 16:12:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Baines X-Patchwork-Id: 1231 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6A33516C96; Sun, 24 Feb 2019 16:13:20 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 238F716C20 for ; Sun, 24 Feb 2019 16:13:20 +0000 (GMT) Received: from localhost ([127.0.0.1]:52982 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gxwP1-0000lV-4N for patchwork@mira.cbaines.net; Sun, 24 Feb 2019 11:13:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gxwOq-0000jq-6d for guix-patches@gnu.org; Sun, 24 Feb 2019 11:13:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gxwOp-0004xt-F9 for guix-patches@gnu.org; Sun, 24 Feb 2019 11:13:08 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:36831) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gxwOk-0004tU-GS for guix-patches@gnu.org; Sun, 24 Feb 2019 11:13:06 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gxwOk-00034s-BQ for guix-patches@gnu.org; Sun, 24 Feb 2019 11:13:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#34638] [PATCH 0/4] Isolated inferiors. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 24 Feb 2019 16:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34638 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 34638@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155102474611787 (code B ref -1); Sun, 24 Feb 2019 16:13:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 Feb 2019 16:12:26 +0000 Received: from localhost ([127.0.0.1]:50375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gxwOA-000342-7U for submit@debbugs.gnu.org; Sun, 24 Feb 2019 11:12:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48891) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gxwO7-00033p-4Z for submit@debbugs.gnu.org; Sun, 24 Feb 2019 11:12:23 -0500 Received: from lists.gnu.org ([209.51.188.17]:38777) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gxwO2-00040a-1X for submit@debbugs.gnu.org; Sun, 24 Feb 2019 11:12:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35038) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gxwO1-0000IC-57 for guix-patches@gnu.org; Sun, 24 Feb 2019 11:12:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gxwO0-0003wj-12 for guix-patches@gnu.org; Sun, 24 Feb 2019 11:12:17 -0500 Received: from mira.cbaines.net ([2a01:7e00::f03c:91ff:fe69:8da9]:34030) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gxwNz-0003sH-PE for guix-patches@gnu.org; Sun, 24 Feb 2019 11:12:15 -0500 Received: from localhost (cpc102582-walt20-2-0-cust14.13-2.cable.virginm.net [86.27.34.15]) by mira.cbaines.net (Postfix) with ESMTPSA id 63DED16C20 for ; Sun, 24 Feb 2019 16:12:11 +0000 (GMT) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 5a94c0be for ; Sun, 24 Feb 2019 16:12:11 +0000 (UTC) User-agent: mu4e 1.0; emacs 26.1 From: Christopher Baines Date: Sun, 24 Feb 2019 16:12:08 +0000 Message-ID: <875zt9go87.fsf@cbaines.net> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches These patches form a prototype for Guix inferiors, that are isolated. Access to the inferior Guix is done through running a REPL as a separate process. These patches provide a way of launching that REPL in an isolated environment through Linux namespaces, providing some isolation from the wider system. These patches should work, at least enough to get the derivations for packages within the inferior Guix, as well as doing 'guix pull' within the inferior Guix. They're not ready to be merged just yet though. I think some of the approaches are a little odd (e.g. using (ice-9 popen) internals) and I've got no idea if the isolation is actually working properly. Christopher Baines (4): utils: Add #:base-directory to call-with-temporary-directory. linux-container: Add 'start-child-in-container'. inferior: Add a shared-directory field to inferior: Add 'open-inferior/container'. gnu/build/linux-container.scm | 82 +++++++++++++++++++++++++++++++ guix/inferior.scm | 90 ++++++++++++++++++++++++++++++----- guix/utils.scm | 4 +- 3 files changed, 163 insertions(+), 13 deletions(-)