summaryrefslogtreecommitdiff
path: root/guix
Commit message (Collapse)AuthorAge
* ui: Auto-compile user code, and improve error reporting.Ludovic Courtès2015-05-25
| | | | | | | | | | | Reported by Christian Grothoff. * guix/ui.scm (load*): Add 'frame-with-source'. Set %load-should-auto-compile. Change error handle to just (exit 1). Add pre-unwind handler to capture the stack and call 'report-load-error'. (report-load-error): Add optional 'frame' parameter and pass it to 'display-error'. * tests/guix-system.sh: Add "unbound variable" test.
* ui: Make 'symlink' replacement more future-proof.Ludovic Courtès2015-05-24
| | | | | * guix/ui.scm (symlink): Change next-to-last 'throw' argument to explicitly ignore ARGS; change last argument to (list errno).
* ui: Add 'copy-file' replacement with better error reporting.Ludovic Courtès2015-05-24
| | | | * guix/ui.scm (copy-file): New procedure.
* guix system: init: Copy the closure of 'grub.cfg', not that of the system.Ludovic Courtès2015-05-24
| | | | | | | | Fixes <http://bugs.gnu.org/20591>. Reported by Daniel Pimentel <d4n1@openmailbox.org>. * guix/scripts/system.scm (install): Copy the closure of GRUB.CFG rather than that of OS-DIR.
* guix system: Always add zero previous entries in grub.cfg for 'init'.Ludovic Courtès2015-05-24
| | | | | | * guix/scripts/system.scm (grub.cfg): Remove. (perform-action): Call 'operating-system-grub.cfg' with the empty list as the 2nd argument when ACTION is 'init.
* guix system: init: Make sure the target is root-owned.Ludovic Courtès2015-05-24
| | | | | | | Suggested by Mark H Weaver <mhw@netris.org>. * guix/scripts/system.scm (install): Add 'chown' and 'chmod' calls for TARGET when running as root, and warn otherwise.
* services: swap: Use 'restart-on-EINTR'.Ludovic Courtès2015-05-22
| | | | | * gnu/services/base.scm (swap-service)[start, stop]: Use 'restart-on-EINTR'. * guix/build/syscalls.scm (swapoff): Fix typo in 'throw' arguments.
* syscalls: Add 'restart-on-EINTR'.Ludovic Courtès2015-05-22
| | | | | * guix/build/syscalls.scm (call-with-restart-on-EINTR): New procedure. (restart-on-EINTR): New macro.
* guix package: Adjust --help message.Ludovic Courtès2015-05-21
| | | | | * guix/scripts/package.scm (show-help): Add KIND parameter for --search-paths as a followup to dbc31ab.
* scripts: Move 'set-build-options-from-command-line*' to (guix scripts build) ↵David Thompson2015-05-21
| | | | | | | | module. * guix/scripts/build.scm (set-build-options-from-command-line*): New procedure. * guix/scripts/environment.scm (set-build-options-from-command-line*): Delete.
* ui: Deduplicate 'show-what-to-build*'.David Thompson2015-05-21
| | | | | | | * guix/ui.scm (show-what-to-build*): New procedure. * guix/scripts/environment.scm (show-what-to-build*): Delete. * guix/scripts/system.scm (show-what-to-build*): Likewise. * build-aux/make-binary-tarball.scm (show-what-to-build*): Likewise.
* package: Add --manifest option.David Thompson2015-05-20
| | | | | | | | * guix/scripts/package.scm (show-help): Add help text. (%options): Add manifest option. (guix-package): Add manifest option handler. * doc/guix.texi ("Invoking guix package"): Document it. * tests/guix-package.sh: Add test.
* profiles: Add 'packages->manifest' procedure.David Thompson2015-05-20
| | | | * guix/profiles.scm (packages->manifest): New procedure.
* ui: Factorize user-provided Scheme file loading.David Thompson2015-05-20
| | | | | | | * guix/ui.scm (make-user-module, load*): New procedures. * guix/scripts/system.scm (%user-module): Define in terms of 'make-user-module'. (read-operating-system): Define in terms of load*'.
* ftp-client: Throw when log-in fails.Ludovic Courtès2015-05-20
| | | | | * guix/ftp-client.scm (ftp-open): When '%ftp-listen' returns something different from 220, throw instead of writing an error message.
* guix package: Add optional argument to --search-paths.Ludovic Courtès2015-05-20
| | | | | | | | | | | | * guix/scripts/package.scm (search-path-environment-variables): Add #:kind parameter. Pass it to 'environment-variable-definition'. (display-search-paths): Add #:kind parameter and pass it to 'search-path-environment-variables'. (%options): Add an optional parameter for "--search-paths". (guix-package)[process-query]: Handle it. * tests/guix-package-net.sh: Adjust existing test. * tests/guix-package.sh: Adjust existing tests and add new test. * doc/guix.texi (Invoking guix package): Document it.
* guix package: --search-paths mentions $PATH.Ludovic Courtès2015-05-20
| | | | | * guix/scripts/package.scm (search-path-environment-variables): Add $PATH to SEARCH-PATHS.
* guix gc: Add '--optimize'.Ludovic Courtès2015-05-19
| | | | | * guix/scripts/gc.scm (show-help, %options): Add --optimize. (guix-gc): Handle it.
* store: Add 'optimize-store' RPC.Ludovic Courtès2015-05-19
| | | | | * guix/store.scm (operation-id): Add 'optimize-store'. (optimize-store): New procedure.
* profiles: Gracefully deal with packages containing an etc/ symlink.Ludovic Courtès2015-05-18
| | | | | | | | | | | | | This fixes a bug whereby 'guix package -i gcc-toolchain' would fail in 'build-profile'. This is because in 'gcc-toolchain', etc/ is a symlink, and so the 'scandir' call in 'unsymlink' would return #f instead of returning a list. Reported by Andreas Enge <andreas.enge@inria.fr>. * guix/build/profiles.scm (ensure-writable-directory)[unsymlink]: Append "/" to TARGET before calling 'scandir'. * tests/profiles.scm ("etc/profile when etc/ is a symlink"): New test.
* syscalls: Add 'set-network-interface-up'.Ludovic Courtès2015-05-17
| | | | * guix/build/syscalls.scm (set-network-interface-up): New procedure.
* publish: Add '--listen'.Ludovic Courtès2015-05-12
| | | | | | | | | | | * guix/scripts/publish.scm (show-help, %options): Add --listen. (getaddrinfo*): New procedure. (%default-options): Add 'address'. (open-server-socket): Replace 'addr' and 'port' with 'address', a sockaddr. (guix-publish): Adjust accordingly. Augment "publishing" message with the actual address. * doc/guix.texi (Invoking guix publish): Document it.
* publish: Add '--user' option.Ludovic Courtès2015-05-12
| | | | | | | | | | | | * guix/scripts/publish.scm (show-help): Add --user. (%options): Likewise. (run-publish-server): Change 'port' parameter to 'socket'. Pass #:socket instead of #:addr and #:port to 'run-server'. Update caller accordingly. (open-server-socket, gather-user-privileges): New procedures. (guix-publish): Use them. Force %PRIVATE-KEY and %PUBLIC-KEY early on. Warn when running as root. * doc/guix.texi (Invoking guix publish): Document --user.
* http-client: Remove monkey patching for 2.0.5.Ludovic Courtès2015-05-10
| | | | | * guix/http-client.scm (read-response-body*): Remove. (http-fetch): Remove hacks for 2.0.5.
* Remove assorted Guile 2.0.5 workarounds.Ludovic Courtès2015-05-10
| | | | | | | | * guix/scripts/authenticate.scm (%default-port-conversion-strategy): Remove. * guix/scripts/substitute.scm (fetch): Remove 2.0.5 special cases. * guix/serialization.scm (write-file): Remove 'scandir' workaround. * guix/ui.scm (command-files): Likewise.
* profiles: Ensure the profile's etc/ directory is writable.Ludovic Courtès2015-05-08
| | | | | | | | | Reported by 宋文武 <iyzsong@gmail.com>. * guix/build/profiles.scm (build-etc/profile, ensure-writable-directory): New procedures. (build-profile): Use them. * tests/profiles.scm ("etc/profile when etc/ already exists"): New test.
* profiles: Generate an 'etc/profile' file.Ludovic Courtès2015-05-06
| | | | | | | | | | | | | | Suggested by 宋文武 <iyzsong@gmail.com> in <http://bugs.gnu.org/20255>. * guix/build/profiles.scm (abstract-profile, write-environment-variable-definition): New procedures. (build-profile): Add #:search-paths parameter. Create OUTPUT/etc/profile. * guix/profiles.scm (profile-derivation)[builder]: Add 'search-paths' variable and pass it to 'build-profile'. Adjust #:modules argument. * tests/profiles.scm ("etc/profile"): New test. * doc/guix.texi (Invoking guix package): Mention etc/profile.
* profiles: Move build code to (guix build profiles).Ludovic Courtès2015-05-06
| | | | | | | | * guix/build/profiles.scm: New file. * Makefile.am (MODULES): Add it. * guix/profiles.scm (profile-derivation)[builder]: Call out to 'build-profile'. Add (guix build profiles) to the #:modules argument.
* search-paths: Export 'string-tokenize*'.Ludovic Courtès2015-05-06
| | | | | * guix/search-paths.scm (string-tokenize*): Export. * tests/utils.scm ("string-tokenize*"): Adjust accordingly.
* download: Work around Guile small-receive-buffer bug.Ludovic Courtès2015-05-06
| | | | | | | | | | | | | | | | Previously, code using directly (guix build download) was still affected by <http://bugs.gnu.org/15368>. This includes source derivations, the 'guix download' command, and (guix gnu-maintenance). 'guix substitute' was unaffected since it used (guix http-client), which already had the fix. * guix/http-client.scm (open-socket-for-uri): Remove. (http-fetch): Remove #:buffered? argument to 'open-socket-for-uri'; use 'setvbuf' instead. * guix/scripts/substitute.scm (fetch): Likewise. * guix/build/download.scm (open-socket-for-uri): New procedure, taken from guix/http-client.scm, but without the #:buffered? parameter.
* download: Reinstate buffering on connection sockets.Ludovic Courtès2015-05-06
| | | | | * guix/build/download.scm (open-connection-for-uri): Reinstate call to 'setvbuf' inadvertently removed in d17551d9.
* environment: Move iteration outside of 'for-each-search-path'.Ludovic Courtès2015-05-05
| | | | | | | | | | | * guix/search-paths.scm (search-path-definition): New procedure. * guix/scripts/environment.scm (for-each-search-path): Rename to... (evaluate-input-search-paths): ... this. Remove 'proc' and 'pure?' parameters, and return directly the list of search-path/value pairs. (create-environment): Use 'for-each' and 'evaluate-input-search-paths' instead of 'for-each-search-path'. (show-search-paths): Use 'for-each', 'search-path-definition', and 'evaluate-search-paths' instead of 'for-each-search-path'.
* environment: Use 'evaluate-search-paths'.Ludovic Courtès2015-05-05
| | | | | | | | | This allows 'guix environment' to correctly handle non-directory and/or pattern search-path specifications, such as that for 'XML_CATALOG_FILES'. * guix/scripts/environment.scm (for-each-search-path): Use 'evaluate-search-paths' instead of 'search-path-as-list' & co.
* search-paths: Define the 'PATH' environment variable.Ludovic Courtès2015-05-05
| | | | | * guix/search-paths.scm ($PATH): New variable. * guix/scripts/environment.scm (for-each-search-path): Use it.
* search-paths: 'evaluate-search-paths' can be passed a list of directories.Ludovic Courtès2015-05-05
| | | | | | | * guix/search-paths.scm (evaluate-search-paths): Change 'directory' to 'directories', and adjust 'search-path-as-list' accordingly. * guix/scripts/package.scm (search-path-environment-variables): Adjust call accordingly.
* gnu-maintenance: 'gnu-package?' returns #t for R and for GNOME packages.Ludovic Courtès2015-05-05
| | | | | | | Reported by John Darrington. * guix/gnu-maintenance.scm (gnu-package?)[mirror-type]: Add "gnome" to the list of GNU mirrors. Return #f for "cran".
* environment: Use (guix search-paths).Ludovic Courtès2015-05-05
| | | | | * guix/scripts/environment.scm: Use (guix search-paths). Fixes a regression introduced in e89431b.
* records: Make 'make-syntactic-constructor' available at load/eval/expand.Ludovic Courtès2015-05-04
| | | | * guix/records.scm (make-syntactic-constructor): Wrap in 'eval-when'.
* profiles: Use a &message error condition instead of 'error'.Ludovic Courtès2015-05-04
| | | | * guix/profiles.scm (sexp->manifest): Use 'raise' instead of 'error'.
* search-paths: 'evaluate-search-paths' now returns spec/value pairs.Ludovic Courtès2015-05-04
| | | | | | | * guix/search-paths.scm (evaluate-search-paths): Return specification/value pairs instead of variable/value pairs. * guix/scripts/package.scm (search-path-environment-variables): Adjust accordingly. Pass #:separator to 'environment-variable-definition'.
* search-paths: Add 'environment-variable-definition'.Ludovic Courtès2015-05-04
| | | | | * guix/search-paths.scm (environment-variable-definition): New variable. * guix/scripts/package.scm (search-path-environment-variables): Use it.
* search-paths: Add 'evaluate-search-paths', from (guix scripts package).Ludovic Courtès2015-05-04
| | | | | | | | | * guix/scripts/package.scm (with-null-error-port, evaluate-search-paths): Move to... * guix/search-paths.scm: ... here. * guix/utils.scm (string-tokenize*): Move to... * guix/search-paths.scm: ... here. * tests/utils.scm ("string-tokenize*"): Adjust accordingly.
* Move search path specifications to (guix search-paths).Ludovic Courtès2015-05-04
| | | | | | | | | | | | | * guix/packages.scm (<search-path-specification>, search-path-specification->sexp, sexp->search-path-specification): Move to... * guix/search-paths.scm: ... here. New file. * Makefile.am (MODULES): Add it. * guix/build-system/cmake.scm, guix/build-system/glib-or-gtk.scm, guix/build-system/gnu.scm, guix/build-system/haskell.scm, guix/build-system/perl.scm, guix/build-system/python.scm, guix/build-system/ruby.scm, guix/build-system/waf.scm, guix/profiles.scm, guix/scripts/package.scm: Use it.
* substitute: Increase TTL from 24h to 36h.Ludovic Courtès2015-05-04
| | | | * guix/scripts/substitute.scm (%narinfo-ttl): Increase to 36h.
* guix: build: Fix indentation for --sources in help output.Eric Bavier2015-05-04
| | | | | * guix/scripts/build.scm (show-help)[--sources]: Make indentation consistent with other long options.
* guix package: Introduce 'evaluate-search-paths'.Ludovic Courtès2015-05-04
| | | | | | * guix/scripts/package.scm (evaluate-search-paths): New procedure, with most of the code formerly in 'search-path-environment-variables'. (search-path-environment-variables): Use it.
* guix package: Move profile cleaning out of 'search-path-environment-variables'.Ludovic Courtès2015-05-04
| | | | | | | | * guix/scripts/package.scm (user-friendly-profile): New procedure. (search-path-environment-variables): Remove 'profile' local variable. (display-search-paths): Explicitly call 'user-friendly-profile' for the argument to 'search-path-environment-variables'. (guix-package)[process-query]: Likewise.
* guix: build: Add transitive source building.Eric Bavier2015-05-02
| | | | | | | * guix/scripts/build.scm (%options, options->derivations): Add --sources option. * doc/guix.texi (Invoking guix build): Document --sources option. * tests/guix-build.sh: Add tests.
* guix: packages: Add package-direct-sources and package-transitive-sources.Eric Bavier2015-05-02
| | | | | | | | | | * guix/tests.scm (dummy-origin): New syntax. * guix/packages.scm (package-direct-sources) (package-transitive-sources): New procedures. * tests/packages.scm ("package-direct-sources, no source") ("package-direct-sources, #f source") ("package-direct-sources, not input source", "package-direct-sources") ("package-transitive-sources"): Test them.
* profiles: Store search paths in manifests.Ludovic Courtès2015-05-02
| | | | | | | | | | | | | | | | | | | Discussed in <http://bugs.gnu.org/20255>. * guix/packages.scm (sexp->search-path-specification): New variable. * guix/profiles.scm (<manifest-entry>)[search-paths]: New field. (package->manifest-entry): Initialize it. (manifest->gexp): Match it. Wrap #$deps in (propagated-inputs ...). Emit (search-paths ...). Increment version. (find-package): New procedure. (sexp->manifest)[infer-search-paths]: New procedure. Use it to initialize the 'search-paths' field for versions 0 and 1. Add case for version 2. * guix/scripts/package.scm (search-path-environment-variables)[manifest-entry->package]: Remove. Use 'manifest-entry-search-paths' instead of 'manifest-entry->package' plus 'package-native-search-paths'. * tests/profiles.scm ("profile-manifest, search-paths"): New test.