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 store: Support 'ssh://' URIs in 'GUIX_DAEMON_SOCKET'. 2017-04-21 19:17:36 +02:00
tests
base16.scm utils: Move base16 procedures to (guix base16). 2017-03-16 22:50:14 +01:00
base32.scm base32: Export the base32 charsets. 2017-07-21 17:03:24 +02:00
base64.scm base64: Turn into a regular Guile module. 2017-05-25 14:25:17 +02:00
build-system.scm
cache.scm cache: Work around 'time-monotonic' bug in Guile 2.2.2. 2017-04-22 14:42:15 +02:00
combinators.scm
config.scm.in
cpio.scm
cve.scm
cvs-download.scm
derivations.scm derivations: Introduce 'read-derivation-from-file'. 2017-06-12 17:53:51 +02:00
discovery.scm discovery: Recurse into directories pointed to by a symlink. 2017-07-03 23:51:23 +02:00
docker.scm pack: Add '--target'. 2017-03-18 00:38:41 +01:00
download.scm download: Remove a SourceForge mirror that never returns 404. 2017-08-25 02:08:35 -04:00
elf.scm
ftp-client.scm ftp-client: Allow custom username and password for FTP servers. 2017-03-21 12:14:05 +01:00
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 ui: Rename '_' to 'G_'. 2017-05-03 16:16:17 +02:00
grafts.scm derivations: Introduce 'read-derivation-from-file'. 2017-06-12 17:53:51 +02:00
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 modules: Raise an error when a dependency could not be found. 2017-05-25 14:25:17 +02:00
monad-repl.scm
monads.scm monads: Add a template and specialization mechanism for monadic procedures. 2017-05-02 23:41:13 +02:00
nar.scm ui: Rename '_' to 'G_'. 2017-05-03 16:16:17 +02:00
packages.scm packages: Use Guile 2.0 for grafting. 2017-08-24 00:41:44 +02:00
pk-crypto.scm publish: The public and private keys are now SRFI-39 parameters. 2017-03-22 14:05:59 +01:00
pki.scm
profiles.scm profiles: Only check file contents if the file exists. 2017-08-09 14:46:48 +02:00
records.scm records: Slight simplification. 2017-04-17 23:31:28 +02:00
scripts.scm scripts: Do not create the config directory. 2017-05-13 00:03:46 +02:00
search-paths.scm
serialization.scm serialization: Remove Guile < 2.0.9 workaround. 2017-04-17 23:31:28 +02:00
sets.scm
ssh.scm ssh: Improve error reporting when 'send-files' fails. 2017-06-04 23:00:32 +02:00
store.scm guix: Fix Guile current-processor-count deprecation warnings. 2017-09-05 19:40:48 +02:00
svn-download.scm guix: Add download-svn-to-store. 2017-06-15 17:03:14 +02:00
tests.scm store: 'GUIX_DAEMON_SOCKET' can now be a URI. 2017-04-21 17:23:37 +02:00
ui.scm utils: Factorize XDG directory handling. 2017-07-28 18:09:43 +02:00
upstream.scm ui: Rename '_' to 'G_'. 2017-05-03 16:16:17 +02:00
utils.scm utils: Factorize XDG directory handling. 2017-07-28 18:09:43 +02:00
workers.scm scripts: Set thread names. 2017-05-28 23:13:39 +02:00
zlib.scm zlib: Don't rely on EBADF being ignored by 'fport_close'. 2017-03-15 15:19:53 +01:00