summaryrefslogtreecommitdiff
path: root/guix/scripts
AgeCommit message (Collapse)Author
2016-06-27Merge branch 'master' into core-updatesLudovic Courtès
2016-06-09publish: Add '--ttl'.Ludovic Courtès
* guix/scripts/publish.scm (show-help, %options): Add --ttl. (render-narinfo): Add #:ttl and honor it. (make-request-handler): Add #:narinfo-ttl and honor it. (run-publish-server): Likewise. (guix-publish): Honor --ttl, pass it to 'run-publish-server'.
2016-06-08publish: Encore URIs that appear in narinfos.Ludovic Courtès
Fixes <http://bugs.gnu.org/21888>. Reported by iyzsong@member.fsf.org (宋文武). * guix/scripts/publish.scm (narinfo-string): Use 'encode-and-join-uri-path' instead of 'string-append' to compute URL. * tests/publish.scm ("/*.narinfo with properly encoded '+' sign"): ("/nar/ with properly encoded '+' sign"): New tests.
2016-05-31offload: Use (guix build syscalls).Ludovic Courtès
This is a followup to 4e0ea3eb288c2143b44bf324c64047762c72d3b3. * guix/scripts/offload.scm: Use (guix build syscalls).
2016-05-27guix package: Inherit the transformed version number.Ludovic Courtès
Previously, 'guix package -i emacs --with-source=./emacs-42.tar.gz' would fail to use "42" as the version number in the manifest entry. Reported by piyo on #guix. * guix/scripts/package.scm (process-actions)[transform-entry]: Inherit the version number from the result of TRANSFORM when it's a package. * tests/guix-package.sh: Test it.
2016-05-26substitute: Internationalize the "Downloading" message.Ludovic Courtès
* guix/scripts/substitute.scm (process-substitution): I18n "Downloading" message.
2016-05-24size: Pass 'requisites' a list of items.Ludovic Courtès
* guix/scripts/size.scm (substitutable-requisites): Change 'item' to 'items' and adjust. (requisites*): Likewise. (mappend-map): Remove. (store-profile): Adjust accordingly.
2016-05-24store: 'requisites' now takes a list of store items.Ludovic Courtès
* guix/store.scm (fold-path): Change 'path' to 'paths' and adjust body accordingly. (requisites): Likewise. * guix/scripts/environment.scm (inputs->requisites): Adjust user accordingly. * guix/scripts/size.scm (requisites*): Likewise. * guix/scripts/gc.scm (guix-gc): Likewise. * tests/store.scm ("requisites"): Likewise.
2016-05-24size: Accept several arguments.Ludovic Courtès
* guix/scripts/size.scm (display-profile): Display WHOLE at then end. (guix-size): Accept several FILES. * doc/guix.texi (Invoking guix size): Add example with several items.
2016-05-24size: 'store-profile' takes a list of store items.Ludovic Courtès
* guix/scripts/size.scm (mappend-map): New procedure. (store-profile): Change 'item' to 'items' and adjust code accordingly. (guix-size): Update caller. * tests/size.scm ("store-profile"): Likewise.
2016-05-24refresh: Make 'list-dependents' a monadic procedure.Ludovic Courtès
* guix/scripts/refresh.scm (list-dependents): Remove use of 'with-store' and 'run-with-store'. (guix-refresh): Wrap body in with-store/run-with-store.
2016-05-21substitute: Gracefully handle invalid store file names.Ludovic Courtès
Before, something like: echo have /gnu/foo | ./test-env guix substitute --query would lead to an ugly backtrace. * guix/scripts/substitute.scm (narinfo-cache-file): Call 'leave' when 'store-hash-part' returns #f.
2016-05-21graph: Allow store file names for 'derivation' and 'references' graphs.Ludovic Courtès
* guix/scripts/graph.scm (%derivation-node-type)[convert]: Add 'derivation-path?' and catch-all clauses. (%reference-node-type)[convert]: Add 'store-path?' and catch-all clauses. (assert-package, nodes-from-package): New procedures. (%package-node-type, %bag-node-type,%bag-with-origins-node-type) (%bag-emerged-node-type): Add 'convert' field (guix-graph): Rename 'packages' to 'items' and allow 'store-path?' arguments. * guix/graph.scm (<node-type>)[convert]: Adjust comment. * doc/guix.texi (Invoking guix graph): Document it.
2016-05-21graph: Use absolute file name canonicalization.Ludovic Courtès
* guix/scripts/graph.scm (guix-graph): Wrap in 'with-fluids'.
2016-05-17lint: Honor 'cpe-name' and 'cpe-version' package properties.Ludovic Courtès
* guix/scripts/lint.scm (package-name->cpe-name): Remove. (package-vulnerabilities): Honor 'cpe-name' and 'cpe-version' properties. * gnu/packages/grub.scm (grub)[properties]: New field. * gnu/packages/gnuzilla.scm (icecat)[properties]: Add 'cpe-name' and 'cpe-version'. * doc/guix.texi (Invoking guix lint): Mention 'cpe-name'.
2016-05-17import: Gracefully report import failures.Ludovic Courtès
Previously, something like 'guix import gnu which' would spit out a backtrace if, say, the 'which' tarball could not be authenticated. * guix/upstream.scm (download-tarball): Mention failure modes in docstring. * guix/import/gnu.scm (gnu-package->sexp): Return #f when 'download-tarball' returns #f. * guix/scripts/import.scm (guix-import): Call 'leave' when IMPORTER does not return a (package ...) sexp.
2016-05-17import: Exit with non-zero when an unknown importer is asked.Ludovic Courtès
* guix/scripts/import.scm (guix-import): Use 'leave' instead of 'format' when IMPORTER is unknown.
2016-05-14guix build: Catch 'getaddrinfo-error' for '--log-file'.Ludovic Courtès
* guix/scripts/build.scm (log-url)[valid-url?]: Catch 'getaddrinfo-error'.
2016-05-14guix build: Do not show what to build when '-d' is used.Ludovic Courtès
* guix/scripts/build.scm (guix-build): Don't call 'show-what-to-build' when OPTS contains 'derivations-only?'.
2016-05-04utils: Move combinators to (guix combinators).Ludovic Courtès
* guix/utils.scm (compile-time-value, memoize, fold2) (fold-tree, fold-tree-leaves): Move to... * guix/combinators: ... here. New file. * tests/utils.scm ("fold2, 1 list", "fold2, 2 lists") (fold-tree tests): Move to... * tests/combinators.scm: ... here. New file. * Makefile.am (MODULES, SCM_TESTS): Add them. * gnu/packages.scm, gnu/packages/bootstrap.scm, gnu/services/herd.scm, guix/build-system/gnu.scm, guix/build-system/python.scm, guix/derivations.scm, guix/gnu-maintenance.scm, guix/import/elpa.scm, guix/scripts/archive.scm, guix/scripts/build.scm, guix/scripts/graph.scm, guix/scripts/lint.scm, guix/scripts/size.scm, guix/scripts/substitute.scm, guix/serialization.scm, guix/store.scm, guix/ui.scm: Adjust imports accordingly.
2016-05-04environment: Use 'break' instead of 'split'.Ludovic Courtès
* guix/scripts/environment.scm (parse-args): Use 'break' instead of 'split'.
2016-05-04services: herd: Move UI handling to 'guix system'.Ludovic Courtès
This makes (gnu services herd) independent of (guix ui). * gnu/services/herd.scm (&shepherd-error, &service-not-found-error) (&action-not-found-error, &action-exception-error) (&unknown-shepherd-error): New error condition types. (report-action-error): Remove. (raise-shepherd-error): New procedure. (display-message): Do not use 'info' and '_'. (invoke-action): Use 'raise-shepherd-error' instead of 'report-action-error'. Do not use 'warning'. (current-services): Do not use 'warning'. * guix/scripts/system.scm (with-shepherd-error-handling): New macro. (report-shepherd-error, call-with-service-upgrade-info): New procedures. (upgrade-shepherd-services): Use it.
2016-04-29guix system: Reduce size of image produced for 'vm' action.Ludovic Courtès
This reduces the size of the image produced by 'guix system vm' from 26 MiB to 9 MiB. * gnu/system/vm.scm (system-qemu-image/shared-store): (system-qemu-image/shared-store-script): Change the default value of #:disk-image-size to 30 MiB when not FULL-BOOT?. * guix/scripts/system.scm (system-derivation-for-action): Likewise for the 'vm' action.
2016-04-28lint: 'check-vulnerabilities' follows package replacements.Ludovic Courtès
* guix/scripts/lint.scm (check-vulnerabilities): Check the replacement of PACKAGE. * tests/lint.scm ("cve: patched vulnerability in replacement"): New test.
2016-04-27challenge: Use exit code 2 when discrepancies are found.Ludovic Courtès
Suggested by John Darrington <john@darrington.wattle.id.au>. * guix/scripts/challenge.scm (guix-challenge): Exit with 2 when MISSING is not empty. * doc/guix.texi (Invoking guix challenge): Document it.
2016-04-27lint: Report synopses/descriptions that are not strings.Ludovic Courtès
Suggested by John Darrington. * guix/scripts/lint.scm (check-description-style): Emit a warning when DESCRIPTION is not a string. (check-synopsis-style): Likewise. (check-gnu-synopsis+description): Likewise. * tests/lint.scm ("description: not a string", "synopsis: not a string"): New tests.
2016-04-25guix gc: Add '--free-space'.Ludovic Courtès
* guix/scripts/gc.scm (show-help, %options): Add '--free-space'. (guix-gc)[ensure-free-space]: New procedure. Handle '--free-space'.
2016-04-20substitute: Sanitize the client-provided column number.Ludovic Courtès
* guix/scripts/substitute.scm (client-terminal-columns): Sanitize the client's column number.
2016-04-20substitute: Install the client's locale.Ludovic Courtès
* guix/store.scm (set-build-options): Add #:locale parameter and honor it. * guix/scripts/substitute.scm (guix-substitute): Install the client's locale.
2016-04-20substitute: Internationalize signature and download messages.Ludovic Courtès
* guix/scripts/substitute.scm (assert-valid-narinfo): Use gettext for messages.
2016-04-20substitute: Better abbreviate substitute URL in progress report.Ludovic Courtès
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'.
2016-04-15substitute: Honor the number of columns of the client terminal.Ludovic Courtès
* 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'.
2016-04-15guix download: Honor the number of columns of the terminal.Ludovic Courtès
* guix/scripts/download.scm (guix-download): Parameterize 'current-terminal-columns'.
2016-04-14lint: Emit an ANSI erase-in-line sequence.Danny Milosavljevic
* 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>
2016-04-07environment: container: Work around read-only /etc/resolv.conf issue.David Thompson
* guix/scripts/environment.scm (launch-environment/container): Mount /etc/resolv.conf as a writable file.
2016-04-06challenge: Really exit with non-zero upon hash mismatch.Ludovic Courtès
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.
2016-04-04emacs: Use 'build-and-use-profile' from (guix scripts package).Alex Kost
* guix/scripts/package.scm: Export 'build-and-use-profile'. * emacs/guix-main.scm (process-package-actions): Use it.
2016-03-30import: Add Hackage updater.Eric Bavier
* 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.
2016-03-30environment: Set a default value for PS1.David Thompson
* guix/scripts/environment.scm (launch-environment/container): Set PS1 during container initialization.
2016-03-28guix system: Warn against missing 'guix pull'.Ludovic Courtès
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.
2016-03-27environment: Properly handle SIGINT.David Thompson
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.
2016-03-26environment: container: Create dummy home directory and /etc/passwd.David Thompson
* 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.
2016-03-23guix build: '--with-source' correctly matches versioned file names.Ludovic Courtès
* 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.
2016-03-23substitute: Gracefully handle TLS errors.Ludovic Courtès
* guix/scripts/substitute.scm (with-networking): Use 'match-lambda*' and add case for 'gnutls-error'.
2016-03-17substitute: Do not leak file descriptors for TLS connections.Ludovic Courtès
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'.
2016-03-17substitute: Cache transient HTTP errors for 10mn.Ludovic Courtès
* guix/scripts/substitute.scm (fetch-narinfos)[handle-narinfo-response]: Cache transient errors for 10mn. (%narinfo-transient-error-ttl): New variable.
2016-03-17lint: Do not leak file descriptors for TLS connections.Ludovic Courtès
Partially fixes <http://bugs.gnu.org/20145>. * guix/scripts/lint.scm (probe-uri): Use 'close-connection' instead of 'close-port'.
2016-03-17substitute: Update progress for responses different from 200/404.Ludovic Courtès
* guix/scripts/substitute.scm (fetch-narinfos)[handle-narinfo-response]: Add missing call to 'update-progress!'.
2016-03-16substitute: Honor client-provided empty URL list.Ludovic Courtès
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.
2016-03-16substitute: Honor the 'max-age' of 'Cache-Control' headers.Ludovic Courtès
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!'.