summaryrefslogtreecommitdiff
path: root/guix/scripts
Commit message (Collapse)AuthorAge
* guix build: Add '--repair'.Ludovic Courtès2017-01-15
| | | | | | * guix/scripts/build.scm (show-help, %options): Add '--repair'. * doc/guix.texi (Invoking guix gc): Mention 'guix build --repair'. (Additional Build Options): Document it.
* guix build: Do not force 'build-cores', 'max-build-jobs', and 'max-silent-time'.Ludovic Courtès2017-01-15
| | | | | | | | | 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'.
* challenge: Add '--verbose'.Ludovic Courtès2017-01-14
| | | | | | | | | * 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.
* challenge: Return comparison reports instead of just discrepancies.Ludovic Courtès2017-01-14
| | | | | | | | | | | | | | | | | | | | | | 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.
* challenge: Use a warning when substitutes are lacking.Ludovic Courtès2017-01-12
| | | | | * guix/scripts/challenge.scm (discrepancies): Use 'warning' instead of 'leave'.
* perform-download: Add backward-compatible case.Ludovic Courtès2017-01-11
| | | | | | | | | | | 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.
* daemon: Allow check builds of 'builtin:download' derivations.Ludovic Courtès2017-01-11
| | | | | | | | | | | | | | | | | | 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.
* guix package: Fix version and output for 'guix package -i /gnu/store/…'.Ludovic Courtès2017-01-11
| | | | | | | | | * 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.
* guix archive: Allow compilation in the absence of Guile-JSON.Ludovic Courtès2017-01-10
| | | | | | | | 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).
* guix archive: '-f docker' supports package names as arguments.Ludovic Courtès2017-01-07
| | | | | | | | | | | | | | | 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.
* guix: Add Docker image export.Ricardo Wurmus2017-01-06
| | | | | | | | * 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.
* graph: Add '%reverse-package-node-type'.Ludovic Courtès2017-01-04
| | | | | | | | | * 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'.
* guix hash: '-x' excludes '.git' even when it is a regular file.Ludovic Courtès2017-01-02
| | | | | * guix/scripts/hash.scm (guix-hash)[vcs-file?]: Add case for '.git' regular files.
* Add 'guix copy'.Ludovic Courtès2016-12-31
| | | | | | | | * 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.
* Add (guix ssh) module.Ludovic Courtès2016-12-31
| | | | | | | | | | | | | | | | | * 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.
* guix build: '--with-source' overrides the 'replacement' of a package.Ludovic Courtès2016-12-21
| | | | | | * guix/scripts/build.scm (package-with-source): Set 'replacement' to #f. * tests/scripts-build.scm ("options->transformation, with-source, replacement"): New test.
* environment: Add '--root' option.Ludovic Courtès2016-12-20
| | | | | | | | | * 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.
* guix import: Print list of expressions.Ricardo Wurmus2016-12-17
| | | | * guix/scripts/import.scm (guix-import): Print list of expressions.
* import cran: Add "recursive" option.Ricardo Wurmus2016-12-17
| | | | | | * guix/scripts/import/cran.scm: (%options): Add "recursive" option. (guix-import-cran): Handle "recursive" option. * doc/guix.texi (Invoking guix import): Document it.
* profiles: Remove dependency on 'glibc-utf8-locales' for tests.Ludovic Courtès2016-12-17
| | | | | | | | | | | | | | | | | | 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.
* refresh: Make dependency on (guix import crates) weak.Ludovic Courtès2016-12-16
| | | | | | Reported by Tobias Geerinckx-Rice <me@tobias.gr>. * guix/scripts/refresh.scm: Do not explicitly import (guix import crates).
* graph: Add "list-backend" and "backend" options.Ricardo Wurmus2016-12-14
| | | | | | | | | | | * 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.
* import: Add updater for rust crates.David Craven2016-12-14
| | | | | | | * 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.
* import: Add importer for rust crates.David Craven2016-12-14
| | | | | | | | | * 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.
* import: cpan: Add updater.Eric Bavier2016-12-12
| | | | | | | | | | | | * 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.
* offload: Allow testing machines that match a regexp.Ludovic Courtès2016-12-09
| | | | | | | * 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'.
* offload: Test each machine only once.Ludovic Courtès2016-12-09
| | | | | | * guix/scripts/offload.scm (check-machine-availability)[build-machine=?]: New procedure. Add call to 'delete-duplicates'.
* offload: Do not read ~/.ssh/known_hosts.Ludovic Courtès2016-12-09
| | | | | * guix/scripts/offload.scm (open-ssh-session): Pass #:knownhosts to 'make-session'.
* offload: Increase the connection timeout.Ludovic Courtès2016-12-06
| | | | * guix/scripts/offload.scm (open-ssh-session): Set #:timeout to 10.
* offload: Send the build log to the right file descriptor.Ludovic Courtès2016-12-06
| | | | | | | | | | 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.
* offload: Fix plural of some messages.Ludovic Courtès2016-12-05
| | | | | | * guix/scripts/offload.scm (send-files): Use 'N_' for possibly plural message. Write "store item" instead of "store file". (retrieve-files): Likewise.
* offload: Make the compression methods configurable.Ludovic Courtès2016-12-05
| | | | | | | * guix/scripts/offload.scm (<build-machine>)[compression] [compression-level]: New fields. (open-ssh-session): Honor them. * doc/guix.texi (Daemon Offload Setup): Document them.
* guix system: If the new system generation already exists, overwrite it.Chris Marusich2016-12-05
| | | | | | | | | | | | | | 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>
* refresh: Indicate that PACKAGE... is optional.Tobias Geerinckx-Rice2016-12-05
| | | | * guix/scripts/refresh.scm (show-help): Add brackets around PACKAGE.
* offload: Add "test" sub-command.Ludovic Courtès2016-12-05
| | | | | | | | | | * 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'.
* publish: Factorize 'content-length' addition.Ludovic Courtès2016-12-04
| | | | | * guix/scripts/publish.scm (with-content-length): New procedure. (http-write) <application/octet-stream>: Use it.
* offload: Do not abort when a machine is unreachable.Ludovic Courtès2016-12-01
| | | | | * guix/scripts/offload.scm (machine-load): Wrap 'open-ssh-session' call in 'false-if-exception'; return +inf.0 if it returns #f.
* offload: Gracefully report connection failures.Ludovic Courtès2016-12-01
| | | | | * guix/scripts/offload.scm (open-ssh-session): Check the return value of 'connect!'. Call 'leave' when it's not 'ok.
* offload: Warn about the lack of zlib support.Ludovic Courtès2016-12-01
| | | | | * guix/scripts/offload.scm (guix-offload): Print a warning when 'zlib-support?' returns false.
* offload: Remove redundant call to 'topologically-sorted' in 'send-file'.Ludovic Courtès2016-12-01
| | | | | * guix/scripts/offload.scm (send-files): Remove call to 'topologically-sorted'.
* refresh: '--list-updaters' shows updater coverage.Ludovic Courtès2016-11-30
| | | | | | | * 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.
* gnu-maintenance: Add kernel.org updater.Ludovic Courtès2016-11-30
| | | | | | * guix/gnu-maintenance.scm (latest-kernel.org-release): New procedure. (%kernel.org-updater): New variable. * guix/scripts/refresh.scm (%updaters): Add it.
* refresh: Honor the selected updaters when '-u' isn't given.Ludovic Courtès2016-11-30
| | | | | | | | | 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'.
* Merge branch 'master' into python-build-systemHartmut Goebel2016-11-29
|\
| * refresh: Warn about packages that lack an updater.Ludovic Courtès2016-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
| * offload: Call 'machine-load' only once per machine.Ludovic Courtès2016-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a longstanding issue where 'choose-build-machine' would make on average O(N log(N)) calls to 'machine-load', plus an extra call for the selected machine, instead of N calls. * guix/scripts/offload.scm (machine-load): Add comment. (machine-power-factor, machine-less-loaded-or-faster?): Remove. (choose-build-machine)[machines+slots]: Rename to... [machines+slots+loads]: ... this. [undecorate]: Adjust accordingly. [machine-less-loaded-or-faster?]: New procedure. Remove extra 'machine-load' call in body.
| * offload: Drop 'remote-pipe'.Ludovic Courtès2016-11-25
| | | | | | | | | | * guix/scripts/offload.scm (remote-pipe): Remove. (machine-load): Use 'open-remote-pipe*' instead of 'remote-pipe'.
| * offload: Rewrite to make direct RPCs to the remote daemon.Ludovic Courtès2016-11-25
| | | | | | | | | | | | | | | | | | | | * guix/scripts/offload.scm (<build-machine>)[daemon-socket]: New field. (connect-to-remote-daemon): New procedure. (%gc-root-file, register-gc-root, remove-gc-roots, offload): Remove. (transfer-and-offload): Rewrite using 'connect-to-remote-daemon' and RPCs over SSH. (store-import-channel, store-export-channel): New procedures. (send-files, retrieve-files): Rewrite using these.
| * offload: Remove 'with-nar-error-handling' macro.Ludovic Courtès2016-11-25
| | | | | | | | | | * guix/scripts/offload.scm (with-nar-error-handling): Remove. (guix-offload): Use 'with-error-handling' instead.
| * offload: Reuse SSH session during 'transfer-and-offload'.Ludovic Courtès2016-11-25
| | | | | | | | | | | | | | | | | | | | | | * guix/scripts/offload.scm (remote-pipe): Replace 'machine' parameter with 'session'. Remove 'open-ssh-session' call. (register-gc-root): Replace 'machine' with 'session'. Use ' session-get' instead of 'build-machine-name'. (remove-gc-roots, offload, send-files, retrieve-files): Likewise. (transfer-and-offload): Add 'open-ssh-session' call. Handle 'offload' errors here. (machine-load): Add call to 'open-ssh-session'.