bazel-contrib/rules_distroless

Fails to natively decompress xz indices on macOS ("unable to download package index")

Open

#65 opened on Jul 18, 2024

View on GitHub
 (1 comment) (0 reactions) (0 assignees)Starlark (70 forks)auto 404
bughelp wanted

Repository metrics

Stars
 (97 stars)
PR merge metrics
 (PR metrics pending)

Description

Package index fetching logic depends on the xz command to decompress Packages.xz (see https://github.com/GoogleContainerTools/rules_distroless/blob/9da4ee521ab077fbd37744cb1acdad9e0f44b349/apt/private/package_index.bzl#L8)

macOS doesn't natively have an xz command, the native way to decompress xz files is surprisingly gzip -d Packages.xz (gzip in macOS is a non-standard Apple variant).

It's fairly easy to workaround by installing xz (brew install xz) so the xz command works. Ideally rules_distroless should use the native macOS command automatically but documenting this macOS dependency in the README would be helpful too.

Contributor guide