~ruther/guix-local

ref: d3a652037ef879f9279bc056c43d15ba7afcbb25 guix-local/guix/scripts/substitute-binary.scm -rwxr-xr-x 35.3 KiB
d3a65203 — Ludovic Courtès 11 years ago
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'.
0561e9ae — Ludovic Courtès 11 years ago
substitute-binary: Allow callers to specify the size of a narinfo.

* guix/scripts/substitute-binary.scm (read-narinfo): Add #:size
  parameter and honor it.
f2226640 — Ludovic Courtès 11 years ago
substitute-binary: Fix recently-introduced regression.

* guix/scripts/substitute-binary.scm (%cache-url): Fix regression
  introduced in 41c45e7.
41c45e78 — Ludovic Courtès 11 years ago
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".
3bcfe23c — Ludovic Courtès 11 years ago
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 ...)).
77448857 — Mark H Weaver 11 years ago
Merge branch 'master' into core-updates
8234fcf2 — Ludovic Courtès 11 years ago
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'.
c4a1b6c2 — Ludovic Courtès 11 years ago
Merge branch 'master' into 'core-updates'.
5f742c84 — Ludovic Courtès 11 years ago
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.
d616c055 — Ludovic Courtès 11 years ago
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".
d09e8c7b — Ludovic Courtès 11 years ago
substitute-binary: Be slightly less verbose when downloading.

* guix/scripts/substitute-binary.scm (guix-substitute-binary)<"--substitute">:
  Be slightly less verbose.
0363991a — Ludovic Courtès 11 years ago
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.
4938b0ee — Ludovic Courtès 11 years ago
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'.
9176607e — Ludovic Courtès 11 years ago
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.
f513527a — Ludovic Courtès 11 years ago
Merge branch 'core-updates'
00fe9333 — Ludovic Courtès 11 years ago
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.
2eea253f — Ludovic Courtès 11 years ago
substitute-binary: Avoid the term "narinfo" in user messages.

* guix/scripts/substitute-binary.scm (assert-valid-narinfo): Change
  message to avoid the term "narinfo".
af018f5e — Ludovic Courtès 11 years ago
Merge branch 'master' into core-updates
6ef3644e — Ludovic Courtès 12 years ago
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.
57832f2c — Ludovic Courtès 12 years ago
substitute-binary: Avoid consing 'regexp-exec' arguments.

* guix/scripts/substitute-binary.scm (regexp-exec): Change formals
  to (rx str . rest).
Next