From patchwork Tue Mar 18 20:57:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Trofimov X-Patchwork-Id: 40353 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C24B527BBEA; Tue, 18 Mar 2025 20:59:23 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED,URIBL_SBL_A autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 46A2827BBE2 for ; Tue, 18 Mar 2025 20:59:22 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tue0m-0007Ot-O3; Tue, 18 Mar 2025 16:58:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tue0h-0007OG-8S for guix-patches@gnu.org; Tue, 18 Mar 2025 16:58:03 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tue0g-0005u1-Uy for guix-patches@gnu.org; Tue, 18 Mar 2025 16:58:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=ciHijTLr8/GUaBIfnUlipDS6ri0Gupe8Wd4EbOZdQ/A=; b=l0AMz1fiOjkN3JsZzp+7FCpECKSTOcqoSQ+ACzrdz/Ff/b7keDdhZt1L2OJYgher4CvEb2FeWXlTb5/a9yg+4PfaWVbaOE9wV6pKA31/3lwYxrz9cqBLPBh3h0oXxp2ElfyyiYwHq9KQqQJ3fd9vyEo4u6tHSWVQUDtgc8Qj4sVmhvjsCCZ/4IYOlnYLRSnXwd15TBRxqTxbXJWko9HbE9mjAhnOAKvDLDUMgpjGR7ssaEaTnkZuybpzXJxI0lPpWEHNzBKZSBuVcNDRmzyuA3A1y1u8mkSodeIK57oLFYWW4t+gyRc+phkrxcr6Q/nSBxcMibtb5YJzvlIdWkrcvQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tue0g-0003TF-Ox for guix-patches@gnu.org; Tue, 18 Mar 2025 16:58:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77033] [PATCH] deploy: Support --target and --system. Resent-From: Sergey Trofimov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 18 Mar 2025 20:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77033 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Roman Scherer Cc: ludo@gnu.org, 77033@debbugs.gnu.org Received: via spool by 77033-submit@debbugs.gnu.org id=B77033.174233146613198 (code B ref 77033); Tue, 18 Mar 2025 20:58:02 +0000 Received: (at 77033) by debbugs.gnu.org; 18 Mar 2025 20:57:46 +0000 Received: from localhost ([127.0.0.1]:43530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tue0M-0003QL-QP for submit@debbugs.gnu.org; Tue, 18 Mar 2025 16:57:45 -0400 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]:57700) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tue0J-0003PC-Lc for 77033@debbugs.gnu.org; Tue, 18 Mar 2025 16:57:40 -0400 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-ac25520a289so1063913966b.3 for <77033@debbugs.gnu.org>; Tue, 18 Mar 2025 13:57:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1742331453; x=1742936253; darn=debbugs.gnu.org; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=ciHijTLr8/GUaBIfnUlipDS6ri0Gupe8Wd4EbOZdQ/A=; b=aeMcX4kCewpWjgSyVeUC62j0kYaRKtZZ63ajtWIwyMGkieDvZFjkOpTMTjbzW8ikNi oroVGqteIv6a94mbWAnCL+EaU1B59dZoHLfl2yNNw+R0icJ4abGjsehV1LYOIHCybQYM lkPAttRCFr96TBck0DmTUllewFbp9EJ7TpfSrcKFiSaYNDZ3LNw2AsWY+u+hXoTp1sfC J8w/AT82L0UBxEX9D+8kdf3NpMNynjsYwHkZgi/s2mQOHyfV/2qoXGA6cyQdlXWlYkGZ flmN7ODi5F7rT+KO2mBFUFbthDNv3NU77cvAYKwaCRRp1LmBXgkt33GAES79gcokmYPZ MpbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742331453; x=1742936253; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ciHijTLr8/GUaBIfnUlipDS6ri0Gupe8Wd4EbOZdQ/A=; b=rd/jxVM8PgrZkdcxKsVgVaqTZVHNDb5pqVkRl1p3tOfVFKAQqP3C4/nzg6nCjwdGos FBiiVxjS47FeFluk5F+tqEeLYn4K0CcGQRM8vv7fhLe0OYqLYNhowONEChXUVyWLhoH6 HJIfRes7ERB3GSh6OYUpJffahl2tVyG6oO4l0Be3UHxnBRa47lGKmjbMtm6ufztUsFEc ij0DXC7vjvrtvb0yI8A1QU89+ZxEvOH7SPfLtfG6eD/i4KDno0XEJ/cIB7hyxPvkV8bO xiHfgn3OgoVzHAqSvWdfdth2DkBxTbnCPUK+6WfMk96Hdzn7hHgo2Y7v4yvBH50ytkZN UL+Q== X-Gm-Message-State: AOJu0Ywdmak6fM7pcVxXKLBCKrYzvmMmGpobwEVjkr0SQ6zK0UnY8V8n qyH/8aC2xo9OpUpt428WKhHPEBzPwsCte3Zkdf0Qsn5Hli9Nd+7tFycnYvSjTeo= X-Gm-Gg: ASbGncvy7atK1pMmY2ghvwcx8pFem+fyeOg1iZ0l6YojiBmgILpIG/Elnvc4ojLdv9P d4mwWeqtTJX78JpeKEc0ha7y/UrS+/2keK3kK6Z1wxKlTja8oGgaaIVFfRVuPYNPHTLQhTPGk9s e9aG4L/4PjXYWP2/p3v5tQrTvnSpPmuKbjviPLaK4xljmEX1aFtPfY9jSWaluc1/zW5JSvbvOoy j65u4o3kRGc4w34ovvGTG9UKMxycRO4hFOZIlIO2SMGN6InhsK/WMCUVUjbNueFLGqqlnYFQSmU 3FaiyPiokix0WNJs7vyDXCdFxqqwiKttZ52NK2Bvog== X-Google-Smtp-Source: AGHT+IHFu9e8FNNP2/IuZUV9I4EGPv4NhjoaV4VOVyhtsYw6gsMjOG3Vwyuud3OwSv5iEcm8/yYDkw== X-Received: by 2002:a17:907:7e5e:b0:ac1:ddaa:2c03 with SMTP id a640c23a62f3a-ac3b73e0c7fmr16784666b.0.1742331452768; Tue, 18 Mar 2025 13:57:32 -0700 (PDT) Received: from thinkpad ([2a02:2454:a0a5:2400:a64e:31ff:fe38:fd6c]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ac314858a8fsm886546766b.80.2025.03.18.13.57.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Mar 2025 13:57:31 -0700 (PDT) In-Reply-To: <87bju1yzfq.fsf@burningswell.com> (Roman Scherer's message of "Sun, 16 Mar 2025 12:42:17 +0100") References: <87bju1yzfq.fsf@burningswell.com> User-Agent: mu4e 1.12.9; emacs 30.0.92 Date: Tue, 18 Mar 2025 21:57:30 +0100 Message-ID: <87frjays3p.fsf@sarg.org.ru> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Sergey Trofimov X-ACL-Warn: , Sergey Trofimov via Guix-patches X-Patchwork-Original-From: Sergey Trofimov via Guix-patches via From: Sergey Trofimov Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Roman Scherer writes: > Hello Sergey, > > this looks good to me and is better than what we have now. I'm testing > this right now and will report back when it went through ... > I think this patch is not necessary at all, your code already sets the `system` field of `machine-ssh-configuration` to the value appropriate to one returned by hetzner-api. It looks to me that the bug is in incorrect parameterization, see the following patch. I've been able to deploy using it (again `build-locally?` set to #f as it takes too long otherwise). Please test this one. --8<---------------cut here---------------start------------->8--- From 988d192cfe4833761d0714aa8a53392c09dd5c9d Mon Sep 17 00:00:00 2001 Message-ID: <988d192cfe4833761d0714aa8a53392c09dd5c9d.1742331137.git.sarg@sarg.org.ru> From: Sergey Trofimov Subject: [PATCH] machine: ssh: Use monadic parameterize for monads. * gnu/machine/ssh (deploy-managed-host): Use store-parameterize in monadic context. Change-Id: I6441a5dac856633f2c2a00b77f21a385bf3a9510 --- gnu/machine/ssh.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) base-commit: df799a61ef73451e587cb81942c7bfcbbade9e7e -- 2.48.1 --8<---------------cut here---------------end--------------->8--- diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm index 73d5dc513e..0ce2860236 100644 --- a/gnu/machine/ssh.scm +++ b/gnu/machine/ssh.scm @@ -542,8 +542,8 @@ (define (deploy-managed-host machine) host (inferior-exception-arguments c)))) os)) - (parameterize ((%current-system system) - (%current-target-system #f)) + (store-parameterize ((%current-system system) + (%current-target-system #f)) (with-roll-back #t (mbegin %store-monad (upgrade-shepherd-services (eval/error-handling c