summaryrefslogtreecommitdiff
path: root/guix/scripts
AgeCommit message (Collapse)Author
2017-01-28Add (guix memoization).Ludovic Courtès
* guix/combinators.scm (memoize): Remove. * guix/memoization.scm: New file. * Makefile.am (MODULES): Add it. * gnu/packages.scm, gnu/packages/bootstrap.scm, guix/build-system/gnu.scm, guix/build-system/python.scm, guix/derivations.scm, guix/gnu-maintenance.scm, guix/import/cran.scm, guix/import/elpa.scm, guix/modules.scm, guix/scripts/build.scm, guix/scripts/graph.scm, guix/scripts/lint.scm, guix/store.scm, guix/utils.scm: Adjust imports accordingly.
2017-01-26copy: Use userauth-public-key/auto! for ssh authentification.Mathieu Othacehe
* guix/scripts/copy.scm (open-ssh-session): Replace userauth-agent! by userauth-public-key/auto!. This way, if ssh-agent is not run, default ssh key (~/.ssh/id_rsa) will be used as a fallback. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-01-25container: Pass through TERM when calling exec.Christopher Baines
* guix/scripts/container/exec.scm (guix-container-exec): Capture the value of the TERM environment variable, and pass it through to the container. This means some applications now work where they did not before (e.g. htop), and others have more functionality, providing that the terminal was capable of enabling that functionality in the first place. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
2017-01-21lint: Display PACKAGE@VERSION.Ludovic Courtès
* guix/scripts/lint.scm (run-checkers): Remove 'name' variable. Display PACKAGE@VERSION instead of PACKAGE-VERSION.
2017-01-19guix environment, build: Allow absolute file names with '--root'.Ludovic Courtès
Reported by Chris Webber. * guix/scripts/build.scm (register-root): If ROOT is absolute, keep it as is. * guix/scripts/environment.scm (register-gc-root): Likewise. * tests/guix-environment.sh (expected): Add test.
2017-01-15guix build: Add '--repair'.Ludovic Courtès
* guix/scripts/build.scm (show-help, %options): Add '--repair'. * doc/guix.texi (Invoking guix gc): Mention 'guix build --repair'. (Additional Build Options): Document it.
2017-01-15guix build: Do not force 'build-cores', 'max-build-jobs', and 'max-silent-time'.Ludovic Courtès
This lets the daemon use its own default settings unless otherwise specified. * guix/scripts/build.scm (set-build-options-from-command-line): Do not provide default values for #:build-cores and #:max-build-jobs. (%default-options): Remove 'max-silent-time'.
2017-01-14challenge: Add '--verbose'.Ludovic Courtès
* guix/scripts/challenge.scm (summarize-report): Add #:verbose? parameter. [report-hashes]: New procedure. Use it. Honor VERBOSE? in the 'match case. (show-help, %options): Add '--verbose'. (guix-challenge): Honor it.
2017-01-14challenge: Return comparison reports instead of just discrepancies.Ludovic Courtès
This makes it easier to distinguish between matches, mismatches, and the various cases of inconclusive reports. * guix/scripts/challenge.scm (<discrepancy>): Rename to... (<comparison-report>): ... this. Add 'result' field. (comparison-report): New macro. (comparison-report-predicate, comparison-report-mismatch?) (comparison-report-match?) (comparison-report-inconclusive?): New procedures. (discrepancies): Rename to... (compare-contents): ... this. Change to return a list of <comparison-report>. Remove calls to 'warning'. (summarize-discrepancy): Rename to... (summarize-report): ... this. Adjust to <comparison-report>. (guix-challenge): Likewise. * tests/challenge.scm ("no discrepancies") ("one discrepancy"): Adjust to new API. ("inconclusive: no substitutes") ("inconclusive: no local build"): New tests.
2017-01-12challenge: Use a warning when substitutes are lacking.Ludovic Courtès
* guix/scripts/challenge.scm (discrepancies): Use 'warning' instead of 'leave'.
2017-01-11perform-download: Add backward-compatible case.Ludovic Courtès
This is meant to ease transition for people running an older guix-daemon invoking a recent 'guix perform-download' with only one argument. This is a followup to 9b5364a3afb03414bd6e3ded2fbfdacabe4e8870. * guix/scripts/perform-download.scm (perform-download): Make 'output' optional. Bind 'output*' from DRV's "out" and honor it. (guix-perform-download): Add clause with one argument.
2017-01-11daemon: Allow check builds of 'builtin:download' derivations.Ludovic Courtès
Fixes <http://bugs.gnu.org/25089>. Reported by Leo Famulari <leo@famulari.name>. * nix/libstore/build.cc (DerivationGoal::runChild): In the 'isBuiltin' case, check whether DRV's output is in 'redirectedOutputs', and pass an 'output' argument to the built-in builder. (DerivationGoal::addHashRewrite): Add 'printMsg' call. * nix/libstore/builtins.hh (derivationBuilder): Add 'output' parameter. * nix/libstore/builtins.cc (builtinDownload): Likewise. Add OUTPUT to ARGV. * guix/scripts/perform-download.scm (perform-download): Add 'output' parameter. (guix-perform-download): Adjust 'match' clauses accordingly. * tests/derivations.scm ("'download' built-in builder, check mode"): New test.
2017-01-11guix package: Fix version and output for 'guix package -i /gnu/store/…'.Ludovic Courtès
* guix/utils.scm (package-name->name+version): Add optional 'delimiter' parameter. * guix/scripts/package.scm (store-item->manifest-entry): Pass #\- as the delimiter for 'package-name->name+version'. Use "out" instead of #f for the 'output' field. * tests/guix-package.sh: Add test.
2017-01-10guix archive: Allow compilation in the absence of Guile-JSON.Ludovic Courtès
Fixes <http://bugs.gnu.org/25409>. Reported by Ben Woodcroft <b.woodcroft@uq.edu.au>. * guix/scripts/archive.scm: Use 'module-autoload!' instead of #:use-module to (guix docker).
2017-01-07guix archive: '-f docker' supports package names as arguments.Ludovic Courtès
This allows users to type: guix archive -f docker emacs as was already the case for the 'nar' format. Reported by David Thompson. * guix/scripts/archive.scm (%default-options): Add 'format'. (export-from-store): Dispatch based on the 'format' key in OPTS. (guix-archive): Call 'export-from-store' in all cases when the 'export' key is in OPTS.
2017-01-06guix: Add Docker image export.Ricardo Wurmus
* guix/docker.scm: New file. * Makefile.am (MODULES): Register it. * guix/scripts/archive.scm (show-help, %options, guix-archive): Add support for "--format". * doc/guix.texi (Invoking guix archive): Document it.
2017-01-04graph: Add '%reverse-package-node-type'.Ludovic Courtès
* guix/scripts/graph.scm (%reverse-package-node-type): New variable. (%node-types): Add it. * tests/graph.scm ("reverse package DAG"): New test. * doc/guix.texi (Invoking guix refresh): Add cross-reference to "Invoking guix graph". (Invoking guix graph): Document 'reverse-package'.
2017-01-02guix hash: '-x' excludes '.git' even when it is a regular file.Ludovic Courtès
* guix/scripts/hash.scm (guix-hash)[vcs-file?]: Add case for '.git' regular files.
2016-12-31Add 'guix copy'.Ludovic Courtès
* guix/scripts/copy.scm: New file. * guix/scripts/archive.scm (options->derivations+files): Export. * doc/guix.texi (Invoking guix copy): New node. * Makefile.am (MODULES) [HAVE_GUILE_SSH]: Add guix/scripts/copy.scm. * po/guix/POTFILES.in: Likewise.
2016-12-31Add (guix ssh) module.Ludovic Courtès
* guix/scripts/offload.scm (connect-to-remote-daemon) (store-import-channel, store-export-channel, send-files) (retrieve-files): Move to (guix ssh). (nonce): Add optional 'name' parameter and use it. (retrieve-files*): New procedure. (transfer-and-offload): Use it instead of 'retrieve-files', and add first parameter to 'send-files'. (assert-node-can-import): Likewise. (assert-node-can-export): Use 'retrieve-files' instead of 'store-export-channel'. * guix/ssh.scm: New file. * configure.ac: Use 'GUIX_CHECK_GUILE_SSH' and define 'HAVE_GUILE_SSH' Automake conditional. * Makefile.am (MODULES) [HAVE_GUILE_SSH]: Add guix/ssh.scm.
2016-12-21guix build: '--with-source' overrides the 'replacement' of a package.Ludovic Courtès
* guix/scripts/build.scm (package-with-source): Set 'replacement' to #f. * tests/scripts-build.scm ("options->transformation, with-source, replacement"): New test.
2016-12-20environment: Add '--root' option.Ludovic Courtès
* guix/scripts/environment.scm (show-help, %options): Add --root. (register-gc-root): New procedure. (guix-environment): Call 'register-gc-root' when OPTS has a 'gc-root' option. * doc/guix.texi (Invoking guix environment): Document it. * tests/guix-environment.sh: Add tests.
2016-12-17guix import: Print list of expressions.Ricardo Wurmus
* guix/scripts/import.scm (guix-import): Print list of expressions.
2016-12-17import cran: Add "recursive" option.Ricardo Wurmus
* guix/scripts/import/cran.scm: (%options): Add "recursive" option. (guix-import-cran): Handle "recursive" option. * doc/guix.texi (Invoking guix import): Document it.
2016-12-17profiles: Remove dependency on 'glibc-utf8-locales' for tests.Ludovic Courtès
Commit 1af0860e8be81c01ad405c1226d6bc4516e62863 added a mandatory dependency on 'glibc-utf8-locales', which entails long rebuilds for tests. * guix/profiles.scm (profile-derivation): Add #:locales? parameter. Add 'set-utf8-locale' variable. Use it when LOCALES? is true. (link-to-empty-profile): Pass #:locales? #f. * guix/scripts/environment.scm (inputs->profile-derivation): Pass #:locales?. * guix/scripts/package.scm (build-and-use-profile): Likewise. * tests/packages.scm ("--search-paths with pattern"): Pass #:locales? #f. * tests/profiles.scm ("profile-derivation") ("profile-derivation, inputs", "profile-manifest, search-paths") ("etc/profile", "etc/profile when etc/ already exists"): ("etc/profile when etc/ is a symlink"): Likewise.
2016-12-16refresh: Make dependency on (guix import crates) weak.Ludovic Courtès
Reported by Tobias Geerinckx-Rice <me@tobias.gr>. * guix/scripts/refresh.scm: Do not explicitly import (guix import crates).
2016-12-14graph: Add "list-backend" and "backend" options.Ricardo Wurmus
* guix/graph.scm (%graph-backends): New variable. * guix/scripts/graph.scm (lookup-backend, list-backends): New procedures. (%options): Add options for "backend" and "list-backends". (show-help): Add help texts for "backend" and "list-backend" options. (%default-options): Add "backend" default. (guix-graph): Pass backend argument to "export-graph". * doc/guix.texi (Invoking guix graph): Document the new options.
2016-12-14import: Add updater for rust crates.David Craven
* guix/import/crate.scm (crate-package?, latest-release, %crate-updater): New variables. * guix/scripts/refresh.scm (%updaters): Add crate updater. * doc/guix.texi: Add crate updater to table.
2016-12-14import: Add importer for rust crates.David Craven
* guix/import/crate.scm: New file. * guix/scripts/import/crate.scm: New file. * guix/scripts/import.scm (importers): Add crate importer. * tests/crate.scm: New file. * doc/guix.texi: Add crate importer to table. * Makefile.am (MODULES, SCM_TESTS): Add files.
2016-12-12import: cpan: Add updater.Eric Bavier
* guix/import/cpan.scm (module->dist-name): Fetch the field of interest. (cpan-fetch): Accept release name rather than module name. (fix-source-url): Rename to ... (cpan-source-url): ... this. Take metadata as parameter. (package->upstream-name, cpan-version, cpan-package?, latest-release): New procedures. (cpan-module->sexp): Use cpan-version and cpan-source-url. (%cpan-updater): New variable. * guix/scripts/refresh.scm (%updaters): Add %CPAN-UPDATER.
2016-12-09offload: Allow testing machines that match a regexp.Ludovic Courtès
* guix/scripts/offload.scm (check-machine-availability): Add 'pred' parameter and honor it. (guix-offload): for the "test" sub-command, accept an extra 'regexp' parameter. Pass a second argument to 'check-machine-availability'.
2016-12-09offload: Test each machine only once.Ludovic Courtès
* guix/scripts/offload.scm (check-machine-availability)[build-machine=?]: New procedure. Add call to 'delete-duplicates'.
2016-12-09offload: Do not read ~/.ssh/known_hosts.Ludovic Courtès
* guix/scripts/offload.scm (open-ssh-session): Pass #:knownhosts to 'make-session'.
2016-12-06offload: Increase the connection timeout.Ludovic Courtès
* guix/scripts/offload.scm (open-ssh-session): Set #:timeout to 10.
2016-12-06offload: Send the build log to the right file descriptor.Ludovic Courtès
This fixes a regression introduced in 21531add3205e400707c8fbfd841845f9a71863a whereby the build log would no longer be sent to FD 4, thereby leading the daemon to not see the build log. * guix/scripts/offload.scm (transfer-and-offload): Parameterize CURRENT-BUILD-OUTPUT-PORT.
2016-12-05offload: Fix plural of some messages.Ludovic Courtès
* guix/scripts/offload.scm (send-files): Use 'N_' for possibly plural message. Write "store item" instead of "store file". (retrieve-files): Likewise.
2016-12-05offload: Make the compression methods configurable.Ludovic Courtès
* guix/scripts/offload.scm (<build-machine>)[compression] [compression-level]: New fields. (open-ssh-session): Honor them. * doc/guix.texi (Daemon Offload Setup): Document them.
2016-12-05guix system: If the new system generation already exists, overwrite it.Chris Marusich
Fixes <http://bugs.gnu.org/25100>. Before that, 'guix system reconfigure' would fail if the next generation already existed. * guix/scripts/system.scm (switch-to-system): Use 'switch-symlink' instead of 'symlink'. * doc/guix.texi (Using the Configuration System, Invoking guix system): Document the behavior. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2016-12-05refresh: Indicate that PACKAGE... is optional.Tobias Geerinckx-Rice
* guix/scripts/refresh.scm (show-help): Add brackets around PACKAGE.
2016-12-05offload: Add "test" sub-command.Ludovic Courtès
* guix/scripts/offload.scm (assert-node-repl, assert-node-has-guix) (nonce, assert-node-can-import, assert-node-can-export) (check-machine-availability): New procedures. (%random-state): New variable. (guix-offload): Add case for "test". * doc/guix.texi (Daemon Offload Setup): Document it. Remove obsolete bit about remote invocation of 'guix build'.
2016-12-04publish: Factorize 'content-length' addition.Ludovic Courtès
* guix/scripts/publish.scm (with-content-length): New procedure. (http-write) <application/octet-stream>: Use it.
2016-12-01offload: Do not abort when a machine is unreachable.Ludovic Courtès
* guix/scripts/offload.scm (machine-load): Wrap 'open-ssh-session' call in 'false-if-exception'; return +inf.0 if it returns #f.
2016-12-01offload: Gracefully report connection failures.Ludovic Courtès
* guix/scripts/offload.scm (open-ssh-session): Check the return value of 'connect!'. Call 'leave' when it's not 'ok.
2016-12-01offload: Warn about the lack of zlib support.Ludovic Courtès
* guix/scripts/offload.scm (guix-offload): Print a warning when 'zlib-support?' returns false.
2016-12-01offload: Remove redundant call to 'topologically-sorted' in 'send-file'.Ludovic Courtès
* guix/scripts/offload.scm (send-files): Remove call to 'topologically-sorted'.
2016-11-30refresh: '--list-updaters' shows updater coverage.Ludovic Courtès
* guix/scripts/refresh.scm (list-updaters-and-exit): Compute the coverage ratio of each updater and print it. Print the coverage ratio for all the updaters. * doc/guix.texi (Invoking guix refresh): Document it.
2016-11-30gnu-maintenance: Add kernel.org updater.Ludovic Courtès
* guix/gnu-maintenance.scm (latest-kernel.org-release): New procedure. (%kernel.org-updater): New variable. * guix/scripts/refresh.scm (%updaters): Add it.
2016-11-30refresh: Honor the selected updaters when '-u' isn't given.Ludovic Courtès
Fixes a regression introduced in e9c72306fdfd6a60158918850cb25d0ff3837d16. * guix/scripts/refresh.scm (check-for-package-update): Add 'updaters' parameter and honor it. (guix-refresh): Pass UPDATERS to 'check-for-package-update'.
2016-11-29Merge branch 'master' into python-build-systemHartmut Goebel
2016-11-29refresh: Warn about packages that lack an updater.Ludovic Courtès
* guix/upstream.scm (package-update-path): Rename to... (package-latest-release): ... this. Remove 'version>?' check. (package-latest-release*): New procedure. (package-update): Use it. * guix/scripts/refresh.scm (lookup-updater): Rename to... (lookup-updater-by-name): ... this. (warn-no-updater): New procedure. (update-package): Add #:warn? parameter and honor it. (check-for-package-update): New procedure. (guix-refresh)[warn?]: New variable. Replace inline code when UPDATE? is false with a call to 'check-for-package-update'. Pass WARN? to 'check-for-package-update' and 'update-package'. * doc/guix.texi (Invoking guix refresh): Document it. Fix a couple of typos.