From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:49139) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvRVd-0003Sv-Db for guix-patches@gnu.org; Wed, 07 Aug 2019 15:22:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hvRVc-0007X2-Aq for guix-patches@gnu.org; Wed, 07 Aug 2019 15:22:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58831) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hvRVc-0007Wk-7k for guix-patches@gnu.org; Wed, 07 Aug 2019 15:22:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hvRVc-00014r-1w for guix-patches@gnu.org; Wed, 07 Aug 2019 15:22:04 -0400 Subject: [bug#36955] [PATCH] machine: Add 'build-locally?' field for managed hosts. Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:49045) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvRV5-00037u-Ph for guix-patches@gnu.org; Wed, 07 Aug 2019 15:21:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hvRV4-0005uu-Qs for guix-patches@gnu.org; Wed, 07 Aug 2019 15:21:31 -0400 Received: from dustycloud.org ([2600:3c02::f03c:91ff:feae:cb51]:52024) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hvRV4-0005ts-MD for guix-patches@gnu.org; Wed, 07 Aug 2019 15:21:30 -0400 References: <87imr9402l.fsf@sdf.lonestar.org> From: Christopher Lemmer Webber In-reply-to: <87imr9402l.fsf@sdf.lonestar.org> Date: Wed, 07 Aug 2019 15:20:59 -0400 Message-ID: <8736icpysk.fsf@dustycloud.org> MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 36955@debbugs.gnu.org Looks good, though I assume this is a dependency for another patch that's coming? Jakob L. Kreuze writes: > * 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)))) > > > ;;;