-
Notifications
You must be signed in to change notification settings - Fork 470
Support decompression of LZMA compressed tarballs #13716
Description
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.lzmaarchive
Specifications
- Version of
dune(output ofdune --version): any - Version of
ocaml(output ofocamlc --version): any - Operating system (distribution and version): OpenBSD