summaryrefslogtreecommitdiff
path: root/guix/scripts
AgeCommit message (Expand)Author
2019-11-26Use 'offload?' instead of 'build-hook?' internally....* guix/scripts/archive.scm (%default-options): Replace 'build-hook?' with 'offload?'. * guix/scripts/build.scm (set-build-options-from-command-line): Pass #:offload? instead of #:use-build-hook?. (%standard-build-options): Use the 'offload? key instead of 'build-hook?. (%default-options): Replace 'build-hook?' with 'offload?'. * guix/scripts/copy.scm (%default-options): Likewise. * guix/scripts/deploy.scm (%default-options): Likewise. * guix/scripts/environment.scm (%default-options): Likewise. * guix/scripts/pack.scm (%default-options): Likewise. * guix/scripts/package.scm (%default-options): Likewise. * guix/scripts/pull.scm (%default-options): Likewise. * guix/scripts/system.scm (%default-options): Likewise. * guix/scripts/time-machine.scm (%default-options): Likewise. * guix/store.scm (set-build-options): Have #:use-build-hook? default to *unspecified*. Add #:offload?. Add call to 'warn-about-deprecation' when #:use-build-hook? is specified. Ludovic Courtès
2019-11-26guix build, daemon: Rename "--no-build-hook" to "--no-offload"....This is a followup to bc69ea2d605810cc32e13ed03d5848b8dc358b61. * guix/scripts/build.scm (show-build-options-help): Rename "--no-build-hook" to "--no-offload". (%standard-build-options): Likewise, and warn when "--no-build-hook" is passed. * nix/nix-daemon/guix-daemon.cc (options): Add "--no-offload" and mark "--no-build-hook" as hidden. * guix/scripts/offload.scm: Adjust comment. * doc/guix.texi (Invoking guix-daemon, Common Build Options): Replace "--no-build-hook" with "--no-offload". * etc/completion/fish/guix.fish, etc/completion/zsh/_guix: Adjust accordingly. Ludovic Courtès
2019-11-22pack: Allow multiple '--manifest' options....* guix/scripts/pack.scm (guix-pack): Collect 'manifest' options, and concatenate the resulting manifests. * tests/guix-pack.sh: Test it. * doc/guix.texi (Invoking guix pack): Document it. Ludovic Courtès
2019-11-22package: Allow multiple '--manifest' options....* guix/scripts/package.scm (manifest-action): Remove. (%actions): Remove it. (load-manifest): New procedure. (process-actions): Handle 'manifest' options. Define 'files' from 'manifest' options. Define 'manifest' based on FILES. Define 'trans' to represent the final transaction. * tests/guix-package.sh: Test it. * doc/guix.texi (Invoking guix package): Mention Ludovic Courtès
2019-11-22substitute: Don't fetch /nix-cache-info....This avoids one GET request every time 'fetch-narinfos' is called. The file itself was essentially useless. * guix/scripts/substitute.scm (<cache-info>, download-cache-info): Remove. (%unreachable-hosts): New variable. (open-connection-for-uri/maybe): New procedure. (fetch-narinfos)[handle-narinfo-response]: Check whether NARINFO has its 'path' under (%store-prefix) and ignore it otherwise. Move 'update-progress!' call before 'if'. [do-fetch]: Remove 'port' parameter. Use 'open-connection-for-uri/maybe'. Remove call to 'download-cache-info'. Ludovic Courtès
2019-11-21pack: Add "--derivation"....* guix/scripts/pack.scm (%options, show-help): Add "--derivation". (guix-pack): Honor it. * tests/guix-pack.sh: Test it. * doc/guix.texi (Invoking guix pack): Document it. Ludovic Courtès
2019-11-19deploy: Handle "--version"....* guix/scripts/deploy.scm (%options): Add "--version". Ludovic Courtès
2019-11-19pull: Acquire a lock for the target profile....This is a followup to b1fb663404894268b5ee92c040f12c52c0bee425. * guix/scripts/pull.scm (guix-pull): Wrap 'run-with-store' call in 'with-file-lock/no-wait'. Ludovic Courtès
2019-11-17guix build: Handle "guix build /….drv" correctly for non-existent derivations....This lets the daemon substitute missing derivations, as in the example at <https://bugs.gnu.org/38226>, instead of failing with ENOENT. * guix/scripts/build.scm (options->things-to-build): In the 'derivation-path?' case, don't fail when 'read-derivation-from-file' raises to ENOENT; return the empty list in that case. (guix-build): Add non-existent '.drv' files to ITEMS. Pass ITEMS in addition to DRV to 'build-derivations'. * tests/guix-build.sh: Add test. Ludovic Courtès
2019-11-15time-machine: Honor the standard build options....* guix/scripts/time-machine.scm (show-help): Call 'show-build-options-help'. (%options): Add %STANDARD-BUILD-OPTIONS. (%default-options): New variable. (parse-args): Pass (list %default-options) to 'parse-command-line' and remove #:build-options? parameter. (guix-time-machine): Call 'set-build-options-from-command-line' and wrap 'cached-channel-instance' call in 'with-status-verbosity'. * doc/guix.texi (Invoking guix time-machine): Mention common build options. Ludovic Courtès
2019-11-15time-machine: Handle 'git-error' exceptions....* guix/scripts/pull.scm (with-git-error-handling): Export. * guix/scripts/time-machine.scm (guix-time-machine): Wrap body in 'with-git-error-handling'. Ludovic Courtès
2019-11-15inferior: 'cached-channel-instance' takes an open store connection....* guix/inferior.scm (cached-channel-instance): Take an explicit 'store' argument. (inferior-for-channels): Wrap call to 'cached-channel-instance' in 'with-store'. * guix/time-machine.scm (guix-time-machine): Wrap call to 'cached-channel-instance' in 'with-store'. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Konrad Hinsen
2019-11-15Add 'guix time-machine'....* guix/scripts/time-machine.scm: New file. * Makefile.am: (MODULES): Add it. * guix/scripts/pull.scm (channel-list): Export. * guix/inferior.scm (cached-channel-instance): New procedure. (inferior-for-channels): Use it. * doc/guix.texi (Invoking guix time-machine): New section. (Channels): Cross-reference it. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Konrad Hinsen
2019-11-15pull: Remove unused '--verbose' option....This option had been ignored since commit 0d39a3b98948314e135566b9315717695a9035ea (August 2018). * guix/scripts/pull.scm (show-help, %options): Remove "--verbose". (build-and-install): Remove #:verbose?, which was unused. (guix-pull): Adjust accordingly. Ludovic Courtès
2019-11-09ui: Produce hyperlinks for the 'location' field of search results....This affects the output of 'guix show', 'guix search', and 'guix system search'. * guix/ui.scm (hyperlink, supports-hyperlinks?, location->hyperlink): New procedures. (package->recutils): Add #:hyperlinks? and honor it. (display-search-results): Pass #:hyperlinks? to PRINT. * guix/scripts/system/search.scm (service-type->recutils): Add #:hyperlinks? and honor it. Ludovic Courtès
2019-11-08guix: package: lock profiles when processing them....* guix/scripts/package.scm (process-actions): Get a per-profile lock to prevent concurrent actions on profiles. * tests/guix-package.sh: Add test. Julien Lepiller
2019-11-07graph: Support package transformation options....* guix/scripts/graph.scm (%options): Append %TRANSFORMATION-OPTIONS. (show-help): Call 'show-transformation-options-help'. (guix-graph): Call 'options->transformation' and use it. * tests/guix-graph.sh: Add test. * doc/guix.texi (Invoking guix graph): Document it. Ludovic Courtès
2019-11-01pull: Gracefully handle invalid Texinfo markup in news....Reported by Oleg Pykhalov <go.wigust@gmail.com>. * guix/scripts/pull.scm (display-news-entry-title) (display-news-entry): Catch 'parser-error' around call to 'texi->plain-text', and return Texinfo as-is when an exception is caught. Ludovic Courtès
2019-10-27pull: Honor '/etc/guix/channels.scm'....* guix/scripts/pull.scm (channel-list)[global-file]: New variable. [channels]: Honor it. * doc/guix.texi (Invoking guix pull): Document it. Ludovic Courtès
2019-10-25guix build: Remove obsolete TODO....* guix/scripts/build.scm (set-build-options-from-command-line): Remove obsolete TODO comment. Ludovic Courtès
2019-10-25guix build: Warn when '--keep-failed' is passed to a remote daemon....* guix/scripts/build.scm (set-build-options-from-command-line): When OPTS has 'keep-failed?' set, check whether STORE is connected over AF_UNIX and warn when it's not. Ludovic Courtès
2019-10-18reconfigure: Silence "shepherd: Evaluating ..." messages....* guix/scripts/system/reconfigure.scm (upgrade-services-program): Parameterize 'shepherd-message-port' to silent "Evaluating ..." messages. Ludovic Courtès
2019-10-18pull: Call 'ensure-default-profile' after 'set-build-options'....This is a followup to 81c580c8664bfeeb767e2c47ea343004e88223c7. * guix/scripts/pull.scm (guix-pull): Move 'ensure-default-profile' call after 'set-build-options-from-command-line' call. This ensures that the 'profiles/per-user/$USER' directory is created before 'ensure-default-profile' is called when 'GUIX_DAEMON_SOCKET' points to a remote TCP daemon. Ludovic Courtès
2019-10-15offload: Set a longer SSH session timeout....Fixes <https://bugs.gnu.org/37762>. * guix/scripts/offload.scm (open-ssh-session): Add 'max-silent-time' parameter. Add call to 'session-set!' before returning SESSION. (transfer-and-offload): Pass MAX-SILENT-TIME to 'open-ssh-session'. (%short-timeout): New variable. (choose-build-machine): Pass %SHORT-TIMEOUT to 'open-ssh-session'. (check-machine-availability): Likewise. (check-machine-status): Likewise. Ludovic Courtès
2019-10-06Merge branch 'master' into core-updatesRicardo Wurmus
2019-10-03environment: '--container' honors '--preserve'....* guix/scripts/environment.scm (launch-environment/container): Add #:white-list parameter and honor it. (guix-environment): Pass #:white-list to 'launch-environment/container'. * tests/guix-environment-container.sh: Add test. Ludovic Courtès
2019-10-01import: crate: Add '--recursive'....* guix/scripts/import/crate.scm (show-help, guix-import-crate): Add '--recursive'. * doc/guix.texi (Invoking guix import): Mention '--recursive'. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Martin Becze
2019-10-01pull: Do not use '~*', which 'msgfmt' fails to interpret....Really fixes <https://bugs.gnu.org/37505>. This is a followup to f751b4646d3989d76dad9e33e39f9724c7c50be6. * guix/scripts/pull.scm (display-channel-news): Remove second occurrence of '~*' in a format string. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Konrad Hinsen
2019-10-01Merge branch 'master' into core-updatesLudovic Courtès
2019-10-01pull: Do not use '~*', which 'msgfmt' fails to interpret....Fixes <https://bugs.gnu.org/37505>. Reported by Konrad Hinsen <konrad.hinsen@fastmail.net>. * guix/scripts/pull.scm (display-channel-news): Use ~a instead of ~* when reporting new channels. Ludovic Courtès
2019-09-28offload: Include the port number in the machine lock file name....This is useful when a single machine appears several time, with different port numbers. * guix/scripts/offload.scm (machine-slot-file): Add MACHINE's port to the file name. Ludovic Courtès
2019-09-27Merge branch 'master' into core-updatesMarius Bakke
2019-09-26guix download: Ensure destination file-name is valid in the store....Avoid invalid store-file-name by explicitly passing the destination name, replacing any character not allowed in the store-file-name by an underscore. Fixes <http://issues.guix.gnu.org/issue/26175> * guix/scripts/download.scm (safe-naensure-valid-store-file-nameme): New function. (download-to-store*): Use it to generate a "safe" basename of URL. Hartmut Goebel
2019-09-26guix package: Add '--list-profiles'....* guix/scripts/package.scm (show-help, %options): Add '--list-profiles'. (process-query): Honor it. * tests/guix-package.sh: Add test. Ludovic Courtès
2019-09-25pull: Dim the commit ID when displaying news....* guix/scripts/pull.scm (display-news-entry): Dim the commit line. Ludovic Courtès
2019-09-24Merge branch 'master' into core-updatesLudovic Courtès
2019-09-23pull: Use ~/.cache/guix/checkouts instead of ~/.cache/guix/pull....Previously 'channel-news-for-commit' would use the former while 'guix pull' would use the latter. Consequently, the first 'guix pull -N' would clone the repository anew. * guix/scripts/pull.scm (guix-pull): Remove 'cache', and leave %REPOSITORY-CACHE-DIRECTORY to its default value. Ludovic Courtès
2019-09-23show, search: Add '--load-path'....* guix/scripts/search.scm (show-help, %options): Add -L/--load-path. * guix/scripts/show.scm (show-help, %options): Add -L/--load-path. Ludovic Courtès
2019-09-23scripts: container: Fix typo....* guix/scripts/container/exec (show-help): Fix spelling of COMMAND. Vagrant Cascadian
2019-09-23deploy: Add '--verbosity' and properly interpret build log....This is a followup to 91300526b7d9d775bd98a700ed3758420ef9eac6. * guix/scripts/deploy.scm (show-help, %options): Add '--verbosity'. (guix-deploy): Wrap 'with-store' in 'with-status-verbosity'. Ludovic Courtès
2019-09-23pull: Display news titles directly upon 'pull'....* guix/scripts/pull.scm (display-profile-news): Return true when there's more to display. (display-news-entry-title): New procedure. (display-news-entry): Use it. (display-channel-specific-news): Return true when there's more to display. (display-channel-news-headlines): New procedure. (build-and-install): Call it. When 'display-channel-news-headlines' or 'display-profile-news' returns #t, print a hint to run "pull --news". (display-new/upgraded-packages): Return true when there's more to display. Ludovic Courtès
2019-09-23pull: '-l' displays channel news....* guix/scripts/pull.scm (display-channel-news): Make 'previous' a parameter. (process-query)[list-generations]: Call 'display-channel-news'. Ludovic Courtès
2019-09-23pull: Display channel news....* guix/scripts/pull.scm (display-news-entry) (display-channel-specific-news): New procedures. (display-channel-news): Call it. (display-new/upgraded-packages): Adjust hint message. * doc/guix.texi (Invoking guix pull): Mention it. Ludovic Courtès
2019-09-23pull: '--news' shows the list of channels added or removed....* guix/scripts/pull.scm (display-channel, channel=?) (display-channel-news, display-news): New procedures. (process-query): Call 'display-news' instead of 'display-profile-news'. Ludovic Courtès
2019-09-21guix package: '--show' ignores deprecated packages....* guix/scripts/package.scm (process-query) <'show>: Remove superseded packages. * tests/guix-package-aliases.sh: Add test. Ludovic Courtès
2019-09-21guix package: Add 'guix show' alias....* guix/scripts/show.scm: New file. * Makefile.am (MODULES): Add it. * po/guix/POTFILES.in: Add it. * tests/guix-package-aliases.sh: Add test. * doc/guix.texi (Invoking guix package): Document it and use it in a example. Signed-off-by: Ludovic Courtès <ludo@gnu.org> zimoun
2019-09-18scripts: pull: Add options for generation management...* guix/scripts/pull.scm (%options) Add --roll-back, --switch-generation, --delete-generations (process-generation-change): New function (guix-pull): Execute generation management operations * doc/guix.texi: Document the generation management operations Signed-off-by: Ludovic Courtès <ludo@gnu.org> Konrad Hinsen
2019-09-18pull: Work around Ubuntu's 'sudo'....Partly fixes <https://bugs.gnu.org/36785>. Reported by Julien Lepiller <julien@lepiller.eu>. * guix/scripts/pull.scm (ensure-default-profile): Do not call 'migrate-generations' when "SUDO_USER" is set. Ludovic Courtès
2019-09-18guix package: "guix package -f FILE" ensures FILE returns a package....* guix/scripts/package.scm (options->installable): Add clause for 'install option with a non-package object. * tests/guix-package.sh: Add test. Ludovic Courtès
2019-09-17Merge branch 'master' into core-updatesLudovic Courtès