From patchwork Wed Aug 7 12:44:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jakob L. Kreuze" X-Patchwork-Id: 14886 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 30F3E17274; Wed, 7 Aug 2019 13:48:10 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id EB2A617252 for ; Wed, 7 Aug 2019 13:48:09 +0100 (BST) Received: from localhost ([::1]:40664 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvLMP-0001ID-Kb for patchwork@mira.cbaines.net; Wed, 07 Aug 2019 08:48:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48987) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvLMK-0001G2-1B for guix-patches@gnu.org; Wed, 07 Aug 2019 08:48:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hvLMI-0005Yx-K1 for guix-patches@gnu.org; Wed, 07 Aug 2019 08:48:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57582) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hvLMI-0005YT-Gi for guix-patches@gnu.org; Wed, 07 Aug 2019 08:48:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hvLMI-0000Pm-CE for guix-patches@gnu.org; Wed, 07 Aug 2019 08:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36955] [PATCH] machine: Add 'build-locally?' field for managed hosts. Resent-From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 07 Aug 2019 12:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 36955 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 36955@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15651820581556 (code B ref -1); Wed, 07 Aug 2019 12:48:02 +0000 Received: (at submit) by debbugs.gnu.org; 7 Aug 2019 12:47:38 +0000 Received: from localhost ([127.0.0.1]:38170 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hvLLr-0000Oz-Hq for submit@debbugs.gnu.org; Wed, 07 Aug 2019 08:47:35 -0400 Received: from lists.gnu.org ([209.51.188.17]:50314) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hvLLp-0000Ol-Rf for submit@debbugs.gnu.org; Wed, 07 Aug 2019 08:47:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48782) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvLLo-00013i-Nv for guix-patches@gnu.org; Wed, 07 Aug 2019 08:47:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hvLLn-0005H4-NH for guix-patches@gnu.org; Wed, 07 Aug 2019 08:47:32 -0400 Received: from mx.sdf.org ([205.166.94.20]:65067) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hvLLn-0005Fa-Dj for guix-patches@gnu.org; Wed, 07 Aug 2019 08:47:31 -0400 Received: from Epsilon (pool-173-76-53-40.bstnma.fios.verizon.net [173.76.53.40]) (authenticated (0 bits)) by mx.sdf.org (8.15.2/8.14.5) with ESMTPSA id x77ClTWp020212 (using TLSv1.2 with cipher AES256-GCM-SHA384 (256 bits) verified NO) for ; Wed, 7 Aug 2019 12:47:30 GMT From: zerodaysfordays@sdf.lonestar.org (Jakob L. Kreuze) Date: Wed, 07 Aug 2019 08:44:18 -0400 Message-ID: <87imr9402l.fsf@sdf.lonestar.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/machine/ssh.scm (machine-ssh-configuration-build-locally?): New variable. (managed-host-remote-eval): Pass 'build-locally?' to 'remote-eval'. --- gnu/machine/ssh.scm | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm index ae312597dd..1f16d9a5ea 100644 --- a/gnu/machine/ssh.scm +++ b/gnu/machine/ssh.scm @@ -47,6 +47,7 @@ machine-ssh-configuration machine-ssh-configuration-host-name + machine-ssh-configuration-build-locally? machine-ssh-configuration-port machine-ssh-configuration-user machine-ssh-configuration-session)) @@ -69,15 +70,17 @@ make-machine-ssh-configuration machine-ssh-configuration? this-machine-ssh-configuration - (host-name machine-ssh-configuration-host-name) ; string - (port machine-ssh-configuration-port ; integer - (default 22)) - (user machine-ssh-configuration-user ; string - (default "root")) - (identity machine-ssh-configuration-identity ; path to a private key - (default #f)) - (session machine-ssh-configuration-session ; session - (default #f))) + (host-name machine-ssh-configuration-host-name) ; string + (build-locally? machine-ssh-configuration-build-locally? + (default #t)) + (port machine-ssh-configuration-port ; integer + (default 22)) + (user machine-ssh-configuration-user ; string + (default "root")) + (identity machine-ssh-configuration-identity ; path to a private key + (default #f)) + (session machine-ssh-configuration-session ; session + (default #f))) (define (machine-ssh-session machine) "Return the SSH session that was given in MACHINE's configuration, or create @@ -103,7 +106,10 @@ one from the configuration's parameters if one was not provided." "Internal implementation of 'machine-remote-eval' for MACHINE instances with an environment type of 'managed-host." (maybe-raise-unsupported-configuration-error machine) - (remote-eval exp (machine-ssh-session machine))) + (remote-eval exp (machine-ssh-session machine) + #:build-locally? + (machine-ssh-configuration-build-locally? + (machine-configuration machine)))) ;;;