guix/nix
Ludovic Courtès 64cf660f87
daemon: Spawn 'guix authenticate' once for all.
Previously, we'd spawn 'guix authenticate' once for each item that has
to be signed (when exporting) or authenticated (when importing).  Now,
we spawn it once for all and then follow a request/reply protocol.  This
reduces the wall-clock time of:

  guix archive --export -r $(guix build coreutils -d)

from 30s to 2s.

* guix/scripts/authenticate.scm (sign-with-key): Return the signature
instead of displaying it.  Raise a &formatted-message instead of calling
'leave'.
(validate-signature): Likewise.
(read-command): New procedure.
(define-enumerate-type, reply-code): New macros.
(guix-authenticate)[send-reply]: New procedure.
Change to read commands from current-input-port.
* nix/libstore/local-store.cc (runAuthenticationProgram): Remove.
(authenticationAgent, readInteger, readAuthenticateReply): New
functions.
(signHash, verifySignature): Rewrite in terms of the agent.
* tests/store.scm ("import not signed"): Remove 'pk' call.
("import signed by unauthorized key"): Check the error message of C.
* tests/guix-authenticate.sh: Rewrite using the new protocol.

fixlet
2020-09-14 15:42:55 +02:00
..
boost nix: Tweak .gitignore files. 2020-06-24 19:55:22 +01:00
libstore daemon: Spawn 'guix authenticate' once for all. 2020-09-14 15:42:55 +02:00
libutil daemon: Move 'Agent' to libutil. 2020-09-14 15:42:55 +02:00
nix-daemon guix build, daemon: Rename "--no-build-hook" to "--no-offload". 2019-11-26 00:16:36 +01:00
.gitignore build: Include a copy of Nix's libstore and daemon; build it. 2012-12-03 23:05:08 +01:00
AUTHORS Merge branch 'nix' into 'master'. 2014-12-19 22:47:37 +01:00
COPYING Merge branch 'nix' into 'master'. 2014-12-19 22:47:37 +01:00
local.mk daemon: Remove OpenSSL hash compatibility wrappers. 2020-06-27 23:42:20 +02:00