summaryrefslogtreecommitdiff
path: root/guix
AgeCommit message (Expand)Author
2014-05-04activation: Fix deletion of setuid programs....* guix/build/activation.scm (activate-setuid-programs): When %SETUID-DIRECTORY exists, pass the right file names to 'delete-file'. Ludovic Courtès
2014-05-03vm: Make root file system type a parameter, and default to ext4....* gnu/system/vm.scm (qemu-image): Add #:file-system-type parameter. Pass it to 'initialize-hard-disk'. * guix/build/linux-initrd.scm (mount-root-file-system): Always honor TYPE. (boot-system): Change #:root-fs-type to default to "ext4". Update docstring. * guix/build/vm.scm (initialize-hard-disk): Remove #:mkfs parameter; add #:file-system-type. Adjust 'mkfs' invocation and 'mount' call to honor #:file-system-type. Ludovic Courtès
2014-05-03ftp-client: Add missing CR in "USER" command....* guix/ftp-client.scm (%ftp-login): Add #\return before #\newline. Fixes access to some FTP servers, such as ftp://invisible-island.net ("ProFTPD 1.3.4a Server"). Ludovic Courtès
2014-05-03system: Add first-class file system declarations....* gnu/system.scm (<operating-system>)[initrd]: Default to 'qemu-initrd'. (<file-system>): New record type. (operating-system-root-file-system): New procedure. (operating-system-derivation): Take the device name for GRUB from 'operating-system-root-file-system'. Pass the 'operating-system-initrd' procedure the list of boot file systems. * gnu/system/linux-initrd.scm (file-system->spec): New procedure. (qemu-initrd): Add 'file-systems' parameter, and remove #:mounts parameter. [file-system-type-predicate]: New procedure. [linux-modules]: Use it. Adjust #:mounts argument in 'boot-system' call. (gnu-system-initrd): Remove. * gnu/system/vm.scm (%linux-vm-file-systems): New variable. (expression->derivation-in-linux-vm): Adjust call to 'qemu-initrd'. (virtualized-operating-system): New procedure. (system-qemu-image/shared-store-script)[initrd]: Remove. Use 'virtualized-operating-system'. Get the 'initrd' file from OS-DRV. * guix/build/linux-initrd.scm (mount-qemu-smb-share, mount-qemu-9p): Remove. (MS_RDONLY, MS_BIND): New global variables. (bind-mount): Remove local 'MS_BIND' definition. (mount-root-file-system): New procedure, with code formerly in 'boot-system'. (mount-file-system): New procedure. (boot-system): Add #:root-fs-type parameter. Remove 'MS_RDONLY' local variable. Use 'mount-root-file-system' and 'mount-file-system'. * doc/guix.texi (Using the Configuration System): Add 'file-system' declaration. Ludovic Courtès
2014-05-01download: Rewrite using gexps....* guix/download.scm (gnutls-derivation): Remove. (gnutls-package): New procedure. (url-fetch): Rewrite using 'gexp->derivation'. Ludovic Courtès
2014-05-01monads, gexp: Remove unintended dependency on (gnu packages …)....* guix/gexp.scm (gexp->derivation, gexp->script): Use 'default-guile' instead of an explicit reference to 'guile-final'. (default-guile): New procedure. * guix/monads.scm (run-with-store)[default-guile]: New procedure. Use it. Ludovic Courtès
2014-05-01gexp: 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-30gexp: Add pretty printer....* guix/gexp.scm (write-gexp): New procedure. <top level>: Add call to 'set-record-type-printer!'. Ludovic Courtès
2014-04-30system: Add support for setuid binaries....* gnu/system.scm (<operating-system>)[pam-services, setuid-programs]: New fields. (etc-directory)[bashrc]: Prepend /run/setuid-programs to $PATH. (operating-system-etc-directory): Honor 'operating-system-pam-services'. (%setuid-programs): New variable. (operating-system-boot-script): Add (guix build utils) to the set of imported modules. Call 'activate-setuid-programs' in boot script. * gnu/system/linux.scm (base-pam-services): New procedure. * guix/build/activation.scm (%setuid-directory): New variable. (activate-setuid-programs): New procedure. * build-aux/hydra/demo-os.scm: Add 'pam-services' field. Ludovic Courtès
2014-04-30linux-initrd: Allow setuid binaries from the unionfs to run....* guix/build/linux-initrd.scm (boot-system): Pass the 'suid' option to UNIONFS. Ludovic Courtès
2014-04-30system: Add (guix build activation)....* gnu/services/dmd.scm (dmd-configuration-file): Remove 'etc' parameter. Move /etc activation code to... * guix/build/activation.scm: ... here; new file. * gnu/system.scm (operating-system-boot-script): Augment script: add (guix build activation) to the load path; call 'activate-etc'. * Makefile.am (MODULES): Add guix/build/activation.scm. Ludovic Courtès
2014-04-29derivations: Micro-optimize 'derivation'....* guix/derivations.scm (derivation->string): New procedure. (derivation-hash, derivation): Use it. Memoization here yields a 5% improvement on "guix build -e '(@ (gnu packages emacs) emacs)' -n --no-substitutes". Ludovic Courtès
2014-04-29gnu-maintenance: Avoid network access in 'gnu-package?'....* guix/gnu-maintenance.scm (gnu-package?): Add 'mirror-type' procedure. Resort to 'official-gnu-packages' only when 'mirror-type' returns #f. Ludovic Courtès
2014-04-29gexp: Remove leftover parameter....* guix/gexp.scm (gexp->sexp): Remove #:outputs parameter. Adjust callers accordingly. Ludovic Courtès
2014-04-28monads: 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-28store: (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-28Add (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-27guix: cmake: Add input and package libraries to the rpath, and adapt package... 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> Andreas Enge
2014-04-22pk-crypto: Add pretty-printer to 'gcry-error' exceptions....* 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. Ludovic Courtès
2014-04-22authenticate: 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-22pk-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-21nar: Really really protect the temporary store directory from GC....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'. Ludovic Courtès
2014-04-16download: Improve progress report output....* guix/build/download.scm (url-fetch): Make current-output-port unbuffered. Ludovic Courtès
2014-04-14linux-initrd: Mount / as a unionfs when asking for a volatile root....* 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'. Ludovic Courtès
2014-04-14offload: '{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-14offload: Better synchronize with remote invocation of 'guix archive --missing'....* guix/scripts/offload.scm (send-files)[missing-files]: Call 'waitpid' after reading all of MISSING. Ludovic Courtès
2014-04-13derivations: 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-12nar: Really protect the temporary store directory from GC....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. Ludovic Courtès
2014-04-12store: 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-12packages: Correctly handle patching for inputs with no extension....Reported by Manolis Ragkousis <manolis837@gmail.com>. * guix/packages.scm (patch-and-repack)[numeric-extension?]: Handle FILE-NAME with no extension. Ludovic Courtès
2014-04-11vm: Move image creation to (guix build vm); split into several procedures....* 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'. Ludovic Courtès
2014-04-11vm: Add (guix build vm) module....* guix/build/vm.scm: New file. * Makefile.am (MODULES): Add it. * gnu/system/vm.scm (expression->derivation-in-linux-vm): Use it. Ludovic Courtès
2014-04-09nar: 'restore-file-set' registers the temporary result as a GC root....* 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>. Ludovic Courtès
2014-04-09gnu: linux-initrd: Mount /dev/pts at boot time....* guix/build/linux-initrd.scm (make-essential-device-nodes): Remove 'mount' call for /dev/pts. (boot-system): Add it here, after 'chroot' call. Ludovic Courtès
2014-04-09gnu: linux-initrd: Better populate /dev....* guix/build/linux-initrd.scm (make-essential-device-nodes): Make /dev/{ptmx,tty} world-writable. Build additional character devices. Ludovic Courtès
2014-04-09guix system: Add 'vm-image' action and '--image-size' option....* 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'. Ludovic Courtès
2014-04-08ui: 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-08offload: Remove all the GC roots in case of multiple-output derivations....* 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. Ludovic Courtès
2014-04-08offload: Bail out when failing to register a GC root on the build machine....* guix/scripts/offload.scm (register-gc-root): Call 'leave' when 'close-pipe' returns non-zero. Ludovic Courtès
2014-04-07utils: Make 'errno' procedure more robust....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'. Ludovic Courtès
2014-04-07Work around behavior of old 'scandir' in Guile 2.0.5....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. Mark H Weaver
2014-04-05hydra: Add 'qemu-image' job....* 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. Ludovic Courtès
2014-04-05guix package: Fix indentation of packages to remove....* guix/scripts/package.scm (show-what-to-remove/install): Add space when showing packages to remove. Ludovic Courtès
2014-04-04ui: Improve reporting of 'system-error' exceptions....* guix/ui.scm (call-with-error-handling): Change 'system-error' handler to display the error message as it was raised. Ludovic Courtès
2014-04-03union: Ensure that the output is always a directory....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'. Mark H Weaver
2014-04-04pki: Introduce 'write-acl', and fix wrong conversion in 'ensure-acl'....* 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'. Ludovic Courtès
2014-04-03offload: Prevent the '.drv' and build result from being GC'd....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. Ludovic Courtès
2014-04-02union: 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-02guix package: 'search-path-environment-variables' traverses module tree once....* 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.) Ludovic Courtès
2014-04-02guix 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