aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* packages: 'package-field-location' handles 'search-path' returning #f.Ludovic Courtès2021-02-22
| | | | | | | | | | Fixes <https://bugs.gnu.org/46390>. Reported by zimoun <zimon.toutoune@gmail.com>. This is similar to the fix in d10474c38d58bdc676e64336769dc2e00cdfa8ed. * guix/packages.scm (package-field-location): Handle FILE not in %LOAD-PATH. * tests/guix-lint.sh: Add test.
* scripts: system: Accept <image> records as input.Mathieu Othacehe2021-02-17
| | | | | | | | | | | | | | * guix/scripts/system.scm (system-derivation-for-action): Replace "os" argument by "image". Remove "image-size", "image-type", "label" and "volatile-root?" arguments. (perform-action): Ditto. (process-action): Construct the <image> record and pass it to "perform-action" procedure. * tests/guix-system.sh: Adapt accordingly. * gnu/system/images/hurd.scm: Return the default image. * gnu/system/images/novena.scm: Ditto. * gnu/system/images/pine64.scm: Ditto. * gnu/system/images/pinebook-pro.scm Ditto.
* scripts: system: Remove 'vm-image' command.Mathieu Othacehe2021-02-17
| | | | | | | | | | | | | | | Remove the 'vm-image' command that has been superseded by the 'image' command. * gnu/system/vm.scm (system-qemu-image): Remove it. * guix/scripts/system.scm (system-derivation-for-action): Mark 'vm-image' command as deprecated and use the image API to produce the VM image. (perform-action, show-help): Adapt accordingly. * tests/guix-system.sh: Ditto. * doc/guix.texi (Invoking guix system, Running Guix in a VM): Ditto. * etc/completion/fish/guix.fish: Ditto. * etc/completion/zsh/_guix: Ditto.
* services: Add transmission-daemon service.Simon South2021-02-12
| | | | | | | | | | | * gnu/services/file-sharing.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * po/packages/POTFILES.in: Add it. * tests/services/file-sharing.scm: New file. * Makefile.am (SCM_TESTS): Add it. * doc/guix.texi (File-Sharing Services): New section. Signed-off-by: 宋文武 <iyzsong@member.fsf.org>
* utils: Add string distance.zimoun2021-02-03
| | | | | | | | * guix/utils.scm (string-distance): New procedure. (string-closest): New procedure. * tests/utils.scm ("string-distance", "string-closest"): New tests. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* guix package: Add '--export-manifest'.Ludovic Courtès2021-02-01
| | | | | | | | | * guix/scripts/package.scm (export-manifest): New procedure. (show-help, %options): Add '--export-manifest'. (process-query): Honor it. * guix/build/profiles.scm (build-profile): Mention it. * tests/guix-package.sh: Test it. * doc/guix.texi (Invoking guix package): Document it.
* utils: Add 'version-unique-prefix'.Ludovic Courtès2021-02-01
| | | | | * guix/utils.scm (version-unique-prefix): New procedure. * tests/utils.scm ("version-unique-prefix"): New test.
* profiles: Add 'manifest->code'.Ludovic Courtès2021-02-01
| | | | | | | * guix/profiles.scm (manifest->code): New procedure. * tests/profiles.scm ("manifest->code, simple") ("manifest->code, simple, versions") ("manifest->code, transformations"): New tests.
* tests: Optimize 'fold-available-packages' test.Ludovic Courtès2021-02-01
| | | | | | | | | | This test goes from 58s to 10s wall-clock time. Reported by Maxim Cournoyer <maxim.cournoyer@gmail.com>. * tests/packages.scm ("fold-available-packages with/without cache"): Remove 'find-duplicates'. Add 'list->set*' and use it instead of 'find-duplicates', 'delete-duplicates', and 'lset='.
* database: Validate #:nar-size and #:time when registering store items.Ludovic Courtès2021-01-31
| | | | | | | * guix/store/database.scm (assert-integer): New procedure. (update-or-insert): Use it to validate NAR-SIZE and TIME. * tests/store-database.scm ("sqlite-register with incorrect size"): New test.
* guix system: Test 'extension-graph' and 'shepherd-graph'.Ludovic Courtès2021-01-30
| | | | | * tests/guix-system.sh: Test 'guix system extension-graph' and 'guix system shepherd-graph'.
* 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.
* swh: Test proper handling of null visit snapshot URL.Ludovic Courtès2021-01-21
| | | | | | * tests/swh.scm (%origin): Change "visits_url" to "origin_visits_url". (%visits): New variable. ("origin-visit, no snapshots"): New test.
* 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.
* inferior: Add 'inferior-eval-with-store' tests.Ludovic Courtès2021-01-21
| | | | | * tests/inferior.scm ("inferior-eval-with-store, exception") ("inferior-eval-with-store, not a procedure"): New tests.
* 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>
* 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.
* services: openntpd: Remove support for deprecated "-s" option.Simon South2021-01-16
| | | | | | | | | | | | | | | * gnu/services/networking.scm (openntpd-configuration): Remove "allow-large-adjustment?" field. (openntpd-shepherd-service): Remove use of "allow-large-adjustment?" configuration field and "-s" daemon option. * tests/networking.scm (%openntpd-conf-sample): Remove "allow-large-adjustment?" field. * doc/guix.texi (Networking Services)[openntpd-service-type]: Remove "allow-large-adjustment?" field from sample configuration. [openntpd-configuration]: Remove description of "allow-large-adjustment?" field. Signed-off-by: Ludovic Courtès <ludo@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'.
* tests: Fix JSON syntax error in 'crate.scm'.Ludovic Courtès2021-01-13
| | | | | | This issue is caught with Guile-JSON 4.4.1, but not by 4.3.2. * tests/crate.scm (test-root-dependencies): Add missing comma.
* 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.
* services: shepherd: 'shepherd-service-type' requires documentation.Ludovic Courtès2021-01-13
| | | | | | | | | | | | | | | | | * gnu/services/shepherd.scm (shepherd-service-type): Require a 'description' form. * gnu/services/base.scm (root-file-system-service-type) (rngd-service-type, host-name-service-type): (virtual-terminal-service-type, console-keymap-service-type) (syslog-service-type, swap-service-type) (kmscon-service-type): Add description. * gnu/services/networking.scm (dhcp-client-service-type): Likewise. * gnu/system/install.scm (cow-store-service-type): Likewise. * gnu/system/linux-container.scm (dummy-networking-service-type): Likewise. * gnu/system/mapped-devices.scm (device-mapping-service-type): Likewise. * tests/guix-system.sh: Likewise.
* 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'.
* 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.
* 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.
* tests: Check the effect of '--without-tests' on implicit inputs.Ludovic Courtès2020-12-21
| | | | | * tests/transformations.scm ("options->transformation, without-tests"): Ensure TAR has #:tests? #f.
* tests: Fix malformed JSON.Ludovic Courtès2020-12-21
| | | | | | | | Guile-JSON 4.3.2 would parse in spite of these typos, but 4.4.1 is stricter. * tests/swh.scm (%directory-entries): Add missing comma. * tests/cve-sample.json: Likewise.
* tests: Make sure substituted items are deduplicated.Ludovic Courtès2020-12-19
| | | | * tests/store.scm ("substitute, deduplication"): New test.
* tests: Check the mtime and permissions of substituted items.Ludovic Courtès2020-12-19
| | | | | | | | * tests/store.scm ("substitute") ("substitute + build-things with output path") ("substitute + build-things with specific output"): Call 'canonical-file?'. * tests/substitute.scm ("substitute, authorized key"): Check the mtime and permissions of "substitute-retrieved".
* 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.
* tests: Check the build trace for hash mismatches on substitutes.Ludovic Courtès2020-12-19
| | | | | * tests/store.scm ("substitute, corrupt output hash, build trace"): New test.
* 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: 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.
* 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'.
* 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'.
* 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.
* guix: Add globstar support.Giacomo Leidi2020-12-09
| | | | | | | | * guix/glob.scm (string->sglob) (glob-match?): Add globstar support. * tests/glob.scm: Update accordingly. Signed-off-by: Jelle Licht <jlicht@fsfe.org>
* import: opam: Adjust test to latest 'opam->guix-package' changes.Ludovic Courtès2020-12-08
| | | | | | | | This is a followup to a8dccd4bdc1e58219d4ba08fe1649bf0b8325f44, which broke the test. * guix/import/opam.scm (get-opam-repository): Prevent inlining. * tests/opam.scm ("opam->guix-package"): Mock 'get-opam-repository'.
* daemon: Run 'guix substitute --substitute' as an agent.Ludovic Courtès2020-12-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids spawning one substitute process per substitution. * nix/libstore/build.cc (class Worker)[substituter]: New field. [outPipe, logPipe, pid]: Remove. (class SubstitutionGoal)[expectedHashStr, status, substituter]: New fields. (SubstitutionGoal::timedOut): Adjust to check 'substituter'. (SubstitutionGoal::tryToRun): Remove references to 'outPipe' and 'logPipe'. Run "guix substitute --substitute" as an 'Agent'. Send the request with 'writeLine'. (SubstitutionGoal::finished): Likewise. (SubstitutionGoal::handleChildOutput): Change to fill in 'expectedHashStr' and 'status'. (SubstitutionGoal::handleEOF): Call 'wakeUp' unconditionally. (SubstitutionGoal::~SubstitutionGoal): Adjust to check 'substituter'. * guix/scripts/substitute.scm (process-substitution): Write "success\n" to stdout upon success. (%error-to-file-descriptor-4?): New variable. (guix-substitute): Set 'current-error-port' to file descriptor 4 unless (%error-to-file-descriptor-4?) is false. Remove "--substitute" arguments. Loop reading line from stdin. * tests/substitute.scm <top level>: Call '%error-to-file-descriptor-4?'. (request-substitution): New procedure. ("substitute, no signature") ("substitute, invalid hash") ("substitute, unauthorized key") ("substitute, authorized key") ("substitute, unauthorized narinfo comes first") ("substitute, unsigned narinfo comes first") ("substitute, first narinfo is unsigned and has wrong hash") ("substitute, first narinfo is unsigned and has wrong refs") ("substitute, two invalid narinfos") ("substitute, narinfo with several URLs"): Adjust to new "guix substitute --substitute" calling convention.
* daemon: Use 'Agent' to spawn 'guix substitute --query'.Ludovic Courtès2020-12-08
| | | | | | | | | | | | | | | | | | | | | | | | | | * nix/libstore/local-store.hh (RunningSubstituter): Remove. (LocalStore)[runningSubstituter]: Change to unique_ptr<Agent>. [setSubstituterEnv, didSetSubstituterEnv]: Remove. [getLineFromSubstituter, getIntLineFromSubstituter]: Take an 'Agent'. * nix/libstore/local-store.cc (LocalStore::~LocalStore): Remove reference to 'runningSubstituter'. (LocalStore::setSubstituterEnv, LocalStore::startSubstituter): Remove. (LocalStore::getLineFromSubstituter): Adjust to 'run' being an 'Agent'. (LocalStore::querySubstitutablePaths): Spawn substituter agent if needed. Adjust to 'Agent' interface. (LocalStore::querySubstitutablePathInfos): Likewise. * nix/libstore/build.cc (SubstitutionGoal::tryToRun): Remove call to 'setSubstituterEnv' and add 'setenv' call for "_NIX_OPTIONS" instead. (SubstitutionGoal::finished): Remove 'readLine' call for 'dummy'. * guix/scripts/substitute.scm (%allow-unauthenticated-substitutes?): Remove second argument to 'make-parameter'. (process-query): Call 'warn-about-missing-authentication' when (%allow-unauthenticated-substitutes?) is #t. (guix-substitute): Wrap body in 'parameterize'. Set 'guix-warning-port' too. No longer exit when 'substitute-urls' returns the empty list. No longer print newline initially. * tests/substitute.scm (test-quit): Parameterize 'current-error-port' to account for the port changes in 'guix-substitute'.
* guix: opam: Pass default repository to recursive importer.Julien Lepiller2020-12-08
| | | | | | | * guix/import/opam.scm (opam->guix-package): Rename #:repository key to #:repo. (opam-recursive-import): Pass #:repo keyword. * tests/opam.scm (opam->guix-package): Rename #:repository to #:repo.
* tests: lint: Add origin patch file name test cases.Chris Marusich2020-12-07
| | | | | | | | | | | | | | In particular, "<origin> patches: same file name -> no warnings" would have caught the issue which was fixed in commit 21887021b9acf60157b1b0a39c16f2ec6498021b. * tests/lint.scm (patches: file names): Rename this test case... ("file patches: different file name -> warning"): ... to this. ("file patches: same file name -> no warnings") ("<origin> patches: different file name -> warning") ("<origin> patches: same file name -> no warnings"): New test cases. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* profiles: Delete duplicate manifest entries in packages->manifest.Leo Prikler2020-12-07
| | | | | | | * gnu/profiles.scm (packages->manifest): Delete duplicate entries. * tests/profiles.scm ("packages->manifest, no duplicates"): New test. Signed-off-by: Ludovic Courtès <ludo@gnu.org>