guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Ludovic Courtès
Subject: 01/02: offload: Add 'ssh-options' field to <build-machine>.
Date: Thu, 09 Jul 2015 10:00:50 +0000

civodul pushed a commit to branch master
in repository guix.

commit b19649a132e83d0b8a29a685e9b8c1b061ef0dfa
Author: Ludovic Courtès <address@hidden>
Date:   Thu Jul 9 10:06:19 2015 +0200

    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.
---
 guix/scripts/offload.scm |   25 +++++++++++++++----------
 1 files changed, 15 insertions(+), 10 deletions(-)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]