summaryrefslogtreecommitdiff
path: root/guix/scripts
Commit message (Collapse)AuthorAge
* substitute: Sanitize the client-provided column number.Ludovic Courtès2016-04-20
| | | | | * guix/scripts/substitute.scm (client-terminal-columns): Sanitize the client's column number.
* substitute: Install the client's locale.Ludovic Courtès2016-04-20
| | | | | | | * guix/store.scm (set-build-options): Add #:locale parameter and honor it. * guix/scripts/substitute.scm (guix-substitute): Install the client's locale.
* substitute: Internationalize signature and download messages.Ludovic Courtès2016-04-20
| | | | | * guix/scripts/substitute.scm (assert-valid-narinfo): Use gettext for messages.
* substitute: Better abbreviate substitute URL in progress report.Ludovic Courtès2016-04-20
| | | | | | | | Suggested by Danny Milosavljevic <dannym@scratchpost.org>. * guix/build/download.scm (nar-uri-abbreviation): New procedure. * guix/scripts/substitute.scm (process-substitution): Use it instead of 'store-path-abbreviation'.
* substitute: Honor the number of columns of the client terminal.Ludovic Courtès2016-04-15
| | | | | | | * guix/store.scm (set-build-options): Add #:terminal-columns parameter and honor it. * guix/scripts/substitute.scm (client-terminal-columns): New procedure. (guix-substitute): Use it to parameterize 'current-terminal-columns'.
* guix download: Honor the number of columns of the terminal.Ludovic Courtès2016-04-15
| | | | | * guix/scripts/download.scm (guix-download): Parameterize 'current-terminal-columns'.
* lint: Emit an ANSI erase-in-line sequence.Danny Milosavljevic2016-04-14
| | | | | | | * guix/scripts/lint.scm (run-checkers): Add '\x1b[K' to progress messages and after 'for-each'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* environment: container: Work around read-only /etc/resolv.conf issue.David Thompson2016-04-07
| | | | | * guix/scripts/environment.scm (launch-environment/container): Mount /etc/resolv.conf as a writable file.
* challenge: Really exit with non-zero upon hash mismatch.Ludovic Courtès2016-04-06
| | | | | | | | | | Reported by John Darrington. * guix/scripts/challenge.scm (guix-challenge): Add an explicit 'exit' call when ISSUES is empty. * scripts/guix.in: Add comment about 'exit'. * doc/guix.texi (Invoking guix challenge): Mention the behavior and exit code.
* emacs: Use 'build-and-use-profile' from (guix scripts package).Alex Kost2016-04-04
| | | | | * guix/scripts/package.scm: Export 'build-and-use-profile'. * emacs/guix-main.scm (process-package-actions): Use it.
* import: Add Hackage updater.Eric Bavier2016-03-30
| | | | | | | | * guix/import/hackage.scm (guix-package->hackage-name, hackage-package?) (latest-release): New procedures. (%hackage-updater): New variable. * guix/scripts/refresh.scm (%updaters): Add it. * doc/guix.texi (Invoking guix refresh): Mention it.
* environment: Set a default value for PS1.David Thompson2016-03-30
| | | | | * guix/scripts/environment.scm (launch-environment/container): Set PS1 during container initialization.
* guix system: Warn against missing 'guix pull'.Ludovic Courtès2016-03-28
| | | | | | | | Suggested by Leo Famulari and others. * guix/scripts/system.scm (maybe-suggest-running-guix-pull): New procedure. (perform-action): Call it when ACTION is 'reconfigure.
* environment: Properly handle SIGINT.David Thompson2016-03-27
| | | | | | | | | | | | | Switching to execlp means that the process spawned in a container is PID 1, which obsoleted one of the 'guix environment --container' tests because the init process can't be killed in the usual manner. * guix/scripts/environment.scm (launch-environment/fork): New procedure. (launch-environment): Switch from system* to execlp. Add handler for SIGINT. (guix-environment): Use launch-environment/fork. * tests/guix-environment-container.sh: Replace abnormal exit test with one that works now that the spawned process is PID 1.
* environment: container: Create dummy home directory and /etc/passwd.David Thompson2016-03-26
| | | | | | | | | * guix/scripts/environment.scm (launch-environment/container): Change $HOME to the current user's home directory instead of /homeless-shelter. Create a dummy /etc/passwd with a single entry for the current user. * doc/guix.texi ("invoking guix environment"): Add a note about the dummy home directory and /etc/passwd.
* guix build: '--with-source' correctly matches versioned file names.Ludovic Courtès2016-03-23
| | | | | | | | * guix/scripts/build.scm: Use the right 'package-name->name+version' procedure. Fixes a regression introduced in 1b846da8c372bee78851439fd9e72b2499115e5a. * tests/scripts-build.scm ("options->transformation, with-source, with version"): New test.
* substitute: Gracefully handle TLS errors.Ludovic Courtès2016-03-23
| | | | | * guix/scripts/substitute.scm (with-networking): Use 'match-lambda*' and add case for 'gnutls-error'.
* substitute: Do not leak file descriptors for TLS connections.Ludovic Courtès2016-03-17
| | | | | | | | Partially fixes <http://bugs.gnu.org/20145>. * guix/scripts/substitute.scm (fetch, download-cache-info): (http-multiple-get, fetch-narinfos, progress-report-port): Use 'close-connection' instead of 'close-port'.
* substitute: Cache transient HTTP errors for 10mn.Ludovic Courtès2016-03-17
| | | | | | * guix/scripts/substitute.scm (fetch-narinfos)[handle-narinfo-response]: Cache transient errors for 10mn. (%narinfo-transient-error-ttl): New variable.
* lint: Do not leak file descriptors for TLS connections.Ludovic Courtès2016-03-17
| | | | | | | Partially fixes <http://bugs.gnu.org/20145>. * guix/scripts/lint.scm (probe-uri): Use 'close-connection' instead of 'close-port'.
* substitute: Update progress for responses different from 200/404.Ludovic Courtès2016-03-17
| | | | | * guix/scripts/substitute.scm (fetch-narinfos)[handle-narinfo-response]: Add missing call to 'update-progress!'.
* substitute: Honor client-provided empty URL list.Ludovic Courtès2016-03-16
| | | | | | | | | | | | | | | Before that, 'guix build --substitute-urls=""' would lead to using the daemon's own URL list instead of the empty list. The 'or*' hack, which is to blame, had become unnecessary since commit fb4bf72be3fbc23bca35ba4b842b7e1517ef0e3a. Reported by Mark H Weaver <mhw@netris.org>. * guix/scripts/substitute.scm (or*): Remove. (%cache-urls): Use 'or' instead of 'or*'. * tests/store.scm ("substitute query, alternating URLs"): Add test with empty URL list. * doc/guix.texi (Common Build Options): Mention the empty string.
* substitute: Honor the 'max-age' of 'Cache-Control' headers.Ludovic Courtès2016-03-16
| | | | | | | | | | This allows substitute servers to tell 'guix substitute' how long they can cache narinfo lookups. * guix/scripts/substitute.scm (cache-narinfo!): Add 'ttl' parameter. [cache-entry]: Honor it. (fetch-narinfos)[handle-narinfo-response]: Check the 'Cache-Control' header of RESPONSE and pass its 'max-age' value to 'cache-narinfo!'.
* substitute: Make room for a 'ttl' field in cached entries.Ludovic Courtès2016-03-16
| | | | | | | | * guix/scripts/substitute.scm (cached-narinfo): Expect 'narinfo' sexp version 2 with a 'ttl' field. (cache-narinfo!)[cache-entry]: Produce 'narinfo' sexp version 2 with a 'ttl' field. (remove-expired-cached-narinfos)[expired?]: Read 'narinfo' sexp version 2.
* substitute: Keep the initial connection alive.Ludovic Courtès2016-03-14
| | | | | | | | | | | | | | The connection used to fetch /nix-cache-info is now reused for the subsequent narinfo requests. * guix/scripts/substitute.scm (download-cache-info)[download]: Remove. [uri, read-cache-info]: New variables. Rewrite in terms of 'http-fetch' instead of 'fetch'. Return an open port in addition to a <cache-info>. * guix/scripts/substitute.scm (http-multiple-get): Add #:port parameter and honor it. (fetch-narinfos)[do-fetch]: Add 'port' parameter. Adjust to new 'download-cache-info' and 'do-fetch' signatures.
* substitute: Remove dead code.Ludovic Courtès2016-03-14
| | | | | | | | This parameter became unused with the switch to HTTP pipelining in commit d3a652037ef879f9279bc056c43d15ba7afcbb25. * guix/scripts/substitute.scm (fetch): Remove #:quiet-404? and adjust accordingly.
* size: Disable grafts.Ludovic Courtès2016-03-14
| | | | * guix/scripts/size.scm (guix-size): Parametrize '%graft?'.
* substitute: Optimize HTTP pipelining over TLS.Ludovic Courtès2016-03-10
| | | | | * guix/scripts/substitute.scm (http-multiple-get): Write the requests to a bytevector output port before sending them.
* substitute: Add HTTPS support.Ludovic Courtès2016-03-10
| | | | | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/22937>. Reported by Chris Marusich <cmmarusich@gmail.com>. * guix/scripts/substitute.scm (fetch): Add 'https' alongside 'http'. Use 'open-connection-for-uri' instead of 'open-socket-for-uri'. Call 'setvbuf' only when PORT matches 'file-port?'. (http-multiple-get): Likewise. Change 'base-url' parameter to 'base-uri'. (fetch-narinfos)[do-fetch]: Add 'https' case alongside 'http'. Pass URI instead of URL to 'http-multiple-get'. * doc/guix.texi (Requirements): Move GnuTLS one level higher and mention HTTPS substitutes. (Substitutes): Mention HTTPS and recommend it. Explain why servers are not authenticated. Add "On Trusting Binaries" subsection.
* substitute: Error out on unsupported URL schemes.Ludovic Courtès2016-03-09
| | | | | | | Reported in <http://bugs.gnu.org/22937> by Chris Marusich <cmmarusich@gmail.com>. * guix/scripts/substitute.scm (fetch): Add 'else' case and call 'leave'.
* guix build: Add '--quiet'.Ludovic Courtès2016-03-08
| | | | | | | | | | Fixes <http://bugs.gnu.org/19772>. Reported by Andrei Osipov <andrspv@gmail.com>. * guix/scripts/build.scm (show-help, %options): Add --quiet. (guix-build): Parameterize 'current-build-output-port' accordingly. * doc/guix.texi (Invoking guix build): Use it in example. (Additional Build Options): Document it.
* guix system: Write the GC root on the target file system.Ludovic Courtès2016-03-08
| | | | | | | Fixes <http://bugs.gnu.org/22802>. Reported by Jookia <166291@gmail.com>. * guix/scripts/system.scm (install-grub*): Prepend TARGET to GC-ROOT.
* guix build: Set the build options early.Ludovic Courtès2016-03-05
| | | | | | | | | | | | This fixes a bug whereby, with grafts leading to builds very early, build options such as --substitute-urls would not be taken into account yet. Reported by Andreas Enge <andreas@enge.fr>. * guix/scripts/build.scm (guix-build): Move 'opts' to the beginning. Use 'with-store' instead of 'open-connection'. Call 'set-build-options-from-command-line' right after 'with-store'.
* lint: cve: Gracefully handle HTTP errors.Ludovic Courtès2016-03-04
| | | | | * guix/scripts/lint.scm (current-vulnerabilities*): New procedure. (package-vulnerabilities): Use it.
* lint: derivation: Disable grafts, but check replacements.Ludovic Courtès2016-03-03
| | | | | * guix/scripts/lint.scm (check-derivation): Pass #:graft? #f. When 'package-replacement' exists, compute its derivation.
* guix build: -S returns the replacement's source.Ludovic Courtès2016-03-03
| | | | | | | | Reported by Mark H Weaver. * guix/scripts/build.scm (options->derivations): When SRC and GRAFT? are true, use the source of P's replacement. * tests/guix-build.sh: Add test.
* utils: Use '@' for separating package names and version numbers.Mathieu Lirzin2016-03-02
| | | | | | | | | | | | | | | | | | | | | This provides the ability to use numbers in package names. Fixes <http://bugs.gnu.org/19219>. * guix/utils.scm (package-name->name+version): New procedure. * gnu/packages.scm (%find-package): Add a FALLBACK? keyword argument. Use the previous method when no package is found. (specification->package+output, specification->package): Adapt documentation to new syntax. * doc/guix.texi (Invoking guix package, Invoking guix import): Likewise. * guix/ui.scm (package-specification->name+version+output): Likewise. * guix/scripts/import/hackage.scm (show-help): Likewise. * tests/guix-build.sh: Adapt to new syntax. * tests/guix-lint.sh: Likewise. * tests/guix-package.sh: Likewise. * tests/ui.scm ("package-specification->name+version+output"): Likewise. * tests/utils.scm ("package-name->name+version"): Likewise. * NEWS: Mention new syntax.
* graph: Ignore 'GUIX_BUILD_OPTIONS'.Ludovic Courtès2016-03-02
| | | | | | | | Previously 'GUIX_BUILD_OPTIONS' would be honored, but 'guix graph' does not support the common build options. * guix/scripts/graph.scm (guix-graph): Use 'args-fold*' instead of 'parse-command-line'.
* guix build: Move '--no-grafts' to the common build options.Ludovic Courtès2016-03-02
| | | | | | | | | | | | | | | | * guix/scripts/build.scm (%options): Move --no-grafts to... (%standard-build-options): ... here. (show-help, show-build-options-help): Adjust accordingly. * guix/scripts/archive.scm (%default-options): Add 'graft?'. (guix-archive): Parametrize '%graft?'. * guix/scripts/environment.scm (%default-options): Add 'graft?'. (guix-environment): Parametrize '%graft?'. * guix/scripts/package.scm (%default-options): Add 'graft?'. (guix-package): Parametrize '%graft?'. * guix/scripts/system.scm (%default-options): Add 'graft?'. (guix-system): Parametrize 'graft?'. * doc/guix.texi (Additional Build Options): Move --no-grafts to... (Common Build Options): ... here.
* guix archive: Use 'with-store'.Ludovic Courtès2016-03-02
| | | | | * guix/scripts/archive.scm (guix-archive): Use 'with-store' instead of an explicit 'open-connection'.
* grafts: Graft recursively.Ludovic Courtès2016-03-01
| | | | | | | | | | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/22139>. * guix/grafts.scm (graft-derivation): Rename to... (graft-derivation/shallow): ... this. (graft-origin-file-name, item->deriver, non-self-references) (cumulative-grafts, graft-derivation): New procedures * tests/grafts.scm ("graft-derivation, grafted item is a direct dependency"): Clarify title. Use 'grafted' instead of 'graft' to refer to the grafted derivation. ("graft-derivation, grafted item is an indirect dependency") ("graft-derivation, no dependencies on grafted output"): New tests. * guix/packages.scm (input-graft): Change to take a package instead of an input. (input-cross-graft): Likewise. (fold-bag-dependencies): New procedure. (bag-grafts): Rewrite in terms of 'fold-bag-dependencies'. * tests/packages.scm ("package-derivation, indirect grafts"): Comment out. * doc/guix.texi (Security Updates): Mention run-time dependencies and recursive grafting.
* import: Add github-updater.Ben Woodcroft2016-02-26
| | | | | | | * guix/import/github.scm: New file. * guix/scripts/refresh.scm (%updaters): Add %GITHUB-UPDATER. * doc/guix.texi (Invoking guix refresh): Mention it. * Makefile.am (MODULES): Add gnu/import/github.scm.
* store: 'path-info-deriver' is #f when there is no deriver.Ludovic Courtès2016-02-26
| | | | | | | * guix/store.scm (read-path-info): Use #f when we get the empty string for DERIVER. * guix/scripts/publish.scm (narinfo-string): Adjust accordingly. * tests/store.scm ("path-info-deriver"): New test.
* Merge branch 'media-updates'Mark H Weaver2016-02-25
|\
| * gnu-maintenance: Add X.org updater.Andy Wingo2016-02-24
| | | | | | | | | | | | | | | | | | | | * guix/gnu-maintenance.scm (xorg-package?, latest-xorg-release): New private functions. (%xorg-updater): New public variable. * guix/scripts/refresh.scm (%updaters): Add %xorg-updater. * doc/guix.texi (Invoking guix refresh): Mention the new updater.
* | guix system: Restore load path after running the activation script.Ludovic Courtès2016-02-25
| | | | | | | | | | | | | | | | | | | | Fixes <http://bugs.gnu.org/22753>. Reported by Mark H Weaver <mhw@netris.org>. * guix/scripts/system.scm (save-load-path-excursion): New variable. (upgrade-shepherd-services): Add comment about the issue. (switch-to-system): Use 'save-load-path-excursion' around 'primitive-load' call.
* | publish: Do not publish nars for invalid store items.Ludovic Courtès2016-02-25
|/ | | | | | | | | | | Before that, /nar requests could succeed if the requested store item exists but is invalid (although such requests were unlikely because the corresponding narinfo request would have failed.) * guix/scripts/publish.scm (render-nar): Add 'store' parameter. Use 'valid-path?' instead of 'file-exists?'. (make-request-handler): Adjust 'render-nar' call accordingly. * tests/publish.scm ("/nar/invalid"): New test.
* Do not check package freshness during upgrade.Alex Kost2016-02-24
| | | | | | | | | Fixes <http://bugs.gnu.org/22740>. Reported by Andreas Enge <andreas@enge.fr>. * gnu/packages.scm (waiting, ftp-open*, check-package-freshness): Remove. * guix/scripts/package.scm (options->installable): Adjust accordingly. * emacs/guix-main.scm (package->manifest-entry*): Likewise.
* publish: Move 'query-path-info' call where it belongs.Ludovic Courtès2016-02-24
| | | | | | * guix/scripts/publish.scm (narinfo-string): Remove 'path-info' parameter and add 'store' parameter. Call 'query-path-info'. (render-narinfo): Adjust accordingly.
* refresh: Remove unneeded import.Ludovic Courtès2016-02-23
| | | | | | | | | Reported by Leo Famulari <leo@famulari.name> and Ben Woodcroft <b.woodcroft@uq.edu.au> at <http://bugs.gnu.org/22752>. * guix/scripts/refresh.scm: Remove unneeded and harmful import of (guix import gem).