Re: [RFC PATCH v3 2/3] perf build: Prefer zlib-rs over zlib when available

From: bot+bpf-ci

Date: Thu Nov 05 2026 - 13:57:51 EST


> perf build: Prefer zlib-rs over zlib when available

TL;DR: install-build-deps.sh may fail entirely on Debian 13 (and possibly
Fedora) because the new zlib-rs package mapping names packages that may not
exist, with no availability check, so apt-get could install nothing.

> diff --git a/tools/perf/scripts/install-build-deps.sh b/tools/perf/scripts/install-build-deps.sh
> --- a/tools/perf/scripts/install-build-deps.sh
> +++ b/tools/perf/scripts/install-build-deps.sh

[ ... ]

> @@ -305,6 +308,9 @@ debian_pkg_for() {
> zlib)
> echo "zlib1g-dev"
> ;;
> + zlib-rs)
> + echo "cargo librust-libz-rs-sys-dev"
> + ;;
> lzma)
> echo "liblzma-dev"
> ;;

Will this break install-build-deps.sh on Debian 13 (trixie), which the
script header lists as validated?

trixie does not appear to ship librust-libz-rs-sys-dev, and unlike the RHEL
branch, the Debian/Ubuntu path in package_set() has no availability check
(pkg_available() is only used for RHEL). The name goes straight into the
install command:

echo "DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y $*"

apt-get then fails with "E: Unable to locate package
librust-libz-rs-sys-dev" (exit 100) and installs nothing, including the
packages that are available. main() prints "error: the install command
failed" and exits 1.

Before this patch zlib-rs had no case, so it was skipped via
[ -n "$pkg" ] || continue and the install worked.

The fedora_pkg_for() name rust-libz-rs-sys-devel is also added without a
check, so Fedora would fail the same way if it lacks that package.

Should debian_pkg_for() probe availability the way pkg_available() does for
dnf, or leave zlib-rs unmapped on distros that do not package the crate?


---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md

CI run summary: https://github.com/kernel-patches/bpf/actions/runs/42083491750