From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id GL7BEiDur2WMWAAAqHPOHw:P1 (envelope-from ) for ; Tue, 23 Jan 2024 17:49:36 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id GL7BEiDur2WMWAAAqHPOHw (envelope-from ) for ; Tue, 23 Jan 2024 17:49:36 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=WbTGopUE; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1706028576; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=cAvWI3+A24fwhNCoiakRvsRbMNqcG+UZ/OqnlO8UKPY=; b=G3ET4ozxiNaY3D080p/9B1KGbpL0QL4RZdFCOxyRaWJlwPHEX0EYa7rh67+ijeKbe+IV1v UIG/x6MOsgLPJmkDlnYyYfi+r3H2rBnWXpCyhLxqPSKkUivNndhaDT1EHba3gxhiJEM0ZD XddosgNnzcwYYBeCtH4ba1hKVCJSHSErKUY/opk8KHcE6awFQB5WOCWSiBE16UHFfgKn/N 1VeJ6J1ABBJ1dDER5UGOLdmjs8UYNmOS3DO0WubtDiibxbCmUDEN94T4xx5/BfEv3zo3+f ETQiFdgim7Dbz1eG7Iw+GeUrEzyvwQP7STZ6QRSrq8DF5CjpI4nfIEFq/F5aaA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=WbTGopUE; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1706028576; a=rsa-sha256; cv=none; b=G8fkcTFoVxeqh7A9QaGyjWxEO3oNIiL/0HV9RzslRo2T9vvsiyOTRRXI/pNo8Ps+DJZOea MucwEnwQvjMHaXOjFZtHbNCQpmwgIKFp3z3QOYOGl1O3F9LDCn+ICprYNSJOXgZMchIr46 mb/NYodTItxnxClSXrBX+fY8ZwHfnNfcnKzCCuvzYZnecCMVoKWU0+pk6QYRckNvJJi2mY RjgbOwhAcQd+SjPrRvsWnor+RRC4xmpw5Ts/Gb9y/XXq2adp1xklUn9mRvDAM5CSYR4MgU OZWeotMijav8GGZb1TamNEgEV7Sn8tlMbaG79+WfjUe7B2lq1dhaDNy+mHoLwA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 21B7F607D3 for ; Tue, 23 Jan 2024 17:49:36 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rSJxM-0003ve-Kz; Tue, 23 Jan 2024 11:49:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rSJxK-0003u5-3c for guix-patches@gnu.org; Tue, 23 Jan 2024 11:48:58 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rSJxJ-0004Nb-RU for guix-patches@gnu.org; Tue, 23 Jan 2024 11:48:57 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rSJxO-00048q-Hp for guix-patches@gnu.org; Tue, 23 Jan 2024 11:49:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68677] [PATCH 2/6] vm: Add =?UTF-8?Q?=E2=80=98date=E2=80=99?= field to . Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 23 Jan 2024 16:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68677 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68677@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 68677-submit@debbugs.gnu.org id=B68677.170602853615867 (code B ref 68677); Tue, 23 Jan 2024 16:49:02 +0000 Received: (at 68677) by debbugs.gnu.org; 23 Jan 2024 16:48:56 +0000 Received: from localhost ([127.0.0.1]:43882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rSJxH-00047k-U3 for submit@debbugs.gnu.org; Tue, 23 Jan 2024 11:48:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rSJxA-00046C-0h for 68677@debbugs.gnu.org; Tue, 23 Jan 2024 11:48:49 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rSJwz-0004Iw-QU; Tue, 23 Jan 2024 11:48:37 -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=cAvWI3+A24fwhNCoiakRvsRbMNqcG+UZ/OqnlO8UKPY=; b=WbTGopUEwmtik6H0Fs83 +iNvh9aOrt4CtAQBuEUDVeUqxDbAtkrBBrCFMujcj7Qc2RuwTQQz1iN8OrYjD99jsjiGe5T9/H/3u 8oF7apYNUC4W+nZArRW4AQzxwNMBiNYzQNZp0HNTi+sXd9fxlNJ7wzs+4IJCuSx01DYzeARUQk+LC qqR0qRuFiQM/TjG7H6ta9V+5EBJwprYxyT7sInL2/2HnPFhv+l9Trir539COVPQ2BLM/DWLvUDOtS YfBoylAEzKrz3uFST58KWr1rdNhAm4jocOUTA3Sh9q7fcKo3/JmlyfXKcEnhuv/lAgyIy6VUk1ReS bsGRpWVDQb8tOA==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Tue, 23 Jan 2024 17:48:17 +0100 Message-ID: <78e16db400df4d9bd53391120c756131ec62f2bd.1706027375.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -6.37 X-Spam-Score: -6.37 X-Migadu-Queue-Id: 21B7F607D3 X-Migadu-Scanner: mx12.migadu.com X-TUID: J+M8PhjftTLE * gnu/system/vm.scm ()[date]: New field. (virtual-machine-compiler): Honor it. Change-Id: Idab1c152466d57cbc6784c031a99fdfd37080bcb --- gnu/system/vm.scm | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 8c27ff787d..33604d3229 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013-2022 Ludovic Courtès +;;; Copyright © 2013-2024 Ludovic Courtès ;;; Copyright © 2016 Christine Lemmer-Webber ;;; Copyright © 2016, 2017 Leo Famulari ;;; Copyright © 2017 Mathieu Othacehe @@ -63,6 +63,7 @@ (define-module (gnu system vm) #:use-module (gnu system uuid) #:use-module ((srfi srfi-1) #:hide (partition)) + #:use-module (srfi srfi-19) #:use-module (srfi srfi-26) #:use-module (rnrs bytevectors) #:use-module (ice-9 match) @@ -326,7 +327,9 @@ (define-record-type* %virtual-machine (disk-image-size virtual-machine-disk-image-size ;integer (bytes) (default 'guess)) (port-forwardings virtual-machine-port-forwardings ;list of integer pairs - (default '()))) + (default '())) + (date virtual-machine-date ;SRFI-19 date | #f + (default #f))) (define-syntax virtual-machine (syntax-rules () @@ -353,22 +356,19 @@ (define-gexp-compiler (virtual-machine-compiler (vm ) system target) (match vm (($ os qemu volatile? graphic? memory-size - disk-image-size ()) - (system-qemu-image/shared-store-script os - #:system system - #:target target - #:qemu qemu - #:graphic? graphic? - #:volatile? volatile? - #:memory-size memory-size - #:disk-image-size - disk-image-size)) - (($ os qemu volatile? graphic? memory-size - disk-image-size forwardings) + disk-image-size forwardings date) (let ((options - `("-nic" ,(string-append - "user,model=virtio-net-pci," - (port-forwardings->qemu-options forwardings))))) + (append (if (null? forwardings) + '() + `("-nic" ,(string-append + "user,model=virtio-net-pci," + (port-forwardings->qemu-options + forwardings)))) + (if date + `("-rtc" + ,(string-append + "base=" (date->string date "~5"))) + '())))) (system-qemu-image/shared-store-script os #:system system #:target target -- 2.41.0