me
/
guix
Archived
1
0
Fork 0
Commit Graph

5786 Commits (c0087d33705f53cc3619a1a43a33602aaecc3a8b)

Author SHA1 Message Date
Ludovic Courtès a0ad636167
ui: 'load*' compiles with '-O1'.
With this change, the wall-clock time of:

  guix system build --no-grafts -d gnu/system/install.scm

goes from 5.0s to 2.3s on Guile 3.0.5.

* guix/ui.scm (without-compiler-optimizations): New macro.
(load*): Use it.
2021-05-17 23:59:58 +02:00
Ludovic Courtès 4288806111
ui: Remove Guile 2.2.3 workaround.
This became dead code with commit
4f621a2b00.

* guix/ui.scm (load*): Remove Guile 2.2.3 workaround.
2021-05-17 23:59:58 +02:00
Ludovic Courtès 938ffcbb05
publish: Add '--negative-ttl'.
* guix/scripts/publish.scm (show-help, %options): Add '--negative-ttl'.
(render-narinfo, render-narinfo/cached, make-request-handler): Add #:negative-ttl
and honor it.
(run-publish-server): Add #:narinfo-negative-ttl and honor it.
(guix-publish): Honor '--negative-ttl'.
* tests/publish.scm ("negative TTL", "no negative TTL"): New tests.
2021-05-16 23:28:11 +02:00
Ludovic Courtès dc3504913d
substitutes: Reduce negative TTLs.
* guix/substitutes.scm (%narinfo-negative-ttl): Change to 15mn.
(%narinfo-transient-error-ttl): Halve.
2021-05-16 23:28:11 +02:00
Christopher Baines 97d615b176
inferior: Support querying package replacements.
I'm looking at this to help with adding support for looking up package
replacements to store in the Guix Data Service.

* guix/inferior.scm (inferior-package-replacement): New procedure.
* tests/inferior.scm ("inferior-package-replacement"): New test.
2021-05-15 12:14:47 +01:00
Ludovic Courtès 46eac03e72
swh: 'lookup-origin-revision' ignores partial visits.
* guix/swh.scm (lookup-origin-revision): Filter out visits with a status
different from 'full.
2021-05-14 23:25:09 +02:00
Ludovic Courtès 67bf612554
self: Add dependency on Disarchive.
This enables the Disarchive fallback implemented in commit
fbc2a52a32 (on foreign distros).

* guix/self.scm (specification->package): Add "disarchive".
(compiled-guix): Add DISARCHIVE to DEPENDENCIES in the #:dependencies
argument to 'guix-command'.
2021-05-14 23:24:08 +02:00
Zheng Junjie d456232712
import: go: Fix goproxy option argument's format.
Commit a8b927a562 Added new procedure go-module-available-versions use
'string-append' to GOPROXY, but 'string->symbol' let GOPROXY is a symbol (it
must be a string), which would lead to wrong-type-arg errors in the
'string-append' procedure.

* guix/scripts/import/go.scm (%options)[goproxy]: Remove call to
'string->symbol'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-05-14 14:47:16 +02:00
Ludovic Courtès 3cde5231aa
challenge: Be defensive in the size passed to the progress reporter.
Possibly fixes <https://bugs.gnu.org/48045>.
Reported by Bone Baboon <bone.baboon@disroot.org>.

* guix/scripts/challenge.scm (call-with-nar): Rename second value
returned by 'http-fetch' to match reality.  Change second argument to
'progress-reporter/file'.
2021-05-13 00:19:58 +02:00
Ludovic Courtès 0aef94e7bc
self: Build with 'guile-3.0-latest'.
* guix/self.scm (specification->package): Use 'guile-3.0-latest' instead
of 'guile-3.0/libgc-7'.
2021-05-13 00:19:58 +02:00
Christopher Baines 34985fb6ae
channels: Add a #:system argument to channel-instances->manifest.
This allows computing a manifest for a specific system. Previously this was
possible, but only through changing %current-system, which caused the
derivation to be computed using that system as well (so computing a derivation
for aarch64-linux on x86_64-linux would require running aarch64-linux code).

This new argument adds the possibility of computing derivations for non-native
systems, without having to run non-native code.

I'm looking at this as it will enable the Guix Data Service to compute channel
instance derivations without relying on QEMU emulation for non-native
systems (it should be faster as well).

* guix/channels.scm (build-from-source): Add #:system argument and pass to
build.
(build-channel-instance): Add system argument and pass to build-from-source.
(channel-instance-derivations): Add #:system argument and pass to
build-channel-instance, also rename system to current-system-value.
(channel-instances->manifest): Add #:system argument and pass to
channel-instance-derivations.
2021-05-12 08:34:07 +01:00
Maxim Cournoyer b7cbca221f
Merge branch 'version-1.3.0' 2021-05-11 22:42:59 -04:00
Ludovic Courtès da28efef36
ssh: Fix type that broke offloading.
Reported by Simon Streit <simon@netpanic.org>.
Regression introduced in 3270308eeb.

* guix/ssh.scm (remote-daemon-channel)[redirect]: Unquote SOCKET-NAME.
2021-05-11 12:49:53 +02:00
Roel Janssen ce3d05cc08
guix: scripts system: Increase the size for generating Docker container images.
* guix/scripts/system.scm: Override the default of 256.
2021-05-10 09:43:12 +02:00
Ludovic Courtès 8a154c2915
describe: Gracefully handle profiles that lack provenance info.
Fixes <https://bugs.gnu.org/48313>.

Previously, 'current-channels' would return the empty list when
'current-profile' is true but the profile lacks provenance info.

* guix/describe.scm (current-channels)[build-time-metadata]: New
procedure.  Call it when 'manifest-entry-channel' returns #f for all of
ENTRIES.
* guix/scripts/describe.scm (guix-describe): When PROFILE is true, pass
third argument to 'display-profile-info'.
2021-05-09 23:46:46 +02:00
Ludovic Courtès 9562a2eb61
diagnostics, ui: Adjust to 'read-error' and 'syntax-error' in Guile 3.0.6.
* guix/diagnostics.scm (source-properties->location): Add clause for
vectors.
* guix/ui.scm (report-load-error): Tweak 'read-error' handling for 3.0.6.
* tests/guix-package.sh: Relax regexp for the "unbound variable"
diagnostic check.
* tests/guix-system.sh: Adjust "missing closing paren" check for 3.0.6.
* tests/records.scm (location-alist): New procedure.
("define-record-type* & wrong field specifier")
("define-record-type* & wrong field specifier, identifier")
("define-record-type* & duplicate initializers"): Use it.
2021-05-09 23:45:36 +02:00
Ludovic Courtès 3270308eeb
ssh: Honor GUIX_DAEMON_SOCKET on the target machine.
Fixes <https://bugs.gnu.org/48240>.
Reported by Ricardo Wurmus <rekado@elephly.net>.

* guix/ssh.scm (remote-daemon-channel)[redirect]: Define
'connect-to-daemon'.  Use the same-named procedure from (guix store)
when available, and honor GUIX_DAEMON_SOCKET.
2021-05-08 14:55:51 +02:00
Ludovic Courtès dd14678b9b
store: Export 'connect-to-daemon'.
* guix/store.scm (connect-to-daemon): Make public.  Improve docstring.
2021-05-08 14:55:51 +02:00
Ludovic Courtès e2f4a5704b
ssh: 'connect-to-remote-daemon' raises a nicer message upon error.
* guix/ssh.scm (connect-to-remote-daemon): Catch
'store-connection-error?' and rethrow.
2021-05-08 14:55:51 +02:00
Ludovic Courtès e3e0886c2d
store: 'open-connection' never returns #f.
* guix/store.scm (open-connection)[handshake-error]: New procedure.
Call it in code paths that would previously return #f.
2021-05-08 14:55:50 +02:00
Ludovic Courtès 5b0afe2420
weather: '--display-missing' shows the system type of missing items.
* guix/scripts/weather.scm (store-item-system): New procedure.
(report-server-coverage): Use it to print the system type of each
missing item.
2021-05-08 14:55:50 +02:00
Guillaume Le Vaillant 2fa8fd4af5
build-system: asdf: Work around package-name->name+version bug.
This patch modifies how the name of the main Common Lisp system is extracted
from the full Guix package name to work around bug#48225 concerning the
'package-name->name+version' function.

Fixes <https://issues.guix.gnu.org/41437>.

* guix/build-system/asdf.scm (asdf-build): Fix 'systems' function.
* guix/build/asdf-build-system.scm (main-system-name): Fix it.
2021-05-08 13:42:38 +02:00
Timothy Sample 7262619d6f
download: Restore error reporting.
Normal error reporting was disrupted by the introduction of
Disarchive in commit fbc2a52a32.  In
particular, running 'guix download' would succeed with a partially
downloaded file.

* guix/build/download.scm (disarchive-fetch/any): Return '#f' when
Disarchive cannot be found, the specification cannot be found, or
Disarchive fails due to an error.
2021-05-05 23:20:36 -04:00
Ludovic Courtès 626e619590
swh: Adjust for compatibility with Guile 2.2's (web client).
Guile <= 2.2.7 did not support #:verify-certificate? so work around it.

* guix/swh.scm (http-get*, http-post*) [! guile-3]: Add variant for
Guile 2.2.
2021-05-05 23:44:48 +02:00
Konrad Hinsen d87a0efeeb
cvs-download: Fix module exports
* guix/cvs-download.scm: Remove non-existent export cvs-reference-url,
  add cvs-reference-root-directory and cvs-reference-module

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-05-05 16:56:43 +02:00
Ludovic Courtès e069611866
swh: Adjust for compatibility with Guile 2.2's (web client).
Guile <= 2.2.7 did not support #:verify-certificate? so work around it.

* guix/swh.scm (http-get*, http-post*) [! guile-3]: Add variant for
Guile 2.2.
2021-05-05 16:56:43 +02:00
Ricardo Wurmus 56e4d7204b
profiles: texlive-configuration: Handle updmap.cfg conflict.
The profile hook would fail when preparing an environment for a package using
texlive-union, because the union already had a updmap.cfg file.

Reported-by: Lars-Dominik Braun <ldb@leibniz-psychology.org>.

* guix/profiles.scm (texlive-configuration): Delete updmap.cfg if it exists.
2021-05-05 14:50:04 +02:00
Leo Prikler 0f116d7f90
build-system: emacs: Clarify %install-dir.
The old comment is no longer adequate, see
<https://lists.gnu.org/archive/html/guix-patches/2021-05/msg00113.html>.

* guix/build/emacs-build-system.scm (%install-dir): Adjust comment to better
reflect usage of this variable.
2021-05-05 10:01:48 +02:00
Maxim Cournoyer afec278417
ui: Suggest installing glibc-locales, not glibc-utf8-locales.
Users (both old and new) struggling with locale warnings is a recurrent theme;
part of it may be due to the glibc-utf8-locales package being misleading, as
it only includes a subset of the UTF-8 locales.  To prevent confusion, suggest
installing the glibc-locales package instead.

* guix/ui.scm (install-locale): Do not mention glibc-utf8-locales in the hint
message.  Use glibc-locales instead of glibc-utf8-locales in the provided
example.
2021-05-05 00:44:17 -04:00
Ludovic Courtès a47f40b30d
status: Avoid abbreviation in messages.
This is a followup to 68228d80dd.

* guix/status.scm (hook-message): Spell out "sub-directories".
2021-05-05 00:57:35 +02:00
Ricardo Wurmus a6b8794c69
profiles: texlive-configuration: Refresh font maps.
* guix/profiles.scm (texlive-configuration): Run updmap to generate font maps
necessary for pdflatex and other tools.
2021-05-03 15:36:14 +02:00
Mathieu Othacehe fd5527407f
android-repo-download: Add guile-json extension.
This partially fixes: <https://issues.guix.gnu.org/48152>.

The (guix build download-nar) module drags the (guix build download) module
that autoloads (guix swh).

[13/26] Loading './guix/swh.scm'...
;;; Failed to autoload swh-download-directory in (guix swh):
;;; no code for module (json)
Backtrace:
In srfi/srfi-1.scm:
   460:18 19 (fold #<procedure 7ffff2c50760 at ice-9/eval.scm:336:1?> ?)
In ice-9/eval.scm:
    619:8 18 (_ #(#(#<directory (guix build utils) 7ffff318fd20>) # ?))
In ice-9/boot-9.scm:
   2806:4 17 (save-module-excursion #<procedure 7ffff25b1a00 at ice-?>)
In unknown file:
          16 (primitive-load "./guix/swh.scm")
In ice-9/eval.scm:
   721:20 15 (primitive-eval (define-module (guix swh) #:use-module ?))
In ice-9/psyntax.scm:
  1241:36 14 (expand-top-sequence ((define-module (guix swh) # # ?)) ?)
  1233:19 13 (parse _ (("placeholder" placeholder)) ((top) #(# # ?)) ?)
   285:10 12 (parse _ (("placeholder" placeholder)) (()) _ c&e (eval) ?)
In ice-9/eval.scm:
   293:34 11 (_ #<directory (guix build utils) 7ffff318fd20>)
In ice-9/boot-9.scm:
   3380:4 10 (define-module* _ #:filename _ #:pure _ #:version _ # _ ?)
  2565:24  9 (call-with-deferred-observers #<procedure 7ffff2215230 ?>)
  3393:24  8 (_)
   222:29  7 (map1 (((guix base16)) ((guix build utils)) ((# ?) ?) ?))
   222:29  6 (map1 (((guix build utils)) ((guix build syscalls) ?) ?))
   222:29  5 (map1 (((guix build syscalls) #:select (mkdtemp!)) (#) ?))
   222:29  4 (map1 (((web uri)) ((web client)) ((web response)) (#) ?))
   222:29  3 (map1 (((web client)) ((web response)) ((json)) ((?)) ?))
   222:29  2 (map1 (((web response)) ((json)) ((srfi srfi-1)) ((?)) ?))
   222:17  1 (map1 (((json)) ((srfi srfi-1)) ((srfi srfi-9)) ((?)) ?))
   3300:6  0 (resolve-interface (json) #:select _ #:hide _ #:prefix _ ?)

ice-9/boot-9.scm:3300:6: In procedure resolve-interface:
no code for module (json)

* guix/android-repo-download.scm (android-repo-fetch): Add guile-json
extension.
2021-05-02 18:45:27 +02:00
Mathieu Othacehe b8c080b388
cvs-download: Add guile-json and gnutls extensions.
This partially fixes: <https://issues.guix.gnu.org/48152>.

The (guix build download-nar) module drags the (guix build download) module
that autoloads (guix swh).

[13/26] Loading './guix/swh.scm'...
;;; Failed to autoload swh-download-directory in (guix swh):
;;; no code for module (json)
Backtrace:
In srfi/srfi-1.scm:
   460:18 19 (fold #<procedure 7ffff2c50760 at ice-9/eval.scm:336:1?> ?)
In ice-9/eval.scm:
    619:8 18 (_ #(#(#<directory (guix build utils) 7ffff318fd20>) # ?))
In ice-9/boot-9.scm:
   2806:4 17 (save-module-excursion #<procedure 7ffff25b1a00 at ice-?>)
In unknown file:
          16 (primitive-load "./guix/swh.scm")
In ice-9/eval.scm:
   721:20 15 (primitive-eval (define-module (guix swh) #:use-module ?))
In ice-9/psyntax.scm:
  1241:36 14 (expand-top-sequence ((define-module (guix swh) # # ?)) ?)
  1233:19 13 (parse _ (("placeholder" placeholder)) ((top) #(# # ?)) ?)
   285:10 12 (parse _ (("placeholder" placeholder)) (()) _ c&e (eval) ?)
In ice-9/eval.scm:
   293:34 11 (_ #<directory (guix build utils) 7ffff318fd20>)
In ice-9/boot-9.scm:
   3380:4 10 (define-module* _ #:filename _ #:pure _ #:version _ # _ ?)
  2565:24  9 (call-with-deferred-observers #<procedure 7ffff2215230 ?>)
  3393:24  8 (_)
   222:29  7 (map1 (((guix base16)) ((guix build utils)) ((# ?) ?) ?))
   222:29  6 (map1 (((guix build utils)) ((guix build syscalls) ?) ?))
   222:29  5 (map1 (((guix build syscalls) #:select (mkdtemp!)) (#) ?))
   222:29  4 (map1 (((web uri)) ((web client)) ((web response)) (#) ?))
   222:29  3 (map1 (((web client)) ((web response)) ((json)) ((?)) ?))
   222:29  2 (map1 (((web response)) ((json)) ((srfi srfi-1)) ((?)) ?))
   222:17  1 (map1 (((json)) ((srfi srfi-1)) ((srfi srfi-9)) ((?)) ?))
   3300:6  0 (resolve-interface (json) #:select _ #:hide _ #:prefix _ ?)

ice-9/boot-9.scm:3300:6: In procedure resolve-interface:
no code for module (json)

* guix/cvs-download.scm (cvs-fetch): Add guile-json and gnutls as extensions.
2021-05-02 18:43:32 +02:00
Mathieu Othacehe d2b5bb5f9d
hg-download: Add guile-json and gnutls extensions.
This partially fixes: <https://issues.guix.gnu.org/48152>.

The (guix build download-nar) module drags the (guix build download) module
that autoloads (guix swh).

[13/26] Loading './guix/swh.scm'...
;;; Failed to autoload swh-download-directory in (guix swh):
;;; no code for module (json)
Backtrace:
In srfi/srfi-1.scm:
   460:18 19 (fold #<procedure 7ffff2c50760 at ice-9/eval.scm:336:1?> ?)
In ice-9/eval.scm:
    619:8 18 (_ #(#(#<directory (guix build utils) 7ffff318fd20>) # ?))
In ice-9/boot-9.scm:
   2806:4 17 (save-module-excursion #<procedure 7ffff25b1a00 at ice-?>)
In unknown file:
          16 (primitive-load "./guix/swh.scm")
In ice-9/eval.scm:
   721:20 15 (primitive-eval (define-module (guix swh) #:use-module ?))
In ice-9/psyntax.scm:
  1241:36 14 (expand-top-sequence ((define-module (guix swh) # # ?)) ?)
  1233:19 13 (parse _ (("placeholder" placeholder)) ((top) #(# # ?)) ?)
   285:10 12 (parse _ (("placeholder" placeholder)) (()) _ c&e (eval) ?)
In ice-9/eval.scm:
   293:34 11 (_ #<directory (guix build utils) 7ffff318fd20>)
In ice-9/boot-9.scm:
   3380:4 10 (define-module* _ #:filename _ #:pure _ #:version _ # _ ?)
  2565:24  9 (call-with-deferred-observers #<procedure 7ffff2215230 ?>)
  3393:24  8 (_)
   222:29  7 (map1 (((guix base16)) ((guix build utils)) ((# ?) ?) ?))
   222:29  6 (map1 (((guix build utils)) ((guix build syscalls) ?) ?))
   222:29  5 (map1 (((guix build syscalls) #:select (mkdtemp!)) (#) ?))
   222:29  4 (map1 (((web uri)) ((web client)) ((web response)) (#) ?))
   222:29  3 (map1 (((web client)) ((web response)) ((json)) ((?)) ?))
   222:29  2 (map1 (((web response)) ((json)) ((srfi srfi-1)) ((?)) ?))
   222:17  1 (map1 (((json)) ((srfi srfi-1)) ((srfi srfi-9)) ((?)) ?))
   3300:6  0 (resolve-interface (json) #:select _ #:hide _ #:prefix _ ?)

ice-9/boot-9.scm:3300:6: In procedure resolve-interface:
no code for module (json)

* guix/hg-download.scm (hg-fetch): Add guile-json and gnutls as extensions.
2021-05-02 18:42:11 +02:00
Leo Prikler 79cfe30f3e
build-system: emacs: Use subdirectories again.
With this, Emacs libraries are installed in the ELPA_NAME-VERSION subdirectory
of site-lisp and potential subdirectories should no longer collide.

* guix/build/emacs-build-system.scm (add-source-to-load-path): Rename to...
(expand-load-path): ... this.  Also expand lone subdirectories of site-lisp.
(%standard-phases): Adjust accordingly.
(elpa-directory): New variable.  Export it publicly for use in other build
systems.
(build, patch-el-files, make-autoloads): Use ELPA name and version to
construct subdirectories of %install-dir.
(install): Install in subdirectory.
2021-05-01 15:56:37 +02:00
Leo Prikler 68228d80dd
profiles: Add hook for Emacs subdirs.
* guix/profiles.scm (emacs-subdirs): New variable.
(%default-profile-hooks): Add it here.
* guix/status.scm (hook-message): Add a message for emacs-subdirs.
2021-05-01 15:56:36 +02:00
Timothy Sample fbc2a52a32
download: Use Disarchive as a last resort.
This is a fixed version of 66b14dccdd,
which was reverted in e74250c3c5.

* guix/download.scm (%disarchive-mirrors): New variable.
(%disarchive-mirror-file): New variable.
(built-in-download): Add 'disarchive-mirrors' keyword argument and
pass its value along to the 'builtin:download' derivation.
(url-fetch): Pass '%disarchive-mirror-file' to 'built-in-download'.
* guix/scripts/perform-download.scm (perform-download): Read
Disarchive mirrors from the environment and pass them to
'url-fetch'.
* guix/build/download.scm (disarchive-fetch/any): New procedure.
(url-fetch): Add 'disarchive-mirrors' keyword argument, use it to
make a list of URIs, and use the new procedure to fetch the file if
all other methods fail.
* build-aux/build-self.scm (build-program)[select?]: Exclude '(guix
build download)'.
* guix/self.scm (compiled-guix)[*core-modules*]: Add 'guile-json' to
the list of extensions.
2021-04-29 11:24:48 -04:00
Ludovic Courtès 524c9800af
diagnostics, ui: Adjust to 'read-error' and 'syntax-error' in Guile 3.0.6.
* guix/diagnostics.scm (source-properties->location): Add clause for
vectors.
* guix/ui.scm (report-load-error): Tweak 'read-error' handling for 3.0.6.
* tests/guix-package.sh: Relax regexp for the "unbound variable"
diagnostic check.
* tests/guix-system.sh: Adjust "missing closing paren" check for 3.0.6.
* tests/records.scm (location-alist): New procedure.
("define-record-type* & wrong field specifier")
("define-record-type* & wrong field specifier, identifier")
("define-record-type* & duplicate initializers"): Use it.
2021-04-29 01:22:04 +02:00
Ludovic Courtès 0ce1b28151
packages: 'package-with-patches' preserves package location.
* guix/packages.scm (package-with-patches): Preserve the 'location'
field of ORIGINAL.
2021-04-29 01:22:04 +02:00
Timothy Sample e74250c3c5
Revert "download: Use Disarchive as a last resort."
This reverts commit 66b14dccdd, which broke
'guix pull'.
2021-04-28 00:24:28 -04:00
Timothy Sample 66b14dccdd
download: Use Disarchive as a last resort.
* guix/download.scm (%disarchive-mirrors): New variable.
(%disarchive-mirror-file): New variable.
(built-in-download): Add 'disarchive-mirrors' keyword argument and
pass its value along to the 'builtin:download' derivation.
(url-fetch): Pass '%disarchive-mirror-file' to 'built-in-download'.
* guix/scripts/perform-download.scm (perform-download): Read
Disarchive mirrors from the environment and pass them to
'url-fetch'.
* guix/build/download.scm (disarchive-fetch/any): New procedure.
(url-fetch): Add 'disarchive-mirrors' keyword argument, use it to
make a list of URIs, and use the new procedure to fetch the file if
all other methods fail.
2021-04-27 21:27:02 -04:00
Timothy Sample 4f59ef3edb
swh: Add a directory download procedure.
* guix/swh.scm (swh-directory-download): New procedure (with
implementation extracted from 'swh-download').
(swh-download): Use it to download the revision directory.
2021-04-27 21:26:50 -04:00
Ludovic Courtès 15b6c2a965
http-client: Remove exception mishandling in 'http-multiple-get'.
Partly fixes <https://bugs.gnu.org/47867>.
Reported by Florian Pelz <pelzflorian@pelzflorian.de>.

The non-tail recursive call to 'connect' could cause requests to be
processed twice, with 'p' possibly closed the second time.

Regression introduced in 205833b72c and
carried over in 45fce38fb0.

* guix/http-client.scm (http-multiple-get): Remove call to 'close-port'
and recursive call to 'connect' when the 'write-request' block returns #f.
2021-04-25 14:36:45 +02:00
Ludovic Courtès 69ffe875c3
http-client, substitute: Gracefully handle GnuTLS EAGAIN/EINTR.
Partly fixes <https://bugs.gnu.org/47867>.
Reported by Florian Pelz <pelzflorian@pelzflorian.de>.

In GnuTLS up to 3.7.1 included, GNUTLS_E_AGAIN and GNUTLS_E_INTERRUPTED
are not handled by 'write_to_session_record_port' and could be thrown at
the caller.  This patch works around that by dropping connections
altogether and restarting when this happens.

* guix/http-client.scm (false-if-networking-error): Swallow ERROR/AGAIN
and ERROR/INTERRUPTED.
* guix/scripts/substitute.scm (call-with-cached-connection): Likewise.
2021-04-25 14:36:40 +02:00
Ludovic Courtès ff74e2a1bc
cve: Gracefully handle bogus CVE entries.
Fixes <https://bugs.gnu.org/47941>.
Reported by Jack Hill <jackhill@jackhill.us>.

* guix/cve.scm (reference-data->cve-references): Gracefully handle lack
of "reference_data".
(cpe-match->cve-configuration): Gracefully handle lack of "cpe23Uri".
2021-04-25 14:35:42 +02:00
Ludovic Courtès c59cc2383d
import: Remove Nix importer.
This importer has suffered from bitrot and no longer works with current
Nix and Nixpkgs.  See <https://bugs.gnu.org/32339> and
<https://bugs.gnu.org/36255>.

* guix/import/snix.scm, guix/scripts/import/nix.scm,
tests/snix.scm: Remove.
* Makefile.am (MODULES, SCM_TESTS): Remove them.
* guix/scripts/import.scm (importers): Remove "nix".
* build-aux/test-env.in: Remove NIXPKGS variable.
* configure.ac: Remove '--with-nixpkgs' option.
* doc/guix.texi (Invoking guix import): Remove bit about "guix import
nix".
* etc/completion/fish/guix.fish: Likewise.
2021-04-25 14:34:09 +02:00
Ludovic Courtès c50db7156d
http-client: Remove exception mishandling in 'http-multiple-get'.
Partly fixes <https://bugs.gnu.org/47867>.
Reported by Florian Pelz <pelzflorian@pelzflorian.de>.

The non-tail recursive call to 'connect' could cause requests to be
processed twice, with 'p' possibly closed the second time.

Regression introduced in 205833b72c and
carried over in 45fce38fb0.

* guix/http-client.scm (http-multiple-get): Remove call to 'close-port'
and recursive call to 'connect' when the 'write-request' block returns #f.
2021-04-24 19:08:13 +02:00
Ludovic Courtès 02d62978f4
http-client, substitute: Gracefully handle GnuTLS EAGAIN/EINTR.
Partly fixes <https://bugs.gnu.org/47867>.
Reported by Florian Pelz <pelzflorian@pelzflorian.de>.

In GnuTLS up to 3.7.1 included, GNUTLS_E_AGAIN and GNUTLS_E_INTERRUPTED
are not handled by 'write_to_session_record_port' and could be thrown at
the caller.  This patch works around that by dropping connections
altogether and restarting when this happens.

* guix/http-client.scm (false-if-networking-error): Swallow ERROR/AGAIN
and ERROR/INTERRUPTED.
* guix/scripts/substitute.scm (call-with-cached-connection): Likewise.
2021-04-24 19:08:13 +02:00
Ludovic Courtès 68a4ca148b
import: go: Autoload (htmlprag).
Fixes <https://bugs.gnu.org/47924>.
Reported by Carl Dong <contact@carldong.me>.

* guix/import/go.scm: Autoload (htmlprag).
2021-04-23 23:39:34 -04:00
Ludovic Courtès 9406bb12ee
import: go: Do not set '%strict-tokenizer?' from the top level.
This avoids interference with other users of (htmlprag) and makes the
intent clearer.

* guix/import/go.scm <top level>: Remove call to '%strict-tokenizer?'.
(go-package-licenses, go-package-description)
(go-package-synopsis, fetch-module-meta-data): Pass #:strict? #t to
'html->sxml'.
2021-04-23 23:39:34 -04:00