-
Notifications
You must be signed in to change notification settings - Fork 470
Support XZ decompression if decompressor is available #13715
Description
Expected Behavior
If a package in opam-repository uses .tar.xz and the users system has a decompressor Dune, like OPAM, should be able to unpack it.
Packages that use XZ compressed tarballs in opam-repository include:
- LLVM
- Clamgml
- Topiary
- A bunch of lesser-known packages
Actual Behavior
At the moment the support is spotty: if the tar implementation can auto-detect .xz files and has a decompressor available (like GNU tar or libarchive's bsdtar) it will work. However if the tar implementation does not support autodetection (e.g. OpenBSD tar, possibly other tar implementations) Dune will fail despite a decompressor existing on the system (and OPAM supporting decompression).
While GNU tar and bsdtar support decompression of xz archives using the -J flag, this flag is not guaranteed to exist, e.g. OpenBSD tar does not have such a flag.
Reproduction
- PR with a reproducing test:
- Use OpenBSD
- Attempt to install any dependency that has a
tar.xz.archive
Specifications
- Version of
dune(output ofdune --version): any - Version of
ocaml(output ofocamlc --version): any - Operating system (distribution and version): OpenBSD