~ruther/guix-local

ref: d3db5efbf97dd0d880b18c8fc0d3c76d91fd6e4d guix-local/guix d---------
1cd1d8a7 — Ludovic Courtès 9 years ago
offload: Call 'machine-load' only once per machine.

This fixes a longstanding issue where 'choose-build-machine' would make
on average O(N log(N)) calls to 'machine-load', plus an extra call for
the selected machine, instead of N calls.

* guix/scripts/offload.scm (machine-load): Add comment.
(machine-power-factor, machine-less-loaded-or-faster?): Remove.
(choose-build-machine)[machines+slots]: Rename to...
[machines+slots+loads]: ... this.
[undecorate]: Adjust accordingly.
[machine-less-loaded-or-faster?]: New procedure.
Remove extra 'machine-load' call in body.
bc1ad4e3 — Ludovic Courtès 9 years ago
offload: Drop 'remote-pipe'.

* guix/scripts/offload.scm (remote-pipe): Remove.
(machine-load): Use 'open-remote-pipe*' instead of 'remote-pipe'.
cf283dd9 — Ludovic Courtès 9 years ago
offload: Rewrite to make direct RPCs to the remote daemon.

* guix/scripts/offload.scm (<build-machine>)[daemon-socket]: New field.
(connect-to-remote-daemon): New procedure.
(%gc-root-file, register-gc-root, remove-gc-roots, offload): Remove.
(transfer-and-offload): Rewrite using 'connect-to-remote-daemon' and
RPCs over SSH.
(store-import-channel, store-export-channel): New procedures.
(send-files, retrieve-files): Rewrite using these.
e8a5db80 — Ludovic Courtès 9 years ago
offload: Remove 'with-nar-error-handling' macro.

* guix/scripts/offload.scm (with-nar-error-handling): Remove.
(guix-offload): Use 'with-error-handling' instead.
6230d6f0 — Ludovic Courtès 9 years ago
store: 'open-connection' can taken an open port.

* guix/store.scm (open-unix-domain-socket): New procedure.
(open-connection): Add #:port parameter and honor it.
9e76eed3 — Ludovic Courtès 9 years ago
offload: Reuse SSH session during 'transfer-and-offload'.

* guix/scripts/offload.scm (remote-pipe): Replace 'machine' parameter
with 'session'.  Remove 'open-ssh-session' call.
(register-gc-root): Replace 'machine' with 'session'.  Use '
session-get' instead of 'build-machine-name'.
(remove-gc-roots, offload, send-files, retrieve-files): Likewise.
(transfer-and-offload): Add 'open-ssh-session' call.  Handle 'offload'
errors here.
(machine-load): Add call to 'open-ssh-session'.
21531add — Ludovic Courtès 12 years ago
offload: Use Guile-SSH instead of GNU lsh.

* guix/scripts/offload.scm (<build-machine>)[ssh-options]: Remove.
[host-key, host-key-type]: New fields.
(%lsh-command, %lshg-command, user-lsh-private-key): Remove.
(user-openssh-private-key, private-key-from-file*): New procedures.
(host-key->type+key, open-ssh-session): New procedures.
(remote-pipe): Remove 'mode' parameter.  Rewrite in terms of
'open-ssh-session' etc.  Update users.
(send-files)[missing-files]: Rewrite using the bidirectional channel
port.
Remove call to 'call-with-compressed-output-port'.
(retrieve-files): Remove call to 'call-with-decompressed-port'.
(machine-load): Remove exit status logic.
* doc/guix.texi (Requirements): Mention Guile-SSH.
(Daemon Offload Setup): Document 'host-key' and 'private-key'.  Show the
default value on each @item line.
* m4/guix.m4 (GUIX_CHECK_GUILE_SSH): New macro.
* config-daemon.ac: Use 'GUIX_CHECK_GUILE_SSH'.  Set
'HAVE_DAEMON_OFFLOAD_HOOK' as a function of that.
9e38e3cf — Ludovic Courtès 9 years ago
syscalls: Add 'add-network-route/gateway' and 'delete-network-route'.

* guix/build/syscalls.scm (SIOCADDRT, SIOCDELRT): New variables.
(%rtentry): New C struct.
(RTF_UP, RTF_GATEWAY, %sockaddr-any): New variables.
(add-network-route/gateway, delete-network-route): New procedures.
* tests/syscalls.scm ("add-network-route/gateway")
("delete-network-route"): New tests.
8eb790f3 — Ludovic Courtès 9 years ago
syscalls: Add 'c-struct-field-offset'.

* guix/build/syscalls.scm (define-c-struct-macro): New macro.
(define-c-struct): Use it.
(c-struct-field-offset): New macro.
fac46e3f — Ludovic Courtès 9 years ago
lint: Add 'mirror-url' checker.

* guix/scripts/lint.scm (origin-uris): New procedure.
(check-source): Use it.
(check-mirror-url): New procedure.
(%checkers): Add 'mirror-url' checker.
* tests/lint.scm ("mirror-url")
("mirror-url: one suggestion"): New tests.
* doc/guix.texi (Invoking guix lint): Document it.
e74f64b9 — Ludovic Courtès 9 years ago
store: Add 'references*'.

* guix/store.scm (references*): New procedure.
* guix/profiles.scm (manifest-lookup-package)[references*]: Remove.
* guix/scripts/system.scm (references*): Remove.
* tests/gexp.scm ("gexp->file", "gexp->file + file-append")
("gexp->derivation", "gexp->derivation, cross-compilation")
("gexp->derivation, ungexp + ungexp-native")
("scheme-file", "text-file*", "mixed-text-file"): Remove 'references*'
instead of (store-lift references).
713335fa — Ludovic Courtès 9 years ago
derivations: Add 'raw-derivation'.

* guix/derivations.scm (raw-derivation): New procedure.
* guix/download.scm (raw-derivation): Remove.
* guix/gexp.scm (raw-derivation): Remove.
4c80d4c4 — Ludovic Courtès 9 years ago
download: Do not offload 'builtin:download' derivations.

* guix/download.scm (built-in-download): Pass #:local-build? #t.
88bdbb2a — Roel Janssen 9 years ago
guix package: Display newline after generation diffs.

* guix/ui.scm (display-profile-content-diff): Display an extra newline.
e9ff8d9f — Ludovic Courtès 9 years ago
syscalls: 'configure-network-interface' has a #:netmask parameter.

* guix/build/syscalls.scm (configure-network-interface): Add #:netmask
keyword parameter and honor it.
67e5f3b7 — Ludovic Courtès 9 years ago
syscalls: Add bindings for SIOCGIFNETMASK and SIOCSIFNETMASK.

* guix/build/syscalls.scm (SIOCGIFNETMASK, SIOCSIFNETMASK): New
variables.
(set-network-interface-netmask, network-interface-netmask): New
procedures.
* tests/syscalls.scm ("network-interface-netmask lo")
("set-network-interface-netmask"): New tests.
9d9d0c9c — Ludovic Courtès 9 years ago
syscalls: Use 'define-c-struct' for 'struct ifconf'.

* guix/build/syscalls.scm (ifconf-struct): Remove.
(%ifconf-struct): New C struct.
(network-interface-names): Use 'make-bytevector' and 'write-ifconf!'
instead of 'make-c-struct', and 'read-ifconf' instead of
'parse-c-struct'.
f43714e6 — Ludovic Courtès 9 years ago
syscalls: C struct writer correctly handles pointer fields.

* guix/build/syscalls.scm (write-type): Add case for '*.
05ceb8dc — Ludovic Courtès 9 years ago
download: Use the built-in 'download' builder when available.

Fixes <http://bugs.gnu.org/22774>.
Reported by Christopher W Carpenter.

* guix/download.scm (built-in-builders*, raw-derivation)
(built-in-download): New procedures.
(in-band-download): New procedure, with code formerly in 'url-fetch'.
(url-fetch): Call 'built-in-builders*' and dispatch between
'built-in-download' and 'in-band-download'.
f9aefa2d — Ludovic Courtès 9 years ago
daemon: Add 'built-in-builders' RPC.

* nix/libstore/builtins.cc (builtinBuilderNames): New function.
* nix/libstore/builtins.hh (builtinBuilderNames): New declaration.
* nix/libstore/worker-protocol.hh (PROTOCOL_VERSION): Bump to 0x160.
(WorkerOp)[wopBuiltinBuilders]: New value.
* nix/nix-daemon/nix-daemon.cc (performOp): Handle it.
* guix/store.scm (operation-id)[built-in-builders]: New value.
* guix/store.scm (read-arg): Add 'string-list'.
(built-in-builders): New procedure.
* tests/derivations.scm ("built-in-builders"): New test.
Next