Opamlint: error 67: Checksum specified with a non archive url

I’m working to update the opam package for Sundials/ML. When I run opam lint it says:

/Users/tbourke/Projects/opam-repository/packages/sundialsml/sundialsml.5.8.0p0/opam: Errors.
    error 67: Checksum specified with a non archive url:
              "https://github.com/inria-parkas/sundialsml/archive/refs/tags/v5.8.0p0.zip -
              md5=46bce6084b7cc70b368add49aa1dd68b"

From what I understand of opamSystem.is_archive, an archive is a compressed tar file (i.e., has an extension like .tar.gz). If I change the url to point to the github-generated tar file, then opam lint is happy.

Otherwise, the manual page for opam-lint states:

E67: Checksum specified with a non archive url

And it is true that if I link to the zip file but delete the checksum, then opam lint is also happy.

I guess there must be some kind of problem using md5 checksums on zip files.

Does anyone know the background to this issue?

Should opam package maintainers use zip files (without checksums) or tarballs (with checksums)?

I’m posting as much for myself as for anyone who googles opam lint error 67 in the future.

Hi,

This is very clearly a bug. Could you open an issue in Issues · ocaml/opam · GitHub ?
I’ll follow up with a PR there.

Thanks!

Here is the fix if you’re interested in the technical details:

Don’t worry about your PR on opam-repository, I’ll ignore the issue.

1 Like