Expected Behavior
If a package in opam-repository uses .tar.lzma and the users system has a decompressor Dune, like OPAM, should be able to unpack it.
OPAM supports LZMA archives, however no package currently in opam-repository uses LZMA compressed tarballs. Custom repositories might as the support in OPAM exists since at least OPAM 2.1 (and quite possibly before).
Actual Behavior
At the moment the support is spotty: if the tar implementation can auto-detect .lzma 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.
While GNU tar and bsdtar support decompression of xz archives using the --lzma 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.lzma archive
Specifications
- Version of
dune (output of dune --version): any
- Version of
ocaml (output of ocamlc --version): any
- Operating system (distribution and version): OpenBSD
Expected Behavior
If a package in opam-repository uses
.tar.lzmaand the users system has a decompressor Dune, like OPAM, should be able to unpack it.OPAM supports LZMA archives, however no package currently in
opam-repositoryuses LZMA compressed tarballs. Custom repositories might as the support in OPAM exists since at least OPAM 2.1 (and quite possibly before).Actual Behavior
At the moment the support is spotty: if the
tarimplementation can auto-detect.lzmafiles and has a decompressor available (like GNUtaror libarchive'sbsdtar) it will work. However if thetarimplementation does not support autodetection (e.g. OpenBSDtar, possibly othertarimplementations) Dune will fail despite a decompressor existing on the system.While GNU
tarandbsdtarsupport decompression ofxzarchives using the--lzmaflag, this flag is not guaranteed to exist, e.g. OpenBSDtardoes not have such a flag.Reproduction
tar.lzmaarchiveSpecifications
dune(output ofdune --version): anyocaml(output ofocamlc --version): any