ocaml / opam

opam is a source-based package manager. It supports multiple simultaneous compiler installations, flexible package constraints, and a Git-friendly development workflow.
https://opam.ocaml.org
Other
1.23k stars 351 forks source link

Download site for ocaml (https://caml.inria.fr/pub/distrib/ocaml-4.13) times out #5137

Closed jonahbeckford closed 2 years ago

jonahbeckford commented 2 years ago

https://github.com/ocaml/opam/blob/e695af24c27679c40df6b2aebfeb35087bad0f6c/src_ext/Makefile#L14

I would switch it over to https://github.com/ocaml/ocaml/archive/refs/tags/4.13.1.tar.gz but the checksums are not equivalent. Anyway, this is likely transient.

Still ... downloading from github.com is going to be more reliable.


One example of timeout:

https://github.com/diskuv/dkml-installer-ocaml/runs/6326430221?check_suite_focus=true#step:35:11367

dbuenzli commented 2 years ago

Still ... downloading from github.com is going to be more reliable.

If there's one thing that has proven unreliable over the years it is the tarballs automatically generated by github.

Don't do that. Generate your own tarballs.

jonahbeckford commented 2 years ago

Agreed, if you are suggesting using GitHub releases rather than tag autogen tarballs.

dbuenzli commented 2 years ago

In any case that's certainly not an issue for opam.

jonahbeckford commented 2 years ago

We can use https://github.com/ocaml/ocaml/archive/ab626576eee205615a9d7c5a66c2cb2478f1169c.tar.gz which is a tarball of the commit id for tag 4.13.1. That is both immutable and reliable for downloads. Seems a better choice than URL_ocaml = https://caml.inria.fr/pub/distrib/ocaml-4.13/ocaml-4.13.1.tar.gz (which was down for more than a day).

No diff when comparing the contents of the tarballs except the top-level directory name (ocaml-4.13.1 vs ocaml-ab626576eee205615a9d7c5a66c2cb2478f1169c):

diff \
  <(tar tvfz ocaml-4.13.1.tar.gz | awk '{printf "%10d %s\n", $3, $NF}' | sort -k2) \
  <(tar tvfz ab626576eee205615a9d7c5a66c2cb2478f1169c.tar.gz | sed s/ocaml-ab626576eee205615a9d7c5a66c2cb2478f1169c/ocaml-4.13.1/ | awk '{printf "%10d %s\n", $3, $NF}' | sort -k2)

Any objections to a PR that uses commit ids instead?