From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Buildroot List <buildroot@buildroot.org>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>,
"Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: [Buildroot] [PATCH v3 1/3] support/scripts/check-host-rpath: fix shellcheck issues
Date: Tue, 25 Aug 2026 23:41:59 +0200 [thread overview]
Message-ID: <20260825214203.3708181-2-thomas.petazzoni@bootlin.com> (raw)
In-Reply-To: <20260825214203.3708181-1-thomas.petazzoni@bootlin.com>
Fixes:
In ./support/scripts/check-host-rpath line 21:
while read file; do
^--^ SC2162 (info): read without -r will mangle backslashes.
In ./support/scripts/check-host-rpath line 62:
while read lib; do
^--^ SC2162 (info): read without -r will mangle backslashes.
In ./support/scripts/check-host-rpath line 90:
while read rpath; do
^--^ SC2162 (info): read without -r will mangle backslashes.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
Changes since v2:
- New in v3
---
.checkpackageignore | 1 -
support/scripts/check-host-rpath | 6 +++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/.checkpackageignore b/.checkpackageignore
index c3ec943075..3cf8cabece 100644
--- a/.checkpackageignore
+++ b/.checkpackageignore
@@ -997,7 +997,6 @@ support/libtool/buildroot-libtool-v2.4.patch lib_patch.ApplyOrder lib_patch.Sob
support/misc/relocate-sdk.sh Shellcheck
support/scripts/apply-patches.sh Shellcheck
support/scripts/check-bin-arch Shellcheck
-support/scripts/check-host-rpath Shellcheck
support/scripts/expunge-gconv-modules Shellcheck
support/scripts/fix-configure-powerpc64.sh lib_shellscript.EmptyLastLine
support/scripts/generate-gitlab-ci-yml Shellcheck
diff --git a/support/scripts/check-host-rpath b/support/scripts/check-host-rpath
index 41aa0aa1ed..7b48af42ca 100755
--- a/support/scripts/check-host-rpath
+++ b/support/scripts/check-host-rpath
@@ -18,7 +18,7 @@ main() {
hostdir="$( sed -r -e 's:/+:/:g; s:/$::;' <<<"${hostdir}" )"
ret=0
- while read file; do
+ while read -r file; do
is_elf "${file}" || continue
elf_needs_rpath "${file}" "${hostdir}" || continue
check_elf_has_rpath "${file}" "${hostdir}" "${perpackagedir}" && continue
@@ -59,7 +59,7 @@ elf_needs_rpath() {
local hostdir="${2}"
local lib
- while read lib; do
+ while read -r lib; do
[ -e "${hostdir}/lib/${lib}" ] && return 0
done < <( readelf -d "${file}" 2>/dev/null \
|sed -r -e '/^.* \(NEEDED\) .*Shared library: \[(.+)\]$/!d;' \
@@ -87,7 +87,7 @@ check_elf_has_rpath() {
local perpackagedir="${3}"
local rpath dir
- while read rpath; do
+ while read -r rpath; do
for dir in ${rpath//:/ }; do
# Remove duplicate and trailing '/' for proper match
dir="$( sed -r -e 's:/+:/:g; s:/$::;' <<<"${dir}" )"
--
2.55.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2026-08-25 21:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-25 21:41 [Buildroot] [PATCH v3 0/3] Improve checking of host binaries Thomas Petazzoni via buildroot
2026-08-25 21:41 ` Thomas Petazzoni via buildroot [this message]
2026-08-25 21:42 ` [Buildroot] [PATCH v3 2/3] support/scripts/check-host-rpath: rename to check-host-bins Thomas Petazzoni via buildroot
2026-08-25 21:42 ` [Buildroot] [PATCH v3 3/3] support/scripts/check-host-bins: add new check on host binaries/libs Thomas Petazzoni via buildroot
2026-08-27 4:19 ` Matthew Weber
2026-08-27 5:33 ` Thomas Petazzoni via buildroot
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=20260825214203.3708181-2-thomas.petazzoni@bootlin.com \
--to=buildroot@buildroot.org \
--cc=arnout@mind.be \
--cc=thomas.petazzoni@bootlin.com \
--cc=yann.morin.1998@free.fr \
/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.