guix-devel/guix/scripts
Ludovic Courtès a9468b422b
substitute: Download from unauthorized sources that provide the right content.
This allows substitutes to be downloaded from unauthorized servers, as
long as they advertise the same hash and references as one of the
authorized servers.

* guix/scripts/substitute.scm (assert-valid-narinfo): Remove.
(valid-narinfo?): Add #:verbose?.  Handle each case of
'signature-case'.
(equivalent-narinfo?): New procedure.
(lookup-narinfos/diverse): Add 'authorized?' parameter and honor it.
[select-hit]: New procedure.
(lookup-narinfo): Add 'authorized?' parameter and pass it.
(process-query): Adjust callers accordingly.
(process-substitution): Remove call to 'assert-valid-narinfo'.  Check
whether 'lookup-narinfo' returns true and call 'leave' if not.
* tests/substitute.scm (%main-substitute-directory)
(%alternate-substitute-directory): New variables.
(call-with-narinfo): Make 'narinfo-directory' a parameter.  Call
'mkdir-p' to create it.  Change unwind handler to check whether
CACHE-DIRECTORY exists before deleting it.
(with-narinfo*): New macro.
("substitute, no signature")
("substitute, invalid hash")
("substitute, unauthorized key"): Change expected error message to "no
valid substitute".
("substitute, unauthorized narinfo comes first")
("substitute, unsigned narinfo comes first")
("substitute, first narinfo is unsigned and has wrong hash")
("substitute, first narinfo is unsigned and has wrong refs")
("substitute, unsigned narinfo comes first")
("substitute, two invalid narinfos"): New tests.
* doc/guix.texi (Substitutes): Explain the new behavior.
2017-09-11 11:10:21 +02:00
..
container
import
archive.scm scripts: Remove 'max-silent-time' from the default options. 2017-09-01 10:29:39 +02:00
authenticate.scm
build.scm
challenge.scm
container.scm
copy.scm scripts: Remove 'max-silent-time' from the default options. 2017-09-01 10:29:39 +02:00
download.scm guix download: Support retrieving local file without the URI scheme. 2017-08-20 20:55:45 +08:00
edit.scm
environment.scm scripts: Remove 'max-silent-time' from the default options. 2017-09-01 10:29:39 +02:00
gc.scm
graph.scm
hash.scm
import.scm
lint.scm Handle the same HTTP redirects everywhere. 2017-09-05 20:57:13 +02:00
offload.scm
pack.scm scripts: Remove 'max-silent-time' from the default options. 2017-09-01 10:29:39 +02:00
package.scm scripts: Remove 'max-silent-time' from the default options. 2017-09-01 10:29:39 +02:00
perform-download.scm
publish.scm
pull.scm scripts: Remove 'max-silent-time' from the default options. 2017-09-01 10:29:39 +02:00
refresh.scm
size.scm size: Default to '--sort=self'. 2017-09-07 13:57:42 +02:00
substitute.scm substitute: Download from unauthorized sources that provide the right content. 2017-09-11 11:10:21 +02:00
system.scm scripts: Remove 'max-silent-time' from the default options. 2017-09-01 10:29:39 +02:00
weather.scm