offload: Add 'ssh-options' field to <build-machine>.

* guix/scripts/offload.scm (<build-machine>)[ssh-options]: New field.
  (remote-pipe): Use it.
  (send-files): Likewise.
master
Ludovic Courtès 2015-07-09 10:06:19 +02:00
parent 92f1b4a54c
commit b19649a132
1 changed files with 15 additions and 10 deletions

View File

@ -69,6 +69,8 @@
(speed build-machine-speed ; inexact real (speed build-machine-speed ; inexact real
(default 1.0)) (default 1.0))
(features build-machine-features ; list of strings (features build-machine-features ; list of strings
(default '()))
(ssh-options build-machine-ssh-options ; list of strings
(default '()))) (default '())))
(define-record-type* <build-requirements> (define-record-type* <build-requirements>
@ -200,10 +202,11 @@ not be started."
;; XXX: Remove '-i' when %LSHG-COMMAND really is lshg. ;; XXX: Remove '-i' when %LSHG-COMMAND really is lshg.
"-i" (build-machine-private-key machine) "-i" (build-machine-private-key machine)
(build-machine-name machine) (append (build-machine-ssh-options machine)
(if quote? (list (build-machine-name machine))
(map shell-quote command) (if quote?
command)))) (map shell-quote command)
command)))))
;;; ;;;
@ -448,12 +451,14 @@ success, #f otherwise."
(format #f "~{~a~%~}" files)) (format #f "~{~a~%~}" files))
((missing pids) ((missing pids)
(filtered-port (filtered-port
(list (which %lshg-command) (append (list (which %lshg-command)
"-l" (build-machine-user machine) "-l" (build-machine-user machine)
"-p" (number->string (build-machine-port machine)) "-p" (number->string
"-i" (build-machine-private-key machine) (build-machine-port machine))
(build-machine-name machine) "-i" (build-machine-private-key machine))
"guix" "archive" "--missing") (build-machine-ssh-options machine)
(cons (build-machine-name machine)
'("guix" "archive" "--missing")))
(open-input-string files))) (open-input-string files)))
((result) ((result)
(get-string-all missing))) (get-string-all missing)))