From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
James Clark <james.clark@linaro.org>,
Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Clark Williams <williams@redhat.com>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 5/7] perf build: install-build-deps: add Debian devel package mapping
Date: Mon, 10 Aug 2026 15:15:24 -0300 [thread overview]
Message-ID: <20260810181526.24603-6-acme@kernel.org> (raw)
In-Reply-To: <20260810181526.24603-1-acme@kernel.org>
From: Arnaldo Carvalho de Melo <acme@redhat.com>
With the Fedora and Ubuntu mappings in place, this patch adds Debian
support: Debian installs the same devel packages, under the same
names, as the Ubuntu mapping, so it reuses debian_pkg_for() and
debian_base_pkgs as-is, with only auto-detection in detect_distro()
(and the shared apt-get install path) added, keeping the script's
per-distro dispatch ready for distros with their own package names.
Validated on a fresh Debian 13 (trixie) container so the host system
is not modified:
distrobox create --image debian:trixie
distrobox enter debian-trixie
make -C tools/perf install-build-deps
which installed the 29 mapped packages; re-running the target is a
no-op (apt-get reports "0 newly installed"). A subsequent clean build
enabled the same feature set as Ubuntu: 'perf version --build-options'
shows every feature with an external dependency Debian has a package
for [on], including the BPF skeletons compiled with clang/llvm
(libLLVM), the python binding and the C++-based features, with only
the deliberately unmapped libbfd family, libperl, libunwind and the
CoreSight (libopencsd) packages [OFF].
RHEL, whose package mapping is largely similar to Fedora's, is the
remaining planned distro, to be enabled once that mapping is
validated on it.
Example of its --list:
$ grep PRETTY_NAME /etc/os-release
PRETTY_NAME="Fedora Linux 44 (Toolbx Container Image)"
$ tools/perf/scripts/install-build-deps.sh --list --distro debian
bison
clang
default-jdk
flex
g++
gcc
libbabeltrace2-dev
libbpf-dev
libc6-dev
libcapstone-dev
libdebuginfod-dev
libdw-dev
libelf-dev
liblzma-dev
libnuma-dev
libpfm4-dev
libslang2-dev
libssl-dev
libtraceevent-dev
libzstd-dev
linux-libc-dev
llvm-dev
make
pkg-config
python3-dev
python3-setuptools
rustc
systemtap-sdt-dev
zlib1g-dev
$
Assisted-by: opencode:deepseek-v4-flash-free
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/Makefile.perf | 3 +-
tools/perf/scripts/install-build-deps.sh | 37 +++++++++++++-----------
2 files changed, 22 insertions(+), 18 deletions(-)
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index e1fc75b4621faed5..29cfd44c427f33ba 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -900,7 +900,8 @@ install: install-bin try-install-man
# Install the development packages needed to build perf, derived from the
# feature tests in tools/build/feature/. Currently supported: the Fedora
-# (dnf) and Ubuntu (apt) package mappings, see the script.
+# (dnf), Ubuntu (apt) and Debian (apt, reusing the Ubuntu mapping)
+# package mappings, see the script.
# INSTALL_BUILD_DEPS_ARGS, when set, is passed to the script, so
# extra options like --list, --dry-run or --distro can be given from make.
install-build-deps:
diff --git a/tools/perf/scripts/install-build-deps.sh b/tools/perf/scripts/install-build-deps.sh
index d725621bd7d70e7f..4a6f4bda49094696 100755
--- a/tools/perf/scripts/install-build-deps.sh
+++ b/tools/perf/scripts/install-build-deps.sh
@@ -26,12 +26,17 @@
# distrobox create --image ubuntu:26.04
# distrobox enter ubuntu-26-04
#
+# - Debian, on apt-get, reusing the Ubuntu mapping, validated on
+# Debian 13 (trixie), in a distrobox container:
+#
+# distrobox create --image debian:trixie
+# distrobox enter debian-trixie
+#
# Running inside a container keeps the host system unmodified.
#
-# Debian, which shares the Ubuntu package mapping, is the next planned
-# distro to be enabled once that mapping is validated on a Debian
-# release (trixie), as is RHEL support, once its (largely similar to
-# Fedora) package mapping is validated there.
+# RHEL support, whose package mapping is largely similar to Fedora's,
+# is the next planned distro, to be enabled once that mapping is
+# validated there.
#
# Usage: install-build-deps.sh [OPTIONS]
#
@@ -39,7 +44,7 @@
# --list list the packages that would be installed, then exit
# --dry-run show the install command that would be run, without
# running it
-# --distro ID force a distro: fedora, ubuntu (default: auto-detect)
+# --distro ID force a distro: fedora, ubuntu, debian (default: auto-detect)
# -h, --help print this help message
#
# Requires root (or passwordless sudo) to actually install packages.
@@ -61,12 +66,13 @@ it, so the corresponding feature gets enabled on a build.
Options:
--list list the packages that would be installed, then exit
--dry-run show the install command that would be run, without running it
- --distro ID force a distro: fedora, ubuntu
+ --distro ID force a distro: fedora, ubuntu, debian
-h, --help print this help message
Distros supported: Fedora (dnf), validated in a toolbx container on
-Fedora 44, and Ubuntu (apt-get), validated in a distrobox container on
-Ubuntu 26.04.
+Fedora 44, Ubuntu (apt-get), validated in a distrobox container on
+Ubuntu 26.04, and Debian (apt-get), reusing the Ubuntu mapping,
+validated in a distrobox container on Debian 13 (trixie).
EOF
exit 0
}
@@ -173,8 +179,7 @@ fedora_pkg_for() {
# Return the Debian/Ubuntu package(s) providing the devel requirements
# of a feature test in tools/build/feature/. This mapping is shared by
# Debian and Ubuntu, whose package names for these devel packages match,
-# and is validated on Ubuntu 26.04; Debian (trixie) will be enabled
-# once the same mapping is validated on it.
+# and is validated on Ubuntu 26.04 and Debian 13 (trixie).
# ---------------------------------------------------------------------
debian_pkg_for() {
local feat="$1"
@@ -281,9 +286,7 @@ detect_distro() {
case "$id" in
fedora) echo "fedora" ;;
ubuntu) echo "ubuntu" ;;
- # Debian shares the Ubuntu package mapping, but it is only validated
- # on Ubuntu so far, so don't auto-detect it yet.
- debian) echo "" ;;
+ debian) echo "debian" ;;
# RHEL and its derivatives share most Fedora package names, but the
# mapping is only validated on Fedora, so don't auto-detect them.
rhel|centos|rocky|alma|ol) echo "" ;;
@@ -315,7 +318,7 @@ package_set() {
local feat pkg pkgs
case "$distro" in
fedora) pkgs="$fedora_base_pkgs" ;;
- ubuntu) pkgs="$debian_base_pkgs" ;;
+ ubuntu|debian) pkgs="$debian_base_pkgs" ;;
esac
for feat in $(feature_tests "$srcdir"); do
@@ -345,7 +348,7 @@ install_cmd() {
fedora)
echo "dnf install -y $*"
;;
- ubuntu)
+ ubuntu|debian)
# a fresh container has no package index, so update first.
echo "apt-get update && apt-get install -y $*"
;;
@@ -374,10 +377,10 @@ main() {
srcdir=$(cd "$(dirname "$0")/../../.." && pwd)
distro=$(detect_distro)
case "$distro" in
- fedora|ubuntu) ;;
+ fedora|ubuntu|debian) ;;
*)
echo "error: unsupported distro (got '$distro'); the package mapping is not validated on other distros." >&2
- echo "Supported and validated: Fedora 44 (toolbx container), Ubuntu 26.04 (distrobox container)." >&2
+ echo "Supported and validated: Fedora 44 (toolbx container), Ubuntu 26.04 and Debian 13 (distrobox containers)." >&2
exit 1
;;
esac
--
2.55.0
next prev parent reply other threads:[~2026-08-10 18:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 18:15 [PATCHES v3 0/7] perf build: Add target to install devel packages needed to build perf Arnaldo Carvalho de Melo
2026-08-10 18:15 ` [PATCH 1/7] tools build: Only probe the compiler at parse time when it is installed Arnaldo Carvalho de Melo
2026-08-10 18:15 ` [PATCH 2/7] perf build: Add install-build-deps framework to install devel packages Arnaldo Carvalho de Melo
2026-08-10 18:15 ` [PATCH 3/7] perf build: install-build-deps: add Fedora devel package mapping Arnaldo Carvalho de Melo
2026-08-10 18:15 ` [PATCH 4/7] perf build: install-build-deps: add Ubuntu " Arnaldo Carvalho de Melo
2026-08-10 18:15 ` Arnaldo Carvalho de Melo [this message]
2026-08-10 18:15 ` [PATCH 6/7] perf build: Remove leftover feature tests for removed cxx and clang support Arnaldo Carvalho de Melo
2026-08-10 18:15 ` [PATCH 7/7] perf build: install-build-deps: add RHEL family devel package mapping Arnaldo Carvalho de Melo
-- strict thread matches above, loose matches on Subject: below --
2026-08-10 19:34 [PATCHES v4 0/7] perf build: Add target to install devel packages needed to build perf Arnaldo Carvalho de Melo
2026-08-10 19:35 ` [PATCH 5/7] perf build: install-build-deps: add Debian devel package mapping Arnaldo Carvalho de Melo
2026-08-10 15:44 [PATCHES v2 0/7] perf build: Add target to install devel packages needed to build perf Arnaldo Carvalho de Melo
2026-08-10 15:44 ` [PATCH 5/7] perf build: install-build-deps: add Debian devel package mapping Arnaldo Carvalho de Melo
2026-08-10 0:51 [PATCHES v1 0/7] perf build: Add target to install devel packages needed to build perf Arnaldo Carvalho de Melo
2026-08-10 0:51 ` [PATCH 5/7] perf build: install-build-deps: add Debian devel package mapping Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260810181526.24603-6-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=tglx@linutronix.de \
--cc=williams@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox