summaryrefslogtreecommitdiff
path: root/guix/scripts
AgeCommit message (Collapse)Author
2017-06-04scripts: refresh: Add -m manifest option.Mathieu Othacehe
* guix/scripts/refresh.scm (%options): Add -m option, (show-help): document it, (packages-from-manifest): new procedure, (guix-refresh): use packages from manifest if specified, otherwise keep the previous behaviour. * doc/guix.texi (Invoking guix refresh): document new option.
2017-06-02substitute: Do not display the installed size.Ludovic Courtès
* guix/scripts/substitute.scm (process-substitution): Do not show the installed size in the "Downloading" message.
2017-06-02syscalls: Provide 'free-disk-space'.Ludovic Courtès
* guix/build/syscalls.scm (free-disk-space): New procedure. * guix/scripts/gc.scm (guix-gc)[ensure-free-space]: Use it instead of 'statfs'.
2017-05-28scripts: Set thread names.Ludovic Courtès
This allows 'guix publish' threads as well as 'guix substitute' and 'guix offload' processes to be properly labeled in 'top', 'pstree', etc. * guix/workers.scm (worker-thunk): Add #:thread-name parameter and honor it. (make-pool): Likewise. * guix/scripts/publish.scm (http-write): Add calls to 'set-thread-name' in bodies of 'call-with-new-thread'. (guix-publish): Call 'set-thread-name'. Pass #:thread-name to 'make-pool'. * guix/scripts/offload.scm (guix-offload): Call 'set-thread-name'. * guix/scripts/substitute.scm (guix-substitute): Likewise.
2017-05-24publish: Do not bake the same item several times.Ludovic Courtès
Before this patch, there was a possibility that we'd queue several baking tasks for the same item. The first one would bake the item but subsequent tasks wouldn't check whether the item had been baked in the meantime and would re-bake it. * guix/scripts/publish.scm (render-narinfo/cached): Don't call 'bake-narinfo+nar' when (file-exists? cached).
2017-05-23guix package: Swallow EPIPE upon 'guix package --list-generations'.Ludovic Courtès
Fixes <http://bugs.gnu.org/27017>. Reported by Alex Vong <alexvong1995@gmail.com>. * guix/scripts/package.scm (process-query) <'list-generations>: Wrap body in 'leave-on-EPIPE'.
2017-05-23guix: lint: Slightly simplify `check-source-file-name'.Arun Isaac
* guix/scripts/lint.scm (check-source-file-name): Implement file name matching with regular expression.
2017-05-23gnu: lint: Fix typo.Arun Isaac
* guix/scripts/lint.scm (check-source-file-name): Fix wrong return value in docstring.
2017-05-22Merge branch 'version-0.13.0'Marius Bakke
2017-05-21guix system: Don't warn about old distros for "guix system init".Ludovic Courtès
* guix/scripts/system.scm (process-action): Don't call 'warn-about-old-distro' when ACTION is 'init' or 'build'.
2017-05-21guix system: Increase image size for 'guix system vm'.Ludovic Courtès
This is a followup to 9a1bfe764859365b6726f168da95b88a2d22403b. * guix/scripts/system.scm (system-derivation-for-action): Add 40MiB to the default size for 'vm'.
2017-05-20pack: Use 'guile2.0-json' when building with Guile 2.0.Ludovic Courtès
Fixes <http://bugs.gnu.org/27005>. Reported by Pjotr Prins <pjotr.public12@thebird.nl>. Fixes a regression introduced in commit 2252f087d4bd450ab41a71379320467887edfc0f. * guix/scripts/pack.scm (docker-image)[json]: New variable. [build]: Use it.
2017-05-20pack: Use 'guile2.0-json' when building with Guile 2.0.Ludovic Courtès
Fixes <http://bugs.gnu.org/27005>. Reported by Pjotr Prins <pjotr.public12@thebird.nl>. Fixes a regression introduced in commit 2252f087d4bd450ab41a71379320467887edfc0f. * guix/scripts/pack.scm (docker-image)[json]: New variable. [build]: Use it.
2017-05-20publish: Fix narinfo rendering for already-compressed items.Ludovic Courtès
Fixes <http://bugs.gnu.org/26975>. Reported by Mark H Weaver <mhw@netris.org>. * guix/scripts/publish.scm (bake-narinfo+nar): Pass #f as the 2nd argument to 'stat' and properly handle #f. * tests/publish.scm (wait-for-file): New procedure. ("with cache"): Remove 'wait-for-file' procedure. ("with cache, uncompressed"): New test.
2017-05-18publish: Fix narinfo rendering for already-compressed items.Ludovic Courtès
Fixes <http://bugs.gnu.org/26975>. Reported by Mark H Weaver <mhw@netris.org>. * guix/scripts/publish.scm (bake-narinfo+nar): Pass #f as the 2nd argument to 'stat' and properly handle #f. * tests/publish.scm (wait-for-file): New procedure. ("with cache"): Remove 'wait-for-file' procedure. ("with cache, uncompressed"): New test.
2017-05-18lint: inputs-should-be-native: Add "cmake".Ludovic Courtès
Suggested by Nicolas Goaziou <mail@nicolasgoaziou.fr>. * guix/scripts/lint.scm (check-inputs-should-be-native)[input-names]: Add "cmake".
2017-05-16scripts: system: Display bootloader name in "list-generations".Mathieu Othacehe
* guix/scripts/system.scm (display-system-generation): Display bootloader name.
2017-05-16scripts: system: Adapt "switch-generation" to new bootloader API.Mathieu Othacehe
* guix/scripts/system.scm (reinstall-grub): Rename to reinstall-bootloader. Read boot-device and boot-type from parameters file to be able to restore the correct bootloader on specified device. Factorize bootloader installation code by calling install-bootloader. (system-bootloader-name): New procedure. (switch-to-system-generation): Adapt.
2017-05-16scripts: system: Adapt "init" to new bootloader API.Mathieu Othacehe
* guix/scripts/system.scm (install): Pass installer a new argument. Rename other arguments. Call install-bootloader instead of install-grub*. (perform-action): Adapt.
2017-05-16scripts: system: Adapt "reconfigure" to new bootloader API.Mathieu Othacehe
* guix/scripts/system.scm (install-grub*): Rename to install-bootloader. Use keys to pass arguments. Pass a new argument, "installer-drv" which is a script in store dealing with bootloader-specific install actions. Also call "install-boot-config" to install the bootloader config file. (install-bootloader-derivation): New procedure. It returns a derivation that builds a file containing "install-procedure" gexp. (perform-action): Build install-proc derivation and call install-bootloader with the resulting file. Stop adding GRUB to PATH as bootloaders are called in install-proc with direct store paths.
2017-05-16bootloader: Add extlinux support.Mathieu Othacehe
* gnu/bootloader.scm: New file. * gnu/bootloader/extlinux.scm: New file. * gnu/bootloader/grub.scm: New file. * gnu/local.mk: Build new files. * gnu/system.scm: Adapt to new bootloader api. * gnu/scripts/system.scm: Adapt to new bootloader api. * gnu.scm: Remove (gnu system grub) and replace by (gnu bootloader) and (gnu bootloader grub) modules. * gnu/system/grub.scm: Moved content to gnu/bootloader/grub.scm. * gnu/system/vm: Replace (gnu system grub) module by (gnu bootloader). * gnu/tests.scm: Ditto. * gnu/tests/nfs.scm: Ditto.
2017-05-11substitute: Honor 'Cache-Control' on 404 responses.Ludovic Courtès
* guix/scripts/substitute.scm (cached-narinfo): When VALUE is #f, use the TTL that is read instead of %NARINFO-NEGATIVE-TTL. (cached-narinfo-expiration-time): Likewise.
2017-05-11publish: Advertise a short TTL for "baking" 404s.Ludovic Courtès
* guix/scripts/publish.scm (not-found): Add #:phrase and #:ttl parameters and honor them. * tests/publish.scm ("with cache"): Check the 'cache-control' header on of the 404 response.
2017-05-10scripts: Warn about old distro.Ludovic Courtès
Fixes <http://bugs.gnu.org/25852>. Suggested by Mark H Weaver <mhw@netris.org>. * guix/scripts.scm (%distro-age-warning): New variable. (warn-about-old-distro): New procedure. * guix/scripts/package.scm (process-actions): Call 'warn-about-old-distro'. * guix/scripts/system.scm (process-action): Likewise.
2017-05-09pull: Use 'with-store'.Ludovic Courtès
* guix/scripts/pull.scm (guix-pull): Remove call to 'open-connection'. Use 'with-store' instead.
2017-05-09pull: Honor the standard build options.Ludovic Courtès
Reported by Niall Dooley <dooleyn@gmail.com> in <https://lists.gnu.org/archive/html/help-guix/2017-05/msg00038.html>. * guix/scripts/pull.scm (%options): Add --dry-run and all of %STANDARD-BUILD-OPTIONS. (show-help): Add call to 'show-build-options-help'. (%default-options): Add 'system', 'substitutes?', 'graft?', 'max-silent-time', and 'verbosity'. (guix-pull)[parse-options]: Remove. Use 'parse-command-line' instead. Honor --dry-run.
2017-05-05scripts: Remove profile-grub-entries.Danny Milosavljevic
* guix/scripts/system.scm (profile-grub-entries): Delete variable.
2017-05-05system: grub: Use boot-parameters instead of menu-entry where possible.Danny Milosavljevic
* gnu/system/grub.scm (boot-parameters->menu-entry): New variable. (grub-configuration-file): Use boot-parameters instead of menu-entry where possible. * guix/scripts/system.scm (profile-boot-parameters): Update docstring. (reinstall-grub): Use profile-boot-parameters. (perform-action): Use profile-boot-parameters.
2017-05-05scripts: Make boot-parameters label include generation number and time.Danny Milosavljevic
* guix/scripts/system.scm (system->boot-parameters): Make label include generation number and time.
2017-05-05system: Introduce read-boot-parameters-file.Danny Milosavljevic
* gnu/system.scm (read-boot-parameters): Remove export. (read-boot-parameters-file): New variable. Export it. * guix/scripts/system.scm (profile-boot-parameters): Use read-boot-parameters-file. (profile-grub-entries): Use read-boot-parameters-file. (reinstall-grub): Use read-boot-parameters-file. (display-system-generation): Use read-boot-parameters-file.
2017-05-04environment: Correct typo.Tobias Geerinckx-Rice
* guix/scripts/environment.scm (create-environment): Fix typo.
2017-05-03refresh: Use (guix discovery).Ludovic Courtès
* guix/scripts/refresh.scm (maybe-updater, list-updaters): Remove. (importer-modules): New procedure. (%updaters): Define using 'fold-module-public-variables'. Turn into a promise and adjust users.
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.