summaryrefslogtreecommitdiff
path: root/guix
Commit message (Collapse)AuthorAge
* import: pypi: Updater silently ignores packages without source.Ludovic Courtès2015-12-01
| | | | | | | | | | | Reported by Andreas Enge <andreas@enge.fr> at <https://lists.gnu.org/archive/html/guix-devel/2015-11/msg00764.html>. * guix/import/pypi.scm (&missing-source-error): New error type. (latest-source-release): Raise it instead of using 'error'. (pypi->guix-package): Guard against it and use 'leave' to report the error. (latest-release): Guard against it and return #f when caught.
* guix build: Modularize transformation handling.Ludovic Courtès2015-12-01
| | | | | | | | | * guix/scripts/build.scm (options/resolve-packages): Remove. (options->things-to-build, transform-package-source): New procedure. (%transformations): New variable. (options->transformation): New procedure. (options->derivations): Rewrite to use 'options->things-to-build' and 'options->transformation'.
* guix package: Refactor 'options->installable'.Ludovic Courtès2015-12-01
| | | | | | | | * guix/scripts/package.scm (options->upgrade-predicate) (store-item->manifest-entry): New procedures. * guix/scripts/package.scm (options->installable): Use them. Remove the 'packages-to-upgrade' and 'packages-to-install' variables by getting rid of a level of indirection.
* guix package: Move 'process-actions' out of sight.Ludovic Courtès2015-12-01
| | | | | | * guix/scripts/package.scm (process-actions): New procedure, moved from... (guix-package): ... here. Adjust accordingly.
* guix package: Formalize the list of actions.Ludovic Courtès2015-12-01
| | | | | | | | * guix/scripts/package.scm (roll-back-action, switch-generation-action) (delete-generations-action, manifest-action): New procedures. (%actions): New variable. * guix/scripts/package.scm (guix-package)[process-action]: Rewrite to traverse %ACTIONS.
* guix package: Move 'build-and-use-profile' out of sight.Ludovic Courtès2015-12-01
| | | | | | * guix/scripts/package.scm (build-and-use-profile): New procedure. Adapted and moved from... (guix-package)[process-actions]: ... here. Adjust call sites.
* guix package: Move a couple of procedures out of sight.Ludovic Courtès2015-12-01
| | | | | | * guix/scripts/package.scm (ensure-default-profile, process-query): New procedures, moved from... (guix-package): ... here.
* guix package: Remove unnecessary use of (%store).Ludovic Courtès2015-12-01
| | | | | * guix/scripts/package.scm (delete-matching-generations): Use STORE instead of (%store).
* gnu: python: Set SOURCE_DATE_EPOCH to 1 instead of 0.Ludovic Courtès2015-11-29
| | | | | | * gnu/packages/python.scm (python-2)[arguments]: Set SOURCE_DATE_EPOCH to 1 to match what the daemon does. * guix/build/python-build-system.scm (set-SOURCE-DATE-EPOCH): Likewise.
* gnu: python-2: Honor 'SOURCE_DATE_EPOCH'.Ludovic Courtès2015-11-29
| | | | | | | | | | * gnu/packages/patches/python-2.7-source-date-epoch.patch: New file. * gnu/packages/python.scm (python-2)[source]: Use it. [arguments]: Set SOURCE_DATE_EPOCH in 'patch-lib-shells' phase. * guix/build/python-build-system.scm (set-SOURCE-DATE-EPOCH): New procedure. (%standard-phases): Add it. * gnu-system.am (dist_patch_DATA): Add patch.
* refresh: Check updater availability at run time.Ludovic Courtès2015-11-29
| | | | | | | | | | | | | This is a followup to b68d2db, which added a check for updaters at macro-expansion time. The problem is that, when running 'guix pull', Guile-JSON is found, so the PyPi updater (say) is added to %UPDATERS, but then at run time Guile-JSON might be missing. Reported by orbea on #guix. * guix/scripts/refresh.scm (maybe-updater): Rewrite as 'syntax-rules'. Produce code that checks conditions at run time. (list-updaters): Update docstring.
* http-client: 'http-fetch' converts strings to URIs.Ludovic Courtès2015-11-29
| | | | | * guix/http-client.scm (http-fetch): Use 'string->uri' if URI is a string. Fixes a regression introduced in 8a5063f.
* guix build: Factorize build log query.Ludovic Courtès2015-11-29
| | | | | * guix/scripts/build.scm (show-build-log): New procedure. (guix-build): New variable 'items'. Use it and 'show-build-log'.
* environment: Set build options early on.Ludovic Courtès2015-11-28
| | | | | | | | | | This fixes a bug whereby some options, such as #:substitute-urls, would be passed to the daemon too late to have an effect. * guix/scripts/environment.scm (build-inputs): Remove call to 'set-build-options-from-command-line*'. (guix-environment): Add call to 'set-build-options-from-command-line' as early as possible.
* lint: Do not report already-patched vulnerabilities.Ludovic Courtès2015-11-28
| | | | | | * guix/scripts/lint.scm (patch-file-name): New procedure. (check-vulnerabilities): Use it to filter out patched vulnerabilities. * tests/lint.scm ("cve: one patched vulnerability"): New test.
* substitute: Warn upon store prefix mismatches.Ludovic Courtès2015-11-28
| | | | | | | | Suggested by Hynek Urban <hynek.urban@gmail.com>. * guix/scripts/substitute.scm (fetch-narinfos): Move body to... [do-fetch]: ... here. New procedure. Emit a warning when CACHE-INFO's prefix does not match.
* lint: Add "cve" checker.Ludovic Courtès2015-11-26
| | | | | | | | | | Fixes <http://bugs.gnu.org/21289>. * guix/scripts/lint.scm (package-name->cpe-name, package-vulnerabilities) (check-vulnerabilities): New procedures. * guix/scripts/lint.scm (%checkers): Add "cve" checker. * tests/lint.scm ("cve", "cve: one vulnerability"): New tests. * doc/guix.texi (Invoking guix lint): Mention it.
* Add (guix cve).Ludovic Courtès2015-11-26
| | | | | | | * guix/cve.scm, tests/cve-sample.xml, tests/cve.scm: New files. * Makefile.am (MODULES): Add guix/cve.scm. (SCM_TESTS): Add tests/cve.scm. (EXTRA_DIST): Add tests/cve-sample.scm.
* http-client: 'http-fetch' and 'http-fetch/cached' support HTTPS.Ludovic Courtès2015-11-26
| | | | | * guix/http-client.scm (http-fetch): Use 'open-connection-for-uri', to support HTTPS.
* import: hackage: Assume current 'ghc' package version.Federico Beffa2015-11-26
| | | | | * guix/scripts/import/hackage.scm (%default-options): Do it. (ghc-default-version): New variable.
* import: hackage: Handle CRLF end of line style.Federico Beffa2015-11-26
| | | | | * guix/import/hackage.scm (hackage-fetch, hackage->guix-package): Use 'canonical-newline-port'.
* utils: Add 'canonical-newline-port'.Federico Beffa2015-11-26
| | | | | * guix/utils.scm (canonical-newline-port): New procedure. * tests/utils.scm ("canonical-newline-port"): New test.
* import: hackage: Make parsing of tests and fields more flexible.Federico Beffa2015-11-26
| | | | | | | * guix/import/cabal.scm (is-test): Allow spaces between keyword and parentheses. (is-id): Add argument 'port'. Allow spaces between keyword and column. (lex-word): Adjust call to 'is-id'.
* import: hackage: Make it resilient to missing final newline.Federico Beffa2015-11-26
| | | | | * guix/import/cabal.scm (peek-next-line-indent): Check for missing final newline.
* import: hackage: Imporve parsing of tests.Federico Beffa2015-11-26
| | | | | * guix/import/cabal.scm (lex-word): Add support for tests with no spaces. (impl): Rewrite.
* import: hackage: Add recognition of 'true' and 'false' symbols.Federico Beffa2015-11-26
| | | | | | | * guix/import/cabal.scm (is-true, is-false, lex-true, lex-false): New procedures. (lex-word): Use them. (make-cabal-parser): Add TRUE and FALSE tokens. (eval): Add entries for 'true and 'false symbols.
* gexp: Build text derivations locally.Ludovic Courtès2015-11-25
| | | | | * guix/gexp.scm (gexp->file): Pass #:substitutable? #f. (text-file*): Likewise, and #:local-build? #t.
* guix package: Reduce startup time by ~50%.Ludovic Courtès2015-11-24
| | | | | | | | | | | | | | | | | | | As measured with: time sh -c 'for i in `seq 1 10` ; do guix package --search-paths ; done' On my machine, when running: strace -o ,,s guix package --search-paths the number returned by: grep -E '^(open|l?stat).*\.go' ,,s | wc -l drops from 1610 to 837. * guix/scripts/package.scm: Remove two unnecessary #:use-module forms. Autoload (gnu packages ...) modules.
* graph: Add '%bag-with-origins-node-type'.Ludovic Courtès2015-11-23
| | | | | | | | | | | * guix/scripts/graph.scm (bag-node-edges): Remove 'filter' call. Add case for 'origin'. (%bag-node-type)[edges]: Add filtering here. (%bag-with-origins-node-type): New variable. (%node-types): Add it. * tests/graph.scm ("bag DAG, including origins"): New test. * tests/guix-graph.sh: Add 'bag-with-origins'. * doc/guix.texi (Invoking guix graph): Document it.
* refresh: Add '--expression'.Ludovic Courtès2015-11-23
| | | | | | * guix/scripts/refresh.scm (%options, show-help): Add --expression. (guix-refresh): Honor it. * doc/guix.texi (Invoking guix refresh): Document it.
* 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.