From patchwork Thu Dec 16 13:06:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 35277 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 F3B2727BBEA; Thu, 16 Dec 2021 13:17:41 +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 67DC227BBE9 for ; Thu, 16 Dec 2021 13:17:41 +0000 (GMT) Received: from localhost ([::1]:59234 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxqdg-0003uo-Cq for patchwork@mira.cbaines.net; Thu, 16 Dec 2021 08:17:40 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59962) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxqUQ-0005mo-3O for guix-patches@gnu.org; Thu, 16 Dec 2021 08:08:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:51691) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxqUO-0004bH-Lq for guix-patches@gnu.org; Thu, 16 Dec 2021 08:08:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mxqUO-0006gE-Gu for guix-patches@gnu.org; Thu, 16 Dec 2021 08:08:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52550] [PATCH 08/10] scripts: system: Pass the volatile field to VM generation. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 16 Dec 2021 13:08:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52550 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52550@debbugs.gnu.org Cc: Mathieu Othacehe Received: via spool by 52550-submit@debbugs.gnu.org id=B52550.163966004425561 (code B ref 52550); Thu, 16 Dec 2021 13:08:04 +0000 Received: (at 52550) by debbugs.gnu.org; 16 Dec 2021 13:07:24 +0000 Received: from localhost ([127.0.0.1]:34993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxqTj-0006e7-NU for submit@debbugs.gnu.org; Thu, 16 Dec 2021 08:07:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58884) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxqTa-0006d2-8D for 52550@debbugs.gnu.org; Thu, 16 Dec 2021 08:07:15 -0500 Received: from [2001:470:142:3::e] (port=33802 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 1mxqTV-0004Sd-20 for 52550@debbugs.gnu.org; Thu, 16 Dec 2021 08:07:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=DKqkG+JSqnchfSJIkWAU0S3s4VOq+AGNdR/ffQsTQFs=; b=Ud5F0ppa9ajA7gJvPuIG nyIce6LaXpQlajEyDGjCxKYtjMbpwQjLgg2eelYo3DeGGbFCq+juuN079q8EuQk+Wm5tzl1bA3B/v LrDHJukugoJ492qx7qIGxZ8KGrkLcM1x7atv6Sgg69l8H03Z6PCiIJmJ3Yc4EYVKfWhiM84zIbjtX RF9iz7/oq/7WJ6A28GJyIFgp8vEjhpmLtzjVQnlP/xZhXlV2FAA0ZtNg3opk5AxaD1ROFqGcQ7CXr UHqOddp5JtwCGZ9OlB1H5U4fneu7TVwHRSffSR9mduE3PdP2h0c8d0Y9mLqa2CRmV17elPDSi04m8 TiUpKvX3tcwSTw==; Received: from [2a01:e0a:19b:d9a0:2f3b:16f2:b776:3ef9] (port=57550 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 1mxqTT-0003iQ-NX; Thu, 16 Dec 2021 08:07:09 -0500 From: Mathieu Othacehe Date: Thu, 16 Dec 2021 14:06:47 +0100 Message-Id: <20211216130649.30285-8-othacehe@gnu.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211216130649.30285-1-othacehe@gnu.org> References: <20211216130649.30285-1-othacehe@gnu.org> 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 * guix/scripts/system.scm (system-derivation-for-action): Add new volatile? argument and pass it to system-qemu-image/shared-store-script. (perform-action): Add new volatile? argument and pass it to system-derivation-for-action. (process-action): Pass the volatile? argument to perform-action. --- guix/scripts/system.scm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index a5d9bb4779..a73fe55418 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -689,6 +689,7 @@ (define file-systems (define* (system-derivation-for-action image action #:key full-boot? + volatile? (graphic? #t) container-shared-network? mappings) @@ -707,6 +708,7 @@ (define* (system-derivation-for-action image action ((vm) (system-qemu-image/shared-store-script os #:full-boot? full-boot? + #:volatile? volatile? #:graphic? graphic? #:disk-image-size (if full-boot? @@ -772,6 +774,7 @@ (define* (perform-action action image dry-run? derivations-only? use-substitutes? target full-boot? + volatile? (graphic? #t) container-shared-network? (mappings '()) @@ -826,6 +829,7 @@ (define bootcfg (mlet* %store-monad ((sys (system-derivation-for-action image action #:full-boot? full-boot? + #:volatile? volatile? #:graphic? graphic? #:container-shared-network? container-shared-network? #:mappings mappings)) @@ -1277,6 +1281,7 @@ (define (graph-backend) #:validate-reconfigure (assoc-ref opts 'validate-reconfigure) #:full-boot? (assoc-ref opts 'full-boot?) + #:volatile? (assoc-ref opts 'volatile-root?) #:graphic? (not (assoc-ref opts 'no-graphic?)) #:container-shared-network? (assoc-ref opts 'container-shared-network?)