summaryrefslogtreecommitdiff
path: root/guix/scripts
Commit message (Collapse)AuthorAge
* ui: Only display link in capable terminals.zimoun2020-02-24
| | | | | | | * guix/ui.scm (display-generation): Display generation path on new line. * guix/scripts/describe.scm (channel-commit-hyperlink): Add TRANSFORMER argument. (display-profile-content): Use TRANSFORMER argument to display URL explicitly when terminal does not support hyperlinks.
* scripts: system: Do not validate network file systems.Maxim Cournoyer2020-02-18
| | | | | | | Fixes <https://bugs.gnu.org/39551>. * guix/scripts/system.scm (check-file-system-availability): Ignore file systems of the NFS type.
* guix build: Add '--manifest' option.Marius Bakke2020-02-14
| | | | | | | | | * guix/scripts/build.scm (show-help): Document --manifest argument. (options->things-to-build): When given a manifest, evaluate all the entries. * tests/guix-build.sh: Add test for --manifest. * doc/guix.texi (Additional Build Options): Mention --manifest. * etc/completion/bash/guix: Complete file name if 'guix build' argument is -m.
* describe: Remove dependency on (guix scripts pull).Ludovic Courtès2020-02-11
| | | | | | | | | | | Until now, 'guix describe' would perform ~3K stat calls and ~1K openat calls because it was pulling (guix scripts pull), which in turn pulls in many (gnu packages …) modules. * guix/scripts/pull.scm (display-profile-content, %vcs-web-views) (channel-commit-hyperlink): Move to... * guix/scripts/describe.scm: ... here. Remove import of (guix scripts pull).
* Update e-mail address for Jakob L. Kreuze.Tobias Geerinckx-Rice2020-02-09
| | | | | | | | | | | As requested here: <https://lists.gnu.org/archive/html/guix-devel/2020-02/msg00128.html>. * .mailmap: Add an entry for Jakob. * gnu/machine.scm, gnu/machine/digital-ocean.scm, gnu/machine/ssh.scm, gnu/packages/admin.scm, gnu/packages/i2p.scm, gnu/packages/music.scm, gnu/packages/web.scm, gnu/tests/reconfigure.scm, guix/scripts/deploy.scm, guix/scripts/system/reconfigure.scm: Update their e-mail address.
* guix build, archive, graph: Disable absolute file port name canonicalization.Ludovic Courtès2020-01-24
| | | | | | | | | | | | | | | This avoids an 'lstat' storm. Specifically: ./pre-inst-env strace -c guix build -nd libreoffice goes from 1,711 to 214 'lstat' calls. * guix/scripts/build.scm (options->things-to-build): When SPEC matches 'derivation-path?', call 'canonicalize-path'. (guix-build): Remove 'with-fluids' for %FILE-PORT-NAME-CANONICALIZATION. * guix/scripts/archive.scm (guix-archive): Remove 'with-fluids' for %FILE-PORT-NAME-CANONICALIZATION. * guix/scripts/graph.scm (guix-graph): Likewise.
* guix package: Create profiles/per-user/$USER upfront.Ludovic Courtès2020-01-19
| | | | | | | | | Fixes <https://bugs.gnu.org/39194>. Reported by Matt Wette <matt.wette@gmail.com>. * guix/scripts/package.scm (build-and-use-profile): Move 'ensure-default-profile' call to... (process-actions): ... here.
* repl: Avoid dependency on high-level package modules.Ludovic Courtès2020-01-19
| | | | | | * guix/scripts/repl.scm: Remove imports of (guix scripts build), (gnu packages), (guix utils), and (guix packages). (%options): Define "--load-path" option right here.
* repl: Adjust "--listen" help message.Ludovic Courtès2020-01-19
| | | | * guix/scripts/repl.scm (show-help): Adjust "--listen" string.
* repl: Add "-q".Ludovic Courtès2020-01-19
| | | | | * guix/scripts/repl.scm (%options, show-help): Add "-q". (guix-repl): Add 'user-config' and use it. Honor 'ignore-dot-guile?'.
* 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.