-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bad checksum for ocaml-migrate-parsetree #15281
Comments
Here is the relevant part of the Dockerfile: |
|
looks like upstream tarball was updated. cc @diml
|
ref #15280 (comment) |
This may also be an issue with github for which we will need to either upload the old source tarball (should be available in the opam online cache) or change the checksum in the opam file. It turns out that if one doesn’t statically upload a source for the release, github sometimes rebuild the tarballs changing the checksums. Either way we should fix it asap |
Looks like it happened here: #15279 |
Do you know for sure that it may happen? I have heard it happens but never experienced myself. Curious for myself - if I should keep uploading tarballs for releases or use github tags. |
This is annoying, that means I can't just simply git pull from my docker container the opam-repository |
So what is the best way to fix it right now? How can I force to install an ocaml-migrate-parsetree that will not generate the error? |
The CI caught it, but only after the file had changed: see #15279 and #15280 (comment) |
@aryx, I think you can temporarily |
@ygrek It happened to multiple projects changing owner or with repos changing name but I think to remember also some PR when no change had happened and the tarballs had changed. I think both |
@mseri I get [ERROR] No package named omp found. |
Also is there a way from the command-line to disable the checksum check during opam install? |
Ok got it, ... ocaml-migrate-parsetree for omp :) |
Yes, sorry, I went too fast there and used the wrong name. I think you can disable the checks in some way, but in this case the tarball may have been changed by mistake. We are working on it |
Can someone submit a PR to fix the checksum? (I don't have a Git cli nearby ;p) |
and yes, sometimes GitHub rebuilds the tag archive which is changing the checksum. |
For the context: libgit2/libgit2#4343 (comment) The manually uploaded artifacts, i.e., that have path It is advised to manually upload a tarball with the source code to the releases folder of github (or use dune-release, when applicable). It is also a good idea to mirror your packages, as github.com is not always available, banned in some countries, and prone to various rate-limiting errors. Ideally, the opam linter should emit a warning, when it detects an unstable tarball url. Also, the issues like this could be prevented with mirroring, for example, if opam had a mirror which mirrors all (or the most important) packages, we won't be having this discussion :) So far, very few packages are using mirrors in the opam universe. The last time I checked it was only bap packages. |
@ivg the global cache at http://opam.ocaml.org/cache/ does not count as mirror? which seems to be used by default by opam!? |
@hannesm, will opam try the cache to retrieve a package that has a mismatching checksum? |
the cache shouldn't have changed so the checksum should be the right one. Only people who attempt to get the archive without the cache will experience the problem. |
@ivg I'm not sure I understand your question, sorry. AFAIU, opam takes the |
So with opam cache in place there should be no upstream url downloads in perfect scenario and this problem should not have surfaced. So it means currently opam cache is not working well? Maybe more mirrors for cache needed? |
The cache is working perfectly well. The problem arises only for people using the docker images/opam-repository's git repository directly (for CI for instance). In those cases the cache is not used, for normal users it is used as usual. |
ah, so when opam remote url is not default - cache is not used, this makes sense. corollary: mirroring opam-repository (to have stable snapshots of universe state) disables cache, ie removes protection from unstable upstreams, which is sad. |
Update: that was actually a docker container from opam-ci that was failing for us :) |
I encountered this issue when following instruction to install Dune from sources, using the documentation. When i try to install the newest version 'opam install ocaml-migrate-parsetree.1.4.1' it says '[Error] Package ocaml-migrate-parsetree has no version 1.4.1'. Basically the documentation on installing and running a Dune node is broken now. |
I use opam in a docker container to install some packages but I recently got this error in my CI:
[topkg.1.0.1] downloaded from http://erratique.ch/software/topkg/releases/topkg-1.0.1.tbz
[ERROR] The sources of the following couldn't be obtained, aborting:
- ocaml-migrate-parsetree.1.4.0: Bad checksum
Anyway I can fix that?
Here is the line in the Dockerfile:
Step 6/18 : RUN git pull && opam update && opam switch 4.07 && opam install dune yaml && opam install pfff pfff.0.39.3
I run this in the docker image FROM ocaml/opam2:alpine
The text was updated successfully, but these errors were encountered: