guix/tests
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
..
base16.scm
base32.scm
base64.scm substitute-binary: Support the Signature field of a narinfo file. 2014-03-30 12:02:10 +02:00
bournish.scm
build-utils.scm
builders.scm build: Add a Guile custom test driver using SRFI-64. 2016-04-03 14:19:09 +02:00
cache.scm cache: Work around 'time-monotonic' bug in Guile 2.2.2. 2017-04-22 14:42:15 +02:00
challenge.scm
combinators.scm utils: Move combinators to (guix combinators). 2016-05-04 23:35:55 +02:00
containers.scm
cpan.scm
cpio.scm build: Add a Guile custom test driver using SRFI-64. 2016-04-03 14:19:09 +02:00
cran.scm
crate.scm
cve-sample.xml Add (guix cve). 2015-11-26 22:35:01 +01:00
cve.scm
derivations.scm
discovery.scm
elpa.scm build: Add a Guile custom test driver using SRFI-64. 2016-04-03 14:19:09 +02:00
file-systems.scm
gem.scm
gexp.scm gexp: 'ungexp-splicing' properly accounts for nested native inputs. 2017-07-17 23:41:36 +02:00
gnu-maintenance.scm
grafts.scm graft: Correctly replace references near the end of the scan buffer. 2017-08-24 23:55:51 +02:00
graph.scm
gremlin.scm build: Add a Guile custom test driver using SRFI-64. 2016-04-03 14:19:09 +02:00
guix-archive.sh
guix-authenticate.sh
guix-build.sh packages: Remove support for PACKAGE-VERSION deprecated syntax. 2017-05-01 17:27:54 +02:00
guix-daemon.sh
guix-download.sh guix download: Support retrieving local file without the URI scheme. 2017-08-20 20:55:45 +08:00
guix-environment-container.sh tests: Fix 'guix environment --container' test in the presence of tmpfs. 2016-08-29 00:09:44 +02:00
guix-environment.sh
guix-gc.sh
guix-graph.sh
guix-hash.sh
guix-lint.sh
guix-package-net.sh tests: Remove 't-profile-alt-*-link' files. 2017-06-02 18:47:06 +02:00
guix-package.sh
guix-register.sh
guix-system.sh tests: Expect less accurate location info in 2.2.0. 2017-03-15 15:19:54 +01:00
hackage.scm
hash.scm
import-utils.scm
lint.scm
modules.scm
monads.scm build: Add a Guile custom test driver using SRFI-64. 2016-04-03 14:19:09 +02:00
nar.scm
pack.scm
packages.scm packages: Add 'package-mapping' and base 'package-input-rewriting' on it. 2017-04-05 22:45:41 +02:00
pk-crypto.scm utils: Move base16 procedures to (guix base16). 2017-03-16 22:50:14 +01:00
pki.scm
profiles.scm
publish.scm
pypi.scm
records.scm records: Improve reporting of invalid field specifiers. 2016-07-14 19:07:07 +02:00
scripts-build.scm
scripts.scm
search-paths.scm tests: Adjust search-paths test following the introduction of aarch64. 2017-04-04 00:10:00 +02:00
services.scm
sets.scm
signing-key.pub
signing-key.sec daemon: Implement signed archive import/export. 2013-12-20 17:17:42 +01:00
size.scm
snix.scm
store.scm
substitute.scm substitute: Download from unauthorized sources that provide the right content. 2017-09-11 11:10:21 +02:00
syscalls.scm syscalls: Add network-interface-running? 2017-07-12 16:15:30 +02:00
system.scm gnu: bootloader: Deprecate "device" field in favor of "target". 2017-08-23 22:23:19 +02:00
test.drv
texlive.scm
ui.scm
union.scm
upstream.scm build: Add a Guile custom test driver using SRFI-64. 2016-04-03 14:19:09 +02:00
utils.scm utils: Move base16 procedures to (guix base16). 2017-03-16 22:50:14 +01:00
workers.scm Add (guix workers). 2017-04-18 23:17:17 +02:00
zlib.scm