Age | Commit message (Expand) | Author |
2014-07-25 | guix: package: Fix recutils output for non-package inputs....* guix/ui.scm (package->recutils)[dependencies]: Ignore non-package inputs.
* tests/guix-package.sh: New test.
| Eric Bavier |
2014-07-25 | build: Fix typo in 'guix package --show' test....* tests/guix-package.sh: Change "^Package:" to "^name:".
| Ludovic Courtès |
2014-07-25 | build: Better reject systems where the shebang would be too long....* tests/gexp.scm (shebang): Add "#!".
| Ludovic Courtès |
2014-07-24 | monads: Add 'interned-file'....* guix/monads.scm (interned-file): New procedure.
* tests/monads.scm ("interned-file"): New test.
* doc/guix.texi (The Store Monad): Document it.
| Ludovic Courtès |
2014-07-21 | guix package: add a "show" option....* doc/guix.texi: Update the documentation.
* guix/scripts/package.scm: Add a "show" option.
* tests/guix-package.sh: Add a test for the "show" option.
| Cyril Roelandt |
2014-07-20 | build: Fix typo that would lead to hitting the socket name length limit....* tests/guix-register.sh: Remove redundant $new_store in $NIX_STATE_DIR,
introduced in 689142cd ("guix-register: Add '--state-directory'
parameter.") Reported by Eric Bavier <ericbavier@gmail.com> and
Alen Skondro <askondro@gmail.com>.
| Ludovic Courtès |
2014-07-20 | guix: utils: Add fold-tree and fold-tree-leaves....* guix/utils.scm (fold-tree, fold-tree-leaves): New functions.
* tests/utils.scm: Add tests for them.
| Eric Bavier |
2014-07-18 | guix-register: Add '--state-directory' parameter....* nix/guix-register/guix-register.cc (GUIX_OPT_STATE_DIRECTORY): New
macro.
(parse_opt): Honor it.
* tests/guix-register.sh: Add test with '--state-directory'.
* guix/store.scm (register-path): Add #:state-directory parameter.
| Ludovic Courtès |
2014-07-17 | records: Report unknown field names in inheriting forms....* guix/records.scm (define-record-type*)[record-inheritance]: Check for
unexpected field names.
* tests/records.scm ("define-record-type* with let* behavior"): Return
#t, not *unspecified*.
("define-record-type* & inherit & extra initializers"): New test.
| Ludovic Courtès |
2014-07-17 | records: Add tests for error cases....* tests/records.scm (test-module): New procedure.
("define-record-type* & missing initializers",
"define-record-type* & extra initializers"): New tests.
| Ludovic Courtès |
2014-07-17 | gexp: Gracefully handle printing of gexps with spliced references....* guix/gexp.scm (write-gexp): Wrap 'write' call in
'false-if-exception'.
* tests/gexp.scm ("printer", "printer vs. ungexp-splicing"): New tests.
| Ludovic Courtès |
2014-07-12 | gexp: Resolve the default system at '>>=' time....Partly fixes <http://bugs.gnu.org/18002>.
Reported by David Thompson <dthompson2@worcester.edu>.
* guix/gexp.scm (gexp->derivation): Change #:system to default #f.
Use (%current-system) from within the 'mlet*'.
* tests/gexp.scm ("gexp->derivation, default system"): New test.
| Ludovic Courtès |
2014-07-12 | monads: Fix 'mapm' so that effects happen from left to right....* guix/monads.scm (mapm): Don't reverse LST, so that items are processed
from left to right. Bind the result of 'foldm' and reverse it.
* tests/monads.scm ("sequence"): Change 'frob' so it performs its side
effect within an 'mlet' body. Adjust call accordingly.
| Ludovic Courtès |
2014-07-06 | build: Get the canonical $HOME name when testing 'guix package'....* tests/guix-package.sh (HOME): Recompute using 'pwd -P'.
| Ludovic Courtès |
2014-07-05 | build: Support running the test suite from a directory with symlinks....Fixes <http://bugs.gnu.org/17935>.
Reported by Alex Kost <alezost@gmail.com>.
* test-env.in: Canonicalize $NIX_STORE_DIR, and remove
$NIX_IGNORE_SYMLINK_STORE setting.
* tests/guix-register.sh: Likewise, canonicalize $new_store_dir and
$new_store and leave $NIX_IGNORE_SYMLINK_STORE unchanged.
| Ludovic Courtès |
2014-07-05 | guix package: Do the right thing for '-p ~/.guix-profile'....Fixes <http://bugs.gnu.org/17939>.
Reported by Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com>.
* guix/scripts/package.scm (canonicalize-profile): New procedure.
(%options): Use it for --profile.
* tests/guix-package.sh: Add test.
| Ludovic Courtès |
2014-06-27 | guix {system,offload}: Improve reporting of syntax errors....* guix/scripts/system.scm (read-operating-system) <catch handler>: Add
case for 'syntax-error'. Correct message for default case.
* guix/scripts/offload.scm (build-machines) <catch handler>: Add case
for 'syntax-error'.
* tests/guix-system.sh: New file.
* Makefile.am (SH_TESTS): Add it.
| Ludovic Courtès |
2014-06-16 | tests: Use the C locale for 'guix package -s'....* tests/guix-package.sh: Set LC_MESSAGES=C before the 'guix package -s'
test.
| Ludovic Courtès |
2014-06-14 | guix build: Allow gexps to be passed to '-e'....* guix/ui.scm (%guix-user-module): New variable.
(read/eval): Pass it as the second argument to 'eval'.
* guix/scripts/build.scm (options/resolve-packages): Add case for
'gexp?'.
* tests/guix-build.sh: Add tests.
* doc/guix.texi (Invoking guix build): Document '-e gexp'.
guxi build: Allow gexps to be passed to '-e'.
* guix/ui.scm (%guix-user-module): New variable.
(read/eval): Pass it as the second argument to 'eval'.
* guix/scripts/build.scm (options/resolve-packages): Add case for
'gexp?'.
* tests/guix-build.sh: Add tests.
* doc/guix.texi (Invoking guix build): Document '-e gexp'.
| Ludovic Courtès |
2014-06-04 | tests: Skip tests that would hit the shebang length limitation....* tests/gexp.scm (shebang): New variable.
Skip "gexp->script" when SHEBANG is longer than 127 chars.
* guix/gexp.scm (gexp->script): Add comment on the issue.
| Ludovic Courtès |
2014-06-01 | derivations: Add #:allowed-references 'derivation' parameter....* guix/derivations.scm (derivation): Add #:allowed-references
parameter.
[user+system-env-vars]: Honor it.
* tests/derivations.scm ("derivation #:allowed-references, ok",
"derivation #:allowed-references, not allowed",
"derivation #:allowed-references, self allowed",
"derivation #:allowed-references, self not allowed"): New tests.
* doc/guix.texi (Derivations): Document #:allowed-references.
| Ludovic Courtès |
2014-05-27 | syscalls: Be more permissive in 'umount' test....* tests/syscalls.scm ("umount, ENOENT"): Rename to...
("umount, ENOENT/EPERM"): ... this. Accept EPERM as a valid return
value.
| Ludovic Courtès |
2014-05-19 | ui: Gracefully deal with zero-output derivations....* guix/ui.scm (show-what-to-build)[built-or-substitutable?]: New
procedure. Check whether OUT is #f.
Use it.
* tests/ui.scm ("show-what-to-build, zero outputs"): New test.
| Ludovic Courtès |
2014-05-10 | Add (guix build syscalls)....* guix/build/syscalls.scm, tests/syscalls.scm: New files.
* Makefile.am (MODULES): Add guix/build/syscalls.scm.
(SCM_TESTS): Add tests/syscalls.scm.
* guix/utils.scm (%libc-errno-pointer, errno): Remove; take from (guix
build syscalls).
| Ludovic Courtès |
2014-05-01 | gexp: Add support for 'origin?' objects in 'ungexp' forms....* guix/gexp.scm (lower-inputs, gexp-inputs, gexp->sexp,
canonicalize-reference): Add 'origin?' case.
* guix/monads.scm (origin->derivation): New procedure.
* tests/gexp.scm ("one input origin"): New test.
| Ludovic Courtès |
2014-04-28 | monads: Hide 'derivation-expression' and 'lower-inputs'....* guix/monads.scm: Unexport 'lower-inputs' and 'derivation-expression'.
(text-file*): Add comment about the switch to 'gexp->derivation'.
(lower-inputs): Add comment about its doom.
(derivation-expression): Likewise.
* guix/gexp.scm (lower-inputs*): Rename to...
(lower-inputs): ... this. Update callers.
* tests/monads.scm (derivation-expression): New procedure.
* doc/guix.texi (The Store Monad): Use 'gexp->derivation' instead of
'derivation-expression'. Remove documentation of
'derivation-expression'.
* guix/ui.scm (read/eval): Use THE-ROOT-MODULE so that macros are
properly expanded.
* tests/guix-build.sh: Use 'gexp->derivation' instead of
'derivation-expression'.monads: Hide 'derivation-expression' and 'lower-inputs'.
| Ludovic Courtès |
2014-04-28 | store: (direct-store-path? (%store-prefix)) returns #f....* guix/store.scm (direct-store-path?): Return #f if PATH
is (%store-prefix).
* tests/store.scm ("direct-store-path?"): Add test.
| Ludovic Courtès |
2014-04-28 | Add (guix gexp)....* guix/gexp.scm: New file.
* tests/gexp.scm: New file.
* Makefile.am (MODULES): Add guix/gexp.scm.
(SCM_TESTS): Add tests/gexp.scm.
* doc/guix.texi (Derivations): Add #:inputs in 'derivation' example.
Mark 'build-expression->derivation' as deprecated, refer to
"G-Expressions". Remove paragraph about code strata.
(G-Expressions): New node.
| Ludovic Courtès |
2014-04-22 | authenticate: Allow signatures with binary data to be written to stdout....Fixes <http://bugs.gnu.org/17312>.
* guix/scripts/authenticate.scm (guix-authenticate): Add calls to
'set-port-encoding!' and 'set-port-conversion-strategy!'. Wrap body
in 'with-fluids' form that sets '%default-port-encoding' and
'%default-port-conversion-strategy'.
* tests/guix-authenticate.sh: Add test.
* tests/pk-crypto.scm ("hash corrupt due to restrictive locale
encoding"): Add reference to bug.
| Ludovic Courtès |
2014-04-22 | pk-crypto: Use ISO-8859-1 for strings passed to 'gcry_sexp_new'....* guix/pk-crypto.scm (string->canonical-sexp): Pass "ISO-8859-1" as the
2nd argument to 'string->pointer'.
* tests/pk-crypto.scm ("version"): New test.
("hash corrupt due to restrictive locale encoding"): New test.
| Ludovic Courtès |
2014-04-14 | offload: '{send,receive}-files' wait for completion of the transfer....Fixes situations where the remote 'guix build' is invoked before the
.drv has been completely copied, as reported at
<https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00174.html>.
In some cases 'send-files' would return before the other end is done
importing the files, and so the subsequent 'guix build' invocation would
just miss the .drv file it refers to.
* guix/utils.scm (call-with-decompressed-port): Don't close PORT.
(call-with-compressed-output-port): Likewise.
* tests/utils.scm ("compressed-output-port + decompressed-port"): Adjust
accordingly.
* guix/scripts/offload.scm (send-files): Add explicit (close-pipe pipe)
call.
(retrieve-files): Likewise.
| Ludovic Courtès |
2014-04-13 | derivations: Fix 'fixed-output-derivation?'....Reported by Nikita Karetnikov <nikita@karetnikov.org>.
* guix/derivations.scm (fixed-output-derivation?): Fix pattern.
* tests/derivations.scm ("fixed-output-derivation?"): Add test.
| Ludovic Courtès |
2014-04-12 | store: Add 'add-permanent-root' and 'remove-permanent-root'....* guix/store.scm (add-indirect-root): Improve docstring.
(%gc-roots-directory): New variable.
(add-permanent-root, remove-permanent-root): New procedures.
* tests/store.scm ("permanent root"): New test.
| Ludovic Courtès |
2014-04-08 | ui: Add 'size->number'....* guix/scripts/gc.scm (size->number): Remove.
* guix/ui.scm (size->number): New procedure.
* tests/ui.scm ("size->number, bytes",
"size->number, MiB", "size->number, GiB", "size->number, 1.2GiB",
"size->number, invalid unit"): New tests.
| Ludovic Courtès |
2014-04-07 | tests: Avoid buffering in 'fcntl-flock' tests....Partially fixes <http://bugs.gnu.org/17212>.
* tests/utils.scm ("fcntl-flock wait", "fcntl-flock non-blocking"): Open
files in binary mode, with no buffering.
| Ludovic Courtès |
2014-04-02 | tests: Add 'union-build' test for <http://bugs.gnu.org/17083>....* tests/union.scm ("union-build with symlink to directory"): New test.
| Ludovic Courtès |
2014-04-02 | union: Rewrite to be faster; handle symlink/directory conflicts....* guix/build/union.scm: Rewrite; only 'file=?' remains unchanged. Remove
'tree-union' and 'delete-duplicate-leaves' exports. Merge inputs in a
breadth-first fashion. Follow symlinks for purposes of making decisions
about the merge.
* tests/union.scm: Remove tests of 'tree-union' and 'delete-duplicate-leaves'.
| Mark H Weaver |
2014-04-02 | guix package: Register non-default profiles as GC roots....* guix/scripts/package.scm (maybe-register-gc-root): New procedure.
* tests/guix-package.sh (profile): Grep the output of "guix gc
--list-live" in a couple of places.
| Ludovic Courtès |
2014-03-31 | Use 'signature-case' in (guix nar) and 'substitute-binary'....* guix/nar.scm (restore-file-set)[assert-valid-signature]: Rewrite in
terms of 'signature-case'.
* guix/scripts/substitute-binary.scm (narinfo-signature->canonical-sexp):
Call 'leave' instead of 'raise' when SIGNATURE is invalid.
(&nar-signature-error, &nar-invalid-hash-error): Remove.
(assert-valid-signature): Add 'narinfo' parameter; remove 'port'.
Rewrite in terms of 'signature-case' and 'leave'. Mention NARINFO's
URI in error messages. Adjust caller.
(narinfo-sha256): New procedure.
(assert-valid-narinfo): Use it.
(valid-narinfo?): Rewrite using 'narinfo-sha256' and
'signature-case'.
* tests/substitute-binary.scm (assert-valid-signature,
test-error-condition): Remove.
("corrupt signature data", "unauthorized public key", "invalid
signature"): Remove.
| Ludovic Courtès |
2014-03-31 | pki: Add 'signature-case' macro....* guix/pki.scm (%signature-status): New procedure.
(signature-case): New macro.
* tests/pki.scm (%secret-key, %alternate-secret-key): New variables.
("signature-case valid-signature", "signature-case invalid-signature",
"signature-case hash-mismatch", "signature-case unauthorized-key",
"signature-case corrupt-signature"): New tests.
| Ludovic Courtès |
2014-03-30 | tests: Test the error output of 'substitute-binary'....* tests/substitute-binary.scm (test-error*): Rename to...
(test-quit): ... this. Add 'error-rx' parameter and honor it.
("not a number", "wrong version number", "substitute, no signature",
"substitute, invalid hash", "substitute, unauthorized key"): Adjust
accordingly.
| Ludovic Courtès |
2014-03-30 | tests: Add more signed substitute tests....* tests/substitute-binary.scm (%narinfo): Set 'URL', 'Compression', and
'NarHash'.
(call-with-narinfo): Create 'example.out' and 'example.nar'.
("query narinfo without signature", "substitute, no signature",
"substitute, authorized key"): New tests.
| Ludovic Courtès |
2014-03-30 | tests: Simplify 'substitute-binary' tests; reduce use of global variables....* tests/substitute-binary.scm (signature-body): Change 'str' parameter
to 'bv', and expect it to be a bytevector.
(%signature-body, %wrong-signature, %acl): Remove.
(signature): Rename to...
(signature-field): ... this. Add 'bv-or-str' parameter. Change 'str'
parameter to #:version. Add #:public-key parameter. Call
'signature-body' directly. Change domain part of the signature to
'example.gnu.org'.
("not a number", "wrong version number", "valid
narinfo-signature->canonical-sexp"): Use 'signature-field' instead of
'signature' or %SIGNATURE.
(test-error-condition): Add 'message-rx' parameter and honor it.
("corrupt signature data", "unauthorized public key", "invalid
signature"): Adjust accordingly.
(narinfo, %signed-narinfo): Remove.
("query narinfo with invalid hash"): Use '%narinfo' and
'signature-field' instead of 'narinfo' and '%signature'.
("query narinfo signed with authorized key", "query narinfo signed
with unauthorized key", "substitute, invalid hash", "substitute,
unauthorized key"): Likewise.
| Ludovic Courtès |
2014-03-30 | tests: Make sure the daemon reports substitute hash mismatches....* tests/store.scm ("substitute, corrupt output hash"): New test.
| Ludovic Courtès |
2014-03-30 | substitute-binary: Defer narinfo authentication and authorization checks....* guix/scripts/substitute-binary.scm (narinfo-signature->canonical-sexp):
Catch 'gcry-error' around 'string->canonical-sexp' call, and re-raise
as a SRFI-35 &message and &nar-signature-error.
(narinfo-maker): Handle when SIGNATURE is #f or an invalid canonical
sexp.
(&nar-signature-error, &nar-invalid-hash-error): New variables.
(assert-valid-signature): Use them. Expect 'signature' to be a
canonical sexp.
(read-narinfo): Remove authentication and authorization checks.
(%signature-line-rx): New variable.
(assert-valid-narinfo, valid-narinfo?): New procedures.
(guix-substitute-binary): Wrap body in 'with-error-handling'.
[valid?]: New procedure.
<--query>: Show only store items of narinfos that match
'valid-narinfo?'.
<--substitute>: Call 'assert-valid-narinfo'.
* tests/substitute-binary.scm (test-error*): Use 'test-equal'.
(%keypair): Remove.
(%public-key, %private-key): Load from signing-key.{pub,sec}.
(signature-body): Add #:public-key parameter.
(call-with-narinfo): New procedure.
(with-narinfo): New macro.
("corrupt signature data", "unauthorized public key", "invalid
signature"): Make the first argument to 'assert-valid-signature' a
canonical sexp.
("invalid hash", "valid read-narinfo", "valid write-narinfo"):
Remove.
("query narinfo with invalid hash", "query narinfo signed with
authorized key", "query narinfo signed with unauthorized key",
"substitute, invalid hash", "substitute, unauthorized key"): New
tests.
| Ludovic Courtès |
2014-03-30 | substitute-binary: Support the Signature field of a narinfo file....* guix/scripts/substitute-binary.scm (<narinfo>): 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'.
| Nikita Karetnikov |
2014-03-29 | tests: Make sure 'guix archive --import' succeeds....* tests/guix-archive.sh: Check the exit value of 'guix archive
--import'.
| Ludovic Courtès |
2014-03-27 | daemon: Add tests for substitutes and --no-substitutes....* tests/guix-daemon.sh: Add substituter tests.
| Ludovic Courtès |
2014-03-26 | Merge branch 'core-updates' | Ludovic Courtès |
2014-03-24 | utils: Add 'call-with-decompressed-port' and 'call-with-compressed-output-port'....* guix/utils.scm (call-with-decompressed-port,
call-with-compressed-output-port): New procedures.
* tests/utils.scm ("compressed-output-port + decompressed-port"):
Rewrite to use them.
| Ludovic Courtès |