summaryrefslogtreecommitdiff
path: root/guix
Commit message (Collapse)AuthorAge
* gexp: Remove leftover parameter.Ludovic Courtès2014-04-29
| | | | | * guix/gexp.scm (gexp->sexp): Remove #:outputs parameter. Adjust callers accordingly.
* monads: Hide 'derivation-expression' and 'lower-inputs'.Ludovic Courtès2014-04-28
| | | | | | | | | | | | | | | | | * 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'.
* store: (direct-store-path? (%store-prefix)) returns #f.Ludovic Courtès2014-04-28
| | | | | | * guix/store.scm (direct-store-path?): Return #f if PATH is (%store-prefix). * tests/store.scm ("direct-store-path?"): Add test.
* Add (guix gexp).Ludovic Courtès2014-04-28
| | | | | | | | | | | * 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.
* guix: cmake: Add input and package libraries to the rpath, and adapt packageAndreas Enge2014-04-27
| | | | | | | | | | | definitions accordingly. * guix/build/cmake-build-system.scm (configure): Add flags. * gnu/packages/maths.scm (lapack): Drop special code. * gnu/packages/ssh.scm (libssh): Drop special code. * gnu/packages/slim.scm (slim): Drop special code and enable shared library. Co-authored-by: Eric Bavier <bavier@member.fsf.org>
* pk-crypto: Add pretty-printer to 'gcry-error' exceptions.Ludovic Courtès2014-04-22
| | | | | | | | | | | | | * guix/pk-crypto.scm (string->canonical-sexp, sign, generate-key): Pass the procedure name as the first argument to 'throw'. (gcrypt-error-printer): New procedure. <top level>: Add call to 'set-exception-printer!'. * guix/nar.scm (restore-one-item): Add 'proc' parameter to 'catch' handler for 'gcry-error. * guix/scripts/archive.scm (%options, generate-key-pair, authorize-key): Likewise. * guix/scripts/substitute-binary.scm (narinfo-signature->canonical-sexp): Likewise.
* authenticate: Allow signatures with binary data to be written to stdout.Ludovic Courtès2014-04-22
| | | | | | | | | | | | 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.
* pk-crypto: Use ISO-8859-1 for strings passed to 'gcry_sexp_new'.Ludovic Courtès2014-04-22
| | | | | | | * 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.
* nar: Really really protect the temporary store directory from GC.Ludovic Courtès2014-04-21
| | | | | | | | | | | | | This is a follow-up to 6071b55e10b7b6e67d77ae058c8744834889e0b4. See <https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00167.html> for the original report, and <https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00198.html> for an alternate solution that has been discussed. * guix/nar.scm (temporary-store-file): Remove call to 'add-permanent-root'; don't loop. (with-temporary-store-file): Rewrite using 'with-store' and 'add-temp-root'.
* download: Improve progress report output.Ludovic Courtès2014-04-16
| | | | | * guix/build/download.scm (url-fetch): Make current-output-port unbuffered.
* linux-initrd: Mount / as a unionfs when asking for a volatile root.Ludovic Courtès2014-04-14
| | | | | | | | | | | | | | * guix/build/linux-initrd.scm (make-essential-device-nodes): Make /dev/fuse. (boot-system): Add #:unionfs parameter. Invoke UNIONFS instead of copying files over when VOLATILE-ROOT? is true. * gnu/system/linux-initrd.scm (expression->initrd): Add #:inputs parameter. [files-to-copy]: New procedure. [builder]: Add 'to-copy' parameter; honor it. (qemu-initrd)[linux-modules]: Add 'fuse.ko' when VOLATILE-ROOT?. Pass UNIONFS-FUSE/STATIC as #:inputs; change builder to pass #:unionfs to 'boot-system'.
* offload: '{send,receive}-files' wait for completion of the transfer.Ludovic Courtès2014-04-14
| | | | | | | | | | | | | | | | | | 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.
* offload: Better synchronize with remote invocation of 'guix archive --missing'.Ludovic Courtès2014-04-14
| | | | | * guix/scripts/offload.scm (send-files)[missing-files]: Call 'waitpid' after reading all of MISSING.
* derivations: Fix 'fixed-output-derivation?'.Ludovic Courtès2014-04-13
| | | | | | | Reported by Nikita Karetnikov <nikita@karetnikov.org>. * guix/derivations.scm (fixed-output-derivation?): Fix pattern. * tests/derivations.scm ("fixed-output-derivation?"): Add test.
* nar: Really protect the temporary store directory from GC.Ludovic Courtès2014-04-12
| | | | | | | | | | | | | | Prevents garbage collection of the temporary store directory while restoring a file set, as it could previously happen: <https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00167.html>. * guix/nar.scm (temporary-store-directory): Rename to... (temporary-store-file): ... this. Use 'add-permanent-root' instead of 'add-indirect-root'. (with-temporary-store-file): New macro. (restore-one-item): New procedure, with code formerly in 'restore-file-set'. Use 'with-temporary-store-file'. (restore-file-set): Use it.
* store: Add 'add-permanent-root' and 'remove-permanent-root'.Ludovic Courtès2014-04-12
| | | | | | | * 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.
* packages: Correctly handle patching for inputs with no extension.Ludovic Courtès2014-04-12
| | | | | | | Reported by Manolis Ragkousis <manolis837@gmail.com>. * guix/packages.scm (patch-and-repack)[numeric-extension?]: Handle FILE-NAME with no extension.
* vm: Move image creation to (guix build vm); split into several procedures.Ludovic Courtès2014-04-11
| | | | | | | | * guix/build/vm.scm (read-reference-graph, initialize-partition-table, install-grub, populate-store, evaluate-populate-directive, reset-timestamps, initialize-hard-disk): New procedures. * gnu/system/vm.scm (qemu-image): Change 'builder' to a call to 'initialize-hard-disk'.
* vm: Add (guix build vm) module.Ludovic Courtès2014-04-11
| | | | | | * guix/build/vm.scm: New file. * Makefile.am (MODULES): Add it. * gnu/system/vm.scm (expression->derivation-in-linux-vm): Use it.
* nar: 'restore-file-set' registers the temporary result as a GC root.Ludovic Courtès2014-04-09
| | | | | | * guix/nar.scm (temporary-store-directory): Use 'add-indirect-root', not 'add-temp-root'. Reported by Andreas Enge <andreas@enge.fr> at <https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00161.html>.
* gnu: linux-initrd: Mount /dev/pts at boot time.Ludovic Courtès2014-04-09
| | | | | | * guix/build/linux-initrd.scm (make-essential-device-nodes): Remove 'mount' call for /dev/pts. (boot-system): Add it here, after 'chroot' call.
* gnu: linux-initrd: Better populate /dev.Ludovic Courtès2014-04-09
| | | | | * guix/build/linux-initrd.scm (make-essential-device-nodes): Make /dev/{ptmx,tty} world-writable. Build additional character devices.
* guix system: Add 'vm-image' action and '--image-size' option.Ludovic Courtès2014-04-09
| | | | | | | | | * guix/scripts/system.scm (%options): Add --image-size. (%default-options): Add 'image-size'. (guix-system)[parse-options]: Handle the 'vm-image' action. Honor them. (show-help): Update accordingly. * doc/guix.texi (Invoking guix system): Add 'vm-image'.
* ui: Add 'size->number'.Ludovic Courtès2014-04-08
| | | | | | | | * 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.
* offload: Remove all the GC roots in case of multiple-output derivations.Ludovic Courtès2014-04-08
| | | | | | | | | * guix/scripts/offload.scm (remove-gc-root): Rename to... (remove-gc-roots): ... this. [builder]: Use 'scandir' and remove all the files starting with %GC-ROOT-FILE. (transfer-and-offload): Adjust to renaming; remove 'false-if-exception' wraps.
* offload: Bail out when failing to register a GC root on the build machine.Ludovic Courtès2014-04-08
| | | | | * guix/scripts/offload.scm (register-gc-root): Call 'leave' when 'close-pipe' returns non-zero.
* utils: Make 'errno' procedure more robust.Ludovic Courtès2014-04-07
| | | | | | | | Partially fixes <http://bugs.gnu.org/17212>. * guix/utils.scm (errno): Move definition of 'bv' outside of the procedure. Use 'bytevector-s32-native-ref' or 'bytevector-s64-native-ref' instead of 'bytevector-sint-ref'.
* Work around behavior of old 'scandir' in Guile 2.0.5.Mark H Weaver2014-04-07
| | | | | | | Problem reported by John Darrington <john@darrington.wattle.id.au>. * guix/nar.scm (write-file): Filter out "." and ".." from the result of 'scandir'. Previously we did this by passing a suitable predicate.
* hydra: Add 'qemu-image' job.Ludovic Courtès2014-04-05
| | | | | | | | * build-aux/hydra/demo-os.scm: New file. * Makefile.am (EXTRA_DIST): Add it. * build-aux/hydra/gnu-system.scm (qemu-jobs): New procedure. (hydra-jobs): Use it. * guix/scripts/system.scm (read-operating-system): Export.
* guix package: Fix indentation of packages to remove.Ludovic Courtès2014-04-05
| | | | | * guix/scripts/package.scm (show-what-to-remove/install): Add space when showing packages to remove.
* ui: Improve reporting of 'system-error' exceptions.Ludovic Courtès2014-04-04
| | | | | * guix/ui.scm (call-with-error-handling): Change 'system-error' handler to display the error message as it was raised.
* union: Ensure that the output is always a directory.Mark H Weaver2014-04-03
| | | | | | | | | Fixes the creation of single-package profiles, reported by Ludovic Courtès. * guix/build/union.scm (union-build): Add new internal procedure 'union-of-directories' that always creates a directory, containing the code previously used only to merge multiple directories. Call it from the multiple-directory case in 'union' and from the top-level 'union-build'.
* pki: Introduce 'write-acl', and fix wrong conversion in 'ensure-acl'.Ludovic Courtès2014-04-04
| | | | | | | * guix/pki.scm (write-acl): New procedure. (ensure-acl): Use it. Fixes a regression introduced in 39831f1, whereby 'ensure-acl' would yield a wrong-type-arg error. * guix/scripts/archive.scm (authorize-key): Use 'write-acl'.
* offload: Prevent the '.drv' and build result from being GC'd.Ludovic Courtès2014-04-03
| | | | | | | | | | | | | | | | | Before that, there was a small time window during which the GC could wipe the .drv (before 'guix build' has been called), or the build result (before 'retrieve-files' has started.) * guix/scripts/offload.scm (remote-pipe): Add #:quote? parameter and honor it. (%gc-root-file): New variable. (register-gc-root, remove-gc-root): New procedures. (offload): Adjust comment. Run 'guix build' with '-r %GC-ROOT-FILE'. (transfer-and-offload): Call 'register-gc-root' before sending (derivation-file-name DRV). Call 'remove-gc-root' after the call to 'offload' or 'retrieve-files'. (send-files): Call 'remote-pipe' with #:quote? #f. (retrieve-files): Likewise.
* union: Rewrite to be faster; handle symlink/directory conflicts.Mark H Weaver2014-04-02
| | | | | | | | | * 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'.
* guix package: 'search-path-environment-variables' traverses module tree once.Ludovic Courtès2014-04-02
| | | | | | | * guix/scripts/package.scm (search-path-environment-variables)[manifest-entry->package]: Use 'find-best-packages-by-name' instead of 'find-packages-by-name'. On a profile with 140 packages, this reduces execution time of this procedure from 5.8 seconds to 2.9 seconds (50% improvement.)
* guix package: Register non-default profiles as GC roots.Ludovic Courtès2014-04-02
| | | | | | * 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.
* pki: Keep ACL in native sexp format to speed up 'authorized-key?'.Ludovic Courtès2014-04-01
| | | | | | | | * guix/pki.scm (acl-entry-sexp, acl-sexp): Remove. (public-keys->acl, current-acl): Return a native sexp. (acl->public-keys, authorized-key?): Expect ACL to be a native sexp. * guix/scripts/archive.scm (authorize-key): Convert ACL to canonical-sexp when writing it.
* substitute-binary: Avoid consing 'regexp-exec' arguments.Ludovic Courtès2014-04-01
| | | | | * guix/scripts/substitute-binary.scm (regexp-exec): Change formals to (rx str . rest).
* substitute-binary: Avoid reloading the ACL repeatedly.Ludovic Courtès2014-04-01
| | | | | | * guix/scripts/substitute-binary.scm (guix-substitute-binary) <--query>: Cache the result of (current-acl); pass it to 'valid-narinfo?' calls. This saves 12% wall-clock time for "guix build emacs -n".
* Use 'signature-case' in (guix nar) and 'substitute-binary'.Ludovic Courtès2014-03-31
| | | | | | | | | | | | | | | | | | | * 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.
* pki: Add 'signature-case' macro.Ludovic Courtès2014-03-31
| | | | | | | | | * 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.
* substitute-binary: Notify of valid signatures.Ludovic Courtès2014-03-31
| | | | | | * guix/scripts/substitute-binary.scm (assert-valid-narinfo): Add #:verbose? parameter; when true, write "found valid signature". (valid-narinfo?): Pass #:verbose? #f.
* guix archive: Make sure $sysconfdir/guix exists in '--authorize'.Ludovic Courtès2014-03-31
| | | | | * guix/scripts/archive.scm (authorize-key): Add 'mkdir-p' call. Reported by Alex Sassmannshausen <alex.sassmannshausen@gmail.com>.
* offload: Exit with code 100 upon build failures.Ludovic Courtès2014-03-31
| | | | | * guix/scripts/offload.scm (transfer-and-offload): Exit with code 100 upon build failure.
* substitute-binary: Defer narinfo authentication and authorization checks.Ludovic Courtès2014-03-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* substitute-binary: Store the cache's URI in the local cached narinfo.Ludovic Courtès2014-03-30
| | | | | | | | | * guix/scripts/substitute-binary.scm (<narinfo>)[uri-base]: New field. (narinfo-maker): Pass CACHE-URL as the 'uri-base' value. (string->narinfo): Add 'cache-uri' parameter. (lookup-narinfo)[cache-entry]: Switch to version 1. Add 'cache-uri' field. Adjust body accordingly. (remove-expired-cached-narinfos): Switch to version 1 by default.
* substitute-binary: Support the Signature field of a narinfo file.Nikita Karetnikov2014-03-30
| | | | | | | | | | | | | | | | * 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'.
* nar: Clarify that 'assert-valid-signature' accepts a string.Nikita Karetnikov2014-03-30
| | | | * guix/nar.scm (assert-valid-signature): Improve the wording.
* Add (guix svn-download).Sree Harsha Totakura2014-03-27
| | | | | | | * guix/svn-download.scm, guix/build/svn.scm: New files. * Makefile.am (MODULES): Add them. Signed-off-by: Ludovic Courtès <ludo@gnu.org>