summaryrefslogtreecommitdiff
path: root/guix/scripts
Commit message (Collapse)AuthorAge
* refresh: Fix internal variable name.zimoun2020-01-18
| | | | * guix/scripts/refresh.scm (%option): Fix internal variable name.
* guix package: Export 'transaction-upgrade-entry'.Ludovic Courtès2020-01-16
| | | | | | | | * guix/scripts/package.scm (transaction-upgrade-entry): Add 'store' parameter and use it instead of (%store). Export. * tests/packages.scm ("transaction-upgrade-entry, zero upgrades") ("transaction-upgrade-entry, one upgrade") ("transaction-upgrade-entry, superseded package"): Adjust accordingly.
* publish: Export 'signed-string'.Ludovic Courtès2020-01-16
| | | | | | * guix/scripts/publish.scm (signed-string): Export and improve docstring. * tests/publish.scm ("/*.narinfo") ("/*.narinfo with properly encoded '+' sign"): Adjust accordingly.
* repl: Fix '--help' message.zimoun2020-01-16
| | | | * guix/scripts/repl.scm: (show-help): Add '--listen' option message.
* repl: Add '--load-path' option.zimoun2020-01-16
| | | | | * guix/scripts/repl.scm (%option): Add '--load-path' option. * doc/guix.texi: Document it.
* edit: Add '--load-path' option.zimoun2020-01-16
| | | | | * guix/scripts/edit.scm (%option): Add '--load-path' option. * doc/guix.texi: Document it.
* refresh: Add '--load-path' option.zimoun2020-01-16
| | | | | * guix/scripts/refresh.scm (%option): Add '--load-path' option. * doc/guix.texi: Document it.
* size: Add '--load-path' option.zimoun2020-01-16
| | | | | * guix/scripts/size.scm (%option): Add '--load-path' option. * doc/guix.texi: Document it.
* graph: Add '--load-path' option.Pierre Neidhardt2020-01-16
| | | | | | * guix/scripts/graph.scm (%option): Add '--load-path' option. * doc/guix.texi: Document it. * tests/guix-graph.sh: Test it.
* serialize: Export 'dump-port*'.Ludovic Courtès2020-01-15
| | | | | * guix/serialization.scm (dump): Export as 'dump-port*'. * guix/scripts/challenge.scm (dump-port*): Remove.
* More module autoload adjustments.Ludovic Courtès2020-01-15
| | | | | | | | This is a followup to 7a0836cffdfe3ab9ee899602f218277646959144. * guix/scripts/package.scm: Adjust binding list of the (guix store roots) autoload. * guix/inferior.scm: Adjust binding list of the (guix cache) autoload.
* substitute: 'http-multiple-get' processes each request only once.Ludovic Courtès2020-01-15
| | | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/39090>. Reported by Gábor Boskovits <boskovits@gmail.com>. Fixes a regression introduced in 9e3f9ac3c00906f5bc647ea8398e4ed5a370614e. * guix/scripts/substitute.scm (http-multiple-get): In the "Connection: close" case, pass (drop requests (+ 1 processed)) to 'loop' as the remaining REQUESTS value. Previously, we would pass a list containing duplicates, and thus the final result would also contain duplicates. When sent to the daemon, that list would lead to a daemon error: got unexpected path `/gnu/store/…' from substituter
* More module autoload changes.Ludovic Courtès2020-01-07
| | | | | | | This is a followup to 6a7c4636d4dec47eefa03c95da5a1315bd0e0413. * guix/scripts/build.scm: Adjust #:autoload clauses. * guix/scripts/gc.scm: Likewise.
* Adjust module autoloads.Ludovic Courtès2020-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Guile < 2.9.7, autoloading a module would give you access to all its bindings. In future versions, autoloading a module gives access only to the listed bindings, as per #:select (see <https://bugs.gnu.org/38895>). This commit adjusts autoloads to the new semantics, allowing Guix to be built with Guile 2.9.7/2.9.8. * guix/build/download.scm <top level>: Remove call to 'module-autoload!'. (load-gnutls): New procedure. (tls-wrap): Call it. * guix/git.scm <top level>: Remove call to 'module-autoload!'. (load-git-submodules): New procedure. (update-submodules): Call it instead of 'resolve-interface'. * gnu/bootloader/grub.scm: Replace #:autoload with #:use-module. * gnu/packages.scm: Likewise. * gnu/packages/ssh.scm: Likewise. * gnu/packages/tex.scm: Likewise. * gnu/services/cuirass.scm: Likewise. * gnu/services/mcron.scm: Likewise. * guix/lint.scm: Augment list of bindings in #:autoload. * guix/scripts/build.scm: Likewise. * guix/scripts/gc.scm: Likewise. * guix/scripts/pack.scm: Likewise. * guix/scripts/publish.scm: Likewise. * guix/scripts/pull.scm: Likewise. * guix/utils.scm: Remove unnecessary #:autoload clauses; replace one of them with #:use-module.
* download: Do not leak file descriptors on TLS ports.Ludovic Courtès2020-01-03
| | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/20145>. * guix/build/download.scm (%tls-ports, register-tls-record-port): Remove. (tls-wrap): Remove call to 'register-tls-record-port'. Return a custom binary input/output port instead. This is a backport of what Guile 2.2's (web client) module has been doing. (close-connection): Define as an alias for 'close-port'. * guix/http-client.scm (http-fetch): Remove #:keep-alive? parameter, which was ignored and unused. Pass #:keep-alive? #f to 'http-get'. * guix/lint.scm (probe-uri): Use 'close-port' instead of 'close-connection'. * guix/scripts/substitute.scm (http-multiple-get): Likewise.
* import: crate: Honor crate version for recursive imports.Ludovic Courtès2019-12-30
| | | | | | | | | | Fixes <https://bugs.gnu.org/38709>. Reported by Valentin Ignatev <valentignatev@gmail.com>. * guix/import/crate.scm (crate-recursive-import): Add optional 'version' parameter and honor it. * guix/scripts/import/crate.scm (guix-import-crate): Pass VERSION as 2nd argument to 'crate-recursive-import'.
* pack: Save provenance information when using '--manifest'.Ludovic Courtès2019-12-29
| | | | | | * guix/scripts/pack.scm (guix-pack)[manifest-from-args]: Remove 'provenance', and add 'with-provenance' procedure. Wrap 'cond' form in 'with-provenance'.
* guix package: Save provenance information when using '--manifest'.Ludovic Courtès2019-12-29
| | | | | | | | | Fixes <https://bugs.gnu.org/38673>. Reported by zimoun <zimon.toutoune@gmail.com>. * guix/describe.scm (manifest-entry-with-provenance): New procedure. * guix/scripts/package.scm (process-actions): Use it when FILES is non-empty.
* profiles: Add 'map-manifest-entries'.Ludovic Courtès2019-12-29
| | | | | * guix/scripts/pack.scm (map-manifest-entries): Move to... * guix/profiles.scm (map-manifest-entries): ... here.
* gnu: Remove squashfs-tools-next.Ricardo Wurmus2019-12-26
| | | | | | * gnu/packages/compression.scm (squashfs-tools-next): Remove variable. * guix/scripts/pack.scm (squashfs-image, guix-pack): Use squashfs-tools. * tests/pack.scm: Use squashfs-tools.
* guix system: Honor the build options in 'delete-generations'.Ludovic Courtès2019-12-21
| | | | | | | | | Until now, 'guix system delete-generations' would ignore OPTS; for example, it would not enable #:print-extended-build-trace? & co., leading to suboptimal output. * guix/scripts/system.scm (process-command)[with-store*]: New macro. Use it for 'delete-generations', 'switch-generation', and 'roll-back'.
* challenge: Fix type mismatch when comparing to a local hash.Ludovic Courtès2019-12-15
| | | | | | * guix/scripts/challenge.scm (call-with-mismatches)[narinfo1]: When LOCAL-HASH is true, call 'narinfo-hash->sha256' and use 'bytevector=?' instead of 'string=?'.
* challenge: Support "--diff=diffoscope".Ludovic Courtès2019-12-12
| | | | | | | | | | | | | * guix/scripts/challenge.scm (call-with-nar): New procedure. (narinfo-contents): Express in terms of 'call-with-nar'. (call-with-mismatches, report-differing-files/external): New procedures. (%diffoscope-command): New variable. (%options): Support "diffoscope" and a string starting with "/". * tests/challenge.scm (call-mismatch-test): New procedure. ("differing-files"): Rewrite in terms of 'call-mismatch-test'. ("call-with-mismatches"): New test. * doc/guix.texi (Invoking guix challenge): Document it.
* challenge: Add "--diff".Ludovic Courtès2019-12-12
| | | | | | | | | | | | | | | | * guix/scripts/challenge.scm (dump-port*): New variable. (archive-contents, store-item-contents, narinfo-contents) (differing-files, report-differing-files): New procedures. (summarize-report): Add #:report-differences and call it. (show-help, %options): Add "--diff". (%default-options): Add 'difference-report' key. (report-differing-files): Parameterize CURRENT-TERMINAL-COLUMNS and pass #:report-differences to 'summarize-report'. * guix/tests/http.scm (%local-url): Add optional argument. (call-with-http-server): Fix docstring typo. * tests/challenge.scm (query-path-size, make-narinfo): New procedures. ("differing-files"): New test. * doc/guix.texi (Invoking guix challenge): Document "--diff".
* progress: Add 'progress-report-port'.Ludovic Courtès2019-12-12
| | | | | * guix/scripts/substitute.scm (progress-report-port): Move to... * guix/progress.scm (progress-report-port): ... here. New procedure.
* challenge: Report the best narinfo URI.Ludovic Courtès2019-12-12
| | | | | | | * guix/scripts/substitute.scm (select-uri): Rename to... (narinfo-best-uri): ... this, and make public. Update callers. * guix/scripts/challenge.scm (summarize-report): Use 'narinfo-best-uri' instead of (first (narinfo-uris ...)).
* guix archive: Add '--list'.Ludovic Courtès2019-12-12
| | | | | | | | * guix/scripts/archive.scm (show-help, %options): Add '--list'. (list-contents): New procedure. (guix-archive): Honor the '--list' option. * tests/guix-archive.sh: Test it. * doc/guix.texi (Invoking guix archive): Document it.
* import: utils: 'recursive-import' returns a list rather than a stream.Ludovic Courtès2019-12-11
| | | | | | | | | | | | | | | | | * guix/import/utils.scm (recursive-import): Remove 'list->stream' call. * guix/scripts/import/cran.scm (guix-import-cran): Remove 'stream->list' call. * guix/scripts/import/crate.scm (guix-import-crate): Likewise. * guix/scripts/import/elpa.scm (guix-import-elpa): Likewise. * guix/scripts/import/gem.scm (guix-import-gem): Likewise. * guix/scripts/import/hackage.scm (guix-import-hackage): Likewise. * guix/scripts/import/opam.scm (guix-import-opam): Likewise. * guix/scripts/import/pypi.scm (guix-import-pypi): Likewise. * guix/scripts/import/stackage.scm (guix-import-stackage): Likewise. * tests/gem.scm ("gem-recursive-import"): Likewise. * tests/import-utils.scm ("recursive-import"): Likewise. Co-authored-by: Brian Leung <bkleung89@gmail.com>
* import: utils: 'recursive-import' returns packages in topological order.Ludovic Courtès2019-12-11
| | | | | | | | | | | | | | | | | | * guix/import/utils.scm (topological-sort): New procedure. (recursive-import): Rewrite to use it. * tests/import-utils.scm ("recursive-import"): New test. * guix/import/cran.scm (cran->guix-package): Always return two values. * guix/scripts/import/cran.scm (guix-import-cran): Remove 'reverse' call on 'cran-recursive-import' result. * guix/scripts/import/crate.scm (guix-import-crate): Likewise. * guix/scripts/import/elpa.scm (guix-import-elpa): Likewise. * guix/scripts/import/gem.scm (guix-import-gem): Likewise. * guix/scripts/import/hackage.scm (guix-import-hackage): Likewise. * guix/scripts/import/opam.scm (guix-import-opam): Likewise. * guix/scripts/import/pypi.scm (guix-import-pypi): Likewise. * guix/scripts/import/stackage.scm (guix-import-stackage): Likewise. * tests/gem.scm ("gem-recursive-import"): Change the order of package expressions accordingly.
* pack: Clarify the /bin/sh requirement for Singularity.Ludovic Courtès2019-12-10
| | | | | | | | | * guix/scripts/pack.scm (squashfs-image)[symlinks*]: New variable. [build]: Use it instead of SYMLINKS. (guix-pack): Emit a warning and a hint when "bash" and "bash-minimal" are missing and PACK-FORMAT is 'squashfs. * doc/guix.texi (Invoking guix pack): Document the /bin/sh requirement for Singularity.
* lint: Add '--load-path' option.zimoun2019-12-08
| | | | | | | | * guix/scripts/lint.scm (%options): Add '--load-path' option. * doc/guix.texi: Document it. * tests/guix-lint.sh: Test it. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix system: Add "describe" action.Ludovic Courtès2019-12-07
| | | | | | | * guix/scripts/system.scm (show-help): Add "describe". (process-command): Handle it. (guix-system): Likewise. * doc/guix.texi (Invoking guix system): Document it.
* guix system: "list-generations" displays provenance info.Ludovic Courtès2019-12-07
| | | | | | | | * guix/scripts/pull.scm (channel-commit-hyperlink): Export. * guix/scripts/system.scm (display-system-generation) [display-channel]: New procedure. Read the "provenance" file of GENERATION and display channel info and the configuration file name when available.
* guix system: Use 'provenance-service-type', add "--save-provenance".Ludovic Courtès2019-12-07
| | | | | | | | | * guix/scripts/system.scm (show-help, %options): Add "--save-provenance". (process-action): Define 'save-provenance?' and 'transform'; call 'transform' on the OS. * doc/guix.texi (Invoking guix system): Document it under 'reconfigure'. (Service Reference): Mention that 'provenance-service-type' is automatically added by 'reconfigure' & 'init'.
* ssh: Add 'authenticate-server*' and use it for offloading.Ludovic Courtès2019-12-04
| | | | | | | | * guix/scripts/offload.scm (host-key->type+key): Remove. (open-ssh-session): Replace server authentication code with a call to 'authenticate-server*'. * guix/ssh.scm (host-key->type+key, authenticate-server*): New procedures.
* substitute: Remove unused procedure.Ludovic Courtès2019-12-04
| | | | | | | This became unused with commit a9468b422b6df2349a3f4d1451c9302c3d77011b. * guix/scripts/substitute.scm (assert-valid-signature): Remove.
* scripts: system: Add --target option.Mathieu Othacehe2019-12-01
| | | | | | | * guix/scripts/system.scm (%options): Add target option, (%default-options): ditto, (process-action): Rename existing target variable to target-file and pass new target variable to run-with-store procedure.
* ui: Factorize 'with-profile-lock'.Ludovic Courtès2019-11-29
| | | | | | | | | * guix/ui.scm (profile-lock-handler, profile-lock-file): New procedures. (with-profile-lock): New macro. * guix/scripts/package.scm (process-actions): Use 'with-profile-lock' instead of 'with-file-lock/no-wait'. * guix/scripts/pull.scm (guix-pull): Likewise.
* pull, describe: Emit hyperlinks for commit identifiers.Ludovic Courtès2019-11-28
| | | | | | | | | | * guix/scripts/pull.scm (%vcs-web-views): New variable. (channel-commit-hyperlink): New procedure. (display-news-entry): Add 'channel' parameter. When 'supports-hyperlinks?' returns true, call 'channel-commit-hyperlink'. (display-profile-content): Likewise, and define CHANNEL. (display-channel-specific-news): Pass CHANNEL to 'display-news-entry'. * guix/ui.scm (hyperlink): Make public.
* substitute: 'http-multiple-get' no longer drops requests above 1,000.Ludovic Courtès2019-11-28
| | | | | | | | | | Previously, in the unlikely case 'http-multiple-get' was passed more than 1,000 requests, it could have dropped all those above 1,000. * guix/scripts/substitute.scm (http-multiple-get): Define 'batch'. Use that for the 'write-request' loop. Add 'processed' parameter to 'loop' and use that to compute the remaining requests and call 'connect' in the recursion base case.
* substitute: Make '%allow-unauthenticated-substitutes?' public.Ludovic Courtès2019-11-27
| | | | | | | | | * guix/scripts/substitute.scm (warn-about-missing-authentication): New procedure. (%allow-unauthenticated-substitutes?): Turn into a public parameter and use 'warn-about-missing-authentication'. (valid-narinfo?): Adjust accordingly. * tests/substitute.scm (call-with-narinfo): Likewise.
* guix build: '--keep-failed' implies '--no-offload'.Ludovic Courtès2019-11-26
| | | | | | * guix/scripts/build.scm (set-build-options-from-command-line): Pass #:offload? #f when 'keep-failed? is true. * doc/guix.texi (Common Build Options): Document it.
* Use 'offload?' instead of 'build-hook?' internally.Ludovic Courtès2019-11-26
| | | | | | | | | | | | | | | | | | | | * 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.
* guix build, daemon: Rename "--no-build-hook" to "--no-offload".Ludovic Courtès2019-11-26
| | | | | | | | | | | | | | | | 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.
* pack: Allow multiple '--manifest' options.Ludovic Courtès2019-11-22
| | | | | | | * 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.
* package: Allow multiple '--manifest' options.Ludovic Courtès2019-11-22
| | | | | | | | | | | * 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
* substitute: Don't fetch /nix-cache-info.Ludovic Courtès2019-11-22
| | | | | | | | | | | | | | | | 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'.
* pack: Add "--derivation".Ludovic Courtès2019-11-21
| | | | | | | * 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.
* deploy: Handle "--version".Ludovic Courtès2019-11-19
| | | | * guix/scripts/deploy.scm (%options): Add "--version".
* pull: Acquire a lock for the target profile.Ludovic Courtès2019-11-19
| | | | | | | This is a followup to b1fb663404894268b5ee92c040f12c52c0bee425. * guix/scripts/pull.scm (guix-pull): Wrap 'run-with-store' call in 'with-file-lock/no-wait'.