summaryrefslogtreecommitdiff
path: root/guix
Commit message (Collapse)AuthorAge
* guix download: Fail when more than one URL is passed.Ludovic Courtès2015-11-23
| | | | | | * guix/scripts/download.scm (guix-download)[parse-option]: Call 'leave' when passed an extra argument. * tests/guix-download.sh: Add test.
* guix download: Gracefully handle missing arguments.Ludovic Courtès2015-11-23
| | | | | | | | Fixes <http://bugs.gnu.org/21991>. Reported by Jan Synáček <jan.synacek@gmail.com>. * guix/scripts/download.scm (guix-download): Call 'leave' when OPTS does not contain an 'argument' key.
* ftp-client: Default port for 'ftp-open' is now "ftp".Ludovic Courtès2015-11-22
| | | | | | * guix/ftp-client.scm (ftp-open): Change default #:port to "ftp". * guix/scripts/lint.scm (probe-uri): Remove 'port' parameter to 'ftp-open'.
* ftp-client: Fix off-by-one when trying addresses in 'ftp-open'.Ludovic Courtès2015-11-22
| | | | | | * guix/ftp-client.scm (ftp-open): Change to use 'match' instead of car/cdr, and fix off-by-one (was '(null? addresses)' instead of '(null? (cdr addresses))'.)
* environment: Correctly handle abnormal exits.Ludovic Courtès2015-11-21
| | | | | | | | Fixes <http://bugs.gnu.org/21958>. * guix/scripts/environment.scm (status->exit-code): New procedure. (exit/status, primitive-exit/status): Use it. * tests/guix-environment-container.sh: Add test.
* refresh: Rewrite '--list-dependent' in terms of (guix graph).Ludovic Courtès2015-11-21
| | | | | | * guix/scripts/refresh.scm (all-packages, list-dependents): New procedures. (guix-refresh): Use it.
* graph: Add procedures to query a node's edges.Ludovic Courtès2015-11-21
| | | | | | | * guix/graph.scm (%node-edges, node-edges, node-back-edges) (node-transitive-edges): New procedures. * tests/graph.scm ("node-edges") ("node-transitive-edges + node-back-edges"): New tests.
* Add (guix graph).Ludovic Courtès2015-11-21
| | | | | | | | | * guix/scripts/graph.scm (<node-type>, <graph-backend>, emit-prologue) (emit-epilogue, emit-node, emit-edge, %graphviz-backend, export-graph): Move to... * guix/graph.scm: ... here. New file. * guix/scripts/system.scm, tests/graph.scm: Use it. * Makefile.am (MODULES): Add it.
* ftp-client: Restrict to TCP/IP connections.Ludovic Courtès2015-11-17
| | | | | | | | | Fixes <http://bugs.gnu.org/21925>. Regression introduced in 279ec1d. Reported by Chris Marusich <cmmarusich@gmail.com>. * guix/ftp-client.scm (ftp-open): Restrict sockets to SOCK_STREAM/IPPROTO_IP.
* graft: Graft files in parallel.Ludovic Courtès2015-11-16
| | | | | * guix/build/graft.scm (rewrite-directory): Use 'n-par-for-each' instead of 'for-each'.
* graft: Graft files in a deterministic order.Ludovic Courtès2015-11-16
| | | | | | | * guix/build/graft.scm (rewrite-directory)[rewrite-leaf]: Change to take a single parameter. Add call to 'lstat'. Factorize result of 'destination'. Use 'find-files' instead of 'file-system-fold'.
* lint: Have connections time out after 3 seconds.Ludovic Courtès2015-11-12
| | | | | | * guix/scripts/lint.scm (probe-uri): Add #:timeout parameter. Pass it to 'open-connection-for-uri' and 'ftp-open'. (validate-uri): Pass #:timeout 3 to 'probe-uri'.
* download: Always use AI_ADDRCONFIG when resolving host names.Ludovic Courtès2015-11-12
| | | | | | | * guix/build/download.scm (open-socket-for-uri): Always pass AI_ADDRCONFIG to 'getaddrinfo' as recommended in the fine Guile manual. * guix/ftp-client.scm (ftp-open): Ditto.
* download: Add timeout parameter for connections.Ludovic Courtès2015-11-12
| | | | | | | | | * guix/build/download.scm (ensure-uri): New procedure. (current-http-proxy): New variable. (open-socket-for-uri): Copy from Guile commit aaea5b2, but add #:timeout parameter and use 'connect*' instead of 'connect'. (open-connection-for-uri): Add #:timeout parameter and pass it to 'open-socket-for-uri'.
* ftp-client: Add timeout parameter to 'ftp-open'.Ludovic Courtès2015-11-12
| | | | | | | * guix/ftp-client.scm (catch-EINPROGRESS): New macro. (connect*): New procedure. (ftp-open): Add #:timeout parameter. Use 'connect*' instead of 'connect' and pass it TIMEOUT.
* ftp-client: Restrict to TCP connections.Ludovic Courtès2015-11-12
| | | | | * guix/ftp-client.scm (ftp-open): Force SOCK_STREAM as the socket type to avoid calling 'connect' on a datagram socket.
* guix gc: Error out when extra arguments are passed.Ludovic Courtès2015-11-11
| | | | | | | | | | Fixes <http://bugs.gnu.org/21817>. Reported by Petter Berntsen <petter@mykolab.ch>. * guix/scripts/gc.scm (guix-gc)[assert-no-extra-arguments]: New procedure. Use it for actions 'collect-garbage', 'optimize', and 'verify'. * tests/guix-gc.sh: Add tests.
* edit: Honor $VISUAL.Ludovic Courtès2015-11-11
| | | | | | | | Suggested by Andreas Enge <andreas@enge.fr>. * guix/scripts/edit.scm (%editor): Honor 'VISUAL' before 'EDITOR'. (show-help): Adjust accordingly. * doc/guix.texi (Invoking guix edit): Likewise.
* refresh: Avoid non-literal format string.Ludovic Courtès2015-11-11
| | | | | | | Reported by Mathieu Lirzin <mthl@gnu.org>. * guix/scripts/refresh.scm (guix-refresh): Rewrite 'list-dependent?' report to avoid nested 'N_' calls.
* ui: 'guix help COMMAND' is like 'guix COMMAND --help'.Ludovic Courtès2015-11-11
| | | | * guix/ui.scm (run-guix): Add ("help" COMMAND) case.
* guix package: '--search-paths' can report combined search paths.Ludovic Courtès2015-11-11
| | | | | | | | | | | | | Partly fixes <http://bugs.gnu.org/20255>. * guix/scripts/package.scm (search-path-environment-variables): Change 'profile' to 'profiles'; expect it to be a list. (display-search-paths): Likewise. (%default-options): Remove 'profile' entry. (%options) <--profile>: Keep previous values associated with 'profile' in RESULT. (guix-package)[process-actions, process-query]: Handle the possible lack of 'profile' pair in OPTS.
* refresh: Discard PyPI updater when Guile-JSON is missing.Ludovic Courtès2015-11-08
| | | | | | | | Reported by Sleep_Walker and Mathieu Lirzin <mthl@gnu.org>. * guix/scripts/refresh.scm (maybe-updater, list-updaters): New macros. (%updaters): Use 'list-updaters' instead of 'list'. Make %PYPI-UPDATER conditional.
* edit: Improve error reporting when $EDITOR is not found.Ludovic Courtès2015-11-05
| | | | | | | | Reported by Benno Evers <benno@bmevers.de> at <https://lists.gnu.org/archive/html/guix-devel/2015-11/msg00125.html>. * guix/scripts/edit.scm (guix-edit): Wrap 'execl' call in 'catch'. Provide more meaningful error message.
* edit: Lift helper procedure.Ludovic Courtès2015-11-05
| | | | | | * guix/scripts/edit.scm (package->location-specification): New procedure, with code formerly... (guix-edit): ... here. Use it.
* import: hackage: Fix invalid use of 'leave'.Ludovic Courtès2015-11-04
| | | | | | | | Reported by Paul van der Walt <paul@denknerd.org> in <http://bugs.gnu.org/21829>. * guix/scripts/import/hackage.scm (guix-import-hackage): Add missing argument in call to 'leave'.
* build-system/python: 'package-with-python2' preserves source location.Ludovic Courtès2015-11-04
| | | | | * guix/build-system/python.scm (package-with-explicit-python): Add 'location' field.
* import: pypi: Make downloads silent.Ludovic Courtès2015-11-04
| | | | | * guix/import/pypi.scm (pypi-fetch): Wrap body in 'call-with-output-file' and 'with-error-to-port'.
* import: pypi: Add missing copyright line.Ludovic Courtès2015-11-04
| | | | * guix/import/pypi.scm: Add missing copyright line for bab020d.
* scripts: container: Fix 'exec' command line parsing.David Thompson2015-11-03
| | | | | | * guix/scripts/container/exec.scm (partition-args): Reimplement such that all args up to and including the PID are returned as the first of the two values.
* import: pypi: add updaterCyril Roelandt2015-11-03
| | | | | | | | * guix/import/pypi.scm (guix-package->pypi-name, latest-release): New procedures. (%pypi-updater): New variable. * guix/scripts/refresh.scm (%updaters): Add %PYPI-UPDATER. * doc/guix.texi (Invoking guix refresh): Mention PyPI
* import: pypi: Use "pypi-uri" instead of building the URL manually.Cyril Roelandt2015-11-03
| | | | | * guix/import/pypi.scm (make-pypi-sexp): Use "pypi-uri". * tests/pypi.scm: Update the tests accordingly.
* guix: Add a "pypi-uri" helper method.Cyril Roelandt2015-11-03
| | | | | * guix/download.scm (mirrors): New "pypi" mirror. * guix/build-system/python.scm (pypi-uri): New method.
* scripts: environment: Display friendly container error messages.David Thompson2015-11-03
| | | | | | * guix/scripts/environment.scm (assert-container-features): New procedure. (guix-environment): Use it.
* import: gnu: Update to the (guix upstream) API.Ludovic Courtès2015-11-03
| | | | | | | | | | | This is a followup to 0a7c5a0. * guix/import/gnu.scm (preferred-archive-type): Use 'upstream-source-archive-types' instead of 'gnu-release-archive-types'. (gnu-package->sexp): Use 'upstream-source-urls' et al. Update call to 'download-tarball'. (gnu->guix-package): Use <upstream-source> instead of <gnu-release>. * guix/upstream.scm (upstream-source-archive-types): Export.
* guix system: Always build grub.cfg for 'init' and 'reconfigure'.Ludovic Courtès2015-11-02
| | | | | | | | | | | Fixes <http://bugs.gnu.org/21068>. Reported by Germano Gabbianelli <tyrion.mx@gmail.com> and Mark H Weaver <mhw@netris.org>. * guix/scripts/system.scm (perform-action): Always add GRUB.CFG to DRVS for 'init' and 'reconfigure'. Co-authored-by: Mark H Weaver <mhw@netris.org>
* services: Add 'system-service-type'.Ludovic Courtès2015-11-02
| | | | | | | | | | | | | | | | | | | | | | | * gnu/services.scm (system-derivation): New procedure. (system-service-type): New variable. (boot-script-entry): New procedure. (boot-service-type): Extend SYSTEM-SERVICE-TYPE. (etc-entry): New procedure. (etc-service-type): Extend SYSTEM-SERVICE-TYPE. (fold-services): Change default #:target-type to SYSTEM-SERVICE-TYPE. * gnu/system.scm (operating-system-directory-base-entries): New procedure. (essential-services): Use it. Add an instance of SYSTEM-SERVICE-TYPE. (operating-system-boot-script): Pass #:target-type to 'fold-services'. (operating-system-derivation): Rewrite in terms of 'fold-services'. * gnu/system/linux-container.scm (system-container): Remove. (container-script): Use 'operating-system-derivation'. * guix/scripts/system.scm (export-extension-graph): Replace BOOT-SERVICE-TYPE by SYSTEM-SERVICE-TYPE. * doc/images/service-graph.dot: Add 'system' node and edges. * doc/guix.texi (Service Composition): Mention SYSTEM-SERVICE-TYPE. (Service Reference): Document it. Update 'fold-services' documentation.
* scripts: environment: Ignore user shell when spawning container.David Thompson2015-11-02
| | | | | | | * guix/scripts/environment.scm (%default-options): Remove 'exec' association. (guix-environment): If the user didn't specify a command, use the default shell, or use /bin/sh when a container is requested.
* emacs: Add completions for '--type' option of 'refresh' popup.Alex Kost2015-11-02
| | | | | | | | | | * guix/scripts/refresh.scm: Export '%updaters'. * emacs/guix-main.scm (refresh-updater-names): New procedure. * emacs/guix-base.el (guix-refresh-updater-names): New function. * emacs/guix-read.el (guix-read-refresh-updater-names, guix-read-refresh-updater-names-string): New functions. * emacs/guix-command.el (guix-command-improve-refresh-argument): Use 'guix-read-refresh-updater-names-string'.
* scripts: Add 'container' subcommand.David Thompson2015-11-01
| | | | | | | | * guix/scripts/container.scm: New file. * guix/scripts/container/exec.scm: New file. * po/guix/POTFILES.in: Add them. * Makefile.am (MODULES): Add them. * doc/guix.texi (Invoking guix container): New section.
* guix system: Fix typo in --help message.Alex Kost2015-10-31
| | | | | * guix/scripts/system.scm (show-help): Align 'container' the same way as other actions.
* scripts: environment: Allow lists of packages in expressions.David Thompson2015-10-30
| | | | | | | * guix/scripts/environment.scm (options/resolve-packages): Match against lists of packages when evaluating expressions. * tests/guix-environment.sh: Add test. * doc/guix.texi ("invoking guix environment"): Add docs.
* scripts: system: Add 'container' action.David Thompson2015-10-30
| | | | | | | * guix/scripts/system.scm (show-help): Display 'container' action. (system-derivation-for-action, guix-system): Add 'container' case. (perform-action): Skip GRUB config generation when building a container. * doc/guix.texi (Invoking guix system): Document it.
* scripts: environment: Allow mixing regular and ad-hoc packages.David Thompson2015-10-29
| | | | | | | | | | | | | | | | | This patch changes the --ad-hoc flag to be positional. That is, the packages that appear before --ad-hoc are interpreted as packages whose inputs should be in the environment; the packages that appear after are interpreted as packages to be directly added to the environment. * guix/scripts/environment.scm (tag-package-arg, compact): New procedures. (%options): Tweak the handlers for --load and --expression options. (options/resolve-packages): Preserve package mode tag. (parse-args): Tweak argument handler to use package tagging procedure. (guix-environment): Apply ad-hoc behavior on a per package basis. * tests/guix-environment.sh: Add test. * doc/guix.texi ("invoking guix environment"): Document new behavior of --ad-hoc.
* refresh: Support comma-separated updater types.Alex Kost2015-10-28
| | | | | | | | * guix/scripts/refresh.scm (%options): Handle comma-separated types for '--type' option. (guix-refresh): Adjust accordingly. (show-help): Likewise. * doc/guix.texi (Invoking guix refresh): Document it.
* ui: Add 'make-regexp*'.Ludovic Courtès2015-10-28
| | | | | | | | | Fixes <http://bugs.gnu.org/21773>. Reported by Jan Synáček <jan.synacek@gmail.com>. * guix/ui.scm (make-regexp*): New procedure. * guix/scripts/package.scm (options->installable, guix-package): Use it when processing user-provided regexps.
* store: Use the daemon's substitute URLs by default.Ludovic Courtès2015-10-28
| | | | | | | | | | | Partly fixes <http://bugs.gnu.org/20217>. * guix/store.scm (set-build-options): Change #:substitute-urls to default to #f. Send the 'substitute-urls' pair only if SUBSTITUTE-URLS is true. * guix/scripts/build.scm (set-build-options-from-command-line): Do not default to %DEFAULT-SUBSTITUTE-URLS for #:substitute-urls. * guix/scripts/size.scm (%default-options): Remove 'substitute-urls'.
* scripts: build: Add --file option.David Thompson2015-10-28
| | | | | | | | * guix/scripts/build.scm (show-help): Add help text for --file option. (%options): Add --file option. (options/resolve-packages): Handle 'file' options. * tests/guix-build.sh: Add tests. * doc/guix.texi ("invoking guix build"): Add doc.
* substitute: Honor all the specified server URLs.Ludovic Courtès2015-10-28
| | | | | | | | | | | | | | * guix/scripts/substitute.scm (lookup-narinfos/diverse): New procedure. (lookup-narinfo): Use it. (process-query): Change #:cache-url to #:cache-urls. [valid?]: Remove 'narinfo?' check, which is no longer necessary. Use 'lookup-narinfos/diverse' instead of 'lookup-narinfos'. (process-substitution): Change #:cache-url to #:cache-urls. (%cache-url): Rename to... (%cache-urls): ... this. Turn into a list. (guix-substitute): Remove 'getaddrinfo' test with early exit. Adjust calls to 'process-query' and 'process-substitution'. * tests/substitute.scm: Change '%cache-url' to '%cache-urls'.
* substitute: 'lookup-narinfos' returns exactly a list of narinfos.Ludovic Courtès2015-10-28
| | | | | | | | * guix/scripts/substitute.scm (lookup-narinfos): Filter out #f values from CACHED, such that the end result is exactly a list of narinfos, not interspersed with #f. * guix/scripts/challenge.scm (discrepancies): Assume REMOTE is a list of narinfos.
* substitute: 'http-multiple-get' follows 'fold' style.Ludovic Courtès2015-10-28
| | | | | | | * guix/scripts/substitute.scm (http-multiple-get): Add 'seed' parameter. Call PROC in 'fold' style. (fetch-narinfos)[handle-narinfo-response]: Adjust accordingly. Update 'http-multiple-get' call accordingly.