substitute-binary: Pipeline HTTP requests instead of using threads. * guix/scripts/substitute-binary.scm (fetch-narinfo, %lookup-threads, n-par-map*): Remove. (narinfo-cache-file, cached-narinfo, cache-narinfo!, narinfo-request, http-multiple-get, read-to-eof, fetch-narinfos, lookup-narinfos, narinfo-from-file): New procedures. (lookup-narinfo): Rewrite in terms of 'lookup-narinfos'. (guix-substitute-binary): Use 'lookup-narinfos' instead of 'lookup-narinfo'.
substitute-binary: Allow callers to specify the size of a narinfo. * guix/scripts/substitute-binary.scm (read-narinfo): Add #:size parameter and honor it.
substitute-binary: Fix recently-introduced regression. * guix/scripts/substitute-binary.scm (%cache-url): Fix regression introduced in 41c45e7.
store: Add preliminary support for client-supplied substitute URLs. * guix/store.scm (set-build-options): Rename #:binary-caches to #:substitute-urls. Actually pass it in 'pairs' under the "substitute-urls" key. * guix/scripts/substitute-binary.scm (%cache-url): Add comment for "untrusted-substitute-urls".
substitute-binary: Let the user know when the cache is being updated. * guix/scripts/substitute-binary.scm (open-cache*): New macro. (guix-substitute-binary): Use it instead of (delay (open-cache ...)).
Merge branch 'master' into core-updates
substitute-binary: Micro-optimize 'narinfo-sha256'. * guix/scripts/substitute-binary.scm (narinfo-signature->canonical-sexp): Change "~a" to "~s" in error message. (%signature-line-rx): Remove. (narinfo-sha256): Use 'string-contains' instead of 'regexp-exec', and 'string-take' instead of 'match:substring'.
Merge branch 'master' into 'core-updates'.
substitute-binary: Add missing newline in download progress report. Fixes <http://bugs.gnu.org/19313>. Reported by rekado <rekado@elephly.net>. * guix/scripts/substitute-binary.scm (guix-substitute-binary) <--substitute>: Add 'newline' call.
substitute-binary: Change "unresponsive" to "slow". * guix/scripts/substitute-binary.scm (fetch): Change "unresponsive" to "somewhat slow". I'm being told that the former is often misunderstood as "broken".
substitute-binary: Be slightly less verbose when downloading. * guix/scripts/substitute-binary.scm (guix-substitute-binary)<"--substitute">: Be slightly less verbose.
Break module cycle involving (guix store) and (guix ui). Before, there was a cycle along the lines of: (guix store) -> (guix nar) -> (guix ui) -> (guix store) This caused problems, as discussed at: http://lists.gnu.org/archive/html/guix-devel/2014-10/msg00109.html This patch removes cycles in the (guix ...) modules. * guix/nar.scm (&nar-error, &nar-read-error, dump, write-contents, read-contents, %archive-version-1, write-file, restore-file): Move to... * guix/serialization.scm: ... here. * guix/store.scm: Remove dependency on (guix nar). * guix/scripts/hash.scm, guix/scripts/offload.scm, guix/scripts/substitute-binary.scm, tests/nar.scm, tests/store.scm, tests/substitute-binary.scm: Adjust accordingly.
substitute-binary: Ignore $GUIX_BINARY_SUBSTITUTE_URL. * guix/scripts/substitute-binary.scm (%cache-url): Ignore the 'GUIX_BINARY_SUBSTITUTE_URL' environment variable. * test-env.in: Invoke 'guix-daemon' with '--substitute-urls'. * tests/substitute-binary.scm: Set '%cache-url' to the value of 'GUIX_BINARY_SUBSTITUTE_URL'.
daemon: Add '--substitute-urls' option. * nix/nix-daemon/guix-daemon.cc (GUIX_OPT_SUBSTITUTE_URLS): New macro. (GUIX_OPT_NO_BUILD_HOOK, GUIX_OPT_GC_KEEP_OUTPUTS, GUIX_OPT_GC_KEEP_DERIVATIONS): Renumber. (options): Add '--substitute-urls'. (parse_opt): Honor it. (main): Add 'settings.set' call for the default "substitute-urls" value. * guix/scripts/substitute-binary.scm (daemon-options, find-daemon-option): New procedures. (%cache-url): Define based on the "substitute-urls" daemon option. * doc/guix.texi (Invoking guix-daemon): Document '--substitute-urls'. (Substitutes): Mention it.
Merge branch 'core-updates'
substitute-binary: Warn about uninitialized ACL. * guix/scripts/substitute-binary.scm (guix-substitute-binary): Call 'check-acl-initialized'. (check-acl-initialized): Don't rely on 'equal?' to compare keys. Instead, convert keys to strings.
substitute-binary: Avoid the term "narinfo" in user messages. * guix/scripts/substitute-binary.scm (assert-valid-narinfo): Change message to avoid the term "narinfo".
Merge branch 'master' into core-updates
pk-crypto: Add pretty-printer to 'gcry-error' exceptions. * guix/pk-crypto.scm (string->canonical-sexp, sign, generate-key): Pass the procedure name as the first argument to 'throw'. (gcrypt-error-printer): New procedure. <top level>: Add call to 'set-exception-printer!'. * guix/nar.scm (restore-one-item): Add 'proc' parameter to 'catch' handler for 'gcry-error. * guix/scripts/archive.scm (%options, generate-key-pair, authorize-key): Likewise. * guix/scripts/substitute-binary.scm (narinfo-signature->canonical-sexp): Likewise.
substitute-binary: Avoid consing 'regexp-exec' arguments. * guix/scripts/substitute-binary.scm (regexp-exec): Change formals to (rx str . rest).