From: sashiko-bot@kernel.org
To: "Arnaldo Carvalho de Melo" <acme@kernel.org>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 7/7] perf build: install-build-deps: add RHEL family devel package mapping
Date: Mon, 10 Aug 2026 16:09:50 +0000 [thread overview]
Message-ID: <20260810160951.7AF821F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260810154437.15946-8-acme@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The INT and TERM signal trap removes the temporary file but fails to exit the script, causing the script to resume execution and proceed with an empty or partial package list after an interrupt.
--
--- Patch [7]: [PATCH 7/7] perf build: install-build-deps: add RHEL family devel package mapping ---
commit d7066a2ea105c214aa5807a82fc683f385da44a7
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
perf build: install-build-deps: add RHEL family devel package mapping
This patch extends the Fedora package mapping in install-build-deps.sh to the
RHEL family (RHEL, CentOS Stream, Rocky Linux, AlmaLinux, Oracle Linux). It
adds logic to check enabled repositories via dnf repoquery to handle packages
that are missing or located in optional repositories like CRB or EPEL.
> diff --git a/tools/perf/scripts/install-build-deps.sh b/tools/perf/scripts/install-build-deps.sh
> index 4a6f4bda49094..caf6d8d1e56d1 100755
> --- a/tools/perf/scripts/install-build-deps.sh
> +++ b/tools/perf/scripts/install-build-deps.sh
[ ... ]
> @@ -518,23 +518,43 @@ main() {
[ ... ]
> + missing_file=$(mktemp) || {
> + echo "error: cannot create a temporary file (mktemp failed)" >&2
> + exit 1
> + }
> + # package_set() runs in a subshell, doing dnf repoquery loops that
> + # may be interrupted, so also trap the temp file then.
> + trap 'rm -f "$missing_file"' EXIT INT TERM
> + pkgs=$(package_set "$distro" "$srcdir" 2>"$missing_file")
> + missing_pkgs=$(cat "$missing_file")
[Severity: Medium]
Will this script continue execution if the user sends SIGINT?
Since the trap removes the temporary file but doesn't explicitly exit, an
interrupt during package_set() would delete the file and then resume execution.
The cat command would fail because the file is gone, and the script might
continue on to the sudo installation phase with an incomplete package list.
Should the trap call exit for INT and TERM signals?
> + rm -f "$missing_file"
>
> case "$action" in
> list)
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260810154437.15946-1-acme@kernel.org?part=7
next prev parent reply other threads:[~2026-08-10 16:09 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
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 1/7] tools build: Only probe the compiler at parse time when it is installed Arnaldo Carvalho de Melo
2026-08-10 18:07 ` Ian Rogers
2026-08-10 15:44 ` [PATCH 2/7] perf build: Add install-build-deps framework to install devel packages Arnaldo Carvalho de Melo
2026-08-10 15:44 ` [PATCH 3/7] perf build: install-build-deps: add Fedora devel package mapping Arnaldo Carvalho de Melo
2026-08-10 15:44 ` [PATCH 4/7] perf build: install-build-deps: add Ubuntu " Arnaldo Carvalho de Melo
2026-08-10 15:44 ` [PATCH 5/7] perf build: install-build-deps: add Debian " Arnaldo Carvalho de Melo
2026-08-10 15:44 ` [PATCH 6/7] perf build: Remove leftover feature tests for removed cxx and clang support Arnaldo Carvalho de Melo
2026-08-10 15:44 ` [PATCH 7/7] perf build: install-build-deps: add RHEL family devel package mapping Arnaldo Carvalho de Melo
2026-08-10 16:09 ` sashiko-bot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-08-11 1:28 [PATCHES v7 0/7] perf build: Add target to install devel packages needed to build perf Arnaldo Carvalho de Melo
2026-08-11 1:29 ` [PATCH 7/7] perf build: install-build-deps: add RHEL family devel package mapping Arnaldo Carvalho de Melo
2026-08-11 0:46 [PATCHES v6 0/7] perf build: Add target to install devel packages needed to build perf Arnaldo Carvalho de Melo
2026-08-11 0:46 ` [PATCH 7/7] perf build: install-build-deps: add RHEL family devel package mapping Arnaldo Carvalho de Melo
2026-08-10 21:46 [PATCHES v5 0/7] perf build: Add target to install devel packages needed to build perf Arnaldo Carvalho de Melo
2026-08-10 21:46 ` [PATCH 7/7] perf build: install-build-deps: add RHEL family devel package mapping Arnaldo Carvalho de Melo
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 7/7] perf build: install-build-deps: add RHEL family devel package mapping Arnaldo Carvalho de Melo
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 7/7] perf build: install-build-deps: add RHEL family devel package mapping Arnaldo Carvalho de Melo
2026-08-10 18:35 ` sashiko-bot
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 7/7] perf build: install-build-deps: add RHEL family devel package mapping Arnaldo Carvalho de Melo
2026-08-10 1:00 ` sashiko-bot
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=20260810160951.7AF821F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=acme@kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.