summaryrefslogtreecommitdiff
path: root/guix/scripts
AgeCommit message (Collapse)Author
2017-05-03ui: Rename '_' to 'G_'.Ludovic Courtès
This avoids collisions with '_' when the latter is used as a 'match' pattern for instance. See <https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00464.html>. * guix/ui.scm: Rename '_' to 'G_'. * po/guix/Makevars (XGETTEXT_OPTIONS): Adjust accordingly. * build-aux/compile-all.scm (warnings): Remove 'format'. * gnu/packages.scm, gnu/services.scm, gnu/services/shepherd.scm, gnu/system.scm, gnu/system/shadow.scm, guix/gnupg.scm, guix/http-client.scm, guix/import/cpan.scm, guix/import/elpa.scm, guix/import/pypi.scm, guix/nar.scm, guix/scripts.scm, guix/scripts/archive.scm, guix/scripts/authenticate.scm, guix/scripts/build.scm, guix/scripts/challenge.scm, guix/scripts/container.scm, guix/scripts/container/exec.scm, guix/scripts/copy.scm, guix/scripts/download.scm, guix/scripts/edit.scm, guix/scripts/environment.scm, guix/scripts/gc.scm, guix/scripts/graph.scm, guix/scripts/hash.scm, guix/scripts/import.scm, guix/scripts/import/cpan.scm, guix/scripts/import/cran.scm, guix/scripts/import/crate.scm, guix/scripts/import/elpa.scm, guix/scripts/import/gem.scm, guix/scripts/import/gnu.scm, guix/scripts/import/hackage.scm, guix/scripts/import/nix.scm, guix/scripts/import/pypi.scm, guix/scripts/import/stackage.scm, guix/scripts/lint.scm, guix/scripts/offload.scm, guix/scripts/pack.scm, guix/scripts/package.scm, guix/scripts/perform-download.scm, guix/scripts/publish.scm, guix/scripts/pull.scm, guix/scripts/refresh.scm, guix/scripts/size.scm, guix/scripts/substitute.scm, guix/scripts/system.scm, guix/ssh.scm, guix/upstream.scm: Use 'G_' instead of '_'. Most of this change was obtained by running: "sed -i -e's/(_ "/(G_ "/g' `find -name \*.scm`".
2017-05-02substitute: Validate substitute URLs.Ludovic Courtès
Reported by Maxim Cournoyer <maxim.cournoyer@gmail.com> at <https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00548.html>. * guix/scripts/substitute.scm (validate-uri): New procedure. (guix-substitute): Use it.
2017-05-02publish: Use a larger zlib buffer for compression with '--cache'.Ludovic Courtès
* guix/scripts/publish.scm (bake-narinfo+nar): Pass #:buffer-size to 'call-with-gzip-output-port'.
2017-05-01publish: Produce a "FileSize" narinfo field when possible.Ludovic Courtès
* guix/scripts/publish.scm (narinfo-string): Add #:file-size parameter. Produce a "FileSize" field when COMPRESSION is eq? to '%no-compression' or when FILE-SIZE is true. (bake-narinfo+nar): Pass #:file-size. * tests/publish.scm ("/*.narinfo") ("/*.narinfo with properly encoded '+' sign") ("with cache"): Check for "FileSize".
2017-05-01refresh: Report packages using the "@" syntax.Ludovic Courtès
* guix/scripts/refresh.scm (list-dependents)[full-name]: New procedure. Use 'full-name' instead of 'package-full-name'. * doc/guix.texi (Invoking guix refresh): Adjust example accordingly.
2017-04-21ssh: Move 'open-ssh-session' to (guix ssh).Ludovic Courtès
* guix/scripts/copy.scm (%compression, open-ssh-session): Move to... * guix/ssh.scm: ... here. Use '&message' conditions instead of calling 'leave'.
2017-04-21offload: Avoid using '_' as a 'match' pattern.Ludovic Courtès
* guix/scripts/offload.scm (host-key->type+key, machine-load) (process-request, guix-offload): Do not use '_' as a 'match' pattern.
2017-04-19publish: Add a handler for / and /index.html.Ludovic Courtès
Suggested by Quiliro <quiliro@riseup.net> in <https://bugs.gnu.org/26567>. * guix/scripts/publish.scm (render-home-page): New procedure. (make-request-handler): Handle it.
2017-04-18publish: Remove expired cache entries when '--ttl' is used.Ludovic Courtès
* guix/scripts/publish.scm (narinfo-files): New procedure. (render-narinfo/cached)[delete-file]: New procedure. Add call to 'maybe-remove-expired-cache-entries'. * doc/guix.texi (Invoking guix publish): Document the interation between --cache and --ttl.
2017-04-18Add (guix cache) and use it in (guix scripts substitute).Ludovic Courtès
* guix/cache.scm, tests/cache.scm: New files. * Makefile.am (MODULES, SCM_TESTS): Add them. * guix/scripts/substitute.scm (obsolete?): Remove. (remove-expired-cached-narinfos): Rename to... (cached-narinfo-expiration-time): ... this. Remove the removal part and only keep the expiration time part. (narinfo-cache-directories): Add optional 'directory' parameter and honor it. (maybe-remove-expired-cached-narinfo): Remove. (cached-narinfo-files): New procedure. (guix-substitute): Use 'maybe-remove-expired-cache-entries' instead of 'maybe-remove-expired-cached-narinfo'.
2017-04-18publish: Add '--cache' and '--workers'.Ludovic Courtès
Fixes <http://bugs.gnu.org/26201>. Reported by <dian_cecht@zoho.com>. These options allow nars to be "baked" off-line and cached instead of being compressed on the fly. As a side-effect, this allows us to provide a 'Content-Length' header for nars. * guix/scripts/publish.scm (show-help, %options): Add '--cache' and '--workers'. (%default-options): Add 'workers'. (nar-cache-file, narinfo-cache-file, run-single-baker): New procedures. (single-baker): New macro. (render-narinfo/cached, bake-narinfo+nar) (render-nar/cached): New procedures. (make-request-handler): Add #:cache and #:pool parameters and honor them. (run-publish-server): Likewise. (guix-publish): Honor '--cache' and '--workers'. * tests/publish.scm ("with cache"): New test. * doc/guix.texi (Invoking guix publish): Document it.
2017-04-18publish: Use 'sendfile' when possible.Ludovic Courtès
* guix/scripts/publish.scm (http-write): In the 'application/octet-stream' case, use 'sendfile' when OUTPUT is a file port.
2017-04-18publish: Introduce 'actual-compression'.Ludovic Courtès
* guix/scripts/publish.scm (actual-compression): New procedure. (narinfo-string): Use it.
2017-04-17scripts: system: Rename --no-grub option to --no-bootloader.Mathieu Othacehe
* guix/scripts/system.scm (%options, show-help): Adjust accordingly. Keep "--no-grub" for compatibility reasons, but do not mention it in the help. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2017-04-16lint: Avoid non-literal format strings.Ludovic Courtès
Reported by Mathieu Othacehe <m.othacehe@gmail.com> at <http://bugs.gnu.org/26498>. * guix/scripts/lint.scm (warn-if-package-has-input): Rename to... (package-input-intersection): ... this. Remove 'linted' and 'message' parameters. Return a list of inputs. (check-inputs-should-be-native): Adjust accordingly. (check-inputs-should-not-be-an-input-at-all): Likewise.
2017-04-16services: 'service-parameters' becomes 'service-value'.Ludovic Courtès
* gnu/services.scm (<service>)[parameters]: Rename to... [value]: ... this. Change calls to 'service-parameters' to 'service-value'. * gnu/system.scm, gnu/tests/base.scm, guix/scripts/system.scm, tests/services.scm: Likewise. * doc/guix.texi (Service Reference): Adjust accordingly.
2017-04-15system: Make grub use <menu-entry> instead of <boot-parameters> again.Danny Milosavljevic
* gnu/system/grub.scm: Remove boot-parameters->menu-entry. (grub-configuration): Don't use boot-parameters->menu-entry. * gnu/system.scm (operating-system-bootcfg): Use menu-entry. * guix/scripts/system.scm (reinstall-grub): Use profile-grub-entries. (perform-action): Use profile-grub-entries.
2017-04-15scripts: system: Introduce profile-boot-parameters.Danny Milosavljevic
* guix/scripts/system.scm (profile-boot-parameters): New variable. (reinstall-grub): Use profile-boot-parameters. (perform-action): Use profile-boot-parameters. Follow-up to 2e58e05bb68d4b747882cfa2b460b132d456f54a.
2017-04-15scripts: system: Rename grub? and install-grub? to bootloader? and ↵Mathieu Othacehe
install-bootloader?. * guix/scripts/system.scm (perform-action): Rename grub? to bootloader, (%options): rename install-grub? to install-bootloader?, (%default-options): ditto, (process-action): reindent and rename grub? to bootloader?.
2017-04-15system: Rename operating-system-grub.cfg to operating-system-bootcfg.Mathieu Othacehe
* gnu/system.scm (operating-system-grub.cfg): Rename to... (operating-system-bootcfg): ... this. * gnu/system/vm.scm (system-disk-image): Use operating-system-bootcfg. (system-qemu-image): Use operating-system-bootcfg. (system-qemu-image/shared-store): Use operating-system-bootcfg. * guix/scripts/system.scm (perform-action): Use operating-system-bootcfg. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2017-04-15scripts: system: Back out operating-system-bootcfg change.Danny Milosavljevic
Follow-up to 475e2ce211ac05a814c1f1bc2b9648baa17ad369. * guix/scripts/system.scm (perform-action): Back out operating-system-bootcfg change.
2017-04-15scripts: system: Move save-load-path-excursion and ↵Danny Milosavljevic
save-environment-excursion macros to the top. * guix/scripts/system.scm (save-load-path-excursion, save-environment-excursion): Move definitions to the top of the file. It allows to use them in the whole file. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2017-04-15scripts: system: Move save-load-path-excursion and ↵Mathieu Othacehe
save-environment-excursion macros to the top. * guix/scripts/system.scm (save-load-path-excursion, save-environment-excursion): Move definitions to the top of the file. It allows to use them in the whole file. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2017-04-07pack: Add '--expression'.Ludovic Courtès
* guix/scripts/pack.scm (%options, show-help): Add '--expression'. (guix-pack)[maybe-package-argument]: New procedure. Use it, and remove variable 'specs'. * doc/guix.texi (Invoking guix pack): Document '--expression'.
2017-04-07size: Avoid '_' as a pattern variable in 'match'.Ludovic Courtès
* guix/scripts/size.scm (display-profile, profile->page-map): Don't use '_' as a 'match' pattern variable.
2017-04-06system: Support the --root option in 'guix system'.Chris Marusich
Fixes <https://bugs.gnu.org/26271>. * guix/scripts/system.scm (perform-action): Add #:gc-root parameter and honor it. (show-help): Document the --root option. (%options): Add 'root'. (process-action): Pass 'root' option to perform-action as #:gc-root. * doc/guix.texi (Invoking guix system): Document '--root'. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-04-06build: Add and export procedure 'register-root*'.Chris Marusich
* guix/scripts/build.scm (register-root*): Add and export it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-04-05environment: Deal with single-entry search paths.Ludovic Courtès
This is a followup to fcd75bdbfa99d14363b905afbf914eec20e69df8. * guix/scripts/environment.scm (create-environment): Check whether SEPARATOR is #f.
2017-04-05build: Export register-root procedure.Chris Marusich
* guix/scripts/build.scm: Export register-root procedure. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2017-04-03Merge branch 'core-updates'Ludovic Courtès
2017-04-02guix: Compress and decompress xz archives in parallel.Efraim Flashner
* guix/scripts/pack.scm (%compressors): Add flag '-T0' when calling "xz". * guix/utils.scm (decompressed-port, compressed-port, compressed-output-port): Same.
2017-03-31substitute: Send ‘User-Agent’ header.Tobias Geerinckx-Rice
* guix/scripts/substitute.scm (narinfo-request): Pass ‘User-Agent’ #:headers to ‘build-request’.
2017-03-30Merge branch 'master' into core-updatesMarius Bakke
Most conflicts are from 6fd52309b8f52c9bb59fccffac53e029ce94b698.
2017-03-28import cran: Print package stream in the expected order.Ricardo Wurmus
* guix/scripts/import/cran.scm (guix-import-cran): Reverse list of packages.
2017-03-27Merge branch 'master' into core-updatesLeo Famulari
2017-03-27ui: Support Texinfo markup in package synopses.Alex Kost
* guix/ui.scm (package-field-string): New procedure. (package-description-string): Use it. (package-synopsis-string): New procedure. (package->recutils): Use it. * guix/scripts/lint.scm (check-synopsis-style)[check-texinfo-markup]: New procedure. Use it in checks. * tests/lint.scm: Test it. * gnu/packages/perl.scm (perl-try-tiny)[synopsis]: Adjust for the Texinfo markup.
2017-03-23Merge remote-tracking branch 'origin/master' into core-updatesEfraim Flashner
2017-03-22publish: Add '--nar-path'.Ludovic Courtès
* guix/scripts/publish.scm (show-help, %options): Add '--nar-path'. (%default-options): Add 'nar-path'. (guix-publish): Honor it.
2017-03-22publish: Make the nar URL prefix a parameter.Ludovic Courtès
* guix/scripts/publish.scm (narinfo-string): Add #:nar-path and honor it. (render-narinfo): Likewise. (make-request-handler): Likewise. (run-publish-server): Likewise. * tests/publish.scm ("custom nar path"): New test.
2017-03-22publish: Add '--public-key' and '--private-key'.Ludovic Courtès
* guix/scripts/publish.scm (show-help, %options): Add --public-key and --private-key. * doc/guix.texi (Invoking guix publish): Document it.
2017-03-22publish: The public and private keys are now SRFI-39 parameters.Ludovic Courtès
* guix/scripts/publish.scm (%default-options): Add 'public-key-file' and 'private-key-file'. (lazy-read-file-sexp): Remove. (%private-key, %public-key): Turn into SRFI-39 parameters. (signed-string, render-narinfo): Adjust accordingly. (guix-publish): Honor 'public-key-file' and 'private-key-file' from OPTS. Use 'parameterize'. * guix/pk-crypto.scm (read-file-sexp): New procedure. * tests/publish.scm: Initialize '%public-key' and '%private-key'.
2017-03-19Merge branch 'master' into core-updatesMark H Weaver
2017-03-18http-client: Avoid name clash with 'open-connection-for-uri' in 2.2.0.Ludovic Courtès
* guix/build/download.scm (open-connection-for-uri): Add note about same-named binding in Guile 2.2.0. * guix/http-client.scm: Use 'guix:open-connection-for-uri' for the procedure coming from (guix build download). * guix/scripts/lint.scm: Likewise. * guix/scripts/substitute.scm: Likewise.
2017-03-18pack: Add '--target'.Ludovic Courtès
* guix/scripts/pack.scm (self-contained-tarball): Add #:target. (docker-image): Add #:target. [build]: Pass it to 'build-docker-image'. (%options, show-help): Add '--target'. (guix-pack): Pass TARGET to 'profile-derivation' and to 'build-image'. * guix/docker.scm (build-docker-image): Add #:system parameter and honor it. * doc/guix.texi (Invoking guix pack): Document '--target'. (Additional Build Options): Refer to the Autoconf manual instead of the obsolete 'configure.info' for cross-compilation.
2017-03-17pack: Move absolute file name to <compressor>.Ludovic Courtès
* guix/scripts/pack.scm (<compressor>)[package]: Remove. [command]: Document as being a gexp with an absolute file name. (%compressors): Adjust accordingly. (self-contained-tarball): Simplify PATH expression. Move 'string-join' for the compressor command on the build side. (docker-image): Simplify PATH expression. * tests/pack.scm (%gzip-compressor): Adjust accordingly.
2017-03-16pack: Allow for "-S /opt/foo=".Ludovic Courtès
Reported by Andy Wingo. * guix/scripts/pack.scm (%options): Use 'string-split' instead of 'string-tokenize'.
2017-03-16pack: Honor symlinks in the Docker back-end.Ludovic Courtès
* guix/docker.scm (symlink-source, topmost-component): New procedures. (build-docker-image): Add #:symlinks parameter and honor it. Remove hard-coded /bin symlink. * guix/scripts/pack.scm (docker-image): Pass #:symlinks to 'build-docker-image'.
2017-03-16pack: Use a fixed timestamp in Docker images.Ludovic Courtès
* guix/docker.scm (build-docker-image): Add #:creation-time parameter. Use SRFI-19 'date->string' instead of 'strftime' et al. * guix/scripts/pack.scm (docker-image)[build]: Pass #:creation-time to 'build-docker-image'.
2017-03-16pack: Add '--format' option and Docker output support.Ludovic Courtès
* guix/docker.scm: Remove dependency on (guix store) and (guix utils). Use (guix build store-copy). Load (json) lazily. (build-docker-image): Remove #:system. Add #:closure, #:compressor, and 'image' parameters. Use 'uname' to determine the architecture. Remove use of 'call-with-temporary-directory'. Use 'read-reference-graph' to compute ITEMS. Honor #:compressor. * guix/scripts/pack.scm (docker-image): New procedure. (%default-options): Add 'format'. (%formats): New variable. (%options, show-help): Add '--format'. (guix-pack): Honor '--format'. * guix/scripts/archive.scm: Remove '--format' option. This reverts commits 1545a012cb7cd78e25ed99ecee26df457be590e9, 01445711db6771cea6122859c3f717f130359f55, and 03476a23ff2d4175b7d3c808726178f764359bec. * doc/guix.texi (Invoking guix pack): Document '--format'. (Invoking guix archive): Remove documentation of '--format'.
2017-03-16pack: Honor command-line options related to the store.Ludovic Courtès
* guix/scripts/pack.scm (guix-pack): Call 'set-build-options-from-command-line'.