summaryrefslogtreecommitdiff
path: root/guix
Commit message (Collapse)AuthorAge
* store: Add 'find-roots' RPC.Ludovic Courtès2021-01-22
| | | | | | | * guix/serialization.scm (read-string-pairs): New procedure. * guix/store.scm (read-arg): Add support for 'string-pairs'. (find-roots): New procedure. * tests/store.scm ("add-indirect-root and find-roots"): New test.
* Revert "substitute: Remove extra 'newline' call."Ludovic Courtès2021-01-21
| | | | | | | | This reverts commit d5a1b0e86f248edd53c785b910b5d51ee708b0fc. This change turned out to be misguided; it would lead to "substitute:" lines being printed on the client side, without anything beyond the colon sign.
* repl: Fix exception handling for interpreted code.Ludovic Courtès2021-01-21
| | | | | | | | | | The 'stack' variable could be #f when code is interpreted, which in practice happens when running in "legacy" mode--i.e., when 'open-inferior' invokes "guile" instead of "guix repl". * guix/repl.scm (send-repl-response)[handle-exception]: Check whether STACK is true before passing it to 'stack->frames'. * tests/inferior.scm ("&inferior-exception, legacy mode"): New test.
* import, swh: Adjust to Guile-JSON 4.5.x unspecified value handling.Ludovic Courtès2021-01-21
| | | | | | | | * guix/import/cpan.scm (<cpan-release>)[home-page]: Add 'unspecified?' case. * guix/import/gem.scm (<gem>)[licenses]: Likewise. (json->gem-dependency-list): Likewise. * guix/swh.scm (<directory-entry>)[checksums]: Likewise.
* archive: Note service type in ACL hint.Tobias Geerinckx-Rice2021-01-20
| | | | * guix/scripts/archive.scm (authorize-key): Mention guix-service-type.
* import/cran: Add more invalid package names to ignore.Ricardo Wurmus2021-01-20
| | | | * guix/import/cran.scm (invalid-packages): Add more names.
* transformations: Add '--with-latest'.Ludovic Courtès2021-01-19
| | | | | | | | | | | | * guix/upstream.scm (upstream-source-compiler): New procedure. (%updaters): Set! it. * guix/transformations.scm (transform-package-latest): New procedure. (%transformations): Add 'with-latest'. (%transformation-options, show-transformation-options-help/detailed): Add '--with-latest'. * tests/transformations.scm ("options->transformation, with-latest"): New test. * doc/guix.texi (Package Transformation Options): Document it.
* environment: Fix '--root' option with relative file name.JOULAUD François2021-01-19
| | | | | | | | | | | | The path normalization of `--root` option of `guix environment` was buggy as it appended full argument after normalized directory. This patch fixes it. * guix/scripts/environment.scm (register-gc-root): Fix gc-root path normalization. * tests/guix-environment.sh: Add test. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* modules: Recognize #:re-export-and-replace.Ludovic Courtès2021-01-19
| | | | | * guix/modules.scm (extract-dependencies): Recognize #:re-export-and-replace, which was introduced in Guile 3.0.
* system: Rename 'disk-image' command 'image'.Mathieu Othacehe2021-01-19
| | | | | | | | | | | | | * guix/scripts/system.scm (system-derivation-for-action): Rename 'disk-image' command 'image'. Warn when using the now deprecated 'disk-image' command. (show-help): Adapt accordingly. (guix-system): Ditto. * tests/guix-system.sh: Ditto. * gnu/system/examples/bare-hurd.tmpl: Ditto. * doc/guix.texi (Building the Installation Image, Building the Installation Image for ARM Boards, Invoking guix pack, Invoking guix system): Adapt documentation.
* image: Rename "raw" image-type to "efi-raw".Mathieu Othacehe2021-01-17
| | | | | | | | * gnu/system/image.scm (raw-image-type): Rename to "efi-raw-image-type". * guix/scripts/system.scm (%default-options): Adapt accordingly. * doc/guix.texi: Ditto. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* guix: Move narinfo code from substitute script to module.Christopher Baines2021-01-16
| | | | | | | | | | | | | | | | | | | | This separation between the code for dealing with narinfos from the code doing that for a purpose should make things clearer, and better support components other that the substitute script in using this code. This is just moving the code around, no code should have been significantly changed. * guix/scripts/substitute.scm (<narinfo>): Move record type to (guix narinfo). (fields->alist, narinfo-hash-algorithm+value, narinfo-hash->sha256, narinfo-signature->canonical-sexp, narinfo-maker, read-narinfo, narinfo-sha256, valid-narinfo?, write-narinfo, narinfo->string, string->narinfo, equivalent-narinfo?, supported-compression?, compresses-better?, narinfo-best-uri): Move procedures to (guix narinfo). (%compression-methods): Move variable to (guix narinfo). * guix/narinfo.scm: New file. * Makefile.am (MODULES): Add it. * po/guix/POTFILES.in: Add 'guix/narinfo.scm'.
* substitute: Untangle skipping authentication from valid-narinfo?.Christopher Baines2021-01-16
| | | | | | | | | | | | Rather than having valid-narinfo? evaluate to #t if %allow-unauthenticated-substitutes? is set to #t, just use (const #t) for valid-narinfo? when %allow-unauthenticated-substitutes? is set to #t. This will allow moving valid-narinfo? in to a (guix substitutes) module. * guix/scripts/substitute.scm (process-query, process-substitution): Change the authorized? argument to lookup-narinfo and lookup-narinfos/diverse based on %allow-unauthenticated-substitutes?. (valid-narinfo?): Remove use of %allow-unauthenticated-substitutes?.
* self: Add dependency on guile-zstd.Ludovic Courtès2021-01-14
| | | | | | * guix/self.scm (specification->package): Add "guile-zstd". (compiled-guix)[guile-zstd]: New variable. [dependencies]: Add it.
* substitute: Add zstd support.Ludovic Courtès2021-01-13
| | | | | * guix/scripts/substitute.scm (%compression-methods): Add zstd. (compresses-better?): "lzip" always wins.
* publish: Add support for zstd compression.Ludovic Courtès2021-01-13
| | | | | | | | | | | * guix/scripts/publish.scm (compress-nar)[write-compressed-file]: New procedure. Use it for 'gzip' and 'lzip'. Add 'zstd. (nar-response-port, string->compression-type): Add case for 'zstd'. * tests/publish.scm (zstd-supported?): New procedure. ("/nar/zstd/*"): New test. * doc/guix.texi (Invoking guix publish): Document zstd compression. (Base Services): Add cross-reference to the above node.
* utils: Support zstd compression via Guile-zstd.Ludovic Courtès2021-01-13
| | | | | | | | * guix/utils.scm (lzip-port): Return a single value. (zstd-port): New procedure. (decompressed-port, compressed-output-port): Add 'zstd' case. * tests/utils.scm (test-compression/decompression): Test 'zstd' when the (zstd) module is available.
* utils: Remove 'compressed-output-port'.Ludovic Courtès2021-01-13
| | | | | | | | This procedure was unused except in one test. * guix/utils.scm (compressed-port): Remove. * tests/utils.scm (test-compression/decompression): Rewrite to use 'compressed-output-port' instead.
* substitute: Remove extra 'newline' call.Ludovic Courtès2021-01-13
| | | | | | | | | This led to extra "substitute:" lines since commit 79c6614f58a57b985daf8940766319e440311db0 or thereabouts. * guix/scripts/substitute.scm (fetch-narinfos): Remove extra 'newline' call, which can be traced back to d3a652037ef879f9279bc056c43d15ba7afcbb25 (2015).
* git: Periodically delete least-recently-used cached checkouts.Ludovic Courtès2021-01-13
| | | | | | | | | | | | This ensures ~/.cache/guix/checkouts is periodically cleaned up. * guix/git.scm (cached-checkout-expiration) (%checkout-cache-cleanup-period): New variables. (delete-checkout): New procedure. (update-cached-checkout)[cache-entries]: New procedure. Add call to 'maybe-remove-expired-cache-entries'. * guix/cache.scm (file-expiration-time): Add optional 'timestamp' parameter and honor it.
* packages: Fix 'base32' used before definition warning.Maxim Cournoyer2021-01-11
| | | | | | | | Before this change, compiling the module would emit the following message: "guix/packages.scm:213:25: warning: macro `base32' used before definition". * guix/packages.scm (define-compile-time-decoder) (base32, base64): Move definitions to the top of the module.
* import: texlive: Produce a partial package definition rather than crashing.Maxim Cournoyer2021-01-10
| | | | | | | | | This is a small improvement awaiting a definitive fix for <https://issues.guix.gnu.org/45656>. * guix/import/texlive.scm (sxml->package): Produce a warning when the SVN checkout failed. Rather than crashing on the unexpected #f value, return a partial package definition with the source field set to #f.
* Revert "gnu: nmap: Update license."Leo Prikler2021-01-10
| | | | | | | | | This reverts commit 2323a7120a0f3ed96fedfff42e86c0aee97995c0. The new license has been deemed non-free by Fedora [1] and there has not yet been a statement by the FSF claiming otherwise. See also [2]. [1] https://github.com/nmap/nmap/issues/2199 [2] https://lists.gnu.org/archive/html/guix-devel/2020-10/msg00227.html
* ui: Fix order of match clauses.Simon Tournier2021-01-07
| | | | | | | | | | Fixes <https://bugs.gnu.org/45709>. This is a follow-up to commit cf289d7cfa34315bf13b3114b9a5bf3d3c05ebea. * guix/ui.scm (run-guix-command): Match for #false first. Signed-off-by: Ricardo Wurmus <rekado@elephly.net>
* upstream: Make the 'updaters' parameter optional.Ludovic Courtès2021-01-07
| | | | | | | | * guix/upstream.scm (lookup-updater, package-latest-release) (package-latest-release*, package-update): Make 'updaters' an optional parameter. * guix/lint.scm (check-for-updates): Remove second argument to 'package-latest-release*'.
* import: elpa: Updater gracefully handles missing upstream data.Ludovic Courtès2021-01-07
| | | | | | | | | Fixes a crash with: guix refresh emacs-exwm-no-x-toolkit * guix/import/elpa.scm (latest-release): Return #f when 'elpa-package-info' returns #f.
* Discover extensions via GUIX_EXTENSIONS_PATH.Ricardo Wurmus2021-01-05
| | | | | | | | | | | * guix/scripts.scm (%command-categories): Add extension category. * guix/ui.scm (source-file-command): Also parse extensions files. (command-files): Accept an optional directory argument. (extension-directories): New procedure. (commands): Use it. (show-guix-help): Hide empty categories. (run-guix-command): Try loading an extension if there is no matching Guix command.
* graph: Install JavaScript files.Ludovic Courtès2021-01-04
| | | | | | | | | | | | | | | Until now, 'guix graph --backend=d3js' wouldn't work outside the build tree. * d3.v3.js: Move to... * guix/d3.v3.js: ... here. * graph.js: Move to... * guix/graph.js: ... here. * Makefile.am (nobase_dist_guilemodule_DATA): Add them. (EXTRA_DIST): Remove them. * guix/graph.scm (emit-d3js-prologue, emit-d3js-epilogue): Adjust 'search-path' argument accordingly. * guix/self.scm (compiled-guix)[*extra-modules*]: Pass them via #:extra-files.
* ui: It's 2021 now!Ludovic Courtès2021-01-04
| | | | * guix/ui.scm (show-version-and-exit): Change year to 2021.
* guix system: Add '--graph-backend'.Ludovic Courtès2021-01-04
| | | | | | | | | | | * guix/scripts/system.scm (lookup-backend): New procedure. (export-extension-graph, export-shepherd-graph): Add #:backend parameter and honor it. (show-help, %options): Add "--graph-backend". (%default-options): Add 'graph-backend'. (process-action): Pass #:backend to 'export-extension-graph' and 'export-shepherd-graph'. * doc/guix.texi (Invoking guix system): Document '--graph-backend'.
* environment: Remove unused modules.guy fleury iteriteka2021-01-04
| | | | | | | * guix/scripts/environment.scm: Do not use (ice-9 format) and (ice-9 rdelim). Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* substitute: Handle "invalid session" GnuTLS errors on reused connections.Ludovic Courtès2021-01-04
| | | | | | | | Reported by Christopher Baines <mail@cbaines.net> at <https://issues.guix.gnu.org/45323#2>. * guix/scripts/substitute.scm (call-with-cached-connection): Handle 'gnutls-error and ERROR/INVALID-SESSION.
* guix hash: Honor '-H' when used alongside '-r'.Ludovic Courtès2021-01-04
| | | | | | * guix/scripts/hash.scm (guix-hash): When 'recursive? is true, use 'open-hash-port' instead of 'open-sha256-port'. * tests/guix-hash.sh: Add test for 'guix hash -r -H sha512'.
* import/utils: recursive-import: Fix typo.Ricardo Wurmus2020-12-31
| | | | * guix/import/utils.scm (recursive-import): Fix typo.
* import/elpa: Abort early on failure to fetch meta data.Ricardo Wurmus2020-12-31
| | | | | | | * guix/import/elpa.scm (elpa->guix-package): Raise condition instead of returning #FALSE. * guix/scripts/import/elpa.scm (guix-import-elpa): Handle conditions when importing recursively.
* build-system/cargo: Use argument "--no-track" in "cargo install".Zhu Zihao2020-12-31
| | | | | | | | * guix/build/cargo-build-system(install): Add argument "--no-track" in "cargo install". Remove stale hack. Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
* utils: Add pkg-config-for-target.Efraim Flashner2020-12-28
| | | | * guix/utils.scm (pkg-config-for-target): New procedure.
* transformations: Add '--with-patch'.Ludovic Courtès2020-12-27
| | | | | | | | | | | | Suggested by Philippe Swartvagher <philippe.swartvagher@inria.fr>. * guix/transformations.scm (transform-package-patches): New procedure. (%transformations): Add it as 'with-patch'. (%transformation-options, show-transformation-options-help/detailed): Add '--with-patch'. * tests/transformations.scm ("options->transformation, with-patch"): New test. * doc/guix.texi (Package Transformation Options): Document it.
* import/utils: alist->package: Handle SPDX license names only as fallback.Ricardo Wurmus2020-12-27
| | | | | | | | | Fixes <https://bugs.gnu.org/45453>. * guix/import/utils.scm (alist->package): Find plain license names in (guix licenses) first, and only fall back to SPDX names on error. * tests/import-utils.scm ("alist->package with SPDX license name 1/2", "alist->package with SPDX license name 2/2"): New tests.
* import/print: package->code: Fix branching.Ricardo Wurmus2020-12-27
| | | | | * guix/import/print.scm (package->code)<license->code>: Branch on VAR, not on the SYMBOL-APPEND return value.
* ssh: Use 'guix repl' instead of 'guile'.Ludovic Courtès2020-12-23
| | | | | | | | | | | | | | | | | | | | This simplifies setup of build machines: no need to install Guile in addition to Guix, no need to set 'GUILE_LOAD_PATH' & co., leading to fewer failure modes. * guix/ssh.scm (remote-run): New procedure. (remote-daemon-channel): Use it instead of 'open-remote-pipe*'. (store-import-channel)[import]: Remove check for module availability. Add call to 'primitive-exit'. Use 'remote-run' instead of 'open-remote-pipe'. (store-export-channel)[export]: Remove check for module availability. Add calls to 'primitive-exit'. Use 'remote-run' instead of 'open-remote-pipe'. (handle-import/export-channel-error): Remove 'module-error' clause. (report-module-error): Remove. * guix/scripts/offload.scm (assert-node-has-guix): Replace call to 'report-module-error' by 'leave'. * doc/guix.texi (Daemon Offload Setup): Remove mention of Guile.
* substitute: Reuse connections for '--query'.Ludovic Courtès2020-12-23
| | | | | | | | | | | | | | | This significantly speeds up things like substituting the closure of a .drv. This is a followup to 5ff521452b9ec2aae9ed8e4bb7bdc250a581f203. * guix/scripts/substitute.scm (http-multiple-get): Add #:open-connection and #:keep-alive? and honor them. (open-connection-for-uri/maybe): Use 'open-connection-for-uri/cached' instead of 'guix:open-connection-for-uri'. Call 'http-multiple-get' within 'call-with-cached-connection'. (open-connection-for-uri/cached): Add #:timeout and #:verify-certificate? and honor them. (call-with-cached-connection): Add 'open-connection' parameter and honor it.
* import: crate: Change updater name from "crates" to "crate".Nicolas Goaziou2020-12-23
| | | | | * guix/import/crate.scm (%crate-updater): Change name to `crate', so it is on par with the importer, and the manual.
* scripts: Fix typo in crate importer help message.Nicolas Goaziou2020-12-23
| | | | | | Fixes <https://issues.guix.gnu.org/45351>. * guix/scripts/import/crate.scm (show-help): Fix URL.
* import/cran: Add input style "specification".Ricardo Wurmus2020-12-22
| | | | | | | | | * guix/import/cran.scm (%input-style): New parameter. (format-inputs): Use it. * guix/scripts/import/cran.scm (guix-import-cran): Set the %input-style parameter. (%options): Add "--style" option. * doc/guix.texi (Invoking guix import): Document it.
* system: Allow separated /boot and encrypted root.Miguel Ángel Arruga Vivas2020-12-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/bootloader/grub.scm (grub-configuration-file): New parameter store-crypto-devices. [crypto-devices]: New helper function. [builder]: Use crypto-devices. * gnu/machine/ssh.scm (roll-back-managed-host): Use boot-parameters-store-crypto-devices to provide its contents to the bootloader configuration generation process. * gnu/tests/install.scm (%encrypted-root-not-boot-os, %encrypted-root-not-boot-os): New os declaration. (%encrypted-root-not-boot-installation-script): New script, whose contents were initially taken from %encrypted-root-installation-script. (%test-encrypted-root-not-boot-os): New test. * gnu/system.scm (define-module): Export operating-system-bootoader-crypto-devices and boot-parameters-store-crypto-devices. (<boot-parameters>): Add field store-crypto-devices. (read-boot-parameters): Parse store-crypto-devices field. [uuid-sexp->uuid]: New helper function extracted from device-sexp->device. (operating-system-bootloader-crypto-devices): New function. (operating-system-bootcfg): Use operating-system-bootloader-crypto-devices to provide its contents to the bootloader configuration generation process. (operating-system-boot-parameters): Add store-crypto-devices to the generated boot-parameters. (operating-system-boot-parameters-file): Likewise to the file with the serialized structure. * guix/scripts/system.scm (reinstall-bootloader): Use boot-parameters-store-crypto-devices to provide its contents to the bootloader configuration generation process. * tests/boot-parameters.scm (%default-store-crypto-devices): New variable. (%grub-boot-parameters, test-read-boot-parameters): Use %default-store-crypto-devices. (tests store-crypto-devices): New tests.
* scripts: discover: Remove previous cache file.Mathieu Othacehe2020-12-20
| | | | | | Partially fixes <https://issues.guix.gnu.org/45302>. * guix/scripts/discover.scm (guix-discover): Remove previous cache files.
* avahi: Remove poll timeout when possible.Ludovic Courtès2020-12-20
| | | | | | | | | | Fixes <https://issues.guix.gnu.org/45314>. * guix/avahi.scm (avahi-browse-service-thread): Change timeout default value to false when no "stop-loop?" procedure is passed. Adapt "iterate-simple-poll" call accordingly. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* maint: Require Guile >= 2.2.6.Ludovic Courtès2020-12-19
| | | | | | | | | | | | * configure.ac: For Guile 2.2, require 2.2.6 or later. * guix/gexp.scm (define-syntax-parameter-once): Remove. Use 'define-syntax-parameter' instead. * guix/mnoads.scm: Likewise. * guix/inferior.scm (proxy)[select*]: Remove. * guix/scripts/publish.scm <top level>: Remove replacement for (@@ (web http) read-header-line). * guix/store/deduplication.scm (counting-wrapper-port): Remove. (nar-sha256): Call 'port-position' on PORT to compute SIZE.
* daemon: Delegate deduplication to 'guix substitute'.Ludovic Courtès2020-12-19
| | | | | | | | | | | | | | | This removes the main source of latency between subsequent downloads. * nix/libstore/build.cc (SubstitutionGoal::tryToRun): Add a "deduplicate" key to ENV. (SubstitutionGoal::finished): Remove call to 'optimisePath'. * guix/scripts/substitute.scm (process-substitution)[destination-in-store?] [dump-file/deduplicate*]: New variables. Pass #:dump-file to 'restore-file'. * guix/scripts/substitute.scm (guix-substitute)[deduplicate?]: New variable. Pass #:deduplicate? to 'process-substitution'. * guix/serialization.scm (dump-file): Export and augment 'dump-file'.