From patchwork Thu Dec 16 13:02:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 499 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 B1B5D27BBEA; Thu, 16 Dec 2021 13:04:47 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6DB2C27BBE9 for ; Thu, 16 Dec 2021 13:04:47 +0000 (GMT) Received: from localhost ([::1]:47602 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxqRC-0003XJ-GX for patchwork@mira.cbaines.net; Thu, 16 Dec 2021 08:04:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57152) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxqPW-00020J-TV for guix-patches@gnu.org; Thu, 16 Dec 2021 08:03:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:51625) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxqPW-0003EV-Ie for guix-patches@gnu.org; Thu, 16 Dec 2021 08:03:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mxqPW-0006Ua-Ck for guix-patches@gnu.org; Thu, 16 Dec 2021 08:03:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52550] [PATCH 00/10] Further work on the image API. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 16 Dec 2021 13:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52550 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52550@debbugs.gnu.org Cc: Mathieu Othacehe X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163965973524876 (code B ref -1); Thu, 16 Dec 2021 13:03:02 +0000 Received: (at submit) by debbugs.gnu.org; 16 Dec 2021 13:02:15 +0000 Received: from localhost ([127.0.0.1]:34935 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxqOl-0006TA-9C for submit@debbugs.gnu.org; Thu, 16 Dec 2021 08:02:15 -0500 Received: from lists.gnu.org ([209.51.188.17]:46050) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxqOj-0006T0-8d for submit@debbugs.gnu.org; Thu, 16 Dec 2021 08:02:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxqOi-0001C9-RL for guix-patches@gnu.org; Thu, 16 Dec 2021 08:02:12 -0500 Received: from [2001:470:142:3::e] (port=33542 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxqOi-00034P-FG for guix-patches@gnu.org; Thu, 16 Dec 2021 08:02:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=6WIutDuDoq9efr4lwnucFQreUwqMnDl7WQXjlvY/Twk=; b=KoRmfe/7/cYgY9 h0Vd8NON7atHBnJHEN30ZfkAsNhHKuXPR+c/UPhs0w4CB0UGtob7OW9d2GHXkzp/J8G755TpShLTq ujNtOIlaYliZjaM0o2HaitGTWfN0MTWBXvw9DyWaJeKSFPOPpLX8e2gvu+DCzyjwVSxc+KRmxmpk7 dDvnDor3v2PQ37pAIsSc4D+okXjpA1f9m/B3vdnX3isCtSOqvQ1Pn+oOQbnsg3p3J6gDCaMrUte4/ O9MfVhTCqaC6o0MkMx1p5LvobT/BOysotjpd5hwVHNhTnqxC6mdkmXPaL1FpnlRfBRX6W//yHU2zb RQ7RnTfNpu9vfk7h+7Pw==; Received: from [2a01:e0a:19b:d9a0:2f3b:16f2:b776:3ef9] (port=57548 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxqOi-0002QE-CR; Thu, 16 Dec 2021 08:02:12 -0500 From: Mathieu Othacehe Date: Thu, 16 Dec 2021 14:02:04 +0100 Message-Id: <20211216130204.29996-1-othacehe@gnu.org> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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 Hello, This series contains further work on the image API that I have postponed for over a year. In short: * The guix system image command now supports the docker image type, which means that the docker-image command is deprecated. * The docker images are not created in a VM (not needed), which results in a creation speedup of around 6 times: 3 minutes vs 19 minutes for a simple docker image on my x86 machine. * Most of the (gnu build vm) and (gnu system vm) code is removed. This is code was largely duplicated in (gnu build image) and (gnu system image). We now have a single entry point for creating images, that is faster, more robust and portable. * I have added a "volatile?" flag to the record so that the system tests can use a persistent or a volatile storage. I have adapted the docker tests to use persistent storage. This means that those tests that have been broken for a long time are now fixed. Thanks, Mathieu Mathieu Othacehe (10): build: image: Add optional closure copy support. image: Add a shared-store? field. image: Add a shared-network? field. system: image: Add docker support. system: vm: Use the image API to generate QEMU images. Remove VM generation dead-code. scripts: system: Deprecate the docker-image command. scripts: system: Pass the volatile field to VM generation. scripts: system: Use the disk-image size argument for VM generation. tests: docker: Fix it. doc/guix.texi | 23 +- gnu/build/image.scm | 39 ++- gnu/build/marionette.scm | 14 +- gnu/build/vm.scm | 500 ---------------------------------- gnu/image.scm | 6 + gnu/local.mk | 1 - gnu/system/image.scm | 125 ++++++++- gnu/system/vm.scm | 564 ++++----------------------------------- gnu/tests/docker.scm | 51 ++-- gnu/tests/install.scm | 2 +- guix/scripts/system.scm | 32 ++- tests/modules.scm | 6 +- 12 files changed, 279 insertions(+), 1084 deletions(-) delete mode 100644 gnu/build/vm.scm