aboutsummaryrefslogtreecommitdiff
path: root/gnu/machine
diff options
context:
space:
mode:
authorJakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>2019-08-07 08:44:18 -0400
committerChristopher Lemmer Webber <cwebber@dustycloud.org>2019-08-07 18:29:07 -0400
commitd84e9b75b2aba98583531f2876d9298871389585 (patch)
tree1f5ab1d6a3c53810b9659968db715a56b7cca994 /gnu/machine
parent9bd1333e587c92fb3f0c12e080cb89e41713df01 (diff)
downloadpatches-d84e9b75b2aba98583531f2876d9298871389585.tar
patches-d84e9b75b2aba98583531f2876d9298871389585.tar.gz
machine: Add 'build-locally?' field for managed hosts.
* gnu/machine/ssh.scm (machine-ssh-configuration-build-locally?): New variable. (managed-host-remote-eval): Pass 'build-locally?' to 'remote-eval'.
Diffstat (limited to 'gnu/machine')
-rw-r--r--gnu/machine/ssh.scm26
1 files changed, 16 insertions, 10 deletions
diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm
index 274d56db26..ba3e33c922 100644
--- a/gnu/machine/ssh.scm
+++ b/gnu/machine/ssh.scm
@@ -44,6 +44,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))
@@ -66,15 +67,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
@@ -100,7 +103,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))))
;;;