bazel-contrib / bazel-contrib/rules_multitool

.deb archives are incompatible with multitool

Open
#107 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.