--- Begin Message ---
Subject: |
guix package fails when --substitute-urls specifies an HTTPS endpoint |
Date: |
Mon, 07 Mar 2016 22:16:30 -0800 |
Hi,
I've noticed that "guix package" fails when I specify an HTTPS endpoint
for --substitute-urls. Is that expected behavior?
I recently set up a caching proxy for hydra.gnu.org. The endpoint's DNS
name is hydra-mirror.marusich.info. It's configured to accept both HTTP
and HTTPS requests. When it receives an HTTPS request, it proxies the
request (assuming it's a cache miss) to hydra.gnu.org over HTTP. I've
configured it this way because my understanding is that hydra.gnu.org is
currently only available via HTTP.
Commands like wget, curl, and even "guix download" work fine with the
mirror, even over HTTPS. For example, the following command succeeds:
guix download
https://hydra-mirror.marusich.info/nar/8kvb2k0n1jqjd5sa7g6qj5qllq0ckcya-linux-libre-4.4
However, when I try to install a package with "guix package" using the
endpoint, it fails with a backtrace like the following (this command was
invoked using the "guix package" from commit
7b3f2682de38a8e39f052705795ec85fcdfc8a96):
--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix package
--substitute-urls="https://hydra-mirror.marusich.info" -i graphviz
substitute: Backtrace:
substitute: In ice-9/boot-9.scm:
substitute: 63: 19 [call-with-prompt prompt0 ...]
substitute: In ice-9/eval.scm:
substitute: 432: 18 [eval # #]
substitute: In ice-9/boot-9.scm:
substitute: 2401: 17 [save-module-excursion #<procedure 16ac940 at
ice-9/boot-9.scm:4045:3 ()>]
substitute: 4050: 16 [#<procedure 16ac940 at ice-9/boot-9.scm:4045:3 ()>]
substitute: 1724: 15 [%start-stack load-stack ...]
substitute: 1729: 14 [#<procedure 16c4ea0 ()>]
substitute: In unknown file:
substitute: ?: 13 [primitive-load
"/gnu/store/3lg5c1nidbj0kjdz5b63hn3vp29kzf0s-guix-0.9.0.c3f29bc/bin/.guix-real"]
substitute: In guix/ui.scm:
substitute: 1175: 12 [run-guix-command substitute "--query"]
substitute: In ice-9/boot-9.scm:
substitute: 157: 11 [catch getaddrinfo-error ...]
substitute: 157: 10 [catch srfi-34 #<procedure 25850a0 at guix/ui.scm:411:2
()> ...]
substitute: 157: 9 [catch system-error ...]
substitute: In guix/scripts/substitute.scm:
substitute: 946: 8 [#<procedure 25850c0 at guix/scripts/substitute.scm:939:3
()>]
substitute: 804: 7 [process-query "info
/gnu/store/x29dbk9inqjym79q0907sx4arp1bfp28-graphviz-2.38.0-doc " ...]
substitute: 633: 6 [lookup-narinfos/diverse # #]
substitute: 617: 5 [lookup-narinfos "https://hydra-mirror.marusich.info" #]
substitute: 589: 4 [fetch-narinfos "https://hydra-mirror.marusich.info" #]
substitute: 222: 3 [download-cache-info "https://hydra-mirror.marusich.info"]
substitute: In guix/records.scm:
substitute: 331: 2 [recutils->alist #<unspecified>]
substitute: In ice-9/rdelim.scm:
substitute: 184: 1 [read-line #<unspecified> trim]
substitute: In unknown file:
substitute: ?: 0 [%read-line #<unspecified>]
substitute:
substitute: ERROR: In procedure %read-line:
substitute: ERROR: In procedure %read-line: Wrong type argument in position 1
(expecting open input port): #<unspecified>
guix package: error: build failed: substituter `substitute' died unexpectedly
--8<---------------cut here---------------end--------------->8---
When I replaced --substitute-urls="https://hydra-mirror.marusich.info"
with --substitute-urls="http://hydra-mirror.marusich.info", the same
command worked fine.
Chris
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#22937: guix package fails when --substitute-urls specifies an HTTPS endpoint |
Date: |
Thu, 10 Mar 2016 14:08:17 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
After some more testing and tweaks, notably with
<https://hydra.gnunet.org> and its brand new Let’s Encrypt certificate,
I pushed the patch as 9b7bd1b160be7c740a798c09e3b8986368b92036.
I can no longer reproduce the ECONNRESET issue I mentioned for
<https://hydra-mirror.marusich.info>, but feel free to open a new bug if
that comes up again!
For the record, the main test I used for that was:
$ sudo rm -rf /var/guix/substitute/cache
$ guix build libreoffice --no-grafts -n \
--substitute-urls=https://hydra.gnunet.org
That forces a redownload of all .narinfo files from hydra.gnunet.org,
which involves HTTP pipelining.
Anyway, thanks for giving me an incentive to address this. This was
long overdue!
Ludo’.
--- End Message ---