From: ludo@gnu.org (Ludovic Courtès)
To: Nikita Karetnikov <nikita@karetnikov.org>
Cc: guix-devel@gnu.org
Subject: Re: Signed archives
Date: Mon, 27 Jan 2014 16:56:59 +0100 [thread overview]
Message-ID: <87r47tfmes.fsf@gnu.org> (raw)
In-Reply-To: <8761p5jv1g.fsf@karetnikov.org> (Nikita Karetnikov's message of "Mon, 27 Jan 2014 19:36:59 +0400")
Nikita Karetnikov <nikita@karetnikov.org> skribis:
> Sorry, I’m failing to understand how the protocol works. Is the spec
> available somewhere?
No.
> Could you describe the entire process in a step-by-step way? What does
> happen when the client requests a substitute? You mentioned that the
> client attempts to fetch the corresponding .narinfo file. What does
> happen after that?
The substituter can be invoked either in query mode, or in substitution
mode.
In query mode, it is passed a list of store file names, and it must tell
whether substitutes exist for them. This is what happens, for instance,
when running ‘guix build foo --dry-run’: it allows ‘guix build’ to know
what would be downloaded from hydra.gnu.org, and what would be built.
In substitute mode, it is passed a list of store file names to actually
substitute.
‘guix substitute-binary’ implements that protocol, with the aim of
reflecting binaries served by Hydra. Thus, its query mode consists in
verifying whether the .narinfo for a given item exists at
http://hydra.gnu.org. Its substitute mode consists in downloading the
archive specified in the corresponding .narinfo.
See the thread at
<http://lists.gnu.org/archive/html/bug-guix/2013-04/msg00013.html>.
> Why does the client need to cache the answer? Does it check the cache
> first?
If it didn’t cache the answer, then it would have to do one HTTP GET for
each item you want to build. For instance:
guix build coreutils -n
would lead something like 20 HTTP requests to hydra.gnu.org, which could
take a lot of time.
So, instead, it does two things:
• it caches Hydra’s .narinfo or lack thereof, for a limited time (see
<http://lists.gnu.org/archive/html/bug-guix/2013-04/msg00082.html>);
• when there’s no info in cache, a HTTP requests are made in parallel
(see <https://lists.gnu.org/archive/html/guix-devel/2013-11/msg00032.html>.)
> ‘guix authenticate’ accepts a ‘hash-file’ argument. Does it come from
> the .narinfo file?
No, it comes from LocalStore::importPath, in local-store.cc.
> If so, should ‘substitute-binary.scm’ check the signature against the
> NarHash field?
Hmm I think so, but we’d have to double-check whether that’s what Nix
actually does.
HTH!
Ludo’.
next prev parent reply other threads:[~2014-01-27 16:02 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-26 14:13 ‘guix archive’ doesn’t work over ‘./pre-inst-env’ Nikita Karetnikov
2014-01-26 14:52 ` Ludovic Courtès
2014-01-26 16:09 ` Signed archives (was: ‘guix archive’ doesn’t work over ‘./pre-inst-env’) Nikita Karetnikov
2014-01-26 19:36 ` Signed archives Ludovic Courtès
2014-01-27 15:36 ` Nikita Karetnikov
2014-01-27 15:56 ` Ludovic Courtès [this message]
2014-02-03 10:45 ` Nikita Karetnikov
2014-02-04 13:12 ` Ludovic Courtès
2014-02-20 9:54 ` Nikita Karetnikov
2014-02-21 21:17 ` Ludovic Courtès
2014-02-27 20:48 ` Signed archives (preliminary patch) Nikita Karetnikov
2014-02-27 22:43 ` Ludovic Courtès
2014-02-28 9:21 ` Mark H Weaver
2014-02-28 10:37 ` Ludovic Courtès
2014-02-28 18:46 ` Nikita Karetnikov
2014-02-28 21:22 ` Nikita Karetnikov
2014-02-28 22:05 ` Ludovic Courtès
2014-03-03 22:54 ` Nikita Karetnikov
2014-03-04 21:59 ` Ludovic Courtès
2014-03-08 22:38 ` Nikita Karetnikov
2014-03-08 22:46 ` Nikita Karetnikov
2014-03-09 17:22 ` Ludovic Courtès
2014-03-09 22:35 ` Ludovic Courtès
2014-03-11 9:51 ` Nikita Karetnikov
2014-03-12 11:57 ` Nikita Karetnikov
2014-03-12 14:25 ` Ludovic Courtès
2014-03-12 23:37 ` [PATCH 2/2] guix substitute-binary: Support the Signature field of a narinfo file. (was: Signed archives (preliminary patch)) Nikita Karetnikov
2014-03-13 21:38 ` [PATCH 2/2] guix substitute-binary: Support the Signature field of a narinfo file Ludovic Courtès
2014-03-13 21:55 ` Nikita Karetnikov
2014-03-13 22:53 ` Ludovic Courtès
2014-03-15 12:24 ` Nikita Karetnikov
2014-03-31 21:54 ` Signed archives (preliminary patch) Ludovic Courtès
2014-02-21 22:10 ` Applying the GPG web-of-trust to Guix (was Re: Signed archives) Mark H Weaver
2014-02-21 23:10 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r47tfmes.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=nikita@karetnikov.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.