Age | Commit message (Expand) | Author |
2021-01-21 | Revert "substitute: Remove extra 'newline' call."...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.
| Ludovic Courtès |
2021-01-20 | archive: Note service type in ACL hint....* guix/scripts/archive.scm (authorize-key): Mention guix-service-type.
| Tobias Geerinckx-Rice |
2021-01-19 | environment: Fix '--root' option with relative file name....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>
| JOULAUD François |
2021-01-19 | system: Rename 'disk-image' command 'image'....* 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.
| Mathieu Othacehe |
2021-01-17 | image: Rename "raw" image-type to "efi-raw"....* 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>
| Mathieu Othacehe |
2021-01-16 | guix: Move narinfo code from substitute script to module....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'.
| Christopher Baines |
2021-01-16 | substitute: Untangle skipping authentication from valid-narinfo?....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?.
| Christopher Baines |
2021-01-13 | substitute: Add zstd support....* guix/scripts/substitute.scm (%compression-methods): Add zstd.
(compresses-better?): "lzip" always wins.
| Ludovic Courtès |
2021-01-13 | publish: Add support for zstd compression....* 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.
| Ludovic Courtès |
2021-01-13 | substitute: Remove extra 'newline' call....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).
| Ludovic Courtès |
2021-01-04 | guix system: Add '--graph-backend'....* 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'.
| Ludovic Courtès |
2021-01-04 | environment: Remove unused modules....* guix/scripts/environment.scm: Do not use (ice-9 format) and (ice-9
rdelim).
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| guy fleury iteriteka |
2021-01-04 | substitute: Handle "invalid session" GnuTLS errors on reused connections....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.
| Ludovic Courtès |
2021-01-04 | guix hash: Honor '-H' when used alongside '-r'....* 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'.
| Ludovic Courtès |
2020-12-31 | import/elpa: Abort early on failure to fetch meta data....* 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.
| Ricardo Wurmus |
2020-12-23 | ssh: Use 'guix repl' instead of 'guile'....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.
| Ludovic Courtès |
2020-12-23 | substitute: Reuse connections for '--query'....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.
| Ludovic Courtès |
2020-12-23 | scripts: Fix typo in crate importer help message....Fixes <https://issues.guix.gnu.org/45351>.
* guix/scripts/import/crate.scm (show-help): Fix URL.
| Nicolas Goaziou |
2020-12-22 | import/cran: Add input style "specification"....* 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.
| Ricardo Wurmus |
2020-12-21 | system: Allow separated /boot and encrypted root....* 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.
| Miguel Ángel Arruga Vivas |
2020-12-20 | scripts: discover: Remove previous cache file....Partially fixes <https://issues.guix.gnu.org/45302>.
* guix/scripts/discover.scm (guix-discover): Remove previous cache files.
| Mathieu Othacehe |
2020-12-19 | maint: Require Guile >= 2.2.6....* 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.
| Ludovic Courtès |
2020-12-19 | daemon: Delegate deduplication to 'guix substitute'....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'.
| Ludovic Courtès |
2020-12-19 | daemon: Let 'guix substitute' perform hash checks....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.
| Ludovic Courtès |
2020-12-15 | system: 'init' does not recompute the hash of each store item....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'.
| Ludovic Courtès |
2020-12-15 | database: Remove #:deduplicate? and #:reset-timestamps? from 'register-path'....* 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'.
| Ludovic Courtès |
2020-12-15 | guix system: 'init' copies, resets timestamps, and deduplicates at once....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'.
| Ludovic Courtès |
2020-12-15 | database: Remove #:deduplicate? from 'register-items'....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.
| Ludovic Courtès |
2020-12-15 | store-copy: 'populate-store' can optionally deduplicate files....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'.
| Ludovic Courtès |
2020-12-15 | database: Remove #:reset-timestamps? from 'register-items'....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.
| Ludovic Courtès |
2020-12-15 | serialization: 'fold-archive' notifies about directory processing completion....* 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.
| Ludovic Courtès |
2020-12-15 | offload: Print warning in context....* guix/scripts/offload.scm (build-machine): Add `location` field.
(build-machine-system): Print location with warning.
| Julien Lepiller |
2020-12-13 | scripts: discover: Remove file locks....* 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.
| Mathieu Othacehe |
2020-12-12 | import/cran: Abort with error message when recursive import fails....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.
| Ricardo Wurmus |
2020-12-08 | substitute: Cache and reuse connections while substituting....That way, when fetching a series of substitutes from the same server(s),
the connection is reused instead of being closed/opened for each
substitutes, which saves on network round trips and TLS handshakes.
* guix/http-client.scm (http-fetch): Add #:keep-alive? and honor it.
* guix/progress.scm (progress-report-port): Add #:close? parameter and
honor it.
* guix/scripts/substitute.scm (at-most): Return the tail as a second
value.
(fetch): Add #:port and #:keep-alive? and honor them.
(%max-cached-connections): New variable.
(open-connection-for-uri/cached, call-with-cached-connection): New
procedures.
(with-cached-connection): New macro.
(process-substitution): Wrap 'fetch' call in 'with-cached-connection'.
Pass #:close? to 'progress-report-port'.
| Ludovic Courtès |
2020-12-08 | daemon: Run 'guix substitute --substitute' as an agent....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.
| Ludovic Courtès |
2020-12-08 | daemon: Use 'Agent' to spawn 'guix substitute --query'....* 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'.
| Ludovic Courtès |
2020-12-08 | guix: opam: Add --repo argument to importer....* guix/scripts/import/opam.scm (guix-import-opam): Pass --repo argument
to recursive and non-recursive importers.
* guix/import/opam.scm (get-opam-repository): Select proper repository
location depending on a new repo argument.
(opam->guix-package): Use get-opam-repository in the procedure body.
| Julien Lepiller |
2020-12-05 | pull: Accept no non-option arguments....* guix/scripts/pull.scm (guix-pull): LEAVE if any non-option arguments
were passed.
| Tobias Geerinckx-Rice |
2020-12-05 | scripts: discover: Check for cache file existence....Fixes: https://issues.guix.gnu.org/45045.
* guix/scripts/discover.scm (read-substitute-urls): Check for file existence.
| Mathieu Othacehe |
2020-12-04 | scripts: substitute: Fix discover option....The discover option can be unset or set to "yes/no". Handle both cases.
* guix/scripts/substitute.scm (%local-substitute-urls): Fix discover option.
| Mathieu Othacehe |
2020-12-04 | import/cran: Do not attempt to generate definitions for failed imports....* guix/scripts/import/cran.scm (guix-import-cran): Remove failed imports from
list of packages to define.
| Ricardo Wurmus |
2020-12-02 | import: crate: Parameterized importing of dev dependencies....The recursive crate importer will now include development dependencies only
for the top level package, but not for any of the recursively imported
packages. Also #:skip-build will be false for the top-most package.
* guix/import/crate.scm (make-crate-sexp): Add the key BUILD?.
(crate->guix-package): Add the key INCLUDE-DEV-DEPS?.
(crate-recursive-import): Likewise.
* guix/scripts/import/crate.scm (guix-import-crate): Likewise.
* tests/crate.scm (cargo-recursive-import): Likewise.
| Martin Becze |
2020-12-02 | import: crate: Use guile-semver to resolve module versions....* guix/import/crate.scm: Add guile-semver as a soft dependency.
(make-crate-sexp): Don't allow other keys. Add '#:skip-build?' to build
system args. Pass a VERSION argument to 'cargo-inputs'.
(crate->guix-package): Use guile-semver to resolve the correct module
versions. Treat "build" dependencies as normal dependencies.
(crate-name->package-name): Reuse the procedure 'guix-name' instead of
duplicating its logic.
* guix/import/utils.scm (package-names->package-inputs): Implement
handling of (name version) pairs.
* guix/scripts/import/crate.scm (guix-import-crate): Use
crate-recursive-import instead of duplicate code.
* tests/crate.scm (recursive-import): Change test packages versions to be
distinguishable. Add version data to the test. Check created symbols, too.
Co-authored-by: Hartmut Goebel <h.goebel@crazy-compilers.com>
| Martin Becze |
2020-12-02 | import: utils: 'recursive-import' accepts an optional version parameter....This adds a key VERSION to 'recursive-import' and moves the parameter REPO to
a key. This also changes all the places that rely on 'recursive-import'.
* guix/import/utils.scm (recursive-import): Add the VERSION key. Make REPO a
key.
(package->definition): Add optional 'append-version?'.
* guix/scripts/import/crate.scm (guix-import-crate): Add the VERSION key.
* guix/import/crate.scm (crate->guix-package): Add the VERSION key.
(crate-recursive-import): Pass VERSION to recursive-import, remove now
unnecessary code.
* guix/import/cran.scm (cran->guix-package, cran-recursive-import): Change the
REPO parameter to a key.
* guix/import/elpa.scm (elpa->guix-package, elpa-recursive-import): Likewise.
* guix/import/gem.scm (gem->guix-package, recursive-import): Likewise.
* guix/import/opam.scm (opam-recurive-import): Likewise.
* guix/import/pypi.scm (pypi-recursive-import): Likewise.
* guix/import/stackage.scm (stackage-recursive-import): Likewise.
* guix/scripts/import/cran.scm (guix-import-cran): Likewise.
* guix/scripts/import/elpa.scm (guix-import-elpa): Likewise.
* tests/elpa.scm (eval-test-with-elpa): Likewise.
* tests/import-utils.scm (recursive-import): Likewise.
Co-authored-by: Hartmut Goebel <h.goebel@crazy-compilers.com>
| Martin Becze |
2020-12-01 | upgrade: Allow several regexps....Fixes <https://bugs.gnu.org/44928>.
Reported by Luis Felipe <luis.felipe.la@protonmail.com>.
* guix/scripts/upgrade.scm (guix-upgrade): Allow several regexps and remove
"extraneous arguement" check.
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
| zimoun |
2020-11-29 | processes: Add '--format' and the "normalized" format....* guix/scripts/processes.scm (lock->recutils): New procedure.
(daemon-session->recutils): Use it.
(daemon-sessions->recutils, session-key->recutils)
(session-scalars->normalized-record)
(child-process->normalized-record)
(daemon-sessions->normalized-record): New procedures.
(session-rec-type, lock-rec-type, child-process-rec-type)
(%available-formats): New variables.
(list-formats): New procedure.
(%options, show-help): Add '--format'.
(%default-options): New variable.
(guix-processes): Use 'parse-command-line' instead of 'args-fold*'.
Honor the 'format' value in OPTIONS.
* doc/guix.texi (Invoking guix processes): Document '--format'.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| John Soo |
2020-11-29 | processes: Put ChildProcess and ChildPID on separate lines....* guix/scripts/processes.scm (daemon-session->recutils): Put child
process information in separate fields.
* doc/guix.texi (Invoking guix processes): Document change in output of
'guix processes'.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| John Soo |
2020-11-29 | Make "guile-avahi" dependency optional....* configure.ac (HAVE_GUILE_AVAHI): New conditional.
* Makefile.am (MODULES): Add "guix/avahi.scm" and "guix/scripts/discover.scm"
if HAVE_GUILE_AVAHI is set.
* guix/scripts/publish.scm: Autoload (guix avahi).
* guix/scripts/substitute.scm: Autoload (guix scripts discovery).
| Mathieu Othacehe |
2020-11-29 | Use substitute servers on the local network....* guix/scripts/discover.scm: New file.
* Makefile.am (MODULES): Add it.
* nix/nix-daemon/guix-daemon.cc (options): Add "discover" option,
(parse-opt): parse it,
(main): start "guix discover" process when the option is set.
* guix/scripts/substitute.scm (%local-substitute-urls): New variable,
(substitute-urls): add it.
* gnu/services/base.scm (<guix-configuration>): Add "discover?"
field,
(guix-shepherd-service): honor it.
* doc/guix.texi (Invoking guix-daemon): Document "discover" option,
(Base Services): ditto.
| Mathieu Othacehe |