From e9c6c58418043f36862a798389f3a7f4253f74cc Mon Sep 17 00:00:00 2001 From: Nikita Karetnikov Date: Sat, 29 Mar 2014 00:06:41 +0100 Subject: substitute-binary: Support the Signature field of a narinfo file. * guix/scripts/substitute-binary.scm (): Add the 'signature' and 'contents' fields. (narinfo-signature->canonical-sexp): New function. (narinfo-maker): Add the 'signature' argument and use it. (assert-valid-signature): New function. (read-narinfo): Support the Signature field. (write-narinfo): Use 'narinfo-contents'. (%allow-unauthenticated-substitutes?): New variable. * guix/base64.scm, tests/base64.scm, tests/substitute-binary.scm: New files. * Makefile.am (SCM_TESTS): Add tests/base64.scm and tests/substitute-binary.scm. (MODULES): Add guix/base64.scm. * test-env.in: Set 'GUIX_ALLOW_UNAUTHENTICATED_SUBSTITUTES'. --- test-env.in | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test-env.in') diff --git a/test-env.in b/test-env.in index 3853ce91ef..a3b3536145 100644 --- a/test-env.in +++ b/test-env.in @@ -58,12 +58,17 @@ then rm -rf "$NIX_STATE_DIR/substituter-data" mkdir -p "$NIX_STATE_DIR/substituter-data" + # For a number of tests, we want to allow unsigned narinfos, for + # simplicity. + GUIX_ALLOW_UNAUTHENTICATED_SUBSTITUTES=yes + # Place for the substituter's cache. XDG_CACHE_HOME="$NIX_STATE_DIR/cache-$$" export NIX_IGNORE_SYMLINK_STORE NIX_STORE_DIR \ NIX_LOCALSTATE_DIR NIX_LOG_DIR NIX_STATE_DIR NIX_DB_DIR \ NIX_ROOT_FINDER NIX_SETUID_HELPER GUIX_BINARY_SUBSTITUTE_URL \ + GUIX_ALLOW_UNAUTHENTICATED_SUBSTITUTES \ NIX_CONF_DIR XDG_CACHE_HOME # Do that because store.scm calls `canonicalize-path' on it. -- cgit v1.2.3