summaryrefslogtreecommitdiff
path: root/guix
AgeCommit message (Collapse)Author
2014-03-06utils: 'fcntl-flock' passes an errno when throwing an exception.Ludovic Courtès
* guix/utils.scm (%libc-errno-pointer, errno): New procedures. (fcntl-flock): Use it as the exception's argument.
2014-03-06offload: Serialize file transfers to build machines.Ludovic Courtès
* guix/scripts/offload.scm (machine-lock-file, lock-machine, unlock-machine): New procedures. (with-machine-lock): New macro. (process-request): Wrap 'send-files' and 'retrieve-files' calls in 'with-machine-lock'.
2014-03-06download: Perform derivations locally.Ludovic Courtès
* guix/download.scm (url-fetch): Pass #:local-build? #t to 'build-expression->derivation'. * guix/git-download.scm (git-fetch): Likewise.
2014-03-01guix package: Use the common build options from (guix scripts build).Ludovic Courtès
* guix/scripts/build.scm (%standard-build-options): Change option handlers to support multiple seeds. * guix/scripts/package.scm (show-help): Remove --dry-run, --fallback, --no-substitutes, and --max-silent-time. (%options): Likewise, and add %STANDARD-BUILD-OPTIONS. (%default-options): Add 'verbosity'. (guix-package): Call 'set-build-options-from-command-line' instead of 'set-build-options'.
2014-03-01substitute-binary: Gracefully handle HTTP GET errors.Ludovic Courtès
* guix/http-client.scm (&http-get-error): New condition type. (http-fetch): Raise it instead of using 'error'. * guix/scripts/substitute-binary.scm (fetch) <http>: Wrap body into 'guard' form; gracefully handle 'http-get-error?' conditions.
2014-03-01offload: Comment out attempt to set up an lsh gateway.Ludovic Courtès
* guix/scripts/offload.scm (open-ssh-gateway): Comment out. (process-request): Remove call to 'open-ssh-gateway' and to 'kill'.
2014-03-01offload: 'remote-pipe' uses the right SSH key.Ludovic Courtès
* guix/scripts/offload.scm (remote-pipe): Pass -i when invoking %LSHG-COMMAND.
2014-03-01offload: Take the target machine load into account.Ludovic Courtès
* guix/scripts/offload.scm (machine-load, machine-less-loaded?, machine-less-loaded-or-faster?): New procedures. (choose-build-machine): Use 'machine-less-loaded-or-faster?' when sorting. Return the head of MACHINES unless it's loaded is >= 2.
2014-02-28guix archive: Change '--help' to show '--authorize'.Ludovic Courtès
* guix/scripts/archive.scm (show-help): Add '--authorize'.
2014-02-28gnu-maintenance: Adjust 'latest-release' to filter Bash's patch directories.Ludovic Courtès
* guix/gnu-maintenance.scm (latest-release)[patch-directory-name?]: New procedure. <subdirs>: Use it to filter out Bash-like patch directories.
2014-02-27store: Use 'when' instead of 'if' in effectful context.Ludovic Courtès
* guix/store.scm (set-build-options): Use 'when' instead of 'if'.
2014-02-21derivations: Remove unused 'derivation' parameter.Ludovic Courtès
* guix/derivations.scm (derivation): Remove unused #:hash-mode parameter. * doc/guix.texi (Derivations): Adjust accordingly.
2014-02-21Add (guix git-download).Ludovic Courtès
* guix/git-download.scm, guix/build/git.scm: New files. * Makefile.am (MODULES): Add them. * guix/packages.scm (<origin>): Fix comment for 'method' field.
2014-02-21nar: Produce archives with files sorted in C collation order.Ludovic Courtès
* guix/nar.scm (write-file) <directory>: Pass 'string<?' as the second argument to 'scandir'. * tests/nar.scm ("write-file puts file in C locale collation order"): New test.
2014-02-21derivations: Add support for recursive fixed-output derivations.Ludovic Courtès
* guix/derivations.scm (<derivation-output>): Add 'recursive?' field. Adjust 'make-derivation-output' callers. (%read-derivation) <fixed-output>: When HASH-ALGO starts with 'r:', set the 'recursive?' field and drop 'r:' from the hash algo name. (write-derivation)[write-output]: Write the algo as 'r:HASH-ALGO' when the RECURSIVE? field is set. (derivation-hash) <fixed-output>: Prepend "r:" when RECURSIVE? is set. (fixed-output-path): New procedure. (derivation): Add #:recursive? parameter. Use 'fixed-output-path' to compute the output file name of a fixed output derivation. (build-expression->derivation): Add #:recursive? parameter. Pass it to 'derivation'. * tests/derivations.scm ("fixed-output derivation, recursive", "build-expression->derivation produces recursive fixed-output", "build-expression->derivation uses recursive fixed-output"): New tests. * doc/guix.texi (Derivations): Document #:recursive? for 'derivation'. Add #:recursive? for 'build-expression->derivation'.
2014-02-21guix hash: Add '--recursive'.Ludovic Courtès
* guix/scripts/hash.scm (show-help): Add --recursive. (%options): Likewise. (guix-hash)[file-hash]: New procedure. Honor --recursive. Use it. * guix/nar.scm (write-file): Add missing field to the &nar-error condition raised upon unsupported file type; change its message to be more descriptive. * tests/guix-hash.sh: Add tests with -r. * doc/guix.texi (Invoking guix hash): Document --recursive.
2014-02-21ui: Handle SRFI-35 '&message' conditions.Ludovic Courtès
* guix/ui.scm (call-with-error-handling): Add case for 'message-condition?'. * po/Makevars: Fix typo in comment.
2014-02-21nar: 'write-file' can write to non-file ports.Ludovic Courtès
* guix/nar.scm (write-contents): Use 'sendfile' only when P is a file port. * tests/nar.scm ("write-file supports non-file output ports"): New test.
2014-02-20guix hash: Don't load the whole file in memory.Ludovic Courtès
* guix/scripts/hash.scm (guix-hash)[eof->null]: Remove. (guix-hash): Use 'port-sha256' to compute the hash instead of 'get-bytevector-all' and co.
2014-02-19gnu: Introduce the (gnu services ...) modules.Ludovic Courtès
* gnu/system/dmd.scm: Remove file. Move contents to... * gnu/services.scm, gnu/services/base.scm, gnu/services/dmd.scm, gnu/services/networking.scm, gnu/services/xorg.scm: ... here. New files. * gnu/system.scm, gnu/system/vm.scm: Adjust accordingly. * guix/scripts/system.scm (%user-module): Likewise. * doc/guix.texi (Using the Configuration System): Likewise. (Defining Services): Likewise.
2014-02-18Add 'guix system'.Ludovic Courtès
* guix/scripts/system.scm: New file. * Makefile.am (MODULES): Add it. * po/POTFILES.in: Likewise. * doc/guix.texi (Using the Configuration System): Link to "Invoking guix system". (Invoking guix system): New node.
2014-02-18guix build: Factorize common options.Ludovic Courtès
* guix/scripts/build.scm (show-build-options-help, set-build-options-from-command-line): New procedures. (show-help): Remove description of --dry-run, --fallback, --no-substitutes, --max-silent-time, and --cores. Call 'show-build-options-help'. (%standard-build-options): New variable. (%options): Remove --dry-run, --fallback, --no-substitutes, --verbosity, --max-silent-time, and --cores. Add %STANDARD-BUILD-OPTIONS. (guix-build): Use 'set-build-options-from-command-line' instead of 'set-build-options'. * guix/scripts/archive.scm (show-help): Remove description of --dry-run, --fallback, --no-substitutes, --max-silent-time, and --cores. Call 'show-build-options-help'. (%options): Remove --dry-run, --fallback, --no-substitutes, --verbosity, --max-silent-time, and --cores. Add %STANDARD-BUILD-OPTIONS. (export-from-store): Call 'set-build-options-from-command-line' instead of 'set-build-options.
2014-02-12guix build: Move 'set-build-options' call earlier.Ludovic Courtès
* guix/scripts/build.scm (guix-build): Move 'set-build-options' call before 'show-what-to-build'.
2014-02-12store: Add comments for the stracer.Ludovic Courtès
* guix/store.scm (%worker-magic-1, %worker-magic-2): Add comments.
2014-02-10store: Change 'export-paths' to always export in topological order.Ludovic Courtès
* guix/store.scm (export-paths): Pass PATHS through 'topologically-sorted' before iterating. * tests/store.scm ("export/import paths, ensure topological order"): New test.
2014-02-10union: Do not compare directories upon collision.Ludovic Courtès
* guix/build/union.scm (file=?): Return #f if FILE1 and FILE2 are not regular files. Fixes a bug whereby collisions among directories would lead to the invocation of 'file=?' and thus 'call-with-input-file' on directories. Reported by Mark H. Weaver <mhw@netris.org>.
2014-02-10download: Provide a 'User-Agent' field in HTTP requests.Ludovic Courtès
Fixes <http://bugs.gnu.org/16703>. Reported by Raimon Grau <raimonster@gmail.com>. * guix/build/download.scm (http-fetch)[headers]: New variable. Pass it as #:headers or #:extra-headers to 'http-get' and 'http-get*'.
2014-02-09gnu: linux-initrd: When booting, chdir to the new root before calling 'chroot'.Ludovic Courtès
* guix/build/linux-initrd.scm (boot-system): Add 'chdir' call right before 'chroot'.
2014-02-03monads: Add 'text-file*'.Ludovic Courtès
* guix/monads.scm (text-file*): New procedure. * tests/monads.scm ("text-file*"): New test. * doc/guix.texi (The Store Monad): Change example since the previous one would erroneously fail to retain a reference to Coreutils. Document 'text-file*'.
2014-02-02offload: Have 'build-machines' honor its argument.Ludovic Courtès
* guix/scripts/offload.scm (build-machines): Honor FILE.
2014-02-01gnu: linux-initrd: Build /dev/input devices.Ludovic Courtès
* guix/build/linux-initrd.scm (make-essential-device-nodes): Make dev/input devices.
2014-02-01gnu: linux-initrd: Make /dev/{mem,kmem}.Ludovic Courtès
* guix/build/linux-initrd.scm (make-essential-device-nodes): Make dev/{mem,kmem}.
2014-01-31gnu: linux-initrd: Allow the root file system to be volatile.Ludovic Courtès
* gnu/system/linux-initrd.scm (qemu-initrd): Add 'volatile-root?' parameter. * guix/build/linux-initrd.scm (boot-system): Likewise. Honor it.
2014-01-31gnu: linux-initrd: Recognize 9p file systems.Ludovic Courtès
* gnu/system/linux-initrd.scm (qemu-initrd)[virtio-9p-modules]: New variable. [linux-modules]: Append VIRTIO-9P-MODULES when a 9p file system is in MOUNTS. * guix/build/linux-initrd.scm (mount-qemu-9p): New procedure. (boot-system): Recognize '9p' in MOUNTS, and use 'mount-qemu-9p'.
2014-01-31gnu: linux-initrd: Properly distinguish between /dev/sda* and /dev/vda*.Ludovic Courtès
* guix/build/linux-initrd.scm (make-essential-device-nodes): Rename devices with major = 8 to /dev/sda*. Make /dev/vda* devices. * gnu/system/vm.scm (qemu-image): Change '/dev/vda' to '/dev/sda'. * gnu/system.scm (operating-system-derivation): Likewise.
2014-01-31gnu: linux-initrd: Start a REPL when the root could not be mounted.Ludovic Courtès
* guix/build/linux-initrd.scm (boot-system): Catch errors when mounting ROOT and call 'start-repl' upon error.
2014-01-29gnu: linux-initrd: Factorize boot code.Ludovic Courtès
* guix/build/linux-initrd.scm (boot-system): New procedure. * gnu/system/linux-initrd.scm (qemu-initrd): Add keyword parameters 'guile-modules-in-chroot?' and 'mounts'. Change builder to simply call 'boot-system'. (gnu-system-initrd): Change to a simple call to 'qemu-initrd'. * gnu/system/vm.scm (expression->derivation-in-linux-vm): Call 'qemu-initrd' with #:guile-modules-in-chroot?.
2014-01-29monads: Add 'imported-modules' and 'compiled-modules'.Ludovic Courtès
* guix/monads.scm (package-file): Fix typo. (imported-modules, compiled-modules): New procedures.
2014-01-27download: Add archive.apache.org to the Apache mirrors.Ludovic Courtès
* guix/download.scm (%mirrors)[apache]: Add archive.apache.org as a last resort.
2014-01-27offload: Do not try to retrieve anything upon build failure.Ludovic Courtès
* guix/scripts/offload.scm (offload): Add 'log-port' keyword parameter. Handle log display here. Return the result of (close-pipe pipe). (process-request): Adjust 'offload' call site accordingly. Call 'retrieve-files' only when 'offload' returns zero; exit when 'offload' returns non-zero.
2014-01-25derivations: Add #:local-build? parameter for derivations.Ludovic Courtès
* guix/derivations.scm (derivation): Add #:local-build? parameter and honor it. (build-expression->derivation): Likewise. * doc/guix.texi (Derivations): Update documentation of these procedures.
2014-01-25profiles: Remove misleading message.Ludovic Courtès
Fixes <http://bugs.gnu.org/16484>. Reported by Andreas Enge <andreas@enge.fr>. * guix/profiles.scm (profile-derivation)[builder]: Remove "building profile '~a' with ~a packages" message.
2014-01-24Add 'guix offload' as a daemon build hook.Ludovic Courtès
* nix/nix-daemon/guix-daemon.cc (GUIX_OPT_NO_BUILD_HOOK): New macro. (options): Add '--no-build-hook'. (parse_opt): Handle it. (main)[HAVE_DAEMON_OFFLOAD_HOOK]: Set 'useBuildHook' by default. Set $NIX_BUILD_HOOK to our offload hook unless otherwise specified. [!HAVE_DAEMON_OFFLOAD_HOOK]: Clear 'useBuildHook'. * pre-inst-env.in: Set and export NIX_BUILD_HOOK. * nix/scripts/offload.in, guix/scripts/offload.scm: New files. * guix/ui.scm (show-guix-help)[internal?]: Add "offload". * config-daemon.ac: Call 'GUIX_CHECK_UNBUFFERED_CBIP'. Instantiate 'nix/scripts/offload'. Set 'BUILD_DAEMON_OFFLOAD' conditional, and optionally define 'HAVE_DEAMON_OFFLOAD_HOOK' cpp macro. * daemon.am (nodist_pkglibexec_SCRIPTS)[BUILD_DAEMON_OFFLOAD]: Add it. * Makefile.am (MODULES)[BUILD_DAEMON_OFFLOAD]: Add 'guix/scripts/offload.scm'. (EXTRA_DIST)[!BUILD_DAEMON_OFFLOAD]: Likewise. * m4/guix.m4 (GUIX_CHECK_UNBUFFERED_CBIP): New macro. * doc/guix.texi (Setting Up the Daemon): Move most of the body to... (Build Environment Setup): ... this. New subsection. (Daemon Offload Setup): New subsection.
2014-01-24store: Add 'topologically-sorted'.Ludovic Courtès
* guix/store.scm (topologically-sorted): New procedure. * tests/store.scm ("topologically-sorted, one item", "topologically-sorted, several items", "topologically-sorted, more difficult"): New tests.
2014-01-24nar: Add 'restore-file-set', for use by build hooks.Ludovic Courtès
* guix/nar.scm (&nar-invalid-hash-error, &nar-signature-error): New condition types. (&nar-error): Add 'file' and 'port' fields. (&nar-read-error): Remove 'port' and 'file' fields. (lock-store-file, unlock-store-file, finalize-store-file, temporary-store-directory, restore-file-set): New procedures. * tests/nar.scm (%seed): New variable. (random-text): New procedure. ("restore-file-set (signed, valid)", "restore-file-set (missing signature)", "restore-file-set (corrupt)"): New tests. * po/Makevars (XGETTEXT_OPTIONS): Add '--keyword=message'.nar fixes * po/POTFILES.in: Add guix/nar.scm.
2014-01-24store: Add 'with-store' convenience macro.Ludovic Courtès
* guix/store.scm (with-store): New macro.
2014-01-24hash: Add 'open-sha256-input-port', for Guile > 2.0.9.Ludovic Courtès
* guix/hash.scm (open-sha256-input-port): New procedure. * tests/hash.scm (supports-unbuffered-cbip?): New procedure. ("open-sha256-input-port, empty", "open-sha256-input-port, hello", "open-sha256-input-port, hello, one two", "open-sha256-input-port, hello, read from wrapped port"): New tests.
2014-01-24pki: Factorize signature manipulation procedures.Ludovic Courtès
* guix/pki.scm (signature-subject, signature-signed-data, valid-signature?): New procedures. * guix/scripts/authenticate.scm (guix-authenticate): Adjust to use them.
2014-01-24utils: Add 'fcntl-flock'.Ludovic Courtès
* guix/utils.scm (%struct-flock, F_SETLKW, F_xxLCK): New variables. (fcntl-flock): New procedure. * tests/utils.scm ("fcntl-flock"): New test.
2014-01-24store: Add 'register-path' procedure.Ludovic Courtès
* guix/store.scm (register-path): New procedure. * tests/store.scm ("register-path"): New test. * guix/config.scm.in (%guix-register-program): New variable. * configure.ac: Compute and substitute 'guix_sbindir'. Compute 'guix_prefix'. * pre-inst-env.in: Define 'GUIX_REGISTER'.