GNU bug report logs - #75010
[PATCH 0/7] Roll back when deployment fails.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Herman Rimm <herman@HIDDEN>; Keywords: patch moreinfo; dated Sat, 21 Dec 2024 17:04:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.
Added tag(s) moreinfo. Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 75010 <at> debbugs.gnu.org:


Received: (at 75010) by debbugs.gnu.org; 9 Feb 2025 16:31:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 09 11:31:47 2025
Received: from localhost ([127.0.0.1]:45961 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1thADj-0005tc-4J
	for submit <at> debbugs.gnu.org; Sun, 09 Feb 2025 11:31:47 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:42442)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1thADf-0005tH-Nm
 for 75010 <at> debbugs.gnu.org; Sun, 09 Feb 2025 11:31:44 -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 <ludo@HIDDEN>)
 id 1thADX-00043f-Dk; Sun, 09 Feb 2025 11:31:35 -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:References:In-Reply-To:Subject:To:
 From; bh=XzbLtf8XB1S8iabrYU5NGJKU7HF7TmtDe1quAq95ib4=; b=I77TJ7wemVH5KYrfXduG
 HLjNSadi2v26z3gRsxtzv5XngvgLsXs/Kb1q5kquQMzerlef2oPCRqvU51/457iNxm2zL4e6fdxKU
 JHIrf0ZVZD42hiMCgC98te5x1EdDC2/mV+LyEb1KE43rCIeVwRNPY7vateVsv3/tA0YIObvBuqBtM
 MAuuU4o9cPFc75qN7nvpQjEa08srx9S3uQU+hAKNuZVKaS7uv4Hc5KwIAOE/k3pYy5+0P0VsRtc3O
 XbAbgcE8j593yAKGBqNlMWrQ8aERVTZIvNpdktuN5GATBl1Qra4AL4gemzJuCjhAoIiNl5516ps0s
 T7TFWWoGtF4RuA==;
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Herman Rimm <herman@HIDDEN>
Subject: Re: [bug#75010] [PATCH v2 1/2] gnu: tests: Add module for guix
 deploy tests.
In-Reply-To: <1e5edf7f36933c07e1f2218c9b6ff239381092da.1738319693.git.herman@HIDDEN>
 (Herman Rimm's message of "Fri, 31 Jan 2025 12:14:23 +0100")
References: <cover.1738319693.git.herman@HIDDEN>
 <1e5edf7f36933c07e1f2218c9b6ff239381092da.1738319693.git.herman@HIDDEN>
Date: Sun, 09 Feb 2025 17:31:32 +0100
Message-ID: <87pljrqduj.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75010
Cc: 75010 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Herman Rimm <herman@HIDDEN> skribis:

> * gnu/tests/deploy.scm: Add file.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Register file.
>
> Change-Id: I348c8bf2e518ec6c00af126993eaca3fcd453901

Nice!


[...]

> +(define (machines os)

Unless I=E2=80=99m mistaken, =E2=80=98os=E2=80=99 is actually unused.  I=E2=
=80=99d suggest making =E2=80=98os=E2=80=99
an sexp and actually using it instead of reading
/run/current-system/configuration.scm.

The OS to deploy should be different from the one already running (at
least a different host name, etc.) as a way to ensure that an actual
deployment occurs.

So you should probably have:

  (define target-os-source
    '(begin
       (use-modules (gnu))
       =E2=80=A6
       (operating-system
         =E2=80=A6)))

(This is similar to uses of =E2=80=98define-os-with-source=E2=80=99 in othe=
r tests
except that we probably only need the source in this case.)

> +  (scheme-file
> +    "machines.scm"
> +    #~(begin (use-modules (gnu machine ssh)

Please indent the usual way:

  (scheme-file "machines.scm"
               #~(begin
                   (use-modules =E2=80=A6)
                   =E2=80=A6))

> +             ;; XXX: (guix platforms ...) are not found in %load-path.
> +             (set! (@ (guix platform) systems)
> +                   (compose list %current-system))

What=E2=80=99s the problem here?

> +                      (machine-ssh-configuration
> +                        (host-name "localhost")
> +                        (host-key
> +                         (string-append
> +                           "ssh-ed25519 "
> +                           (public-key->string
> +                             (public-key-from-file
> +                               "/etc/ssh/ssh_host_ed25519_key.pub"))))

It=E2=80=99s enough to do:

  (call-with-input-file "/etc/ssh/ssh_host_ed25519_key.pub"
    get-string-all)

> +(define %test-deploy
> +  (system-test
> +   (name "deploy")
> +   (description "Deploy to the local machine.")
> +   (value (run-deploy-test))))
> +
> +(define %test-rollback
> +  (system-test
> +   (name "rollback")
> +   (description "Rollback the deployment of a faulty bootloader.")
> +   (value (run-rollback-test))))

For clarity, I=E2=80=99d change =E2=80=98name=E2=80=99 of the 2nd one to "d=
eploy-rollback" and
clarify in the description that this is about =E2=80=98guix deploy=E2=80=99.

Could you send an updated version?

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#75010; Package guix-patches. Full text available.

Message received at 75010 <at> debbugs.gnu.org:


Received: (at 75010) by debbugs.gnu.org; 31 Jan 2025 11:15:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 31 06:15:28 2025
Received: from localhost ([127.0.0.1]:50199 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tdozf-0003s8-FU
	for submit <at> debbugs.gnu.org; Fri, 31 Jan 2025 06:15:27 -0500
Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:60723
 helo=email.rimm.ee)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <herman@HIDDEN>) id 1tdozX-0003ra-AG
 for 75010 <at> debbugs.gnu.org; Fri, 31 Jan 2025 06:15:19 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman;
 t=1738322111;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=pZ/PV1Gl0KqucAF0jOJLSrmsndCOwF1T+Gzr6E73k0g=;
 b=bfd1T5wL5n2ORL1PhxXpkPQ+Imm6v4OyPp9Fr0bmcajKnQYJ++G+4/UsLakpBdpusZ6How
 zbRE+L415Y43Df0/ME3FQdk+UCKLywd+pqbis+A7TfQ1IcwPBC3Ljn8rgdlqkpSeRemqTt
 COmQ91ptvxyniFrNYYLAUS3OkpRjjGxEJHzDeDhJWpYrhh7SlB6EOOGsGFQEGl+upsPfJs
 L9aX6re4G+nHz70eDQWANgtrHXnJNu15xA8fDtVs/YAmHFr/ck1S+bg/TdIWX5pAXLwudR
 ZqasMr81yw/zGpUiPhJ0ewKzZKUbaudZNDvZ9fnqpTnknSre7EVyXk7oz8H8AQ==
Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 5cea52a9
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO)
 for <75010 <at> debbugs.gnu.org>; Fri, 31 Jan 2025 11:15:11 +0000 (UTC)
From: Herman Rimm <herman@HIDDEN>
To: 75010 <at> debbugs.gnu.org
Subject: [PATCH v2 2/2] Fix deploy test errors.
Date: Fri, 31 Jan 2025 12:14:24 +0100
Message-ID: <e88bf77918c4899508f9d1ca3369ee2929ed6249.1738319693.git.herman@HIDDEN>
X-Mailer: git-send-email 2.47.1
In-Reply-To: <cover.1738319693.git.herman@HIDDEN>
References: <cover.1738319693.git.herman@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75010
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Change-Id: I5e321124cade4ce46209688c94b7c340940fce21
---
 gnu/packages/file-systems.scm | 4 +---
 guix/channels.scm             | 3 +--
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm
index 5fd92d08fb1..c66642bb39a 100644
--- a/gnu/packages/file-systems.scm
+++ b/gnu/packages/file-systems.scm
@@ -601,9 +601,7 @@ (define-public gphotofs
     (license license:gpl2+)))
 
 (define bcachefs-tools-rust-target
-  (platform-rust-target (lookup-platform-by-target-or-system
-                         (or (%current-target-system)
-                             (%current-system)))))
+  "x86_64-unknown-linux-gnu")
 
 (define bcachefs-tools-target/release
   (string-append "target/" bcachefs-tools-rust-target "/release"))
diff --git a/guix/channels.scm b/guix/channels.scm
index 4700f7a45d0..d6425a31dfb 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -565,8 +565,7 @@ (define* (latest-channel-instances store channels
                (let* ((current (current-commit (channel-name channel)))
                       (instance
                        (latest-channel-instance store channel
-                                                #:authenticate?
-                                                authenticate?
+                                                #:authenticate? #f
                                                 #:validate-pull
                                                 validate-pull
                                                 #:starting-commit
-- 
2.47.1





Information forwarded to guix-patches@HIDDEN:
bug#75010; Package guix-patches. Full text available.

Message received at 75010 <at> debbugs.gnu.org:


Received: (at 75010) by debbugs.gnu.org; 31 Jan 2025 11:15:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 31 06:15:27 2025
Received: from localhost ([127.0.0.1]:50197 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tdozZ-0003ry-1C
	for submit <at> debbugs.gnu.org; Fri, 31 Jan 2025 06:15:27 -0500
Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:60723
 helo=email.rimm.ee)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <herman@HIDDEN>) id 1tdozV-0003ra-CA
 for 75010 <at> debbugs.gnu.org; Fri, 31 Jan 2025 06:15:19 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman;
 t=1738322109;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=GkCknNlNF2tbf41QzLgdY8r/cCLWNSwwVPGdgf+721g=;
 b=mdBs/05If5MBLgoCCv6cuctD7Jub9875yDo2Voz4ZBURn4gK624q7lKDZMIyfBoBIyqH+V
 wyUomEA1bSIqOUgyrKjDNLfD3cTuFlEJWtwgW9D9wgQtNjuW62U1p3SuWmq2MzsEphgPtm
 taM2DmJBMLwAfKNECFSHK91N6Gucmrzvv3kGAmTX3lLCEMxx5Q0AkXsXocQAugdtCFBDOY
 LMyllFxUJwusEKrvWyJ5PrTW9emnxV6b6ZXQYVZ0iUp22a2Fbg61Ls4qTluZyz7SvAo0gy
 PNXnQDFzdLM44G33Qm2lbFW8izduhOffbWs1FOWYXk1euQBPxC3IBZuM37JRzQ==
Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id ac7bbc66
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO)
 for <75010 <at> debbugs.gnu.org>; Fri, 31 Jan 2025 11:15:09 +0000 (UTC)
From: Herman Rimm <herman@HIDDEN>
To: 75010 <at> debbugs.gnu.org
Subject: [PATCH v2 1/2] gnu: tests: Add module for guix deploy tests.
Date: Fri, 31 Jan 2025 12:14:23 +0100
Message-ID: <1e5edf7f36933c07e1f2218c9b6ff239381092da.1738319693.git.herman@HIDDEN>
X-Mailer: git-send-email 2.47.1
In-Reply-To: <cover.1738319693.git.herman@HIDDEN>
References: <cover.1738319693.git.herman@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75010
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/tests/deploy.scm: Add file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Register file.

Change-Id: I348c8bf2e518ec6c00af126993eaca3fcd453901
---
 gnu/local.mk         |   3 +-
 gnu/tests/deploy.scm | 224 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 226 insertions(+), 1 deletion(-)
 create mode 100644 gnu/tests/deploy.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index e8c807cf630..3addd69746a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -62,7 +62,7 @@
 # Copyright © 2023 B. Wilson <elaexuotee@HIDDEN>
 # Copyright © 2023 Bruno Victal <mirai@HIDDEN>
 # Copyright © 2023, 2024 gemmaro <gemmaro.dev@HIDDEN>
-# Copyright © 2023 Herman Rimm <herman@HIDDEN>
+# Copyright © 2023, 2025 Herman Rimm <herman@HIDDEN>
 # Copyright © 2023 Troy Figiel <troy@HIDDEN>
 # Copyright © 2024, 2025 David Elsing <david.elsing@HIDDEN>
 # Copyright © 2024 Ashish SHUKLA <ashish.is@HIDDEN>
@@ -840,6 +840,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/tests/containers.scm			\
   %D%/tests/cups.scm				\
   %D%/tests/databases.scm			\
+  %D%/tests/deploy.scm				\
   %D%/tests/desktop.scm				\
   %D%/tests/dns.scm				\
   %D%/tests/dict.scm				\
diff --git a/gnu/tests/deploy.scm b/gnu/tests/deploy.scm
new file mode 100644
index 00000000000..96f074d1f90
--- /dev/null
+++ b/gnu/tests/deploy.scm
@@ -0,0 +1,224 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@HIDDEN>
+;;; Copyright © 2024 Herman Rimm <herman@HIDDEN>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu tests deploy)
+  #:use-module (gnu packages gnupg)
+  #:use-module (gnu packages package-management)
+  #:use-module (gnu packages ssh)
+  #:use-module ((guix self) #:select (make-config.scm))
+  #:use-module (gnu services)
+  #:use-module (gnu services base)
+  #:use-module (gnu services ssh)
+  #:use-module (gnu system)
+  #:use-module (gnu system vm)
+  #:use-module (gnu tests)
+  #:use-module (guix gexp)
+  #:use-module (guix modules)
+  #:use-module (ice-9 match)
+  #:export (%test-deploy
+            %test-rollback))
+
+;;; Commentary:
+;;;
+;;; Test in-place system deployment: advancing the system generation on
+;;; a running instance of the Guix System.
+;;;
+;;; Code:
+
+(define (machines os)
+  (scheme-file
+    "machines.scm"
+    #~(begin (use-modules (gnu machine ssh)
+                          (guix utils)
+                          (ice-9 ftw)
+                          (ssh key))
+             ;; XXX: (guix platforms ...) are not found in %load-path.
+             (set! (@ (guix platform) systems)
+                   (compose list %current-system))
+             (list (machine
+                     (configuration
+                      (machine-ssh-configuration
+                        (host-name "localhost")
+                        (host-key
+                         (string-append
+                           "ssh-ed25519 "
+                           (public-key->string
+                             (public-key-from-file
+                               "/etc/ssh/ssh_host_ed25519_key.pub"))))
+                        (system (%current-system))))
+                     (environment managed-host-environment-type)
+                     ;; XXX: First S-expression is for operating-system.
+                     (operating-system
+                      (call-with-input-file
+                        "/run/current-system/configuration.scm"
+                        read)))))))
+
+(define not-config?
+  ;; Select (guix …) and (gnu …) modules, except (guix config).
+  (match-lambda
+    (('guix 'config) #f)
+    (('guix rest ...) #t)
+    (('gnu rest ...) #t)
+    (_ #f)))
+
+(define* (deploy-program #:optional (os #~%simple-os))
+  (program-file "deploy.scm"
+    (with-extensions (list guile-gcrypt guile-ssh)
+      (with-imported-modules
+        `(((guix config) => ,(make-config.scm)))
+        #~(execl #$(file-append (current-guix) "/bin/guix")
+                 "guix" "deploy" #$(machines os))))))
+
+(define os
+  (marionette-operating-system
+    (operating-system-with-provenance
+      (simple-operating-system
+         (service openssh-service-type
+           (openssh-configuration
+             (permit-root-login #t)
+             (allow-empty-passwords? #t)))
+         (service static-networking-service-type
+           (list (static-networking
+                   (inherit %loopback-static-networking)
+                   (provision '(networking)))))))
+    #:imported-modules '((gnu services herd)
+                         (guix combinators))))
+
+(define vm (virtual-machine os))
+
+(define system-generations-definition
+  #~(define (system-generations marionette)
+      "Return the names of the generation symlinks on MARIONETTE."
+      (marionette-eval
+        '(begin (use-modules (ice-9 ftw))
+                (define (select? entry)
+                  (not (member entry '("per-user" "system" "." ".."))))
+                (scandir "/var/guix/profiles/" select?))
+        marionette)))
+
+(define* (run-deploy-test)
+  "Run a test of an OS running DEPLOY-PROGRAM, which creates a new
+generation of the system profile."
+  (define (test script)
+    (with-imported-modules '((gnu build marionette))
+      #~(begin
+          (use-modules (gnu build marionette)
+                       (ice-9 match)
+                       (srfi srfi-64))
+
+          (define marionette
+            (make-marionette (list #$vm)))
+
+          #$system-generations-definition
+
+          (test-runner-current (system-test-runner #$output))
+          (test-begin "deploy")
+
+          (let ((generations-prior (system-generations marionette)))
+            (test-assert "script successfully evaluated"
+              (marionette-eval
+               '(primitive-load #$script)
+               marionette))
+
+            (test-equal "script created new generation"
+              (length (system-generations marionette))
+              (1+ (length generations-prior)))
+
+            (test-equal "script activated the new generation"
+              (string-append "/var/guix/profiles/system-"
+                             (number->string (+ 1 (length generations-prior)))
+                             "-link")
+              (marionette-eval '(readlink "/run/current-system")
+                               marionette)))
+
+          (test-assert "uname"
+            (match (marionette-eval '(uname) marionette)
+              (#("Linux" host-name _ ...)
+               (string=? host-name #$(operating-system-host-name os)))))
+
+          (test-end))))
+
+  (gexp->derivation "deploy" (test (deploy-program))))
+
+(define* (run-rollback-test)
+  "Run a test of an OS with a faulty bootloader running DEPLOY-PROGRAM,
+which causes a rollback."
+  (define new-os
+    #~(operating-system
+        (inherit %simple-os)
+        (host-name (substring (operating-system-host-name %simple-os)
+                              0 1))
+        (bootloader
+         (bootloader-configuration
+           (inherit (operating-system-bootloader
+                      %simple-os))
+           (targets '("/dev/null"))))))
+
+  (define (test script)
+    (with-imported-modules '((gnu build marionette))
+      #~(begin
+          (use-modules (gnu build marionette)
+                       (ice-9 match)
+                       (srfi srfi-64))
+
+          (define marionette
+            (make-marionette (list #$vm)))
+
+          #$system-generations-definition
+
+          (test-runner-current (system-test-runner #$output))
+          (test-begin "rollback")
+
+          (let ((generations-prior (system-generations marionette)))
+            (test-assert "script successfully evaluated"
+              (marionette-eval
+               '(primitive-load #$script)
+               marionette))
+
+            (test-equal "script created new generation"
+              (length (system-generations marionette))
+              (1+ (length generations-prior)))
+
+            (test-equal "script rolled back the new generation"
+              (string-append "/var/guix/profiles/system-"
+                             (number->string (length generations-prior))
+                             "-link")
+              (marionette-eval '(readlink "/run/current-system")
+                               marionette)))
+
+          (test-assert "uname"
+            (match (marionette-eval '(uname) marionette)
+              (#("Linux" host-name _ ...)
+               (string=? host-name #$(operating-system-host-name os)))))
+
+          (test-end))))
+
+  (gexp->derivation "rollback" (test (deploy-program new-os))))
+
+(define %test-deploy
+  (system-test
+   (name "deploy")
+   (description "Deploy to the local machine.")
+   (value (run-deploy-test))))
+
+(define %test-rollback
+  (system-test
+   (name "rollback")
+   (description "Rollback the deployment of a faulty bootloader.")
+   (value (run-rollback-test))))
-- 
2.47.1





Information forwarded to guix-patches@HIDDEN:
bug#75010; Package guix-patches. Full text available.

Message received at 75010 <at> debbugs.gnu.org:


Received: (at 75010) by debbugs.gnu.org; 31 Jan 2025 11:14:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jan 31 06:14:20 2025
Received: from localhost ([127.0.0.1]:50189 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tdoyX-0003jj-78
	for submit <at> debbugs.gnu.org; Fri, 31 Jan 2025 06:14:20 -0500
Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:58167
 helo=email.rimm.ee)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <herman@HIDDEN>) id 1tdoyS-0003jP-8r
 for 75010 <at> debbugs.gnu.org; Fri, 31 Jan 2025 06:14:15 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman;
 t=1738322041;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type;
 bh=zhSqmmwIp6T9sIKWPk374iVyrWdTVKMta6XrqvFocbk=;
 b=pXrpzl/EQ6XWJPDKe9mSnvvodYBiXVo6f3FAcnKlkUJBTgUH20s3qR/13wHwnxADCIuyfi
 iE6KCn+nJ106cE+bJxZM2jTL25MAP+i4dPyZzTwKqaFmC5KFL6CtnQO/SoLwoYCo0iZFr/
 99fmLkQiDPBq9uYmjOxwIV8D+QhDey669YQ9+5S/P4b7qfnEMSaLI2A5HPLewH9IYy5YJK
 vLC5TLMEts6li6HhbK6r1hXvxj++tdRsOC6i/z5Wdk1ElxRD8UgWPKZoCX15SaLzUDlypH
 tJNkXzN7KsMqZoSUF5SPoavi4sL0GwTP03a5sQSHxEQv1WRXo6dxyyvze9+KHQ==
Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id cafe2f90
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); 
 Fri, 31 Jan 2025 11:14:00 +0000 (UTC)
Date: Fri, 31 Jan 2025 12:13:15 +0100
From: Herman Rimm <herman@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: [PATCH v2 0/2] Add module for guix deploy tests.
Message-ID: <vlmjulfz5eyyab2dviyoti5itfmx6pv7wtomjx5ei5gnnqbdrv@eskkgnba7nx6>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="3nf2grkfdqkcowr4"
Content-Disposition: inline
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75010
Cc: 75010 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


--3nf2grkfdqkcowr4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi Ludo',

Thanks for your feedback.  I'm not sure how to fix the bugs in guix
deploy.  For now I want to make the tests for guix deploy work, so I
only submit [PATCH v2 1/2], previously [PATCH 7/7].

[PATCH v2 2/2] has workarounds, the one in (gnu packages file-systems)
is because I don't know how to get the deploy tests to load e.g. (guix
platforms x86).

I run these commands:

  guix shell -D guix gnupg -CPWN
  make
  ./pre-inst-env guix build -f test.scm &> result

I attached result, test.scm contains:

  (use-modules (gnu tests deploy) (gnu tests reconfigure))
  ;%test-rollback
  %test-deploy
  ;%test-switch-to-system

%test-deploy runs into an error I don't know how to fix or work around.

Cheers,
Herman

Herman Rimm (2):
  gnu: tests: Add module for guix deploy tests.
  Fix deploy test errors.

 gnu/local.mk                  |   3 +-
 gnu/packages/file-systems.scm |   4 +-
 gnu/tests/deploy.scm          | 224 ++++++++++++++++++++++++++++++++++
 guix/channels.scm             |   3 +-
 4 files changed, 228 insertions(+), 6 deletions(-)
 create mode 100644 gnu/tests/deploy.scm


base-commit: 5a6c66f7919fbe79251cd425ae6952e67acbe94c
-- 
2.47.1

--3nf2grkfdqkcowr4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=result
Content-Transfer-Encoding: quoted-printable

Updating channel 'guix' from Git repository at '/home/herman/git/guix/'...
guix build: warning: channel authentication disabled
Computing Guix derivation for 'x86_64-linux'... =20
substitute: =0Dsubstitute: =1B[Klooking for substitutes on 'https://substit=
utes.nonguix.org'...   0.0%=0Dsubstitute: =1B[Klooking for substitutes on '=
https://substitutes.nonguix.org'... 100.0%
substitute: =0Dsubstitute: =1B[Klooking for substitutes on 'https://guix.bo=
rdeaux.inria.fr'...   0.0%=0Dsubstitute: =1B[Klooking for substitutes on 'h=
ttps://guix.bordeaux.inria.fr'... 100.0%
substitute: =0Dsubstitute: =1B[Klooking for substitutes on 'https://bordeau=
x.guix.gnu.org'...   0.0%=0Dsubstitute: =1B[Klooking for substitutes on 'ht=
tps://bordeaux.guix.gnu.org'... 100.0%
substitute: =0Dsubstitute: =1B[Klooking for substitutes on 'https://ci.guix=
=2Egnu.org'...   0.0%=0Dsubstitute: =1B[Klooking for substitutes on 'https:=
//ci.guix.gnu.org'... 100.0%
The following derivation will be built:
  /gnu/store/vw9857dzp7lvplkm9szyivg32f9yvdgm-deploy.drv
building /gnu/store/vw9857dzp7lvplkm9szyivg32f9yvdgm-deploy.drv...
=1Bc=1B[?7l=1B[2J=1B[0mSeaBIOS (version 1.16.2/GNU Guix)


iPXE (https://ipxe.org) 00:03.0 CA00 PCI2.10 PnP PMM+0EFCAE60+0EF0AE60 CA00
Press Ctrl-B to configure iPXE (PCI 00:03.0)...=0D                         =
                                                     =20


Booting from ROM...
=1Bc=1B[?7l=1B[2J[    0.000000] Linux version 6.12.11-gnu (guix@guix) (gcc =
(GCC) 11.4.0, GNU ld (GNU Binutils) 2.41) #1 SMP PREEMPT_DYNAMIC 1
[    0.000000] Command line: console=3DttyS0 root=3D/dev/vda1 gnu.system=3D=
/gnu/store/2qbnwnl4lifdq8f5wa8nlj79bhxfg0pi-system gnu.load=3D/gnu/store/2q=
bnwnl4lifdq8f5wa8nlj79bhxfg0pi-system/boot panic=3D1 modprobe.blacklist=3Du=
sbmouse,usbkbd
[    0.000000] KERNEL supported cpus:
[    0.000000]   Intel GenuineIntel
[    0.000000]   AMD AuthenticAMD
[    0.000000]   Hygon HygonGenuine
[    0.000000]   Centaur CentaurHauls
[    0.000000]   zhaoxin   Shanghai =20
[    0.000000] BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[    0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reser=
ved
[    0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reser=
ved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000000ffdcfff] usable
[    0.000000] BIOS-e820: [mem 0x000000000ffdd000-0x000000000fffffff] reser=
ved
[    0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reser=
ved
[    0.000000] BIOS-e820: [mem 0x000000fd00000000-0x000000ffffffffff] reser=
ved
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] APIC: Static calls initialized
[    0.000000] SMBIOS 3.0.0 present.
[    0.000000] DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2/GNU=
 Guix 04/01/2014
[    0.000000] DMI: Memory slots populated: 1/1
[    0.000000] tsc: Fast TSC calibration using PIT
[    0.000000] tsc: Detected 3094.138 MHz processor
[    0.014246] AGP: No AGP bridge found
[    0.014564] last_pfn =3D 0xffdd max_arch_pfn =3D 0x400000000
[    0.015358] MTRR map: 4 entries (3 fixed + 1 variable; max 19), built fr=
om 8 variable MTRRs
[    0.015565] x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WP  UC- WT=
 =20
[    0.041300] found SMP MP-table at [mem 0x000f5b80-0x000f5b8f]
[    0.046909] RAMDISK: [mem 0x0f1bf000-0x0ffcffff]
[    0.047342] ACPI: Early table checksum verification disabled
[    0.047732] ACPI: RSDP 0x00000000000F59B0 000014 (v00 BOCHS )
[    0.048067] ACPI: RSDT 0x000000000FFE1C58 000034 (v01 BOCHS  BXPC     00=
000001 BXPC 00000001)
[    0.048640] ACPI: FACP 0x000000000FFE1B0C 000074 (v01 BOCHS  BXPC     00=
000001 BXPC 00000001)
[    0.049236] ACPI: DSDT 0x000000000FFE0040 001ACC (v01 BOCHS  BXPC     00=
000001 BXPC 00000001)
[    0.049314] ACPI: FACS 0x000000000FFE0000 000040
[    0.049378] ACPI: APIC 0x000000000FFE1B80 000078 (v03 BOCHS  BXPC     00=
000001 BXPC 00000001)
[    0.049418] ACPI: HPET 0x000000000FFE1BF8 000038 (v01 BOCHS  BXPC     00=
000001 BXPC 00000001)
[    0.049444] ACPI: WAET 0x000000000FFE1C30 000028 (v01 BOCHS  BXPC     00=
000001 BXPC 00000001)
[    0.049559] ACPI: Reserving FACP table memory at [mem 0xffe1b0c-0xffe1b7=
f]
[    0.049590] ACPI: Reserving DSDT table memory at [mem 0xffe0040-0xffe1b0=
b]
[    0.049600] ACPI: Reserving FACS table memory at [mem 0xffe0000-0xffe003=
f]
[    0.049606] ACPI: Reserving APIC table memory at [mem 0xffe1b80-0xffe1bf=
7]
[    0.049613] ACPI: Reserving HPET table memory at [mem 0xffe1bf8-0xffe1c2=
f]
[    0.049620] ACPI: Reserving WAET table memory at [mem 0xffe1c30-0xffe1c5=
7]
[    0.052246] No NUMA configuration found
[    0.052265] Faking a node at [mem 0x0000000000000000-0x000000000ffdcfff]
[    0.053073] NODE_DATA(0) allocated [mem 0x0ffd7ac0-0x0ffdcfff]
[    0.055487] Zone ranges:
[    0.055509]   DMA      [mem 0x0000000000001000-0x0000000000ffffff]
[    0.055577]   DMA32    [mem 0x0000000001000000-0x000000000ffdcfff]
[    0.055591]   Normal   empty
[    0.055613]   Device   empty
[    0.055627] Movable zone start for each node
[    0.055662] Early memory node ranges
[    0.055691]   node   0: [mem 0x0000000000001000-0x000000000009efff]
[    0.055905]   node   0: [mem 0x0000000000100000-0x000000000ffdcfff]
[    0.056032] Initmem setup node 0 [mem 0x0000000000001000-0x000000000ffdc=
fff]
[    0.057266] On node 0, zone DMA: 1 pages in unavailable ranges
[    0.057511] On node 0, zone DMA: 97 pages in unavailable ranges
[    0.058676] On node 0, zone DMA32: 35 pages in unavailable ranges
[    0.059226] ACPI: PM-Timer IO Port: 0x608
[    0.059618] ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1])
[    0.060018] IOAPIC[0]: apic_id 0, version 32, address 0xfec00000, GSI 0-=
23
[    0.060147] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.060452] ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
[    0.060482] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[    0.060601] ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
[    0.060613] ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
[    0.060853] ACPI: Using ACPI (MADT) for SMP configuration information
[    0.060908] ACPI: HPET id: 0x8086a201 base: 0xfed00000
[    0.061332] CPU topo: Max. logical packages:   1
[    0.061346] CPU topo: Max. logical dies:       1
[    0.061355] CPU topo: Max. dies per package:   1
[    0.061403] CPU topo: Max. threads per core:   1
[    0.061561] CPU topo: Num. cores per package:     1
[    0.061576] CPU topo: Num. threads per package:   1
[    0.061586] CPU topo: Allowing 1 present CPUs plus 0 hotplug CPUs
[    0.062566] PM: hibernation: Registered nosave memory: [mem 0x00000000-0=
x00000fff]
[    0.062641] PM: hibernation: Registered nosave memory: [mem 0x0009f000-0=
x0009ffff]
[    0.062676] PM: hibernation: Registered nosave memory: [mem 0x000a0000-0=
x000effff]
[    0.062683] PM: hibernation: Registered nosave memory: [mem 0x000f0000-0=
x000fffff]
[    0.062834] [mem 0x10000000-0xfffbffff] available for PCI devices
[    0.062911] Booting paravirtualized kernel on bare hardware
[    0.063229] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0=
xffffffff, max_idle_ns: 7645519600211568 ns
[    0.064047] setup_percpu: NR_CPUS:256 nr_cpumask_bits:1 nr_cpu_ids:1 nr_=
node_ids:1
[    0.074489] percpu: Embedded 92 pages/cpu s281304 r65536 d29992 u2097152
[    0.076483] Kernel command line: console=3DttyS0 root=3D/dev/vda1 gnu.sy=
stem=3D/gnu/store/2qbnwnl4lifdq8f5wa8nlj79bhxfg0pi-system gnu.load=3D/gnu/s=
tore/2qbnwnl4lifdq8f5wa8nlj79bhxfg0pi-system/boot panic=3D1 modprobe.blackl=
ist=3Dusbmouse,usbkbd
[    0.078411] Dentry cache hash table entries: 32768 (order: 6, 262144 byt=
es, linear)
[    0.078589] Inode-cache hash table entries: 16384 (order: 5, 131072 byte=
s, linear)
[    0.081266] Fallback order for Node 0: 0=20
[    0.081553] Built 1 zonelists, mobility grouping on.  Total pages: 65403
[    0.081571] Policy zone: DMA32
[    0.082151] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.082330] AGP: Checking aperture...
[    0.083956] AGP: No AGP bridge found
[    0.132487] SLUB: HWalign=3D64, Order=3D0-3, MinObjects=3D0, CPUs=3D1, N=
odes=3D1
[    0.134743] allocated 524288 bytes of page_ext
[    0.136945] ftrace: allocating 52652 entries in 206 pages
[    0.177576] ftrace: allocated 206 pages with 5 groups
[    0.187702] Dynamic Preempt: voluntary
[    0.191629] rcu: Preemptible hierarchical RCU implementation.
[    0.191664] rcu: 	RCU restricting CPUs from NR_CPUS=3D256 to nr_cpu_ids=
=3D1.
[    0.191858] 	Trampoline variant of Tasks RCU enabled.
[    0.191869] 	Rude variant of Tasks RCU enabled.
[    0.191875] 	Tracing variant of Tasks RCU enabled.
[    0.191968] rcu: RCU calculated value of scheduler-enlistment delay is 2=
5 jiffies.
[    0.191994] rcu: Adjusting geometry for rcu_fanout_leaf=3D16, nr_cpu_ids=
=3D1
[    0.193113] RCU Tasks: Setting shift to 0 and lim to 1 rcu_task_cb_adjus=
t=3D1 rcu_task_cpu_ids=3D1.
[    0.193144] RCU Tasks Rude: Setting shift to 0 and lim to 1 rcu_task_cb_=
adjust=3D1 rcu_task_cpu_ids=3D1.
[    0.193155] RCU Tasks Trace: Setting shift to 0 and lim to 1 rcu_task_cb=
_adjust=3D1 rcu_task_cpu_ids=3D1.
[    0.223346] NR_IRQS: 16640, nr_irqs: 256, preallocated irqs: 16
[    0.232373] rcu: srcu_init: Setting srcu_struct sizes based on contentio=
n.
[    0.238861] Console: colour VGA+ 80x25
[    0.240714] printk: legacy console [ttyS0] enabled
[    0.257306] ACPI: Core revision 20240827
[    0.262798] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, =
max_idle_ns: 19112604467 ns
[    0.267437] APIC: Switch to symmetric I/O mode setup
[    0.272561] ..TIMER: vector=3D0x30 apic1=3D0 pin1=3D2 apic2=3D-1 pin2=3D=
-1
[    0.292596] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles:=
 0x2c99a652877, max_idle_ns: 440795264666 ns
[    0.293292] Calibrating delay loop (skipped), value calculated using tim=
er frequency.. 6188.27 BogoMIPS (lpj=3D12376552)
[    0.297890] Last level iTLB entries: 4KB 512, 2MB 255, 4MB 127
[    0.298020] Last level dTLB entries: 4KB 512, 2MB 255, 4MB 127, 1GB 0
[    0.298548] Spectre V1 : Mitigation: usercopy/swapgs barriers and __user=
 pointer sanitization
[    0.298866] Spectre V2 : Mitigation: Retpolines
[    0.298986] Spectre V2 : Spectre v2 / SpectreRSB mitigation: Filling RSB=
 on context switch
[    0.299158] Spectre V2 : Spectre v2 / SpectreRSB : Filling RSB on VMEXIT
[    0.300209] x86/fpu: x87 FPU will use FXSAVE
[    0.648269] Freeing SMP alternatives memory: 44K
[    0.649346] pid_max: default: 32768 minimum: 301
[    0.660472] LSM: initializing lsm=3Dcapability,yama,apparmor,tomoyo,ima,=
evm
[    0.665293] Yama: becoming mindful.
[    0.669295] AppArmor: AppArmor initialized
[    0.669556] TOMOYO Linux initialized
[    0.675047] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, l=
inear)
[    0.675290] Mountpoint-cache hash table entries: 512 (order: 0, 4096 byt=
es, linear)
[    0.814759] smpboot: CPU0: AMD QEMU Virtual CPU version 2.5+ (family: 0x=
f, model: 0x6b, stepping: 0x1)
[    0.823277] Performance Events: PMU not available due to virtualization,=
 using software events only.
[    0.824444] signal: max sigframe size: 1440
[    0.825952] rcu: Hierarchical SRCU implementation.
[    0.826070] rcu: 	Max phase no-delay instances is 1000.
[    0.834892] NMI watchdog: Perf NMI watchdog permanently disabled
[    0.836179] smp: Bringing up secondary CPUs ...
[    0.838158] smp: Brought up 1 node, 1 CPU
[    0.838367] smpboot: Total of 1 processors activated (6188.27 BogoMIPS)
[    0.844489] Memory: 192116K/261612K available (20480K kernel code, 3079K=
 rwdata, 13308K rodata, 4592K init, 2340K bss, 65040K reserved, 0K cma-rese=
rved)
[    0.852384] devtmpfs: initialized
[    0.855515] x86/mm: Memory block size: 128MB
[    0.862992] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xfffffff=
f, max_idle_ns: 7645041785100000 ns
[    0.863585] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[    0.867187] pinctrl core: initialized pinctrl subsystem
[    0.873410] PM: RTC time: 10:26:40, date: 2025-01-31
[    0.885429] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.888734] audit: initializing netlink subsys (disabled)
[    0.890600] audit: type=3D2000 audit(1738319200.624:1): state=3Dinitiali=
zed audit_enabled=3D0 res=3D1
[    0.895837] thermal_sys: Registered thermal governor 'fair_share'
[    0.895875] thermal_sys: Registered thermal governor 'bang_bang'
[    0.896001] thermal_sys: Registered thermal governor 'step_wise'
[    0.896101] thermal_sys: Registered thermal governor 'user_space'
[    0.896643] cpuidle: using governor ladder
[    0.896965] cpuidle: using governor menu
[    0.898529] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
[    0.901774] PCI: Using configuration type 1 for base access
[    0.904351] kprobes: kprobe jump-optimization is enabled. All kprobes ar=
e optimized if possible.
[    0.990229] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
[    0.990388] HugeTLB: 28 KiB vmemmap can be freed for a 2.00 MiB page
[    1.033470] ACPI: Added _OSI(Module Device)
[    1.033584] ACPI: Added _OSI(Processor Device)
[    1.033744] ACPI: Added _OSI(3.0 _SCP Extensions)
[    1.033920] ACPI: Added _OSI(Processor Aggregator Device)
[    1.056793] ACPI: 1 ACPI AML tables successfully acquired and loaded
[    1.090060] ACPI: Interpreter enabled
[    1.091146] ACPI: PM: (supports S0 S3 S4 S5)
[    1.091275] ACPI: Using IOAPIC for interrupt routing
[    1.092654] PCI: Using host bridge windows from ACPI; if necessary, use =
"pci=3Dnocrs" and report a bug
[    1.092833] PCI: Using E820 reservations for host bridge windows
[    1.097705] ACPI: Enabled 2 GPEs in block 00 to 0F
[    1.127116] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[    1.127828] acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments MS=
I HPX-Type3]
[    1.128124] acpi PNP0A03:00: _OSC: not requesting OS control; OS require=
s [ExtendedConfig ASPM ClockPM MSI]
[    1.128865] acpi PNP0A03:00: fail to add MMCONFIG information, can't acc=
ess extended configuration space under this bridge
[    1.134481] acpiphp: Slot [3] registered
[    1.134640] acpiphp: Slot [4] registered
[    1.134765] acpiphp: Slot [5] registered
[    1.134908] acpiphp: Slot [6] registered
[    1.135032] acpiphp: Slot [7] registered
[    1.135152] acpiphp: Slot [8] registered
[    1.135286] acpiphp: Slot [9] registered
[    1.135405] acpiphp: Slot [10] registered
[    1.135525] acpiphp: Slot [11] registered
[    1.135644] acpiphp: Slot [12] registered
[    1.135771] acpiphp: Slot [13] registered
[    1.135914] acpiphp: Slot [14] registered
[    1.136039] acpiphp: Slot [15] registered
[    1.136161] acpiphp: Slot [16] registered
[    1.136283] acpiphp: Slot [17] registered
[    1.136403] acpiphp: Slot [18] registered
[    1.136524] acpiphp: Slot [19] registered
[    1.136650] acpiphp: Slot [20] registered
[    1.136789] acpiphp: Slot [21] registered
[    1.136945] acpiphp: Slot [22] registered
[    1.137072] acpiphp: Slot [23] registered
[    1.137195] acpiphp: Slot [24] registered
[    1.137315] acpiphp: Slot [25] registered
[    1.137436] acpiphp: Slot [26] registered
[    1.137579] acpiphp: Slot [27] registered
[    1.137710] acpiphp: Slot [28] registered
[    1.137851] acpiphp: Slot [29] registered
[    1.137974] acpiphp: Slot [30] registered
[    1.138096] acpiphp: Slot [31] registered
[    1.138408] PCI host bridge to bus 0000:00
[    1.138696] pci_bus 0000:00: root bus resource [io  0x0000-0x0cf7 window]
[    1.138954] pci_bus 0000:00: root bus resource [io  0x0d00-0xffff window]
[    1.139069] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bfff=
f window]
[    1.139239] pci_bus 0000:00: root bus resource [mem 0x10000000-0xfebffff=
f window]
[    1.139363] pci_bus 0000:00: root bus resource [mem 0x100000000-0x17ffff=
fff window]
[    1.139622] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.140822] pci 0000:00:00.0: [8086:1237] type 00 class 0x060000 convent=
ional PCI endpoint
[    1.144686] pci 0000:00:01.0: [8086:7000] type 00 class 0x060100 convent=
ional PCI endpoint
[    1.145456] pci 0000:00:01.1: [8086:7010] type 00 class 0x010180 convent=
ional PCI endpoint
[    1.147648] pci 0000:00:01.1: BAR 4 [io  0xc160-0xc16f]
[    1.148769] pci 0000:00:01.1: BAR 0 [io  0x01f0-0x01f7]: legacy IDE quirk
[    1.148957] pci 0000:00:01.1: BAR 1 [io  0x03f6]: legacy IDE quirk
[    1.149089] pci 0000:00:01.1: BAR 2 [io  0x0170-0x0177]: legacy IDE quirk
[    1.149218] pci 0000:00:01.1: BAR 3 [io  0x0376]: legacy IDE quirk
[    1.149887] pci 0000:00:01.3: [8086:7113] type 00 class 0x068000 convent=
ional PCI endpoint
[    1.150328] pci 0000:00:01.3: quirk: [io  0x0600-0x063f] claimed by PIIX=
4 ACPI
[    1.150484] pci 0000:00:01.3: quirk: [io  0x0700-0x070f] claimed by PIIX=
4 SMB
[    1.151068] pci 0000:00:02.0: [1234:1111] type 00 class 0x030000 convent=
ional PCI endpoint
[    1.152108] pci 0000:00:02.0: BAR 0 [mem 0xfd000000-0xfdffffff pref]
[    1.152932] pci 0000:00:02.0: BAR 2 [mem 0xfebf0000-0xfebf0fff]
[    1.157310] pci 0000:00:02.0: ROM [mem 0xfebe0000-0xfebeffff pref]
[    1.157650] pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x0=
00c0000-0x000dffff]
[    1.158382] pci 0000:00:03.0: [8086:100e] type 00 class 0x020000 convent=
ional PCI endpoint
[    1.158945] pci 0000:00:03.0: BAR 0 [mem 0xfebc0000-0xfebdffff]
[    1.159485] pci 0000:00:03.0: BAR 1 [io  0xc080-0xc0bf]
[    1.161998] pci 0000:00:03.0: ROM [mem 0xfeb80000-0xfebbffff pref]
[    1.166527] pci 0000:00:04.0: [1af4:1005] type 00 class 0x00ff00 convent=
ional PCI endpoint
[    1.167926] pci 0000:00:04.0: BAR 0 [io  0xc140-0xc15f]
[    1.168706] pci 0000:00:04.0: BAR 1 [mem 0xfebf1000-0xfebf1fff]
[    1.169231] pci 0000:00:04.0: BAR 4 [mem 0xfe000000-0xfe003fff 64bit pre=
f]
[    1.174368] pci 0000:00:05.0: [1af4:1009] type 00 class 0x000200 convent=
ional PCI endpoint
[    1.174988] pci 0000:00:05.0: BAR 0 [io  0xc0c0-0xc0ff]
[    1.176380] pci 0000:00:05.0: BAR 1 [mem 0xfebf2000-0xfebf2fff]
[    1.179168] pci 0000:00:05.0: BAR 4 [mem 0xfe004000-0xfe007fff 64bit pre=
f]
[    1.184179] pci 0000:00:06.0: [1af4:1003] type 00 class 0x078000 convent=
ional PCI endpoint
[    1.184950] pci 0000:00:06.0: BAR 0 [io  0xc100-0xc13f]
[    1.185579] pci 0000:00:06.0: BAR 1 [mem 0xfebf3000-0xfebf3fff]
[    1.187202] pci 0000:00:06.0: BAR 4 [mem 0xfe008000-0xfe00bfff 64bit pre=
f]
[    1.191172] pci 0000:00:07.0: [1af4:1001] type 00 class 0x010000 convent=
ional PCI endpoint
[    1.192522] pci 0000:00:07.0: BAR 0 [io  0xc000-0xc07f]
[    1.193403] pci 0000:00:07.0: BAR 1 [mem 0xfebf4000-0xfebf4fff]
[    1.194970] pci 0000:00:07.0: BAR 4 [mem 0xfe00c000-0xfe00ffff 64bit pre=
f]
[    1.202231] ACPI: PCI: Interrupt link LNKA configured for IRQ 10
[    1.202878] ACPI: PCI: Interrupt link LNKB configured for IRQ 10
[    1.203300] ACPI: PCI: Interrupt link LNKC configured for IRQ 11
[    1.203717] ACPI: PCI: Interrupt link LNKD configured for IRQ 11
[    1.203979] ACPI: PCI: Interrupt link LNKS configured for IRQ 9
[    1.207655] iommu: Default domain type: Translated
[    1.207781] iommu: DMA domain TLB invalidation policy: lazy mode
[    1.211666] SCSI subsystem initialized
[    1.213227] ACPI: bus type USB registered
[    1.213582] usbcore: registered new interface driver usbfs
[    1.213901] usbcore: registered new interface driver hub
[    1.214095] usbcore: registered new device driver usb
[    1.215278] EDAC MC: Ver: 3.0.0
[    1.226937] NetLabel: Initializing
[    1.227019] NetLabel:  domain hash size =3D 128
[    1.227100] NetLabel:  protocols =3D UNLABELED CIPSOv4 CALIPSO
[    1.228077] NetLabel:  unlabeled traffic allowed by default
[    1.231868] mctp: management component transport protocol core
[    1.231982] NET: Registered PF_MCTP protocol family
[    1.232515] PCI: Using ACPI for IRQ routing
[    1.235054] pci 0000:00:02.0: vgaarb: setting as boot VGA device
[    1.235201] pci 0000:00:02.0: vgaarb: bridge control possible
[    1.235340] pci 0000:00:02.0: vgaarb: VGA device added: decodes=3Dio+mem=
,owns=3Dio+mem,locks=3Dnone
[    1.235521] vgaarb: loaded
[    1.237185] hpet: 3 channels of 0 reserved for per-cpu timers
[    1.237537] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
[    1.237709] hpet0: 3 comparators, 64-bit 100.000000 MHz counter
[    1.241933] clocksource: Switched to clocksource tsc-early
[    1.253837] VFS: Disk quotas dquot_6.6.0
[    1.254163] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 byte=
s)
[    1.258755] AppArmor: AppArmor Filesystem Enabled
[    1.259221] pnp: PnP ACPI init
[    1.262967] pnp: PnP ACPI: found 6 devices
[    1.285826] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, m=
ax_idle_ns: 2085701024 ns
[    1.287302] NET: Registered PF_INET protocol family
[    1.288379] IP idents hash table entries: 4096 (order: 3, 32768 bytes, l=
inear)
[    1.348972] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, =
4096 bytes, linear)
[    1.349291] Table-perturb hash table entries: 65536 (order: 6, 262144 by=
tes, linear)
[    1.349486] TCP established hash table entries: 2048 (order: 2, 16384 by=
tes, linear)
[    1.349773] TCP bind hash table entries: 2048 (order: 4, 65536 bytes, li=
near)
[    1.350010] TCP: Hash tables configured (established 2048 bind 2048)
[    1.351489] MPTCP token hash table entries: 256 (order: 0, 6144 bytes, l=
inear)
[    1.351938] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    1.352552] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, line=
ar)
[    1.354147] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    1.354699] NET: Registered PF_XDP protocol family
[    1.355613] pci_bus 0000:00: resource 4 [io  0x0000-0x0cf7 window]
[    1.355734] pci_bus 0000:00: resource 5 [io  0x0d00-0xffff window]
[    1.355840] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff windo=
w]
[    1.355956] pci_bus 0000:00: resource 7 [mem 0x10000000-0xfebfffff windo=
w]
[    1.356181] pci_bus 0000:00: resource 8 [mem 0x100000000-0x17fffffff win=
dow]
[    1.356776] pci 0000:00:01.0: PIIX3: Enabling Passive Release
[    1.356969] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
[    1.357218] PCI: CLS 0 bytes, default 64
[    1.363146] Trying to unpack rootfs image as initramfs...
[    1.370792] Initialise system trusted keyrings
[    1.376543] workingset: timestamp_bits=3D40 max_order=3D16 bucket_order=
=3D0
[    1.376866] zbud: loaded
[    1.552642] Key type asymmetric registered
[    1.552852] Asymmetric key parser 'x509' registered
[    1.553498] Block layer SCSI generic (bsg) driver version 0.4 loaded (ma=
jor 247)
[    1.556672] io scheduler mq-deadline registered
[    1.560623] ledtrig-cpu: registered to indicate activity on CPUs
[    1.561465] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
[    1.563661] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/inpu=
t/input0
[    1.571723] ACPI: button: Power Button [PWRF]
[    1.579774] Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled
[    1.589041] 00:04: ttyS0 at I/O 0x3f8 (irq =3D 4, base_baud =3D 115200) =
is a 16550A
[    1.629915] Linux agpgart interface v0.103
[    1.681460] brd: module loaded
[    1.701423] loop: module loaded
[    1.701834] SPI driver tps6594 has no spi_device_id for ti,tps6594-q1
[    1.701951] SPI driver tps6594 has no spi_device_id for ti,tps6593-q1
[    1.702063] SPI driver tps6594 has no spi_device_id for ti,lp8764-q1
[    1.702167] SPI driver tps6594 has no spi_device_id for ti,tps65224-q1
[    1.703361] Key type psk registered
[    1.725387] scsi host0: ata_piix
[    1.727230] scsi host1: ata_piix
[    1.727638] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc160 irq 1=
4 lpm-pol 0
[    1.727799] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc168 irq 1=
5 lpm-pol 0
[    1.734330] tun: Universal TUN/TAP device driver, 1.6
[    1.740507] PPP generic driver version 2.4.2
[    1.743159] i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x6=
0,0x64 irq 1,12
[    1.750063] serio: i8042 KBD port at 0x60,0x64 irq 1
[    1.750349] serio: i8042 AUX port at 0x60,0x64 irq 12
[    1.752319] mousedev: PS/2 mouse device common for all mice
[    1.754679] input: AT Translated Set 2 keyboard as /devices/platform/i80=
42/serio0/input/input1
[    1.756526] rtc_cmos 00:05: RTC can wake from S4
[    1.761285] rtc_cmos 00:05: registered as rtc0
[    1.761877] rtc_cmos 00:05: setting system clock to 2025-01-31T10:26:41 =
UTC (1738319201)
[    1.763085] rtc_cmos 00:05: alarms up to one day, y3k, 242 bytes nvram, =
hpet irqs
[    1.763332] i2c_dev: i2c /dev entries driver
[    1.763907] device-mapper: uevent: version 1.0.3
[    1.769162] device-mapper: ioctl: 4.48.0-ioctl (2023-03-01) initialised:=
 dm-devel@HIDDEN
[    1.769666] amd_pstate: the _CPC object is not present in SBIOS or ACPI =
disabled
[    1.777113] NET: Registered PF_INET6 protocol family
[    1.790924] Segment Routing with IPv6
[    1.791239] In-situ OAM (IOAM) with IPv6
[    1.791839] NET: Registered PF_PACKET protocol family
[    1.796580] Key type dns_resolver registered
[    1.798692] IPI shorthand broadcast: enabled
[    1.831549] sched_clock: Marking stable (1796049004, 32028762)->(1829853=
714, -1775948)
[    1.841308] registered taskstats version 1
[    1.844598] Loading compiled-in X.509 certificates
[    1.880310] Demotion targets for Node 0: null
[    1.884557] ata2: found unknown device (class 0)
[    1.893622] ata2.00: ATAPI: QEMU DVD-ROM, 2.5+, max UDMA/100
[    1.903081] scsi 1:0:0:0: CD-ROM            QEMU     QEMU DVD-ROM     2.=
5+ PQ: 0 ANSI: 5
[    1.933880] sr 1:0:0:0: [sr0] scsi3-mmc drive: 4x/4x cd/rw xa/form2 tray
[    1.934160] cdrom: Uniform CD-ROM driver Revision: 3.20
[    1.957065] sr 1:0:0:0: Attached scsi generic sg0 type 5
[    2.319882] Freeing initrd memory: 14404K
[    2.329205] Key type encrypted registered
[    2.329361] AppArmor: AppArmor sha256 policy hashing enabled
[    2.329875] ima: No TPM chip found, activating TPM-bypass!
[    2.330158] ima: Allocated hash algorithm: sha1
[    2.332647] ima: No architecture policies found
[    2.333424] evm: Initialising EVM extended attributes:
[    2.333536] evm: security.selinux
[    2.333614] evm: security.SMACK64
[    2.333675] evm: security.SMACK64EXEC
[    2.333738] evm: security.SMACK64TRANSMUTE
[    2.333806] evm: security.SMACK64MMAP
[    2.333869] evm: security.apparmor
[    2.333927] evm: security.ima
[    2.333979] evm: security.capability
[    2.334050] evm: HMAC attrs: 0x1
[    2.337300] PM:   Magic number: 9:732:427
[    2.338388] powernow_k8: Power state transitions not supported
[    2.432512] tsc: Refined TSC clocksource calibration: 3094.187 MHz
[    2.432923] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x2c9=
9d3f920e, max_idle_ns: 440795207063 ns
[    2.433167] clocksource: Switched to clocksource tsc
[    2.434724] clk: Disabling unused clocks
[    2.435052] PM: genpd: Disabling unused power domains
[    2.524668] Freeing unused kernel image (initmem) memory: 4592K
[    2.525054] Write protecting the kernel read-only data: 34816k
[    2.527292] Freeing unused kernel image (rodata/data gap) memory: 1028K
[    2.527607] Run /init as init process
GC Warning: pthread_getattr_np or pthread_attr_getstack failed for main thr=
ead
GC Warning: Could not open /proc/stat
Welcome, this is GNU's early boot Guile.
Use 'gnu.repl' for an initrd REPL.

loading kernel modules...
[    3.458092] ACPI: bus type drm_connector registered
[    3.674625] usbcore: registered new interface driver usb-storage
[    3.685666] usbcore: registered new interface driver uas
[    3.696671] hid: raw HID events driver (C) Jiri Kosina
[    3.701918] usbcore: registered new interface driver usbhid
[    3.702042] usbhid: USB HID core driver
[    3.860826] isci: Intel(R) C600 SAS Controller Driver - version 1.2.0
[    4.042724] ACPI: \_SB_.LNKD: Enabled at IRQ 11
[    4.187830] ACPI: \_SB_.LNKA: Enabled at IRQ 10
[    4.330956] ACPI: \_SB_.LNKB: Enabled at IRQ 10
[    4.474033] ACPI: \_SB_.LNKC: Enabled at IRQ 11
[    4.492249] virtio_blk virtio3: 1/0/0 default/read/poll queues
[    4.500445] virtio_blk virtio3: [vda] 4096 512-byte logical blocks (2.10=
 MB/2.00 MiB)
[    4.506147]  vda: vda1
[    4.586475] random: crng init done
[    4.650199] netfs: FS-Cache loaded
[    4.714127] 9pnet: Installing 9P2000 support
[    4.719768] 9p: Installing v9fs 9p2000 file system support
[    4.803959] EXT4-fs (vda1): mounted filesystem 4efbd36d-72ff-63f9-8948-e=
9934efbd36d ro without journal. Quota mode: none.
[    4.827145] 9pnet: Limiting 'msize' to 512000 as this is the maximum sup=
ported by transport virtio
loading '/gnu/store/2qbnwnl4lifdq8f5wa8nlj79bhxfg0pi-system/boot'...
[    5.045983] evm: overlay not supported
making '/gnu/store/2qbnwnl4lifdq8f5wa8nlj79bhxfg0pi-system' the current sys=
tem...
populating /etc from /gnu/store/60h7d9v6biigvn0kglhf7xv6g128jzp9-etc...
setting up privileged programs in '/run/privileged/bin'...
Please wait while gathering entropy to generate the key pair;
this may take time...
ssh-keygen: generating new host keys: RSA ECDSA ED25519=20
[   30.455376] shepherd[1]: GNU Shepherd 1.0.1 (Guile 3.0.9, x86_64-unknown=
-linux-gnu)
[   30.456581] shepherd[1]: Starting service root...
[   30.459256] shepherd[1]: Service root started.
[   30.461618] shepherd[1]: Service root running with value #<<process> id:=
 1 command: #f>.
[   30.463821] shepherd[1]: Service root has been started.
[   30.497626] shepherd[1]: starting services...
[   30.498399] shepherd[1]: Configuration successfully loaded from '/gnu/st=
ore/d4xgx9k9i20p1hv51cxfgsq59ijkvk92-shepherd.conf'.
[   30.730913] shepherd[1]: Starting service user-file-systems...
[   30.731711] shepherd[1]: Starting service root-file-system...
[   30.759276] shepherd[1]: Starting service host-name...
[   30.772576] shepherd[1]: Starting service pam...
[   30.788808] shepherd[1]: Starting service sysctl...
[   30.789927] shepherd[1]: Starting service transient...
[   30.802309] shepherd[1]: Starting service timer...
[   30.803256] shepherd[1]: Starting service log-rotation...
[   30.811938] shepherd[1]: Starting service loopback...
[   30.821456] shepherd[1]: Starting service networking...
[   30.823805] shepherd[1]: Service user-file-systems started.
[   30.829457] shepherd[1]: Service root-file-system started.
[   30.831092] shepherd[1]: Service host-name started.
[   30.831777] shepherd[1]: Service pam started.
[   30.845976] shepherd[1]: Service transient started.
[   30.846704] shepherd[1]: Service timer started.
[   30.855042] shepherd[1]: Service log-rotation started.
[   30.855914] shepherd[1]: Service user-file-systems running with value #t.
[   30.864009] shepherd[1]: Service user-file-systems has been started.
[   30.877421] shepherd[1]: Service root-file-system running with value #t.
[   31.154425] udevd[94]: starting version 3.2.14
[   31.310363] udevd[94]: specified group 'sgx' unknown
[   31.536000] shepherd[1]: Service root-file-system has been started.
[   31.542496] udevd[94]: starting eudev-3.2.14
[   31.553729] shepherd[1]: Service host-name running with value "komputilo=
".
[   31.595559] udevd[94]: no sender credentials received, message ignored
[   31.601316] shepherd[1]: Service host-name has been started.
[   31.603169] shepherd[1]: Service pam running with value #t.
[   31.615234] shepherd[1]: Service pam has been started.
[   31.630416] shepherd[1]: Service transient running with value #t.
[   31.643245] shepherd[1]: Service transient has been started.
[   31.673823] shepherd[1]: Service timer running with value #t.
[   31.690685] shepherd[1]: Service timer has been started.
[   31.691966] shepherd[1]: Service log-rotation running with value #<timer=
 #<<calendar-event> seconds: (0) minutes: (0) hours: (22) days-of-month: (1=
 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2=
9 30 31) months: (1 2 3 4 5 6 7 8 9 10 11 12) days-of-week: (0)> #<procedur=
e rotation ()> 7fda4a5fdf20>.
[   31.706559] shepherd[1]: Service log-rotation has been started.
[   31.707531] shepherd[1]: [sysctl] fs.protected_hardlinks =3D 1
[   31.725902] shepherd[1]: Service sysctl has been started.
[   31.726694] shepherd[1]: Service sysctl started.
[   31.736905] shepherd[1]: [sysctl] fs.protected_symlinks =3D 1
[   31.737948] shepherd[1]: Service sysctl running with value #t.
[   31.739526] shepherd[1]: Starting service udev...
[   31.746249] shepherd[1]: waiting for udevd...
[   31.747963] shepherd[1]: Registering new logger for udev.
[   31.799565] shepherd[1]: Starting service virtual-terminal...
[   31.809478] shepherd[1]: Service virtual-terminal started.
[   31.811801] shepherd[1]: Service virtual-terminal running with value #t.
[   31.829259] shepherd[1]: Service virtual-terminal has been started.
[   32.151030] shepherd[1]: Registering new logger for udev.
[   33.004991] shepherd[1]: [90bpic7a0hd7lc9h1nfgv1kxcw31dbx2-set-up-networ=
k] Waiting for network device 'lo'...
[   33.042258] shepherd[1]: Service loopback has been started.
[   33.043274] shepherd[1]: Service loopback started.
[   33.055043] shepherd[1]: Service loopback running with value #t.
[   33.136415] Floppy drive(s): fd0 is 2.88M AMI BIOS
[   33.203202] FDC 0 is a S82078B
[   33.413999] parport_pc 00:03: reported by Plug and Play ACPI
[   33.414867] parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE]
[   33.680933] shepherd[1]: [90bpic7a0hd7lc9h1nfgv1kxcw31dbx2-set-up-networ=
k] Backtrace:
[   33.685030] piix4_smbus 0000:00:01.3: SMBus Host Controller at 0x700, re=
vision 0
[   33.692397] shepherd[1]: [90bpic7a0hd7lc9h1nfgv1kxcw31dbx2-set-up-networ=
k]            2 (primitive-load "/gnu/store/90bpic7a0hd7lc9h1nfgv1kxcw3?")
[   33.695789] shepherd[1]: [90bpic7a0hd7lc9h1nfgv1kxcw31dbx2-set-up-networ=
k] In ice-9/eval.scm:
[   33.702145] i2c i2c-0: Memory type 0x07 not supported yet, not instantia=
ting SPD
[   33.707919] shepherd[1]: [90bpic7a0hd7lc9h1nfgv1kxcw31dbx2-set-up-networ=
k]     619:8  1 (_ #f)
[   33.713945] shepherd[1]: Service networking could not be started.
[   33.722414] shepherd[1]: [90bpic7a0hd7lc9h1nfgv1kxcw31dbx2-set-up-networ=
k]     619:8  0 (_ #(#<directory (guile-user) 7f6224e0ec80> "lo"))
[   33.723369] shepherd[1]: Service networking failed to start.
[   33.727643] shepherd[1]: [90bpic7a0hd7lc9h1nfgv1kxcw31dbx2-set-up-networ=
k]=20
[   33.734309] shepherd[1]: [90bpic7a0hd7lc9h1nfgv1kxcw31dbx2-set-up-networ=
k] ice-9/eval.scm:619:8: ERROR:
[   33.741727] shepherd[1]: [90bpic7a0hd7lc9h1nfgv1kxcw31dbx2-set-up-networ=
k]   1. &netlink-response-error: 17
[   33.743773] shepherd[1]: [90bpic7a0hd7lc9h1nfgv1kxcw31dbx2-set-up-networ=
k] Waiting for network device 'lo'...
[   33.827819] e1000: Intel(R) PRO/1000 Network Driver
[   33.827956] e1000: Copyright (c) 1999-2006 Intel Corporation.
[   33.829181] input: PC Speaker as /devices/platform/pcspkr/input/input3
[   34.015905] bochs-drm 0000:00:02.0: vgaarb: deactivate vga console
[   34.037603] Console: switching to colour dummy device 80x25
[   34.338092] Error: Driver 'pcspkr' is already registered, aborting...
[   34.732630] [drm] Found bochs VGA, ID 0xb0c5.
[   34.732764] [drm] Framebuffer size 16384 kB @ 0xfd000000, mmio @ 0xfebf0=
000.
[   34.750684] [drm] Found EDID data blob.
[   34.780233] [drm] Initialized bochs-drm 1.0.0 for 0000:00:02.0 on minor 0
[   34.869326] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/=
i8042/serio1/input/input4
[   35.046110] fbcon: bochs-drmdrmfb (fb0) is primary device
[   35.072232] Console: switching to colour frame buffer device 160x50
[   35.097466] bochs-drm 0000:00:02.0: [drm] fb0: bochs-drmdrmfb frame buff=
er device
[   35.394468] ppdev: user-space parallel port driver
[   35.440756] e1000 0000:00:03.0 eth0: (PCI:33MHz:32-bit) 52:54:00:12:34:56
[   35.441246] e1000 0000:00:03.0 eth0: Intel(R) PRO/1000 Network Connection
[   35.488950] e1000 0000:00:03.0 ens3: renamed from eth0
[   35.553306] kvm_amd: Nested Virtualization enabled
[   35.553515] kvm_amd: Nested Paging disabled
[   35.554011] kvm_amd: PMU virtualization is disabled
[   35.886147] shepherd[1]: Service udev has been started.
[   35.888935] shepherd[1]: Service udev started.
[   35.912309] shepherd[1]: Service udev running with value #<<process> id:=
 94 command: #f>.
[   36.009428] shepherd[1]: Starting service marionette...
[   36.010168] shepherd[1]: Starting service file-system-/dev/pts...
[   36.042372] shepherd[1]: Service marionette started.
[   36.043762] shepherd[1]: Service file-system-/dev/pts started.
[   36.074994] shepherd[1]: Service marionette running with value #<<proces=
s> id: 115 command: ("/gnu/store/k3r056x67dbfibarvf8isflqvs37xq5d-marionett=
e-repl.scm")>.
[   36.075940] shepherd[1]: Service marionette has been started.
[   36.094306] shepherd[1]: Starting service file-system-/sys/kernel/debug.=
=2E.
[   36.095073] shepherd[1]: Service file-system-/dev/pts running with value=
 #t.
[   36.101476] shepherd[1]: Service file-system-/dev/pts has been started.
[   36.102212] shepherd[1]: Service file-system-/sys/kernel/debug started.
[   36.103893] shepherd[1]: Starting service file-system-/dev/shm...
[   36.109673] shepherd[1]: Service file-system-/sys/kernel/debug running w=
ith value #t.
[   36.111389] shepherd[1]: Service file-system-/sys/kernel/debug has been =
started.
[   36.116393] shepherd[1]: Service file-system-/dev/shm started.
[   36.118500] shepherd[1]: Starting service file-system-/sys/firmware/efi/=
efivars...
[   36.119200] shepherd[1]: Service file-system-/dev/shm running with value=
 #t.
[   36.127446] shepherd[1]: Service file-system-/dev/shm has been started.
[   36.132488] shepherd[1]: Service file-system-/sys/firmware/efi/efivars s=
tarted.
[   36.134591] shepherd[1]: Service file-system-/sys/firmware/efi/efivars r=
unning with value #t.
[   36.135317] shepherd[1]: Service file-system-/sys/firmware/efi/efivars h=
as been started.
[   36.157626] shepherd[1]: Starting service file-systems...
[   36.158346] shepherd[1]: Service file-systems started.
[   36.164229] shepherd[1]: Service file-systems running with value #t.
[   36.165097] shepherd[1]: Service file-systems has been started.
[   36.383402] shepherd[1]: Starting service user-homes...
[   36.385923] shepherd[1]: Service user-homes started.
[   36.394833] shepherd[1]: Service user-homes running with value #t.
[   36.395651] shepherd[1]: Service user-homes has been started.
[   36.429366] shepherd[1]: Starting service urandom-seed...
[   36.430112] shepherd[1]: Service urandom-seed started.
[   36.431681] shepherd[1]: Service urandom-seed running with value #t.
[   36.440554] shepherd[1]: Service urandom-seed has been started.
[   36.466489] shepherd[1]: Starting service user-processes...
[   36.467256] shepherd[1]: Service user-processes started.
[   36.473501] shepherd[1]: Service user-processes running with value #t.
[   36.474236] shepherd[1]: Service user-processes has been started.
[   36.525376] shepherd[1]: Starting service log-cleanup...
[   36.526245] shepherd[1]: Service log-cleanup started.
[   36.540243] shepherd[1]: Service log-cleanup running with value #<timer =
#<<calendar-event> seconds: (0) minutes: (30) hours: (12) days-of-month: (1=
 8 15 22) months: (1 2 3 4 5 6 7 8 9 10 11 12) days-of-week: (0 1 2 3 4 5 6=
)> #<<command> arguments: ("/gnu/store/009nnqwra22fj75pdlcqjq8idw62nr5f-del=
ete-old-logs") user: #f group: #f supplementary-groups: () environment-vari=
ables: ("PATH=3D/run/current-system/profile/bin") directory: "/" resource-l=
imits: ()> 7fda488a5320>.
[   36.541686] shepherd[1]: Service log-cleanup has been started.
[   36.611080] shepherd[1]: Starting service guix-daemon...
[   36.611886] shepherd[1]: Service guix-daemon started.
[   36.645680] shepherd[1]: Service guix-daemon running with value #<<proce=
ss> id: 116 command: #f>.
[   36.646505] shepherd[1]: Service guix-daemon has been started.
[   36.701544] shepherd[1]: Starting service syslogd...
[   36.903606] shepherd[1]: Starting service term-tty6...
[   36.909464] shepherd[1]: Service term-tty6 started.
[   36.949638] shepherd[1]: Service term-tty6 running with value #<<process=
> id: 118 command: ("/gnu/store/zpm9yhsadznxc50qdxzmy653d5fhwpxs-mingetty-1=
=2E08/sbin/mingetty" "--nohangup" "tty6")>.
[   36.950981] shepherd[1]: Service term-tty6 has been started.
[   37.061329] shepherd[1]: Starting service term-tty5...
[   37.062191] shepherd[1]: Service term-tty5 started.
=0D

This is the GNU system.  Welcome.
komputilo login: [   50.140368] guix: page allocation failure: order:7, mod=
e:0x40dc0(GFP_KERNEL|__GFP_COMP|__GFP_ZERO), nodemask=3D(null),cpuset=3D/,m=
ems_allowed=3D0
[   50.142093] CPU: 0 UID: 0 PID: 115 Comm: guix Not tainted 6.12.11-gnu #1=
 dd9436551024bc83fa81afd0342f0c0a62be23e7
[   50.142453] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS =
1.16.2/GNU Guix 04/01/2014
[   50.142697] Call Trace:
[   50.143124]  <TASK>
[   50.143489]  dump_stack_lvl+0x7a/0xa0
[   50.143954]  dump_stack+0x14/0x20
[   50.144016]  warn_alloc+0x14e/0x1d0
[   50.144105]  ? __alloc_pages_direct_compact+0x1f1/0x210
[   50.144198]  __alloc_pages_slowpath.constprop.0+0x9c4/0xea0
[   50.144319]  __alloc_pages_noprof+0x349/0x360
[   50.144419]  ? v9fs_alloc_rdir_buf.isra.0+0x56/0xa0 [9p 119d41d027c08fcf=
02ee70a711b6373108aa7632]
[   50.144614]  ___kmalloc_large_node+0x88/0x120
[   50.144692]  __kmalloc_large_node_noprof+0x21/0xc0
[   50.144773]  __kmalloc_noprof+0x30a/0x420
[   50.144848]  v9fs_alloc_rdir_buf.isra.0+0x56/0xa0 [9p 119d41d027c08fcf02=
ee70a711b6373108aa7632]
[   50.144986]  ? v9fs_alloc_rdir_buf.isra.0+0x56/0xa0 [9p 119d41d027c08fcf=
02ee70a711b6373108aa7632]
[   50.145127]  v9fs_dir_readdir_dotl+0x59/0x1c0 [9p 119d41d027c08fcf02ee70=
a711b6373108aa7632]
[   50.145268]  ? aa_file_perm+0x134/0x510
[   50.145350]  ? apparmor_file_permission+0x79/0x1b0
[   50.145434]  iterate_dir+0x135/0x220
[   50.145501]  __x64_sys_getdents64+0x84/0x130
[   50.145571]  ? __pfx_filldir64+0x10/0x10
[   50.145643]  x64_sys_call+0x1e1a/0x2680
[   50.145710]  do_syscall_64+0x74/0x160
[   50.145796]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
[   50.145952] RIP: 0033:0x7f3eaa161033
[   50.146272] Code: df 66 0f 1f 44 00 00 48 89 ef e8 78 77 fb ff 4c 89 e0 =
5b 5d 41 5c c3 b8 ff ff ff 7f 48 39 c2 48 0f 47 d0 b8 d9 00 00 00 0f 05 <48=
> 3d 00 f0 ff ff 77 05 c3 0f 1f 40 00 48 8b 15 91 1d 10 00 f7 d8
[   50.146569] RSP: 002b:00007fff6e819708 EFLAGS: 00000293 ORIG_RAX: 000000=
00000000d9
[   50.146719] RAX: ffffffffffffffda RBX: 0000000036d4b1c0 RCX: 00007f3eaa1=
61033
[   50.146831] RDX: 0000000000080000 RSI: 0000000036d4b1f0 RDI: 00000000000=
0000f
[   50.146941] RBP: 0000000036d4b1c4 R08: 0000000000000002 R09: 00000000000=
0416d
[   50.147065] R10: 0000000000000000 R11: 0000000000000293 R12: fffffffffff=
fff80
[   50.147176] R13: 0000000000000000 R14: 00007f3e94bd3760 R15: 00007f3eaa0=
22374
[   50.147338]  </TASK>
[   50.147631] Mem-Info:
[   50.147858] active_anon:55 inactive_anon:34507 isolated_anon:0
[   50.147858]  active_file:2464 inactive_file:2406 isolated_file:32
[   50.147858]  unevictable:0 dirty:0 writeback:0
[   50.147858]  slab_reclaimable:1330 slab_unreclaimable:4783
[   50.147858]  mapped:2813 shmem:653 pagetables:411
[   50.147858]  sec_pagetables:0 bounce:0
[   50.147858]  kernel_misc_reclaimable:0
[   50.147858]  free:1589 free_pcp:0 free_cma:0
[   50.148578] Node 0 active_anon:220kB inactive_anon:138028kB active_file:=
9856kB inactive_file:9624kB unevictable:0kB isolated(anon):0kB isolated(fil=
e):128kB mapped:11252kB dirty:0kB writeback:0kB shmem:2612kB shmem_thp:0kB =
shmem_pmdmapped:0kB anon_thp:0kB writeback_tmp:0kB kernel_stack:1488kB page=
tables:1644kB sec_pagetables:0kB all_unreclaimable? no
[   50.149061] Node 0 DMA free:492kB boost:0kB min:136kB low:168kB high:200=
kB reserved_highatomic:0KB active_anon:0kB inactive_anon:13044kB active_fil=
e:1124kB inactive_file:136kB unevictable:0kB writepending:0kB present:15992=
kB managed:15360kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_c=
ma:0kB
[   50.149507] lowmem_reserve[]: 0 176 0 0 0
[   50.149618] Node 0 DMA32 free:5864kB boost:0kB min:1632kB low:2040kB hig=
h:2448kB reserved_highatomic:0KB active_anon:220kB inactive_anon:124984kB a=
ctive_file:8732kB inactive_file:9492kB unevictable:0kB writepending:0kB pre=
sent:245620kB managed:201236kB mlocked:0kB bounce:0kB free_pcp:0kB local_pc=
p:0kB free_cma:0kB
[   50.149996] lowmem_reserve[]: 0 0 0 0 0
[   50.150137] Node 0 DMA: 2*4kB (U) 9*8kB (UM) 10*16kB (UM) 8*32kB (U) 0*6=
4kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB =3D 496kB
[   50.150546] Node 0 DMA32: 36*4kB (UME) 261*8kB (UME) 87*16kB (UME) 70*32=
kB (UME) 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB =3D 5864=
kB
[   50.150881] Node 0 hugepages_total=3D0 hugepages_free=3D0 hugepages_surp=
=3D0 hugepages_size=3D2048kB
[   50.151055] 5540 total pagecache pages
[   50.151156] 0 pages in swap cache
[   50.151219] Free swap  =3D 0kB
[   50.151273] Total swap =3D 0kB
[   50.151378] 65403 pages RAM
[   50.151431] 0 pages HighMem/MovableOnly
[   50.151495] 11254 pages reserved
[   50.151551] 0 pages cma reserved
[   50.151607] 0 pages hwpoisoned
[   50.153035] Memory allocations:
[   50.153264]     80.4 MiB    20585 mm/memory.c:1062 func:folio_prealloc
[   50.153423]     52.1 MiB    13326 mm/memory.c:1064 func:folio_prealloc
[   50.153521]     19.1 MiB     4889 mm/readahead.c:263 func:page_cache_ra_=
unbounded
[   50.153631]     18.3 MiB     2917 mm/slub.c:2433 func:alloc_slab_page
[   50.153736]     8.16 MiB     2093 mm/percpu.c:512 func:pcpu_mem_zalloc
[   50.153835]     8.11 MiB     2292 mm/execmem.c:31 func:__execmem_alloc
[   50.153933]     7.54 MiB        0 mm/compaction.c:1880 func:compaction_a=
lloc
[   50.154047]     3.91 MiB     1003 drivers/gpu/drm/drm_fbdev_ttm.c:98 [dr=
m_ttm_helper] func:drm_fbdev_ttm_helper_fb_probe
[   50.154208]     3.05 MiB    23515 fs/kernfs/dir.c:624 func:__kernfs_new_=
node
[   50.154312]     2.55 MiB      653 mm/shmem.c:1774 func:shmem_alloc_folio
guix deploy: =1B[1;31merror: =1B[0mcreating directory `/gnu/store/.links': =
Read-only file system
QEMU runs as PID 18
connected to QEMU's monitor
read QEMU monitor prompt
connected to guest REPL
%%%% Starting test deploy  (Writing full log to "/gnu/store/kh05hj3aljrvj48=
71j3m8h35zixix5ag-deploy/deploy.log")
marionette is ready
PASS: script successfully evaluated
/gnu/store/xgi6gds4lg8ysal8gd2wa5fraq12iava-deploy-builder:1: FAIL script c=
reated new generation
/gnu/store/xgi6gds4lg8ysal8gd2wa5fraq12iava-deploy-builder:1: FAIL script a=
ctivated the new generation
PASS: uname
# of expected passes      2
# of unexpected failures  2

Tests failed, dumping log file '/gnu/store/kh05hj3aljrvj4871j3m8h35zixix5ag=
-deploy/deploy.log'.

%%%% Starting test deploy
Group begin: deploy
Test begin:
  test-name: "script successfully evaluated"
  source-file: "/gnu/store/xgi6gds4lg8ysal8gd2wa5fraq12iava-deploy-builder"
  source-line: 1
  source-form: (test-assert "script successfully evaluated" (marionette-eva=
l (quote (primitive-load "/gnu/store/msrjgz3n5np9wmmnksh78jxhasmbb9pn-deplo=
y.scm")) marionette))
Test end:
  result-kind: pass
  actual-value: ready
Test begin:
  test-name: "script created new generation"
  source-file: "/gnu/store/xgi6gds4lg8ysal8gd2wa5fraq12iava-deploy-builder"
  source-line: 1
  source-form: (test-equal "script created new generation" (length (system-=
generations marionette)) (#{1+}# (length generations-prior)))
Test end:
  result-kind: fail
  actual-value: 2
  expected-value: 1
Test begin:
  test-name: "script activated the new generation"
  source-file: "/gnu/store/xgi6gds4lg8ysal8gd2wa5fraq12iava-deploy-builder"
  source-line: 1
  source-form: (test-equal "script activated the new generation" (string-ap=
pend "/var/guix/profiles/system-" (number->string (+ 1 (length generations-=
prior))) "-link") (marionette-eval (quote (readlink "/run/current-system"))=
 marionette))
Test end:
  result-kind: fail
  actual-value: "/gnu/store/2qbnwnl4lifdq8f5wa8nlj79bhxfg0pi-system"
  expected-value: "/var/guix/profiles/system-2-link"
Test begin:
  test-name: "uname"
  source-file: "/gnu/store/xgi6gds4lg8ysal8gd2wa5fraq12iava-deploy-builder"
  source-line: 1
  source-form: (test-assert "uname" (match (marionette-eval (quote (uname))=
 marionette) (#("Linux" host-name _ ...) (string=3D? host-name "komputilo")=
)))
Test end:
  result-kind: pass
  actual-value: #t
Group end: deploy
# of expected passes      2
# of unexpected failures  2
builder for `/gnu/store/vw9857dzp7lvplkm9szyivg32f9yvdgm-deploy.drv' failed=
 with exit code 1
build of /gnu/store/vw9857dzp7lvplkm9szyivg32f9yvdgm-deploy.drv failed
Could not find build log for '/gnu/store/vw9857dzp7lvplkm9szyivg32f9yvdgm-d=
eploy.drv'.
guix build: error: build of `/gnu/store/vw9857dzp7lvplkm9szyivg32f9yvdgm-de=
ploy.drv' failed

--3nf2grkfdqkcowr4--




Information forwarded to guix-patches@HIDDEN:
bug#75010; Package guix-patches. Full text available.

Message received at 75010 <at> debbugs.gnu.org:


Received: (at 75010) by debbugs.gnu.org; 30 Dec 2024 12:37:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 30 07:37:16 2024
Received: from localhost ([127.0.0.1]:57688 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tSF1I-0007Jf-Lh
	for submit <at> debbugs.gnu.org; Mon, 30 Dec 2024 07:37:16 -0500
Received: from eggs.gnu.org ([209.51.188.92]:49874)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1tSF1G-0007JL-Vb
 for 75010 <at> debbugs.gnu.org; Mon, 30 Dec 2024 07:37:15 -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 <ludo@HIDDEN>)
 id 1tSF19-0006db-TJ; Mon, 30 Dec 2024 07:37: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:Date:References:In-Reply-To:Subject:To:
 From; bh=GCrryRaG+bnl7vUwoo6Jjm9BWABvWhJ/UdbtCgsjngM=; b=l6MKqXIBvT0CYXVPs4TW
 5RLmRGqwApUoa8oy1HnbwqJtA4t7AJu75smoqkqsXZ08/fpday7UFz6v9uPKS/wR5fMz59XCDlxJr
 zSbnO3TfPsNIuHWqnkl5Dnln2pcjKh3kOcT0hHVtEAM7ie5seM3I3Rsldg1v404L6pF3+OYVltJJd
 g0GDT7x3dKn5nO4nzx+T1Eobvh9miRFhecDDY0vYtRtrjTuKKpxOv8pWDHEn5G6uK2S19VWN0SnIV
 OFXHAkjCxUJBv9uyJLc2ShnefnVriop9GpnOkBBOwDL43iuAet7PaRLT1SksqgB8rS/0DFPSDkPqp
 lQECoAGKNumMzQ==;
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Herman Rimm <herman@HIDDEN>
Subject: Re: [bug#75010] [PATCH 3/7] gnu: machine: ssh: Return monadic value
 from roll-back-managed-host.
In-Reply-To: <9d7e69af958b651dd463d93822c0b493e201387a.1734798943.git.herman@HIDDEN>
 (Herman Rimm's message of "Sat, 21 Dec 2024 18:04:07 +0100")
References: <cover.1734798943.git.herman@HIDDEN>
 <9d7e69af958b651dd463d93822c0b493e201387a.1734798943.git.herman@HIDDEN>
Date: Mon, 30 Dec 2024 13:36:40 +0100
Message-ID: <87ttals5yf.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75010
Cc: 75010 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Herman Rimm <herman@HIDDEN> skribis:

> * gnu/machine/ssh.scm (roll-back-managed-host): Use return.
>
> Change-Id: Ibe7ddd5758173a6835d8796c9c5ae5ba306b3334

[...]

> -    (_ (raise roll-back-failure))))
> +         (mwhen (eqv? 'error remote-result)
> +           (return (raise roll-back-failure))))))
> +    (_ (return (raise roll-back-failure)))))

Definitely.  :-)

(=E2=80=98return=E2=80=99 could be omitted since it won=E2=80=99t return.)

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#75010; Package guix-patches. Full text available.

Message received at 75010 <at> debbugs.gnu.org:


Received: (at 75010) by debbugs.gnu.org; 30 Dec 2024 12:34:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 30 07:34:38 2024
Received: from localhost ([127.0.0.1]:57680 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tSEyk-000786-2U
	for submit <at> debbugs.gnu.org; Mon, 30 Dec 2024 07:34:38 -0500
Received: from eggs.gnu.org ([209.51.188.92]:56272)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1tSEyh-00077r-Ok
 for 75010 <at> debbugs.gnu.org; Mon, 30 Dec 2024 07:34:36 -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 <ludo@HIDDEN>)
 id 1tSEyW-0006Jv-7k; Mon, 30 Dec 2024 07:34:24 -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:References:In-Reply-To:Subject:To:
 From; bh=NflHsyouIEs8G0ZrPoZsDxb9TmrVvPT/9EYxUxcEjrE=; b=lag8PAaYhhBvZsz5qvn2
 SPEx1WNa8CvA1oRnvGi/iCN3G8yDPnLJ3JgvQpioSchjV9126R4IAanGdjl3Iqnxty2RiZbbdQJXt
 2sn6o9nAROyvHIiDWMhXuPjlRDhMDBi/QP4rT+1Pq+1ffWwhoPI8qyKtGcwn8g2jduleelVQ2cxep
 FGN6HkQWBFOs8xxUqj8keB2PWnhwM6KtyP3rTe8ak2/nx8bYH1pK2ajovI6KkbsaZVgDhYOSNY14D
 J3uVaooh/qSxTnaHe7BZvTv2mQ0W8Q0ZW2bjBeXmGbd2L6OQkEXG4uBZPYXcjwHF8V00oTJ9sGNy6
 C4EaJh8cPo2TDw==;
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Herman Rimm <herman@HIDDEN>
Subject: Re: [bug#75010] [PATCH 1/7] monads: Add 'mmatch'.
In-Reply-To: <4bfa279cae2316d7a7a4e0640d13a0763ad86f92.1734798943.git.herman@HIDDEN>
 (Herman Rimm's message of "Sat, 21 Dec 2024 18:04:05 +0100")
References: <cover.1734798943.git.herman@HIDDEN>
 <4bfa279cae2316d7a7a4e0640d13a0763ad86f92.1734798943.git.herman@HIDDEN>
Date: Mon, 30 Dec 2024 13:34:19 +0100
Message-ID: <87y0zxs62c.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75010
Cc: Josselin Poiret <dev@HIDDEN>,
 Maxim Cournoyer <maxim.cournoyer@HIDDEN>,
 Simon Tournier <zimon.toutoune@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>,
 Tobias Geerinckx-Rice <me@HIDDEN>, 75010 <at> debbugs.gnu.org,
 Christopher Baines <guix@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Herman Rimm <herman@HIDDEN> skribis:

> * doc/guix.texi (The Store Monad): Document mmatch.
> * guix/monads.scm (mmatch): Add macro.
>
> Change-Id: I558f8e025f6cf788c9fc475e99d49690d7a98f41

[...]

> +@defmac mmatch monad mexp (pattern body) @dots{}
> +Match monadic object @var{mexp} against clause @var{pattern}s, in the

I=E2=80=99m not convinced by this one: usually, monadic procedures take a
=E2=80=9Cnormal=E2=80=9D value and return a monadic value.  So the style of=
 this macro
is quite unusual.  Also it doesn=E2=80=99t save much typing compared to an
=E2=80=98mlet=E2=80=99 followed by =E2=80=98match=E2=80=99.

WDYT?

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#75010; Package guix-patches. Full text available.

Message received at 75010 <at> debbugs.gnu.org:


Received: (at 75010) by debbugs.gnu.org; 30 Dec 2024 12:21:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 30 07:21:36 2024
Received: from localhost ([127.0.0.1]:57657 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tSEm8-0006YG-1V
	for submit <at> debbugs.gnu.org; Mon, 30 Dec 2024 07:21:36 -0500
Received: from eggs.gnu.org ([209.51.188.92]:55732)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1tSEm5-0006Y1-GG
 for 75010 <at> debbugs.gnu.org; Mon, 30 Dec 2024 07:21:34 -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 <ludo@HIDDEN>)
 id 1tSElx-0004uG-UA; Mon, 30 Dec 2024 07:21:25 -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:References:In-Reply-To:Subject:To:
 From; bh=Agq7yUEZUIiwP0WeZZe0g5dw5Jo9UU+1Oxz4pUenljE=; b=GCsiHiCebkWq9Ycx4DK9
 JWtK1h1QzKhVOPbBMb7FMVQkWnf0guK3SILHUdpF+UdltMUfOqWPCBius4Jp8v/R7ztsK0v2Q7yiP
 8x4i+BTda5MX2bCfCJnW6LhgfOfeAr+QoDqJU/AoqmWnyxaL3X1wiFQwlBBbKGs5dQdo/DJOXul6j
 HsgtuC/QKlhODzg5lHvrFAkxOhYE4SVCi5SKl2SnbEPttNGnpEmWY0Doh+FdMA2pQXtk2A/iA0ldi
 6H7Ci2uYAEyJFBVTBRy65ITWx+o3+NqK63kq0pTgdyAuKm34IxeE5jdGqPzNpP8np3H4DPVtmGIHn
 gB3ZwGeye+GA0A==;
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Herman Rimm <herman@HIDDEN>
Subject: Re: [bug#75010] [PATCH 7/7] WIP: gnu: tests: Add module for guix
 deploy tests.
In-Reply-To: <6438a457713360741155104b3b2c8af6fda50ee4.1734798943.git.herman@HIDDEN>
 (Herman Rimm's message of "Sat, 21 Dec 2024 18:04:11 +0100")
References: <cover.1734798943.git.herman@HIDDEN>
 <6438a457713360741155104b3b2c8af6fda50ee4.1734798943.git.herman@HIDDEN>
Date: Mon, 30 Dec 2024 13:21:12 +0100
Message-ID: <8734i5tl8n.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75010
Cc: 75010 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Herman Rimm <herman@HIDDEN> skribis:

> * gnu/tests/deploy.scm: Add file.
>
> Change-Id: I348c8bf2e518ec6c00af126993eaca3fcd453901

Yay, nice!

Could you add it to =E2=80=98gnu/local.mk=E2=80=99?

> +(define (machines os)
> +  (program-file "machines.scm"
> +    #~(list (machine (configuration

This should be =E2=80=98scheme-file=E2=80=99 (with normal indentation).

> +(define* (deploy-program #:optional (os #~%simple-os))
> +  (program-file "deploy.scm"
> +    (with-extensions (list guile-gcrypt)
> +      (with-imported-modules `(,@(source-module-closure
> +                                  '((guix scripts deploy))
> +                                  #:select? not-config?)
> +                               ((guix config) =3D> ,(make-config.scm)))
> +        #~(begin
> +            (use-modules (guix scripts deploy))
> +            (guix-deploy #$(machines os)))))))

We could use the =E2=80=98guix=E2=80=99 package here: it would be faster, b=
ut then we
would be testing an older snapshot and not the code at hand.  Not great.

Still, maybe using =E2=80=98current-guix=E2=80=99 would be faster (fewer th=
ings to
build), as in:

  #~(execl #$(file-append (current-guix) "/bin/guix")
           "guix" "deploy=E2=80=9C #$(machines os))

> +          (define (system-generations marionette)
> +            (marionette-eval
> +             '(begin
> +                (use-modules (ice-9 ftw)
> +                             (srfi srfi-1))
> +                (let* ((profile-dir "/var/guix/profiles/")
> +                       (entries (map first (cddr (file-system-tree profi=
le-dir)))))

Please use =E2=80=98match=E2=80=99 rather than =E2=80=98first=E2=80=99 and =
=E2=80=98cddr=E2=80=99 (info "(guix) Data
Types and Pattern Matching").

Or maybe you could just as well use =E2=80=98scandir=E2=80=99?

> +            (test-equal "script created new generation"
> +              (length (system-generations marionette))
> +              (1+ (length generations-prior)))
> +
> +            (test-equal "script activated the new generation"
> +              (string-append "/var/guix/profiles/system-"
> +                             (number->string (+ 1 (length generations-pr=
ior)))
> +                             "-link")
> +              (marionette-eval '(readlink "/run/current-system")
> +                               marionette)))

We could also check other things, like the host name.

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#75010; Package guix-patches. Full text available.

Message received at 75010 <at> debbugs.gnu.org:


Received: (at 75010) by debbugs.gnu.org; 30 Dec 2024 12:09:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Dec 30 07:09:30 2024
Received: from localhost ([127.0.0.1]:57602 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tSEaQ-0005oa-6s
	for submit <at> debbugs.gnu.org; Mon, 30 Dec 2024 07:09:30 -0500
Received: from eggs.gnu.org ([209.51.188.92]:33872)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1tSEaO-0005oK-4f
 for 75010 <at> debbugs.gnu.org; Mon, 30 Dec 2024 07:09:28 -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 <ludo@HIDDEN>)
 id 1tSEaG-0003PP-7V; Mon, 30 Dec 2024 07:09:20 -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:References:In-Reply-To:Subject:To:
 From; bh=MSUI0vjXgVIzIcWY1kWgPXFJmSNrp3BBARSP8AeMU7E=; b=Ajoi5NcfjvhuMuPRuVLq
 lZf2Wes8JDMtoluuCWcbQWNe0Q0LZhy5jMUAdeDuxiKP/CHK6Atm6HNtdaVM0BkhpVdf6P37hDjNe
 xm9Z9QjefSOqXhp13GolE2BjfXtfXIaowCjEmRuNo106HMJv2LrLpZg80p+OchN8UnQVri7w/p6h6
 91aWGy3w6yJI37EwI/1wh/gu8YWug0oy3kLGT6NUQvRkgNcvXH7ZhViJKKHzkGn7Ee2fO2FoiqaAX
 8YSqOuZbV2fP3531Su9yEcmrAqGdPvb9NQHkvR7gtnH8Yc40ZQ9IQUKNkq445xMOV/bJ8zo60D7bK
 yaOhh3HioKpkDA==;
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Herman Rimm <herman@HIDDEN>
Subject: Re: [bug#75010] [PATCH 2/7] gnu: machine: ssh: Refactor
 roll-back-managed-host.
In-Reply-To: <cbe72256fc842a207540d3a0d3ca28ef549ed885.1734798943.git.herman@HIDDEN>
 (Herman Rimm's message of "Sat, 21 Dec 2024 18:04:06 +0100")
References: <cover.1734798943.git.herman@HIDDEN>
 <cbe72256fc842a207540d3a0d3ca28ef549ed885.1734798943.git.herman@HIDDEN>
Date: Mon, 30 Dec 2024 13:09:04 +0100
Message-ID: <87ed1ptlsv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75010
Cc: 75010 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi,

Herman Rimm <herman@HIDDEN> skribis:

> * gnu/machine/ssh.scm (roll-back-managed-host): Use let* and mbegin.
>
> Change-Id: Ic3d5039ecf01e1e965dce8a696e7dbd625d2b3c5

[...]

> +  (mmatch %store-monad (machine-boot-parameters machine)
> +    ((_ params rest ...)
> +     (let* ((entries (list (boot-parameters->menu-entry params)))
> +            (locale (boot-parameters-locale params))
> +            (crypto-dev (boot-parameters-store-crypto-devices params))
> +            (store-dir (boot-parameters-store-directory-prefix params))
> +            (old-entries (map boot-parameters->menu-entry rest))
> +            (bootloader (operating-system-bootloader
> +                          (machine-operating-system machine)))
> +            (generate-bootloader-configuration-file
> +             (bootloader-configuration-file-generator
> +               (bootloader-configuration-bootloader bootloader))))
> +       (mbegin %store-monad
> +         (lower-object (generate-bootloader-configuration-file
> +                         bootloader entries
> +                         #:locale locale
> +                         #:store-crypto-devices crypto-dev
> +                         #:store-directory-prefix store-dir
> +                         #:old-entries old-entries)))
> +       (mlet %store-monad
> +           ((remote-result (machine-remote-eval machine remote-exp)))
> +         (when (eqv? 'error remote-result)
> +           (raise roll-back-failure)))))

The (mbegin =E2=80=A6) expression has no effect because it=E2=80=99s not in=
 tail
position (it expands to (lambda (=E2=80=A6) =E2=80=A6)).

Even if it had an effect, generating the bootloader config file in
itself does nothing: it has to at least be copied to the right place or
passed as an argument to =E2=80=98grub-install=E2=80=99 or similar.

The following =E2=80=98mlet=E2=80=99 should use =E2=80=98mwhen=E2=80=99 rat=
her than =E2=80=98when=E2=80=99 to return a
monadic value when the condition is false.

These two bugs are actually already present in =E2=80=98master=E2=80=99, so=
 I guess
we=E2=80=99re dealing with untested code. =F0=9F=98=B1

(We should come up with a strategy to test those things.)

Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#75010; Package guix-patches. Full text available.

Message received at 75010 <at> debbugs.gnu.org:


Received: (at 75010) by debbugs.gnu.org; 21 Dec 2024 17:05:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 21 12:05:17 2024
Received: from localhost ([127.0.0.1]:47527 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tP2ui-0005Pg-Qs
	for submit <at> debbugs.gnu.org; Sat, 21 Dec 2024 12:05:17 -0500
Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:43315
 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <herman@HIDDEN>) id 1tP2ud-0005Kx-Jc
 for 75010 <at> debbugs.gnu.org; Sat, 21 Dec 2024 12:05:12 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman;
 t=1734800700;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=q8l2CGW8ua0o6eD68houCMsDsSN0DbJ0eXCyDxg2/X8=;
 b=eTWF4QOMTkmXKcYONocuNLyjGHAloL4444ByhYZJJuxovnRsVPjTrXnr5KR+J2oIR34U1i
 c1OBtNZHMJzs6XwLH/dK21+BDN+gOy+aWiI7DuES4WHhWJqWgxLouYjtYR3xnYcFlDigBx
 0gNHu8rjCOYmHr4oyF0mlr734I/iETrkdafoe8j5qyZLxDf1PGjfI2kvuT1/CPr7Aks1bS
 MTzsJFT7/bzIuei7n3GRFkBWKVxDV582zulKwHXpg0c5u+FBAwN7lmwKHvZG5ufi/E0orY
 062JhGuAFdVB69/vVU4gT8CNNls2StC2ruDlbdVgndUakkvn80QINv5DMAUm9A==
Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id bdd870d6
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO)
 for <75010 <at> debbugs.gnu.org>; Sat, 21 Dec 2024 17:05:00 +0000 (UTC)
From: Herman Rimm <herman@HIDDEN>
To: 75010 <at> debbugs.gnu.org
Subject: [PATCH 7/7] WIP: gnu: tests: Add module for guix deploy tests.
Date: Sat, 21 Dec 2024 18:04:11 +0100
Message-ID: <6438a457713360741155104b3b2c8af6fda50ee4.1734798943.git.herman@HIDDEN>
X-Mailer: git-send-email 2.45.2
In-Reply-To: <cover.1734798943.git.herman@HIDDEN>
References: <cover.1734798943.git.herman@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75010
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/tests/deploy.scm: Add file.

Change-Id: I348c8bf2e518ec6c00af126993eaca3fcd453901
---
 gnu/tests/deploy.scm | 203 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 203 insertions(+)
 create mode 100644 gnu/tests/deploy.scm

diff --git a/gnu/tests/deploy.scm b/gnu/tests/deploy.scm
new file mode 100644
index 0000000000..24671cddec
--- /dev/null
+++ b/gnu/tests/deploy.scm
@@ -0,0 +1,203 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@HIDDEN>
+;;; Copyright © 2024 Herman Rimm <herman@HIDDEN>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu tests deploy)
+  #:use-module (gnu packages gnupg)
+  #:use-module ((guix self) #:select (make-config.scm))
+  #:use-module (gnu services)
+  #:use-module (gnu services base)
+  #:use-module (gnu services ssh)
+  #:use-module (gnu system)
+  #:use-module (gnu system vm)
+  #:use-module (gnu tests)
+  #:use-module (guix gexp)
+  #:use-module (guix modules)
+  #:use-module (ice-9 match)
+  #:export (%test-deploy
+            %test-rollback))
+
+;;; Commentary:
+;;;
+;;; Test in-place system deployment: advancing the system generation on
+;;; a running instance of the Guix System.
+;;;
+;;; Code:
+
+(define (machines os)
+  (program-file "machines.scm"
+    #~(list (machine (configuration
+                      (machine-ssh-configuration
+                        (host-name "localhost")
+                        (system (%current-system))))
+                     (environment managed-host-environment-type)
+                     (operating-system #$os)))))
+
+(define not-config?
+  ;; Select (guix …) and (gnu …) modules, except (guix config).
+  (match-lambda
+    (('guix 'config) #f)
+    (('guix rest ...) #t)
+    (('gnu rest ...) #t)
+    (_ #f)))
+
+(define* (deploy-program #:optional (os #~%simple-os))
+  (program-file "deploy.scm"
+    (with-extensions (list guile-gcrypt)
+      (with-imported-modules `(,@(source-module-closure
+                                  '((guix scripts deploy))
+                                  #:select? not-config?)
+                               ((guix config) => ,(make-config.scm)))
+        #~(begin
+            (use-modules (guix scripts deploy))
+            (guix-deploy #$(machines os)))))))
+
+(define os
+  (marionette-operating-system
+    (simple-operating-system
+      (service openssh-service-type
+        (openssh-configuration
+          (permit-root-login #t)
+          (allow-empty-passwords? #t)))
+      (service static-networking-service-type
+        (list (static-networking
+                (inherit %loopback-static-networking)
+                (provision '(networking))))))
+    #:imported-modules '((gnu services herd)
+                         (guix combinators))))
+
+(define vm (virtual-machine os))
+
+(define* (run-deploy-test)
+  "Run a test of an OS running DEPLOY-PROGRAM, which creates a new
+generation of the system profile."
+  (define (test script)
+    (with-imported-modules '((gnu build marionette))
+      #~(begin
+          (use-modules (gnu build marionette)
+                       (srfi srfi-64))
+
+          (define marionette
+            (make-marionette (list #$vm)))
+
+          ;; Return the names of the generation symlinks on MARIONETTE.
+          (define (system-generations marionette)
+            (marionette-eval
+             '(begin
+                (use-modules (ice-9 ftw)
+                             (srfi srfi-1))
+                (let* ((profile-dir "/var/guix/profiles/")
+                       (entries (map first (cddr (file-system-tree profile-dir)))))
+                  (remove (lambda (entry)
+                            (member entry '("per-user" "system")))
+                          entries)))
+             marionette))
+
+          (test-runner-current (system-test-runner #$output))
+          (test-begin "deploy")
+
+          (let ((generations-prior (system-generations marionette)))
+            (test-assert "script successfully evaluated"
+              (marionette-eval
+               '(primitive-load #$script)
+               marionette))
+
+            (test-equal "script created new generation"
+              (length (system-generations marionette))
+              (1+ (length generations-prior)))
+
+            (test-equal "script activated the new generation"
+              (string-append "/var/guix/profiles/system-"
+                             (number->string (+ 1 (length generations-prior)))
+                             "-link")
+              (marionette-eval '(readlink "/run/current-system")
+                               marionette)))
+
+          (test-end))))
+
+  (gexp->derivation "deploy" (test (deploy-program))))
+
+(define* (run-rollback-test)
+  "Run a test of an OS with a faulty bootloader running DEPLOY-PROGRAM,
+which causes a rollback."
+  (define os
+    #~(operating-system
+        (inherit %simple-os)
+        (bootloader
+         (bootloader-configuration
+           (inherit (operating-system-bootloader
+                      %simple-os))
+           (targets '("/dev/null"))))))
+
+  (define (test script)
+    (with-imported-modules '((gnu build marionette))
+      #~(begin
+          (use-modules (gnu build marionette)
+                       (srfi srfi-64))
+
+          (define marionette
+            (make-marionette (list #$vm)))
+
+          ;; Return the names of the generation symlinks on MARIONETTE.
+          (define (system-generations marionette)
+            (marionette-eval
+             '(begin
+                (use-modules (ice-9 ftw)
+                             (srfi srfi-1))
+                (let* ((profile-dir "/var/guix/profiles/")
+                       (entries (map first (cddr (file-system-tree profile-dir)))))
+                  (remove (lambda (entry)
+                            (member entry '("per-user" "system")))
+                          entries)))
+             marionette))
+
+          (test-runner-current (system-test-runner #$output))
+          (test-begin "rollback")
+
+          (let ((generations-prior (system-generations marionette)))
+            (test-assert "script successfully evaluated"
+              (marionette-eval
+               '(primitive-load #$script)
+               marionette))
+
+            (test-equal "script created new generation"
+              (length (system-generations marionette))
+              (1+ (length generations-prior)))
+
+            (test-equal "script rolled back the new generation"
+              (string-append "/var/guix/profiles/system-"
+                             (number->string (length generations-prior))
+                             "-link")
+              (marionette-eval '(readlink "/run/current-system")
+                               marionette)))
+
+          (test-end))))
+
+  (gexp->derivation "rollback" (test (deploy-program os))))
+
+(define %test-deploy
+  (system-test
+   (name "deploy")
+   (description "Deploy to the local machine.")
+   (value (run-deploy-test))))
+
+(define %test-rollback
+  (system-test
+   (name "rollback")
+   (description "Rollback the deployment of a faulty bootloader.")
+   (value (run-rollback-test))))
-- 
2.45.2





Information forwarded to guix-patches@HIDDEN:
bug#75010; Package guix-patches. Full text available.

Message received at 75010 <at> debbugs.gnu.org:


Received: (at 75010) by debbugs.gnu.org; 21 Dec 2024 17:05:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 21 12:05:16 2024
Received: from localhost ([127.0.0.1]:47525 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tP2ui-0005PZ-Bh
	for submit <at> debbugs.gnu.org; Sat, 21 Dec 2024 12:05:16 -0500
Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:38121
 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <herman@HIDDEN>) id 1tP2ud-0005I2-10
 for 75010 <at> debbugs.gnu.org; Sat, 21 Dec 2024 12:05:11 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman;
 t=1734800700;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=sg+tzSoNpo4NreLrmz4j1tsSAkk4dcN12IGGjeWhksU=;
 b=uzC3I+wp5im80GUQLs+gLQN8j9bLPSfA7yLGIRK0nG2a0pDr7Rtllwys9+yHZmwbQmE7G5
 4LJ2sLdABhcIWtYSf+Mhtg7cvI7eGBDwqSYqNco4temizhmkUreYQ78SKAlqiY9EVpagtT
 O/j0sPg0wfNFZo0HhzQEEwv5B1ICfkHVRfn8tm4XAl6DRXUbTpq2IXdrIIFiLypdOVceXW
 Oo6BKim9eRIpjkpoenUjX9bPrfK5saMkgZXfNmaIywZcmLvcumHnzgPLR65XI8v7Pu51hF
 4Wf7A1+lJbpcjSFnQipFxAfqkQJG9Sl7NDhiHvDvugqSbwBjfaIxiCmKFSDFgQ==
Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 981c04c1
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO)
 for <75010 <at> debbugs.gnu.org>; Sat, 21 Dec 2024 17:05:00 +0000 (UTC)
From: Herman Rimm <herman@HIDDEN>
To: 75010 <at> debbugs.gnu.org
Subject: [PATCH 6/7] gnu: machine: ssh: Roll-back on failure.
Date: Sat, 21 Dec 2024 18:04:10 +0100
Message-ID: <bff43ef960ffdcb7c366767b16f2dbe8da037ee5.1734798943.git.herman@HIDDEN>
X-Mailer: git-send-email 2.45.2
In-Reply-To: <cover.1734798943.git.herman@HIDDEN>
References: <cover.1734798943.git.herman@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75010
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

This restores the roll-back behaviour which was disabled in 2885c35.

* gnu/machine/ssh.scm (deploy-managed-host): Use roll-back-machine.

Change-Id: I8636347541ee1e4e30da15dd43455329a46c3bdb
---
 gnu/machine/ssh.scm | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm
index b954620b69..9cc9c8f099 100644
--- a/gnu/machine/ssh.scm
+++ b/gnu/machine/ssh.scm
@@ -512,7 +512,8 @@ (define (deploy-managed-host machine)
              (menu-entries (map boot-parameters->menu-entry boot-parameters))
              (bootloader-configuration (operating-system-bootloader os))
              (bootcfg (operating-system-bootcfg os menu-entries)))
-        (define-syntax-rule (eval/error-handling condition handler ...)
+        (define-syntax-rule (eval/error-handling condition store
+                                                 handler ...)
           ;; Return a wrapper around EVAL such that HANDLER is evaluated if an
           ;; exception is raised.
           (lambda (exp)
@@ -524,7 +525,7 @@ (define (deploy-managed-host machine)
                         store)))))
 
         (mbegin %store-monad
-          (switch-to-system (eval/error-handling c
+          (switch-to-system (eval/error-handling c store
                               (raise (formatted-message
                                       (G_ "\
 failed to switch systems while deploying '~a':~%~{~s ~}")
@@ -535,13 +536,19 @@ (define (deploy-managed-host machine)
                          (%current-target-system #f))
             (mbegin %store-monad
               (upgrade-shepherd-services
-                (eval/error-handling c
+                (eval/error-handling c store
+                  (info (G_ "rolling back ~a...~%") host)
+                  (run-with-store store (roll-back-machine machine)
+                                  #:system system)
                   (warning (G_ "\
 an error occurred while upgrading services on '~a':~%~{~s ~}~%")
                            host (inferior-exception-arguments c)))
                 os)
               (install-bootloader
-                (eval/error-handling c
+                (eval/error-handling c store
+                  (info (G_ "rolling back ~a...~%") host)
+                  (run-with-store store (roll-back-machine machine)
+                                  #:system system)
                   (raise (formatted-message
                            (G_ "\
 failed to install bootloader on '~a':~%~{~s ~}~%")
-- 
2.45.2





Information forwarded to guix-patches@HIDDEN:
bug#75010; Package guix-patches. Full text available.

Message received at 75010 <at> debbugs.gnu.org:


Received: (at 75010) by debbugs.gnu.org; 21 Dec 2024 17:05:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 21 12:05:16 2024
Received: from localhost ([127.0.0.1]:47523 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tP2uh-0005PR-OI
	for submit <at> debbugs.gnu.org; Sat, 21 Dec 2024 12:05:16 -0500
Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:38121
 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <herman@HIDDEN>) id 1tP2uc-0005I2-4r
 for 75010 <at> debbugs.gnu.org; Sat, 21 Dec 2024 12:05:10 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman;
 t=1734800700;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=GILwmmbUV5cxDgm2vE7mgAMn6SS5HAWz45VRyyCkjIU=;
 b=mnd73a6TS7e1pqVgvtQRNtFq38wE5BhUm/Yj2HEIdgAhHXOtqmtIzGY7PNFq5DL8+rMyeR
 0usEneEv0XZ3ZB+qf/FIpQAiDPVA3Qg76vfkJ57J9RWHqWq0PDL8rO3G2QyGN9zTF/os+/
 RwYUYLaM7DDfG9ot/eLDen2tiVEfPoUOhol/eviW2BAMKHQ8vFKkQUrVvw3d/WbWQZL1qX
 0Vuo8OIUm26UoH+Yk4bWxm/gK2AomNfqkhwPin2zUtazj2NSbpHUaH9cnpn/6iFmHN2jBW
 8WKSeJ9fWT4P4Y/6cdl4C+WnGJG//QZxdQzGJtBYsE+QqE3DnX84lkD2ZJz6bA==
Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 75f982c0
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO)
 for <75010 <at> debbugs.gnu.org>; Sat, 21 Dec 2024 17:05:00 +0000 (UTC)
From: Herman Rimm <herman@HIDDEN>
To: 75010 <at> debbugs.gnu.org
Subject: [PATCH 5/7] gnu: machine: Remove &deploy-error.
Date: Sat, 21 Dec 2024 18:04:09 +0100
Message-ID: <bbab03d6042290e23d34e67b054d5a1d8612293f.1734798943.git.herman@HIDDEN>
X-Mailer: git-send-email 2.45.2
In-Reply-To: <cover.1734798943.git.herman@HIDDEN>
References: <cover.1734798943.git.herman@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Christopher Baines <guix@HIDDEN>, Josselin Poiret <dev@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75010
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/machine.scm (&deploy-error): Remove.
* gnu/machine/ssh.scm (with-roll-back): Remove.
(deploy-managed-host): Remove with-roll-back.
* guix/scripts/deploy.scm (deploy-machine*): Remove deploy-error? case.

Change-Id: I719eafda0f5d12e1f4e3795631e78378f5376745
---
 gnu/machine.scm         | 17 +-------------
 gnu/machine/ssh.scm     | 51 +++++++++++++++--------------------------
 guix/scripts/deploy.scm |  8 +------
 3 files changed, 20 insertions(+), 56 deletions(-)

diff --git a/gnu/machine.scm b/gnu/machine.scm
index 60be674972..ede595d053 100644
--- a/gnu/machine.scm
+++ b/gnu/machine.scm
@@ -41,12 +41,7 @@ (define-module (gnu machine)
 
             deploy-machine
             roll-back-machine
-            machine-remote-eval
-
-            &deploy-error
-            deploy-error?
-            deploy-error-should-roll-back
-            deploy-error-captured-args))
+            machine-remote-eval))
 
 ;;; Commentary:
 ;;;
@@ -122,13 +117,3 @@ (define (roll-back-machine machine)
 and the new generation number."
   (let ((environment (machine-environment machine)))
     ((environment-type-roll-back-machine environment) machine)))
-
-
-;;;
-;;; Error types.
-;;;
-
-(define-condition-type &deploy-error &error
-  deploy-error?
-  (should-roll-back deploy-error-should-roll-back)
-  (captured-args deploy-error-captured-args))
diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm
index 3e69d4b9a3..b954620b69 100644
--- a/gnu/machine/ssh.scm
+++ b/gnu/machine/ssh.scm
@@ -480,18 +480,6 @@ (define (machine-boot-parameters machine)
                            (boot-parameters-kernel-arguments params))))))))
           remote-results))))
 
-(define-syntax-rule (with-roll-back should-roll-back? mbody ...)
-  "Catch exceptions that arise when binding MBODY, a monadic expression in
-%STORE-MONAD, and collect their arguments in a &deploy-error condition, with
-the 'should-roll-back' field set to SHOULD-ROLL-BACK?"
-  (catch #t
-    (lambda ()
-      mbody ...)
-    (lambda args
-      (raise (condition (&deploy-error
-                         (should-roll-back should-roll-back?)
-                         (captured-args args)))))))
-
 (define (deploy-managed-host machine)
   "Internal implementation of 'deploy-machine' for MACHINE instances with an
 environment type of 'managed-host."
@@ -536,32 +524,29 @@ (define (deploy-managed-host machine)
                         store)))))
 
         (mbegin %store-monad
-          (with-roll-back #f
-            (switch-to-system (eval/error-handling c
-                                (raise (formatted-message
-                                        (G_ "\
+          (switch-to-system (eval/error-handling c
+                              (raise (formatted-message
+                                      (G_ "\
 failed to switch systems while deploying '~a':~%~{~s ~}")
-                                        host
-                                        (inferior-exception-arguments c))))
-                              os))
+                                      host
+                                      (inferior-exception-arguments c))))
+                            os)
           (parameterize ((%current-system system)
                          (%current-target-system #f))
-            (with-roll-back #t
-              (mbegin %store-monad
-                (upgrade-shepherd-services (eval/error-handling c
-                                             (warning (G_ "\
+            (mbegin %store-monad
+              (upgrade-shepherd-services
+                (eval/error-handling c
+                  (warning (G_ "\
 an error occurred while upgrading services on '~a':~%~{~s ~}~%")
-                                                      host
-                                                      (inferior-exception-arguments
-                                                       c)))
-                                           os)
-                (install-bootloader (eval/error-handling c
-                                      (raise (formatted-message
-                                              (G_ "\
+                           host (inferior-exception-arguments c)))
+                os)
+              (install-bootloader
+                (eval/error-handling c
+                  (raise (formatted-message
+                           (G_ "\
 failed to install bootloader on '~a':~%~{~s ~}~%")
-                                              host
-                                              (inferior-exception-arguments c))))
-                                    bootloader-configuration bootcfg)))))))))
+                           host (inferior-exception-arguments c))))
+                bootloader-configuration bootcfg))))))))
 
 
 ;;;
diff --git a/guix/scripts/deploy.scm b/guix/scripts/deploy.scm
index 4b1a603049..ca0e1c4023 100644
--- a/guix/scripts/deploy.scm
+++ b/guix/scripts/deploy.scm
@@ -156,13 +156,7 @@ (define (deploy-machine* store machine)
                    (apply format #f
                           (gettext (formatted-message-string c)
                                    %gettext-domain)
-                          (formatted-message-arguments c))))
-           ((deploy-error? c)
-            (when (deploy-error-should-roll-back c)
-              (info (G_ "rolling back ~a...~%")
-                    (machine-display-name machine))
-              (run-with-store store (roll-back-machine machine)))
-            (apply throw (deploy-error-captured-args c))))
+                          (formatted-message-arguments c)))))
       (run-with-store store (deploy-machine machine))
 
     (info (G_ "successfully deployed ~a~%")
-- 
2.45.2





Information forwarded to guix@HIDDEN, dev@HIDDEN, ludo@HIDDEN, othacehe@HIDDEN, zimon.toutoune@HIDDEN, me@HIDDEN, guix-patches@HIDDEN:
bug#75010; Package guix-patches. Full text available.

Message received at 75010 <at> debbugs.gnu.org:


Received: (at 75010) by debbugs.gnu.org; 21 Dec 2024 17:05:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 21 12:05:15 2024
Received: from localhost ([127.0.0.1]:47521 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tP2uh-0005PK-Bb
	for submit <at> debbugs.gnu.org; Sat, 21 Dec 2024 12:05:15 -0500
Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:38121
 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <herman@HIDDEN>) id 1tP2ub-0005I2-Ab
 for 75010 <at> debbugs.gnu.org; Sat, 21 Dec 2024 12:05:09 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman;
 t=1734800698;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=EREHFR3ipWhtTXlI/zC1e2OV5zlEkHLR82/AvIEdK+o=;
 b=fxJVef1q+g2bHak/MbVtqICsjyu2K7C/7Qvdf38euotmhZaUGw1SCB+hoQ0hF9eu9pctze
 UghAaXE+RnhCVkk1ix0nc3i/jPvHTWANPhcXvhEihzsC7d8EIqzdyjZo6nymEMeKW/i+ZD
 30eti20X8uccUoCoNjlgN3QsVm9hLu9Hf35kkZS3uWNvhHD3JVlLKxqzot8rMFgcamFA8n
 Dwufqw2AQvM1gz3OR1BANgzKlJVDWDATLPlcYHXMmuu7QGAllqXFqIKxIODlLtdgeVI2FN
 5ak944QK7GhQhXJgr3UO+fOYj08gZ30msSaoWIC8G3TwQ84h8cthrfASjMz+Bg==
Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 6d2af424
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); 
 Sat, 21 Dec 2024 17:04:58 +0000 (UTC)
From: Herman Rimm <herman@HIDDEN>
To: 75010 <at> debbugs.gnu.org
Subject: [PATCH 4/7] Rename two remote variables confusingly named
 'generations'.
Date: Sat, 21 Dec 2024 18:04:08 +0100
Message-ID: <9ae59065234a1d8215f94f2df13752cbfa438595.1734798943.git.herman@HIDDEN>
X-Mailer: git-send-email 2.45.2
In-Reply-To: <cover.1734798943.git.herman@HIDDEN>
References: <cover.1734798943.git.herman@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75010
Cc: Felix Lechner <felix.lechner@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

From: Felix Lechner <felix.lechner@HIDDEN>

Both refer to data sets returned from the remote expression, and one of them
shadowed an element of itself.

* gnu/machine/ssh.scm (machine-boot-parameters): Rename generations
  to remote-results.

Change-Id: Ibd8a3036126d9da1215cfc191884c0f54df637df
---
 gnu/machine/ssh.scm | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm
index c76b51c757..3e69d4b9a3 100644
--- a/gnu/machine/ssh.scm
+++ b/gnu/machine/ssh.scm
@@ -455,10 +455,11 @@ (define (machine-boot-parameters machine)
                            (read-file boot-parameters-path))))
                  (reverse (generation-numbers %system-profile)))))))
 
-  (mlet* %store-monad ((generations (machine-remote-eval machine remote-exp)))
+  (mlet %store-monad
+      ((remote-results (machine-remote-eval machine remote-exp)))
     (return
-     (map (lambda (generation)
-            (match generation
+     (map (lambda (remote-result)
+            (match remote-result
               ((generation system-path time serialized-params)
                (let* ((params (call-with-input-string serialized-params
                                 read-boot-parameters))
@@ -477,7 +478,7 @@ (define (machine-boot-parameters machine)
                   (kernel-arguments
                    (append (bootable-kernel-arguments system-path root version)
                            (boot-parameters-kernel-arguments params))))))))
-          generations))))
+          remote-results))))
 
 (define-syntax-rule (with-roll-back should-roll-back? mbody ...)
   "Catch exceptions that arise when binding MBODY, a monadic expression in
-- 
2.45.2





Information forwarded to guix-patches@HIDDEN:
bug#75010; Package guix-patches. Full text available.

Message received at 75010 <at> debbugs.gnu.org:


Received: (at 75010) by debbugs.gnu.org; 21 Dec 2024 17:05:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 21 12:05:15 2024
Received: from localhost ([127.0.0.1]:47519 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tP2uh-0005PC-1C
	for submit <at> debbugs.gnu.org; Sat, 21 Dec 2024 12:05:15 -0500
Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:38121
 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <herman@HIDDEN>) id 1tP2ua-0005I2-Eq
 for 75010 <at> debbugs.gnu.org; Sat, 21 Dec 2024 12:05:09 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman;
 t=1734800697;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=Q/q4Qebf9NGtSGG6njgIa5LiFgClro62TGrj78Uwy1g=;
 b=GlCjO/yyh+uSImac/iZTFcRIk7MFuqPlr8ERPFu43KOZlLMBNa+YTXvTDFi0PVVg/iTmJx
 +bB4mi+QZPi06Ud8lKZkgEs3JALCvJUCCBDmQRvQjctFkCZWT0BEqVogDt4coQrxaJH4cK
 UTyn7LnbTMTwCJu57WnmQU7jmk0264Yl6jy21lqNWQWJxH688zAcvDkm/j22/B5YVGusUB
 18232AmswaSckhyrH+22RCxHWTw4I/F0jxXVTwqS0qMpFLR+eYtb1pptmfFwajekKfDwik
 sz2X0IG4Yrf4tb/o98mSpcJz3kMIuuof8X9wUyEFvmuDa80dqap+SOY9/RCJUw==
Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id f6bd2c01
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO)
 for <75010 <at> debbugs.gnu.org>; Sat, 21 Dec 2024 17:04:57 +0000 (UTC)
From: Herman Rimm <herman@HIDDEN>
To: 75010 <at> debbugs.gnu.org
Subject: [PATCH 3/7] gnu: machine: ssh: Return monadic value from
 roll-back-managed-host.
Date: Sat, 21 Dec 2024 18:04:07 +0100
Message-ID: <9d7e69af958b651dd463d93822c0b493e201387a.1734798943.git.herman@HIDDEN>
X-Mailer: git-send-email 2.45.2
In-Reply-To: <cover.1734798943.git.herman@HIDDEN>
References: <cover.1734798943.git.herman@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75010
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/machine/ssh.scm (roll-back-managed-host): Use return.

Change-Id: Ibe7ddd5758173a6835d8796c9c5ae5ba306b3334
---
 gnu/machine/ssh.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm
index 24c36a1936..c76b51c757 100644
--- a/gnu/machine/ssh.scm
+++ b/gnu/machine/ssh.scm
@@ -612,9 +612,9 @@ (define (roll-back-managed-host machine)
                          #:old-entries old-entries)))
        (mlet %store-monad
            ((remote-result (machine-remote-eval machine remote-exp)))
-         (when (eqv? 'error remote-result)
-           (raise roll-back-failure)))))
-    (_ (raise roll-back-failure))))
+         (mwhen (eqv? 'error remote-result)
+           (return (raise roll-back-failure))))))
+    (_ (return (raise roll-back-failure)))))
 
 
 ;;;
-- 
2.45.2





Information forwarded to guix-patches@HIDDEN:
bug#75010; Package guix-patches. Full text available.

Message received at 75010 <at> debbugs.gnu.org:


Received: (at 75010) by debbugs.gnu.org; 21 Dec 2024 17:05:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 21 12:05:15 2024
Received: from localhost ([127.0.0.1]:47517 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tP2ug-0005PA-GS
	for submit <at> debbugs.gnu.org; Sat, 21 Dec 2024 12:05:14 -0500
Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:38121
 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <herman@HIDDEN>) id 1tP2uZ-0005I2-CI
 for 75010 <at> debbugs.gnu.org; Sat, 21 Dec 2024 12:05:08 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman;
 t=1734800696;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=ZTYy1cD46r8aq1jDrZf65hzcr3HDQHHFFvlUl8fXvto=;
 b=vN1DEqTjNoBYnNwy4Oay68R+N36O6mMiWxCCAEyBy8oDCHBzkwxyXHuiY/rJ2SnvySClI9
 we+t4xgtFQy/U2RTQ05pWOW5AC8SdqUTA8rzqOWB8l4pAt+kWPZq7PF3Qqvn0kSaOHrz56
 T/AsVid02uDXy5ibnzhuQqocXsrqIxkUrD2r9Meb+Q4DVPxznqurPbS0h17Kc7K2E8fBfU
 4hcpD2RstBLDCgM4MrAduX5MCtr8sXSDYoYiHPbFY+6uep451/PcWrH87WjEp+CNbMfemo
 0s3zdGcf4J5Rv7gilaKY5S/lHy8E/WMx/GtOXPxc+hdCrkZ1R7Il8d7V50bYIw==
Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 7c4c3846
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO)
 for <75010 <at> debbugs.gnu.org>; Sat, 21 Dec 2024 17:04:56 +0000 (UTC)
From: Herman Rimm <herman@HIDDEN>
To: 75010 <at> debbugs.gnu.org
Subject: [PATCH 2/7] gnu: machine: ssh: Refactor roll-back-managed-host.
Date: Sat, 21 Dec 2024 18:04:06 +0100
Message-ID: <cbe72256fc842a207540d3a0d3ca28ef549ed885.1734798943.git.herman@HIDDEN>
X-Mailer: git-send-email 2.45.2
In-Reply-To: <cover.1734798943.git.herman@HIDDEN>
References: <cover.1734798943.git.herman@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75010
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/machine/ssh.scm (roll-back-managed-host): Use let* and mbegin.

Change-Id: Ic3d5039ecf01e1e965dce8a696e7dbd625d2b3c5
---
 gnu/machine/ssh.scm | 53 ++++++++++++++++++++++-----------------------
 1 file changed, 26 insertions(+), 27 deletions(-)

diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm
index 3e10d984e7..24c36a1936 100644
--- a/gnu/machine/ssh.scm
+++ b/gnu/machine/ssh.scm
@@ -2,6 +2,8 @@
 ;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@HIDDEN>
 ;;; Copyright © 2020-2023 Ludovic Courtès <ludo@HIDDEN>
 ;;; Copyright © 2024 Ricardo <rekado@HIDDEN>
+;;; Copyright © 2024 Felix Lechner <felix.lechner@HIDDEN>
+;;; Copyright © 2024 Herman Rimm <herman@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -589,33 +591,30 @@ (define (roll-back-managed-host machine)
   (define roll-back-failure
     (condition (&message (message (G_ "could not roll-back machine")))))
 
-  (mlet* %store-monad ((boot-parameters (machine-boot-parameters machine))
-                       (_ -> (if (< (length boot-parameters) 2)
-                                 (raise roll-back-failure)))
-                       (entries -> (map boot-parameters->menu-entry
-                                        (list (second boot-parameters))))
-                       (locale -> (boot-parameters-locale
-                                   (second boot-parameters)))
-                       (crypto-dev -> (boot-parameters-store-crypto-devices
-                                       (second boot-parameters)))
-                       (store-dir -> (boot-parameters-store-directory-prefix
-                                      (second boot-parameters)))
-                       (old-entries -> (map boot-parameters->menu-entry
-                                            (drop boot-parameters 2)))
-                       (bootloader -> (operating-system-bootloader
-                                       (machine-operating-system machine)))
-                       (bootcfg (lower-object
-                                 ((bootloader-configuration-file-generator
-                                   (bootloader-configuration-bootloader
-                                    bootloader))
-                                  bootloader entries
-                                  #:locale locale
-                                  #:store-crypto-devices crypto-dev
-                                  #:store-directory-prefix store-dir
-                                  #:old-entries old-entries)))
-                       (remote-result (machine-remote-eval machine remote-exp)))
-    (when (eqv? 'error remote-result)
-      (raise roll-back-failure))))
+  (mmatch %store-monad (machine-boot-parameters machine)
+    ((_ params rest ...)
+     (let* ((entries (list (boot-parameters->menu-entry params)))
+            (locale (boot-parameters-locale params))
+            (crypto-dev (boot-parameters-store-crypto-devices params))
+            (store-dir (boot-parameters-store-directory-prefix params))
+            (old-entries (map boot-parameters->menu-entry rest))
+            (bootloader (operating-system-bootloader
+                          (machine-operating-system machine)))
+            (generate-bootloader-configuration-file
+             (bootloader-configuration-file-generator
+               (bootloader-configuration-bootloader bootloader))))
+       (mbegin %store-monad
+         (lower-object (generate-bootloader-configuration-file
+                         bootloader entries
+                         #:locale locale
+                         #:store-crypto-devices crypto-dev
+                         #:store-directory-prefix store-dir
+                         #:old-entries old-entries)))
+       (mlet %store-monad
+           ((remote-result (machine-remote-eval machine remote-exp)))
+         (when (eqv? 'error remote-result)
+           (raise roll-back-failure)))))
+    (_ (raise roll-back-failure))))
 
 
 ;;;
-- 
2.45.2





Information forwarded to guix-patches@HIDDEN:
bug#75010; Package guix-patches. Full text available.

Message received at 75010 <at> debbugs.gnu.org:


Received: (at 75010) by debbugs.gnu.org; 21 Dec 2024 17:05:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 21 12:05:09 2024
Received: from localhost ([127.0.0.1]:47509 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tP2ua-0005Mj-MS
	for submit <at> debbugs.gnu.org; Sat, 21 Dec 2024 12:05:09 -0500
Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:38121
 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <herman@HIDDEN>) id 1tP2uY-0005I2-Bd
 for 75010 <at> debbugs.gnu.org; Sat, 21 Dec 2024 12:05:07 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman;
 t=1734800696;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=XBnWVgPt+dXrwelp+ecr17pGs1zoO5nRvpNKyO4JC0o=;
 b=DH+pAVrZ7HAbYWtDndS5FRIBPhlzp4nq1BrN5dF1r2SNXjqRarAWh5aL+JZJ7MIgeDcYgS
 lSGTnIst7QBmb1RG1Lb1gXBcCnhngUTRKQ7p3PMczg28QOXEI5ysYzmJp8//39cps4CSbH
 cE2Zet2ONQW6chpTElZ73HTv1A566ymHteGmred+/a/iDgRL9LFs6DzSxAzumeeeBnWfBw
 hFimLDdtOjSRh9TQ6n+NZbAd7t4DoOKouqnBKj74U+SYlbA6pAUn3U0u7BNlm7Gy2gnn/Q
 TL8AxRJwCfu1aV8fb2arF3eTfs6zMJGaPJapWe+diaIE8SOQXtjptIfOiNL3pg==
Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 32d18722
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO)
 for <75010 <at> debbugs.gnu.org>; Sat, 21 Dec 2024 17:04:56 +0000 (UTC)
From: Herman Rimm <herman@HIDDEN>
To: 75010 <at> debbugs.gnu.org
Subject: [PATCH 1/7] monads: Add 'mmatch'.
Date: Sat, 21 Dec 2024 18:04:05 +0100
Message-ID: <4bfa279cae2316d7a7a4e0640d13a0763ad86f92.1734798943.git.herman@HIDDEN>
X-Mailer: git-send-email 2.45.2
In-Reply-To: <cover.1734798943.git.herman@HIDDEN>
References: <cover.1734798943.git.herman@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Christopher Baines <guix@HIDDEN>, Josselin Poiret <dev@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>, Mathieu Othacehe <othacehe@HIDDEN>, Maxim Cournoyer <maxim.cournoyer@HIDDEN>, Simon Tournier <zimon.toutoune@HIDDEN>, Tobias Geerinckx-Rice <me@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75010
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* doc/guix.texi (The Store Monad): Document mmatch.
* guix/monads.scm (mmatch): Add macro.

Change-Id: I558f8e025f6cf788c9fc475e99d49690d7a98f41
---
 doc/guix.texi   |  6 ++++++
 guix/monads.scm | 11 +++++++++++
 2 files changed, 17 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index f7b7569887..c86f644360 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -11814,6 +11814,12 @@ The Store Monad
 (@pxref{Local Bindings,,, guile, GNU Guile Reference Manual}).
 @end defmac
 
+@defmac mmatch monad mexp (pattern body) @dots{}
+Match monadic object @var{mexp} against clause @var{pattern}s, in the
+order in which they appear.  The last expression of each clause
+@var{body} must be a monadic expression.
+@end defmac
+
 @defmac mbegin monad mexp @dots{}
 Bind @var{mexp} and the following monadic expressions in sequence,
 returning the result of the last expression.  Every expression in the
diff --git a/guix/monads.scm b/guix/monads.scm
index 0bd8ac9315..0e8ca868ce 100644
--- a/guix/monads.scm
+++ b/guix/monads.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013, 2014, 2015, 2017, 2022 Ludovic Courtès <ludo@HIDDEN>
+;;; Copyright © 2024 Herman Rimm <herman@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -37,6 +38,7 @@ (define-module (guix monads)
             with-monad
             mlet
             mlet*
+            mmatch
             mbegin
             mwhen
             munless
@@ -355,6 +357,15 @@ (define-syntax mlet
              (let ((var temp) ...)
                body ...)))))))
 
+(define-syntax mmatch
+  (syntax-rules ()
+    "Match the monadic object MEXP against the patterns of CLAUSES ...
+in the order in which they appear.  The last expression of each clause
+body must be a monadic expression."
+    ((_ monad mexp clauses ...)
+     (with-monad monad
+       (>>= mexp (match-lambda clauses ...))))))
+
 (define-syntax mbegin
   (syntax-rules (%current-monad)
     "Bind MEXP and the following monadic expressions in sequence, returning
-- 
2.45.2





Information forwarded to guix@HIDDEN, dev@HIDDEN, ludo@HIDDEN, othacehe@HIDDEN, maxim.cournoyer@HIDDEN, zimon.toutoune@HIDDEN, me@HIDDEN, guix-patches@HIDDEN:
bug#75010; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 21 Dec 2024 17:03:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 21 12:03:35 2024
Received: from localhost ([127.0.0.1]:47501 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tP2t5-0005FS-30
	for submit <at> debbugs.gnu.org; Sat, 21 Dec 2024 12:03:35 -0500
Received: from lists.gnu.org ([209.51.188.17]:42782)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <herman@HIDDEN>) id 1tP2t1-0005FI-L0
 for submit <at> debbugs.gnu.org; Sat, 21 Dec 2024 12:03:33 -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 <herman@HIDDEN>) id 1tP2t0-000541-Hl
 for guix-patches@HIDDEN; Sat, 21 Dec 2024 12:03:31 -0500
Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]
 helo=email.rimm.ee)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256)
 (Exim 4.90_1) (envelope-from <herman@HIDDEN>) id 1tP2sx-0002Tb-Fm
 for guix-patches@HIDDEN; Sat, 21 Dec 2024 12:03:30 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman;
 t=1734800596;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type;
 bh=nhT0nJ8hLTcNp807orlhORxWkUQwN/owqpSs/xAEbic=;
 b=TvdiH//QGNzyUlm8KgUfSLzkpGR7CpQAGwoHL+usAkxapCR3M88X3aEFEntDfESxrkAGIY
 9o60uI0jwPoqDwwskLNkJjjOjs8fMqWl8Z+d+sy8pW5kshMPJl4SUIKhaEOpP6aOkPACw6
 Hv4MMbi779YYCMR+bXa5rx/lot5qI7bYHWxZV9ahRfcEtkLlWfrj8dINWCzCFgJWuh/ZPi
 iFVBav/lXDjw0p15TBAZ370jFNR/WbuRuuRADATamF9ICD9Gy4cl6Z9xiZbZb4VpVp6HIO
 vQ0CvQ3J2WvIbVqh3SkbEJgYNKGY1wSxlFBszHbm+XN8/1d0eKNtLyQBCJouLA==
Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id a3ddfb77
 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO)
 for <guix-patches@HIDDEN>; Sat, 21 Dec 2024 17:03:16 +0000 (UTC)
Date: Sat, 21 Dec 2024 18:02:35 +0100
From: Herman Rimm <herman@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH 0/7] Roll back when deployment fails.
Message-ID: <zrxq4axts6fcbybijcsndtuy2aw3rbjpbrcj4kaiyacimefrlz@o35c72jre4ax>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="vpnmmrdgs7wyx7tx"
Content-Disposition: inline
Received-SPF: pass client-ip=81.205.150.117; envelope-from=herman@HIDDEN;
 helo=email.rimm.ee
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 TVD_RCVD_IP=0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)


--vpnmmrdgs7wyx7tx
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hello,

Felix's patch is from issue #69343, one is also squashed into [PATCH
2/7].

In [PATCH 2/7], does the mbegin above the mlet work, or is its value
discarded?  Guix deploy seems to work the same way.

In [PATCH 7/7] I try to add a test for the guix deploy rollback
behavior.  See attachment, why does this error occur?

Cheers,
Herman

Felix Lechner (1):
  Rename two remote variables confusingly named 'generations'.

Herman Rimm (6):
  monads: Add 'mmatch'.
  gnu: machine: ssh: Refactor roll-back-managed-host.
  gnu: machine: ssh: Return monadic value from roll-back-managed-host.
  gnu: machine: Remove &deploy-error.
  gnu: machine: ssh: Roll-back on failure.
  WIP: gnu: tests: Add module for guix deploy tests.

 doc/guix.texi           |   6 ++
 gnu/machine.scm         |  17 +---
 gnu/machine/ssh.scm     | 122 +++++++++++-------------
 gnu/tests/deploy.scm    | 203 ++++++++++++++++++++++++++++++++++++++++
 guix/monads.scm         |  11 +++
 guix/scripts/deploy.scm |   8 +-
 6 files changed, 279 insertions(+), 88 deletions(-)
 create mode 100644 gnu/tests/deploy.scm


base-commit: 11855e1c2863c56d9a3364cdac614a529a1c7cc2
-- 
2.45.2


--vpnmmrdgs7wyx7tx
Content-Type: application/x-gunzip
Content-Disposition: attachment;
	filename="1gv9mdpy6ygfgfvh4j56j4nq8c9a1m-module-import-compiled.drv.gz"
Content-Transfer-Encoding: base64

H4sIAAAAAAACA+2a30/jOBDH3/kr5lrd0T64tOkvml2BON3uCukEEmJ1D9wJXMdpvU3synYK
5YG//cZJf2ShJau7AltUykM6/vozM3bsZJJeQeOgUe/U/4E/FQ2EHMB+7WAgkwOq7a3So5ph
8X6tVtu7Am+1sK+UjdDEdU7bXKNNRBQcUMZUIq3J6VvP6UMRcWKmxvI436f9XJ9IyOSOxCpI
Ir7s9OHDB/hMEReAVUATq1zkENMRJ/eR6BMhx4klY6UtCAkVZ6v6aTepgKmAQ6g0ZNhZ8xtB
VWJ/cuqvE65FOCXmdkgY11aEglHLj1PwIBF3gC3PwL8ZJdfCNR8rI6zSUxIIwxT6yrjC5tqe
oT8S/kR+1JjL9+DDbR+4LnHcNGfO8u4cDjl+314fIddcMk4s1QNuc05mDYU+5ro3dMFUHAtL
IqVGyXjBz6wF8JnozchWc74VXAckkTDL+XOWAmYqeT2iSfqZloypHS6wC3MBe6nbOdiAg0eL
Zqtc5Pbehdi8Dz8sUob/8tJXrJ2XH/KCt86o9LA6EHbpoS+kK2ZMAX8h29HX0v86uTg7Pfvi
w1fDQYVw4+D7jhdwFlFNrZjwZV9XkCSiWgM4CQIo+znRMZRDF+FUJRo7h0LyWWmJtInCqkYo
uba6ZDSKyK2wQzK4F+NNVoOvQb43NnhCRttzZNf8wuQr6Kwu/2PKhjg/i5L/3U3I9pBz+6iQ
oVrW/YOiO9K1SDwYcmnTBwlkyf8OTfKi/+jHWO0qySMllsUXHhfsPU6xI+aJqv8NS3GS56WW
ImQmemWqCMhRNgSbyn7jxG0sd7fhPN2N6wut/+1ZU7mcNzjvG6Z+Ob28/nR2fvn5/OvZHwsy
11rpohvjmej1ye6SnEpI2ntR4VqdMFvEnqveBE5tmBFlAmPKRnSAFTobcjaagS+HWt26LiM+
hZtE9lUiAzKhWtB+xPfB3VYB1QMDN5WS5kZFE473QpbrkDJeghJGNitY4ObhJC1OZgE+nJSg
4gJY5b2KBUl1v/be4h5NE7oL/DUDd+/YcDtlcRq9+4YAbbgueC83V70Y93dMw2pM3d87lSAY
J730TTPpucrO3wMAz/N8rweNHlRiOm7AdTVvPVxp7a60dlZa2yutrZXW5kqr98SKATQaM2ul
8v2E4Zd7EUUU5+xRS9lNIxxXHabZ9Loppg6VJ+cJrCFC2Tc8wptfuE5ByzG1Q81pYBaDCs1e
3T8EwEG9dnGvGfym1276mDXgMF//AK5bgGu3Wr5XB+ikODdYh82O3wLASTB0Mn/cQvgdS7QR
eKKksma7g/06AK15GIkcSXUrwf1mIItg9oczNNYCr61i4h4e0yB7Cl5yzwzmA3YwH7ASlD+O
tWI8SPTxUS5sPqHRIrmO1/Hx7APPJVf+uHztuG4WumEY8na322nT+lGWZq/pNzHNRoqoPPrk
kMdHOG0r/1MOnq09H0Op/x/O3qMcU6YPny4uzi9cwo0a/IYLNqbW8oDE3BjMbz7IWYMPpQfq
Y+6WDXGRWzTjPve3LM1UuMMlMdbmxodKCd1hiU7crw+yw1rar1Td+xeG4J/MliIAAA==

--vpnmmrdgs7wyx7tx--




Acknowledgement sent to Herman Rimm <herman@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#75010; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 18 Feb 2025 17:00:03 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.