* guix/scripts/lint.scm (patch-file-name): New procedure.
(check-vulnerabilities): Use it to filter out patched vulnerabilities.
* tests/lint.scm ("cve: one patched vulnerability"): New test.
Suggested by Hynek Urban <hynek.urban@gmail.com>.
* guix/scripts/substitute.scm (fetch-narinfos): Move body to...
[do-fetch]: ... here. New procedure.
Emit a warning when CACHE-INFO's prefix does not match.
* guix/import/cabal.scm (is-test): Allow spaces between keyword and
parentheses.
(is-id): Add argument 'port'. Allow spaces between keyword and column.
(lex-word): Adjust call to 'is-id'.
* guix/import/cabal.scm (is-true, is-false, lex-true, lex-false): New procedures.
(lex-word): Use them.
(make-cabal-parser): Add TRUE and FALSE tokens.
(eval): Add entries for 'true and 'false symbols.
As measured with:
time sh -c 'for i in `seq 1 10` ; do guix package --search-paths ; done'
On my machine, when running:
strace -o ,,s guix package --search-paths
the number returned by:
grep -E '^(open|l?stat).*\.go' ,,s | wc -l
drops from 1610 to 837.
* guix/scripts/package.scm: Remove two unnecessary #:use-module forms.
Autoload (gnu packages ...) modules.
Fixes <http://bugs.gnu.org/21991>.
Reported by Jan Synáček <jan.synacek@gmail.com>.
* guix/scripts/download.scm (guix-download): Call 'leave' when OPTS does
not contain an 'argument' key.
* guix/ftp-client.scm (ftp-open): Change to use 'match' instead of
car/cdr, and fix off-by-one (was '(null? addresses)' instead of
'(null? (cdr addresses))'.)
Fixes <http://bugs.gnu.org/21958>.
* guix/scripts/environment.scm (status->exit-code): New procedure.
(exit/status, primitive-exit/status): Use it.
* tests/guix-environment-container.sh: Add test.
Fixes <http://bugs.gnu.org/21925>.
Regression introduced in 279ec1d.
Reported by Chris Marusich <cmmarusich@gmail.com>.
* guix/ftp-client.scm (ftp-open): Restrict sockets to
SOCK_STREAM/IPPROTO_IP.
* guix/build/graft.scm (rewrite-directory)[rewrite-leaf]: Change to take
a single parameter. Add call to 'lstat'. Factorize result of
'destination'.
Use 'find-files' instead of 'file-system-fold'.
* guix/scripts/lint.scm (probe-uri): Add #:timeout parameter. Pass it
to 'open-connection-for-uri' and 'ftp-open'.
(validate-uri): Pass #:timeout 3 to 'probe-uri'.
* guix/build/download.scm (open-socket-for-uri): Always pass
AI_ADDRCONFIG to 'getaddrinfo' as recommended in the fine Guile
manual.
* guix/ftp-client.scm (ftp-open): Ditto.
* guix/build/download.scm (ensure-uri): New procedure.
(current-http-proxy): New variable.
(open-socket-for-uri): Copy from Guile commit aaea5b2, but add #:timeout
parameter and use 'connect*' instead of 'connect'.
(open-connection-for-uri): Add #:timeout parameter and pass it to
'open-socket-for-uri'.
* guix/ftp-client.scm (catch-EINPROGRESS): New macro.
(connect*): New procedure.
(ftp-open): Add #:timeout parameter. Use 'connect*' instead of
'connect' and pass it TIMEOUT.
Fixes <http://bugs.gnu.org/21817>.
Reported by Petter Berntsen <petter@mykolab.ch>.
* guix/scripts/gc.scm (guix-gc)[assert-no-extra-arguments]: New
procedure.
Use it for actions 'collect-garbage', 'optimize', and 'verify'.
* tests/guix-gc.sh: Add tests.
Partly fixes <http://bugs.gnu.org/20255>.
* guix/scripts/package.scm (search-path-environment-variables): Change
'profile' to 'profiles'; expect it to be a list.
(display-search-paths): Likewise.
(%default-options): Remove 'profile' entry.
(%options) <--profile>: Keep previous values associated with 'profile'
in RESULT.
(guix-package)[process-actions, process-query]: Handle the possible
lack of 'profile' pair in OPTS.
Reported by Sleep_Walker and Mathieu Lirzin <mthl@gnu.org>.
* guix/scripts/refresh.scm (maybe-updater, list-updaters): New macros.
(%updaters): Use 'list-updaters' instead of 'list'. Make
%PYPI-UPDATER conditional.
Reported by Paul van der Walt <paul@denknerd.org>
in <http://bugs.gnu.org/21829>.
* guix/scripts/import/hackage.scm (guix-import-hackage): Add missing
argument in call to 'leave'.
* guix/scripts/container/exec.scm (partition-args): Reimplement such
that all args up to and including the PID are returned as the first of
the two values.
This is a followup to 0a7c5a0.
* guix/import/gnu.scm (preferred-archive-type): Use
'upstream-source-archive-types' instead of 'gnu-release-archive-types'.
(gnu-package->sexp): Use 'upstream-source-urls' et al. Update call to
'download-tarball'.
(gnu->guix-package): Use <upstream-source> instead of <gnu-release>.
* guix/upstream.scm (upstream-source-archive-types): Export.