mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
offload: Allow build machines to specify a port number.
* guix/scripts/offload.scm (<build-machine>): Add 'port' field. (remote-pipe, send-files): Use lsh's '-p' option when invoking it.
This commit is contained in:
parent
257b93412a
commit
cecd72d55a
2 changed files with 9 additions and 2 deletions
|
@ -345,6 +345,9 @@ A number of optional fields may be specified:
|
||||||
|
|
||||||
@table @code
|
@table @code
|
||||||
|
|
||||||
|
@item port
|
||||||
|
Port number of the machine's SSH server (default: 22).
|
||||||
|
|
||||||
@item private-key
|
@item private-key
|
||||||
The SSH private key file to use when connecting to the machine.
|
The SSH private key file to use when connecting to the machine.
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,8 @@ (define-record-type* <build-machine>
|
||||||
build-machine make-build-machine
|
build-machine make-build-machine
|
||||||
build-machine?
|
build-machine?
|
||||||
(name build-machine-name) ; string
|
(name build-machine-name) ; string
|
||||||
|
(port build-machine-port ; number
|
||||||
|
(default 22))
|
||||||
(system build-machine-system) ; string
|
(system build-machine-system) ; string
|
||||||
(user build-machine-user) ; string
|
(user build-machine-user) ; string
|
||||||
(private-key build-machine-private-key ; file name
|
(private-key build-machine-private-key ; file name
|
||||||
|
@ -161,8 +163,9 @@ (define (remote-pipe machine mode command)
|
||||||
"Run COMMAND on MACHINE, assuming an lsh gateway has been set up."
|
"Run COMMAND on MACHINE, assuming an lsh gateway has been set up."
|
||||||
(catch 'system-error
|
(catch 'system-error
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(apply open-pipe* mode %lshg-command
|
(apply open-pipe* mode %lshg-command "-z"
|
||||||
"-l" (build-machine-user machine) "-z"
|
"-l" (build-machine-user machine)
|
||||||
|
"-p" (build-machine-port machine)
|
||||||
|
|
||||||
;; 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)
|
||||||
|
@ -328,6 +331,7 @@ (define (missing-files files)
|
||||||
(missing (filtered-port
|
(missing (filtered-port
|
||||||
(list (which %lshg-command)
|
(list (which %lshg-command)
|
||||||
"-l" (build-machine-user machine)
|
"-l" (build-machine-user machine)
|
||||||
|
"-p" (build-machine-port machine)
|
||||||
"-i" (build-machine-private-key machine)
|
"-i" (build-machine-private-key machine)
|
||||||
(build-machine-name machine)
|
(build-machine-name machine)
|
||||||
"guix" "archive" "--missing")
|
"guix" "archive" "--missing")
|
||||||
|
|
Loading…
Reference in a new issue