ocaml / dune

A composable build system for OCaml.
https://dune.build/
MIT License
1.63k stars 404 forks source link

Fetch Zip Archives #10104

Open rgrinberg opened 8 months ago

rgrinberg commented 8 months ago

https://github.com/ocaml/dune/pull/10085 was a hotfix that did not implement the full extraction functionality supported by opam. One such missing feature is the support for zip archives. We should restore this feature.

We should also make sure we support tbz archives while we're at it.

Leonidas-from-XIV commented 8 months ago

The way I use tar is that it automatically decompresses the formats it knows about (the manpage says that -a/--auto-compress can be used to enable it however it doesn't state that it is always enabled which it seems to be on my system), so it should support gzip, bzip2, xz, lzip, lzma, lzop (at least on my system) without any issue.

Zip support does indeed need a separate tool.

rgrinberg commented 8 months ago

so it should support gzip, bzip2, xz, lzip, lzma, lzop (at least on my system) without any issue.

I see. I wonder why opam tries to do the detection manually then.

Leonidas-from-XIV commented 8 months ago

That could be up to different tar implementations. Looks like e.g. tar in OpenBSD only supports gzip & compress and doesn't do autodetection according to its manpage.