bazel-contrib / bazel-contrib/rules_distroless

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

Open
#65 2 comments 1 reaction 0 assignees View on GitHub
bug help wanted
Dominant language
Starlark
Stars
101
Forks
74
Avg merge
9h 42m
Merged PRs (30d)
2

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

Open the contributing guide

Research direction

Start at apt/private/package_index.bzl line 8 and reproduce package index fetching on macOS. Compare the current xz-based decompression with the macOS gzip behavior described in the issue, then check the README for the relevant dependency documentation. Done means macOS users can fetch indices without an unexpected missing-command failure, or have the dependency clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.