ocaml / dune

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

Fetch Zip Archives #10104

Open rgrinberg opened 6 months ago

rgrinberg commented 6 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 6 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 6 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 6 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.