summaryrefslogtreecommitdiff
path: root/guix/scripts
AgeCommit message (Collapse)Author
2017-08-19pack: Add "none" compressor.Ricardo Wurmus
* guix/scripts/pack.scm (%compressors): Add compressor "none"; prepend extension with ".". (self-contained-tarball, docker-image): Assume compressor extensions start with period. * doc/guix.texi (Invoking guix pack): Document it.
2017-08-02pull: Honor '--no-grafts'.Ludovic Courtès
* guix/scripts/pull.scm (guix-pull): Parameterize %GRAFT? as a function of OPTS.
2017-08-02pull: Use the commit ID as the version string.Ludovic Courtès
* guix/scripts/pull.scm (build-from-source): Add #:commit parameter. Pass it to BUILD. (build-and-install): Add #:commit and pass it to 'build-from-source'. (guix-pull): Pass #:commit to 'build-and-install'.
2017-08-02pull: Fetch source code from Git.Ludovic Courtès
* guix/scripts/pull.scm (%snapshot-url, with-environment-variable) (with-PATH): Remove. (ensure-guile-git!): New procedure. (%repository-url): New variable. (%default-options): Add 'repository-url' and 'ref'. (show-help, %options): Add '--commit' and '--url'. (temporary-directory, first-directory, interned-then-deleted) (unpack): Remove. (build-from-source): Rename 'tarball' to 'source'. Remove call to 'unpack'. (build-and-install): Rename 'tarball' to 'source'. (honor-lets-encrypt-certificates!, report-git-error): New procedures. (with-git-error-handling): New macro. (guix-pull)[fetch-tarball]: Remove. Wrap body in 'with-git-error-handling'. Rewrite to use 'latest-repository-commit'. * build-aux/build-self.scm (build): Print an error message and exit when GUILE-GIT is #f. * doc/guix.texi (Invoking guix pull): Mention Git. Document '--commit' and '--branch'.
2017-08-01guix package: Allow `guix package -u' to fuction as before.Efraim Flashner
This is a follow up to 6ddf97f81bb99a73f00e30ad5fc19577872b5b49 * guix/scripts/package.scm (%options) <"-u">: Only check for a flag when there is an ARG after '-u'.
2017-08-01lint: formatting: Detect sexp boundaries.Ludovic Courtès
* guix/scripts/lint.scm (report-formatting-issues)[last-line]: Remove. [sexp-last-line]: New procedure. Use it.
2017-07-31guix package: Warn when invoked with '-u -something'.Ludovic Courtès
Fixes <https://bugs.gnu.org/27820>. Reported by Hartmut Goebel <h.goebel@crazy-compilers.com>. * guix/scripts/package.scm (%options) <"-u">: Emit a warning when ARG starts with "-".
2017-07-28bootloader: Use <menu-entry> for the bootloader side.Danny Milosavljevic
* gnu/bootloader.scm (menu-entry-device-mount-point): New variable. Export it. (<menu-entry>: New field "device". * gnu/bootloader/grub.scm (grub-confgiuration-file): Handle <menu-entry> entries. * gnu/bootloader/extlinux.scm (extlinux-configuration-file): Handle <menu-entry> entries. * gnu/system.scm (menu->entry->boot-parameters): Delete variable. (boot-parameters->menu-entry): New variable. Export it. (operating-system-bootcfg): Make OLD-ENTRIES a list of <menu-entry>. * guix/script/system.scm (reinstall-bootloader): Fix bootcfg usage. (perform-action): Fix bootcfg usage.
2017-07-28utils: Factorize XDG directory handling.Ludovic Courtès
* guix/ui.scm (config-directory): Remove. * guix/utils.scm (xdg-directory, config-directory): New procedures. (cache-directory): Rewrite in terms of 'xdg-directory'. * guix/scripts/substitute.scm (%narinfo-cache-directory): Pass #:ensure? #f to 'cache-directory'.
2017-07-27weather: Show "-m" option in help message.Ludovic Courtès
Reported by Alex Kost <alezost@gmail.com>. * guix/scripts/weather.scm (show-help): Show "-m".
2017-07-25offload: Fix potential file descriptor and memory leak.Ludovic Courtès
The '%slots' list could grow indefinitely; in practice though, guix-daemon is likely to restart 'guix offload' often enough. * guix/scripts/offload.scm (%slots): Remove. (choose-build-machine): Don't 'set!' %SLOTS. Return the acquired slot as a second value. (process-request): Adjust accordingly. Release the returned slot after 'transfer-and-offload'.
2017-07-25offload: Disconnect sessions created by 'machine-load'.Ludovic Courtès
This fixes a memory leak that can be seen by running: (map (lambda _ (machine-load m)) (iota 1000)) * guix/scripts/offload.scm (machine-load): Add call to 'disconnect!'.
2017-07-25Add 'guix weather'.Ludovic Courtès
* guix/scripts/weather.scm: New file. * Makefile.am (MODULES): Add it. * doc/guix.texi (Substitutes, Invoking guix publish): Mention "guix weather". (Invoking guix weather): New node. Co-authored-by: Ricardo Wurmus <rekado@elephly.net>
2017-07-21publish: Make the cache eviction policy less aggressive.Ludovic Courtès
Suggested by Mark H Weaver <mhw@netris.org>. * guix/scripts/publish.scm (nar-expiration-time): New procedure. (render-narinfo/cached): Use it as the #:entry-expiration passed to 'maybe-remove-expired-cache-entries'.
2017-07-21publish: Avoid 'valid-path?' RPC for non-existent items.Ludovic Courtès
* guix/scripts/publish.scm (render-narinfo/cached): Call 'file-exists?' before calling 'valid-path?'. This makes the 404 path slightly faster.
2017-07-21publish: Remove 'regexp-exec' call from the hot path.Ludovic Courtès
* guix/scripts/publish.scm (extract-narinfo-hash): Rewrite without resorting to regexps.
2017-07-21substitute: Avoid repeated calls to 'length'.Ludovic Courtès
* guix/scripts/substitute.scm (fetch-narinfos)[update-progress!]: Move 'length' call outside of lambda.
2017-07-21substitute: Optimize hash-part-to-path conversion on non-200 responses.Ludovic Courtès
Previously this operation was linear in the number of requests and involved costly calls to 'string-contains'. * guix/scripts/substitute.scm (fetch-narinfos)[hash-part->path]: New procedure. [handle-narinfo-response]: Use it for caching when CODE is not 200.
2017-07-20guix package: '-l' correctly handles zero-generation profiles.Ludovic Courtès
* guix/scripts/package.scm (process-query) <'list-generations>: Properly handle the case where 'profile-generations' returns the empty list.
2017-07-20guix package: Trim trailing slashes from the profile name.Ludovic Courtès
Fixes <https://bugs.gnu.org/25762>. Reported by Ricardo Wurmus <rekado@elephly.net>. * guix/scripts/package.scm (canonicalize-profile): Trim trailing slashes from PROFILE.
2017-07-18guix system: Use "image.iso" as the name of ISO images.Ludovic Courtès
* guix/scripts/system.scm (system-derivation-for-action): Pass #:name to 'system-disk-image'.
2017-07-12substitute: Work around Guile 2.2 'time-monotonic' bug.Ludovic Courtès
Prior to this change, half of the cached narinfos would expire immediately since they contained the number of nanoseconds instead of the number of seconds as their date. * guix/scripts/substitute.scm (time-monotonic) <guile-2.2>: Define, as a workaround.
2017-07-12size: Add '--sort=KEY'.Ludovic Courtès
* guix/scripts/size.scm (profile-closure<?, profile-self<?): New procedures. (display-profile): Add #:profile<? parameter and honor it. (show-help, %options): Add '--sort'. (%default-options): Add 'profile<?'. (guix-size): Pass PROFILE<? to 'display-profile*'. * doc/guix.texi (Invoking guix size): Document '--sort'.
2017-07-12environment: Rationalize calls to 'set-build-options'.Ludovic Courtès
Before this change '--substitute-urls' would be ignored. * guix/scripts/environment.scm (build-environment): Remove redundant call to 'set-build-options-from-command-line*'. (guix-environment): Move 'set-build-options-from-command-line' right after 'with-store'.
2017-07-03copy: Default to port 22.Ludovic Courtès
Failing to do that, "%p" would be "0" when using "ProxyCommand" in ~/.ssh/config. * guix/scripts/copy.scm (send-to-remote-host): Default to port 22. (retrieve-from-remote-host): Likewise.
2017-07-03guix system: Add "--file-system-type" option.Danny Milosavljevic
* guix/scripts/system.scm (process-action): Pass file-system-type to ... (perform-action): ... here. Add new keyword argument. Pass new value to ... (system-derivation-for-action): ... here. Add new keyword argument. Pass new value to system-disk-image. * doc/guix.texi (disk-image): Document new option.
2017-06-30vm: Estimate the disk size by default.Ludovic Courtès
* gnu/build/vm.scm (estimated-partition-size): New procedure. * gnu/system/vm.scm (expression->derivation-in-linux-vm): Change #:disk-image-size default to 'guess. [builder]: When DISK-IMAGE-SIZE is 'guess, use 'estimated-partition-size' and compute and estimate of the image size. (qemu-image): Likewise. * guix/build/store-copy.scm (file-size, closure-size): New procedures. * guix/scripts/system.scm (%default-options): Change 'image-size' to 'guess. * doc/guix.texi (Building the Installation Image): Remove '--image-size' flag from example. (Invoking guix system): Document the image size estimate.
2017-06-26guix package: Allow '--rollback', after all.Ludovic Courtès
* guix/scripts/package.scm (%options): Add "rollback" as an alias for "roll-back".
2017-06-26guix package: 'guix package -r PKG -u' does not upgrade PKG.Ludovic Courtès
Fixes <http://bugs.gnu.org/27262>. Reported by Mark H Weaver <mhw@netris.org>. * guix/scripts/package.scm (transaction-upgrade-entry): Check if ENTRY matches 'manifest-transaction-removal-candidate?' and return TRANSACTION if it does. (process-actions): Move 'options->removable' from step 2 to step 1.
2017-06-25guix package: Warn about packages that no longer exist.Ludovic Courtès
Fixes <http://bugs.gnu.org/27261>. Reported by Mark H Weaver <mhw@netris.org>. * guix/scripts/package.scm (transaction-upgrade-entry): Add call to 'warning' when NAME cannot be found in the package set.
2017-06-24refresh: Be more verbose when passed an explicit package list.Ludovic Courtès
* guix/scripts/refresh.scm (check-for-package-update): Use 'version-compare' instead of 'version>?'. When WARN? is true, print something for the '=' and '<' cases.
2017-06-21environment: Disable profile collision checks.Ludovic Courtès
Reported by Efraim Flashner. This is a followup to a654dc4bcf7c8e205bdefa1a1d5f23444dd22778. * guix/profiles.scm (profile-derivation): Add #:allow-collisions? and honor it. * guix/scripts/environment.scm (inputs->profile-derivation): Pass #:allow-collisions? #f to 'profile-derivation'. * tests/guix-environment.sh: Test "guix environment guix".
2017-06-21guix package: '--search-paths' shows search paths from propagated inputs.Ludovic Courtès
* guix/scripts/package.scm (process-query) <'search-paths>: Use 'manifest-transitive-entries' instead of 'manifest-entries'.
2017-06-21guix package: Always upgrade packages that have propagated inputs.Ludovic Courtès
* guix/scripts/package.scm (transaction-upgrade-entry): Always upgrade packages that have propagated inputs.
2017-06-15guix: Add texlive importer.Ricardo Wurmus
* guix/import/texlive.scm: New file. * guix/scripts/import/texlive.scm: New file. * Makefile.am (MODULES): Add them. * tests/texlive.scm: New file. * Makefile.am (SCM_TESTS): Add it. * guix/scripts/import.scm (importers): Add texlive importer. * doc/guix.texi (Invoking guix import): Document it.
2017-06-13guix package: '--search' sorts by relevance.Ludovic Courtès
* guix/scripts/package.scm (find-packages-by-description): Rewrite to compute a score based on the number of regexps matched and the number of matches for each regexp. Sort according to this score and return it as a second value. (process-query) <'search>: Capture the two return values of 'find-packages-by-description'. Pass #:extra-fields to 'package->recutils'. * doc/guix.texi (Invoking guix package): Mention relevance, give an example.
2017-06-12derivations: Introduce 'read-derivation-from-file'.Ludovic Courtès
This avoids the open/fstat/close syscalls upon a cache hit that we had with the previous idiom: (call-with-input-file file read-derivation) where caching happened in 'read-derivation' itself. * guix/derivations.scm (%read-derivation): Rename to... (read-derivation): ... this. (read-derivation-from-file): New procedure. (derivation-prerequisites, substitution-oracle) (derivation-prerequisites-to-build): (derivation-path->output-path, derivation-path->output-paths): (derivation-path->base16-hash, map-derivation): Use 'read-derivation-from-file' instead of (call-with-input-file … read-derivation). * guix/grafts.scm (item->deriver): Likewise. * guix/scripts/build.scm (log-url, options->things-to-build): Likewise. * guix/scripts/graph.scm (file->derivation): Remove. (derivation-dependencies, %derivation-node-type): Use 'read-derivation-from-file' instead. * guix/scripts/offload.scm (guix-offload): Likewise. * guix/scripts/perform-download.scm (guix-perform-download): Likewise. * guix/scripts/publish.scm (load-derivation): Remove. (narinfo-string): Use 'read-derivation-from-file'.
2017-06-10bootloader: Rename boot-name to bootloader-name.Mathieu Othacehe
* gnu/system (<boot-parameters>)[boot-name]: Rename field to... [bootloader-name]: ... this. Adjust users. * gnu/scripts/system.scm: Adjust accordingly.
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.