guix-devel/guix
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
..
build Handle the same HTTP redirects everywhere. 2017-09-05 20:57:13 +02:00
build-system Merge branch 'master' into core-updates 2017-08-06 00:23:20 -04:00
import import: cpan: Updater returns a list of URLs. 2017-07-24 17:35:26 +02:00
scripts substitute: Download from unauthorized sources that provide the right content. 2017-09-11 11:10:21 +02:00
store
tests
base16.scm
base32.scm base32: Export the base32 charsets. 2017-07-21 17:03:24 +02:00
base64.scm
build-system.scm
cache.scm
combinators.scm
config.scm.in
cpio.scm
cve.scm
cvs-download.scm
derivations.scm
discovery.scm discovery: Recurse into directories pointed to by a symlink. 2017-07-03 23:51:23 +02:00
docker.scm
download.scm download: Remove a SourceForge mirror that never returns 404. 2017-08-25 02:08:35 -04:00
elf.scm
ftp-client.scm
gcrypt.scm
gexp.scm gexp: Slightly improve error reporting for 'local-file'. 2017-07-20 18:08:00 +02:00
git-download.scm git-download: Remove call to 'canonicalize-path'. 2017-07-30 17:22:13 +02:00
git.scm guix: git: Stop using libgit2-shutdown. 2017-07-01 16:32:42 +02:00
gnu-maintenance.scm gnu-maintenance: GNU updater no longer relies on FTP access. 2017-09-03 23:36:17 +02:00
gnupg.scm
grafts.scm
graph.scm Revert "graph: Provide access to the package record in the emit functions." 2017-08-24 23:55:51 +02:00
hash.scm
hg-download.scm
http-client.scm Handle the same HTTP redirects everywhere. 2017-09-05 20:57:13 +02:00
licenses.scm licenses: Add MirOS license. 2017-07-20 19:55:21 +05:30
memoization.scm memoization: (mlambda () ...) allows for inner 'define'. 2017-09-03 23:36:17 +02:00
modules.scm
monad-repl.scm
monads.scm
nar.scm
packages.scm packages: Use Guile 2.0 for grafting. 2017-08-24 00:41:44 +02:00
pk-crypto.scm
pki.scm
profiles.scm profiles: Only check file contents if the file exists. 2017-08-09 14:46:48 +02:00
records.scm
scripts.scm
search-paths.scm
serialization.scm
sets.scm
ssh.scm
store.scm guix: Fix Guile current-processor-count deprecation warnings. 2017-09-05 19:40:48 +02:00
svn-download.scm
tests.scm
ui.scm utils: Factorize XDG directory handling. 2017-07-28 18:09:43 +02:00
upstream.scm
utils.scm utils: Factorize XDG directory handling. 2017-07-28 18:09:43 +02:00
workers.scm
zlib.scm