bazel-contrib / bazel-contrib/rules_multitool
.deb archives are incompatible with multitool
- Dominant language
- Starlark
- Stars
- 25
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
`.deb` files fall under the "archive" flow which uses bazel's native download_and_extract ([code](https://github.com/bazel-contrib/rules_multitool/blob/b9fa2d73361fa656666e347f7152571add548a1c/multitool/private/multitool.bzl#L98)). This is a problem because bazel's implementation of download_and_extract for `.deb` files only decompresses the outer `ar` archive layer and not the inner `data.tar.*` files ([code](https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/bazel/repository/decompressor/ArFunction.java#L32)).
This means after download_and_extract runs on a .deb, you'll get:
```
debian-binary
control.tar.gz (or .xz, .zst)
data.tar.gz (or .xz, .zst)
```
...not the actual unpacked files you probably want.
As a result, multitool is incompatible with deb archives because it cannot index into `data.tar.gz` to locate the executable.
Contributor guide
Assessment
This issue has not been assessed yet.