summaryrefslogtreecommitdiff
path: root/guix
Commit message (Collapse)AuthorAge
* 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'.
* daemon: Let 'guix substitute' perform hash checks.Ludovic Courtès2020-12-19
| | | | | | | | | | | | | | | | | | | | | | | | | | This way, the hash of the store item can be computed as it is restored, thereby avoiding an additional file tree traversal ('hashPath' call) later on in the daemon. Consequently, it should reduce latency between subsequent substitute downloads. This is a followup to 5ff521452b9ec2aae9ed8e4bb7bdc250a581f203. * guix/scripts/substitute.scm (narinfo-hash-algorithm+value): New procedure. (process-substitution): Wrap INPUT into a hash input port, 'hashed', and read from it. Compare the actual and expected hashes, and print a "hash-mismatch" status line when they differ. When they match, print not just "success" but also the nar hash and size. * nix/libstore/build.cc (class SubstitutionGoal)[expectedHashStr]: Remove. (SubstitutionGoal::finished): Tokenize 'status'. Parse it and handle "success" and "hash-mismatch" accordingly. Call 'hashPath' only when the returned hash is not SHA256. (SubstitutionGoal::handleChildOutput): Remove 'expectedHashStr' handling. * tests/substitute.scm ("substitute, invalid hash"): Rename to... ("substitute, invalid narinfo hash"): ... this. ("substitute, invalid hash"): New test.
* status: Do not emit ANSI escapes when stderr is not a tty.Ludovic Courtès2020-12-18
| | | | | | | | | Fixes <https://bugs.gnu.org/44985>. Reported by Simon Josefsson <simon@josefsson.org>. * guix/progress.scm (display-download-progress): Add #:tty? and honor it. * guix/status.scm (print-build-event): Pass #:tty? to 'display-download-progress'.
* import: elpa: Support working with MELPA.Carlo Zancanaro2020-12-18
| | | | | | | | | | | | * guix/import/elpa.scm (default-files-spec): New variable. (download-git-repository, package-name->melpa-recipe, file-hash, vcs-file?, git-repository->origin, melpa-recipe->origin, melpa-recipe->maybe-arguments): New procedures. (elpa-package->sexp): Add optional repo argument, and use it to determine whether to attempt to construct a source using the MELPA recipe. (elpa->guix-package): Pass repo to elpa-package->sexp. Signed-off-by: Christopher Baines <mail@cbaines.net>
* import: cran: Use CRAN’s canonical URL as home-page.Lars-Dominik Braun2020-12-15
| | | | | | | * guix/import/cran.scm (%cran-canonical-url): New variable. (description->package): Construct home-page using canonical URL. Signed-off-by: Christopher Baines <mail@cbaines.net>
* deduplicate: Create the '.links' directory lazily.Ludovic Courtès2020-12-15
| | | | | | | | | | This avoids repeated (mkdir-p "/gnu/store/.links") calls when deduplicating lots of files. * guix/store/deduplication.scm (deduplicate): Remove initial call to 'mkdir-p'. Add ENOENT case in 'link' exception handler. Reindent. * tests/store-deduplication.scm ("deduplicate, ENOSPC"): Check for (<= links 4) to account for the initial 'link' call.
* database: Honor 'SOURCE_DATE_EPOCH'.Ludovic Courtès2020-12-15
| | | | | | * guix/store/database.scm (timestamp): New procedure. (sqlite-register): Use it as the default for #:time. (register-items): Likewise for #:registeration-time.
* database: Remove 'register-path'.Ludovic Courtès2020-12-15
| | | | | | | | | | | | * guix/store/database.scm (register-path): Remove. * tests/store-database.scm ("register-path"): Rename to... ("register-items"): ... this, and use 'register-items' instead of 'register-path'. ("register-path, directory"): Rename to... ("register-items, directory"): ... this, and use 'register-items' instead of 'register-path'. ("register-path with unregistered references"): Rename to... ("sqlite-register with unregistered references"): ... this.
* system: 'init' does not recompute the hash of each store item.Ludovic Courtès2020-12-15
| | | | | | | | | | | | | | | Fixes <https://bugs.gnu.org/44760>. Previously, the 'register-path' call would re-traverse ITEM to compute its nar hash, even though that hash is already known in the initial store. This patch also avoids repeated opening/closing of the database. * guix/store/database.scm (call-with-database): Export. * guix/scripts/system.scm (copy-item): Add 'db' parameter. Call 'sqlite-register' instead of 'register-path'. (copy-closure): Remove redundant call to 'references*'. Call 'call-with-database' and pass the database to 'copy-item'.
* database: Remove #:deduplicate? and #:reset-timestamps? from 'register-path'.Ludovic Courtès2020-12-15
| | | | | | | | * guix/store/database.scm (register-path): Remove #:deduplicate? and #:reset-timestamps?. * guix/scripts/system.scm (copy-item): Adjust accordingly. * tests/store-database.scm ("register-path") ("register-path, directory"): Call 'reset-timestamps'.
* guix system: 'init' copies, resets timestamps, and deduplicates at once.Ludovic Courtès2020-12-15
| | | | | | | | | Partly fixes <https://bugs.gnu.org/44760>. * guix/build/store-copy.scm (copy-store-item): New procedure. (populate-store): Use it instead of the inline 'copy-recursively' call. * guix/scripts/system.scm (copy-item): Likewise. Pass #:reset-timestamps? and #:deduplicate? to 'register-path'.
* database: Remove #:deduplicate? from 'register-items'.Ludovic Courtès2020-12-15
| | | | | | | | | | | | It is now up to the caller to deduplicate store contents. * guix/store/database.scm (register-items): Remove #:deduplicate? parameter and call to 'deduplicate'. (register-path): Call 'deduplicate' when #:deduplicate? is true. * gnu/build/image.scm (register-closure): Adjust call accordingly. * gnu/build/vm.scm (register-closure): Likewise. * guix/nar.scm (finalize-store-file): Likewise. * guix/scripts/pack.scm (store-database): Likewise.
* store-copy: 'populate-store' can optionally deduplicate files.Ludovic Courtès2020-12-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now deduplication was performed as an additional pass after copying files, which involve re-traversing all the files that had just been copied. * guix/store/deduplication.scm (copy-file/deduplicate): New procedure. * tests/store-deduplication.scm ("copy-file/deduplicate"): New test. * guix/build/store-copy.scm (populate-store): Add #:deduplicate? parameter and honor it. * tests/gexp.scm ("gexp->derivation, store copy"): Pass #:deduplicate? #f to 'populate-store'. * gnu/build/image.scm (initialize-root-partition): Pass #:deduplicate? to 'populate-store'. Pass #:deduplicate? #f to 'register-closure'. * gnu/build/vm.scm (root-partition-initializer): Likewise. * gnu/build/install.scm (populate-single-profile-directory): Pass #:deduplicate? #f to 'populate-store'. * gnu/build/linux-initrd.scm (build-initrd): Likewise. * guix/scripts/pack.scm (self-contained-tarball)[import-module?]: New procedure. [build]: Pass it as an argument to 'source-module-closure'. * guix/scripts/pack.scm (squashfs-image)[build]: Wrap in 'with-extensions'. * gnu/system/linux-initrd.scm (expression->initrd)[import-module?]: New procedure. [builder]: Pass it to 'source-module-closure'. * gnu/system/install.scm (cow-store-service-type)[import-module?]: New procedure. Pass it to 'source-module-closure'.
* database: Remove #:reset-timestamps? from 'register-items'.Ludovic Courtès2020-12-15
| | | | | | | | | | | | | | The assumption now is that the caller took care of resetting timestamps and permissions. * guix/store/database.scm (register-items): Remove #:reset-timestamps? parameter and the call to 'reset-timestamps'. (register-path): Adjust accordingly and add call to 'reset-timestamps'. * gnu/build/image.scm (register-closure): Remove #:reset-timestamps? parameter to 'register-items'. * gnu/build/vm.scm (register-closure): Likewise. * guix/nar.scm (finalize-store-file): Adjust accordingly. * guix/scripts/pack.scm (store-database)[build]: Likewise.
* store-copy: 'populate-store' resets timestamps.Ludovic Courtès2020-12-15
| | | | | | | | | | | | | | | | Until now, 'populate-store' would reset permissions but not timestamps, so callers would resort to going through an extra directory traversal to reset timestamps. * guix/build/store-copy.scm (reset-permissions): Remove. (copy-recursively): New procedure. (populate-store): Pass #:keep-permissions? to 'copy-recursively'. Remove call to 'reset-permissions'. * tests/gexp.scm ("gexp->derivation, store copy"): In BUILD-DRV, check whether 'populate-store' canonicalizes permissions and timestamps. * gnu/build/image.scm (initialize-root-partition): Pass #:reset-timestamps? #f to 'register-closure'. * gnu/build/vm.scm (root-partition-initializer): Likewise.
* nar: Deduplicate files right as they are restored.Ludovic Courtès2020-12-15
| | | | | | | | | | | | | This avoids having to traverse and re-read the files that we have just restored, thereby reducing I/O. * guix/serialization.scm (dump-file): New procedure. (restore-file): Add #:dump-file parameter and honor it. * guix/store/deduplication.scm (tee, dump-file/deduplicate): New procedures. * guix/nar.scm (restore-one-item): Pass #:dump-file to 'restore-file'. (finalize-store-file): Pass #:deduplicate? #f to 'register-items'. * tests/nar.scm <top level>: Call 'setenv' to set "NIX_STORE".
* serialization: 'restore-file' sets canonical timestamp and permissions.Ludovic Courtès2020-12-15
| | | | | | | | | | | * guix/serialization.scm (restore-file): Set the permissions and mtime of FILE. * guix/nar.scm (finalize-store-file): Pass #:reset-timestamps? #f to 'register-items'. * tests/nar.scm (rm-rf): Add 'chmod' calls to ensure files are writable. ("write-file + restore-file with symlinks"): Ensure every file in OUTPUT passes 'canonical-file?'. * tests/guix-archive.sh: Run "chmod -R +w" before "rm -rf".
* serialization: 'fold-archive' notifies about directory processing completion.Ludovic Courtès2020-12-15
| | | | | | | | | * guix/serialization.scm (fold-archive): Call PROC with a 'directory-complete tag when done with a directory. (restore-file): Handle it. * guix/scripts/archive.scm (list-contents): Likewise. * guix/scripts/challenge.scm (archive-contents): Likewise. * tests/nar.scm ("write-file-tree + fold-archive"): Adjust accordingly.
* offload: Print warning in context.Julien Lepiller2020-12-15
| | | | | * guix/scripts/offload.scm (build-machine): Add `location` field. (build-machine-system): Print location with warning.
* scripts: discover: Remove file locks.Mathieu Othacehe2020-12-13
| | | | | | | | * guix/scripts/discover.scm (call-with-read-file-lock, with-read-file-lock): Remove them. (write-publish-file): Use "with-atomic-file-output" instead of "with-file-lock". (read-substitute-urls): Remove file lock.
* download: Update ImageMagick mirror list.Marius Bakke2020-12-13
| | | | | | * guix/download.scm (%mirrors): Remove defunct ImageMagick mirrors, update URLs for directory structure changes (/releases instead of /legacy). Move official site last.
* import/cran: Abort with error message when recursive import fails.Ricardo Wurmus2020-12-12
| | | | | | | | | Previously, after a failed recursive import "guix import" would signal success. * guix/import/cran.scm (cran->guix-package): Raise a condition when all repositories have been exhausted. * guix/scripts/import/cran.scm (guix-import-cran): Handle errors.