mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 06:06:32 +00:00
support/scripts: check-host-rpath now handles $ORIGIN as well
"$ORIGIN/../../usr/lib" is also a valid RPATH for binaries in "$hostdir/usr/bin". After RPATH sanitation, all RPATH directories start with "$ORIGIN". Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
363ec9686d
commit
824f3d9beb
@ -58,7 +58,7 @@ check_elf_has_rpath() {
|
|||||||
for dir in ${rpath//:/ }; do
|
for dir in ${rpath//:/ }; do
|
||||||
# Remove duplicate and trailing '/' for proper match
|
# Remove duplicate and trailing '/' for proper match
|
||||||
dir="$( sed -r -e 's:/+:/:g; s:/$::;' <<<"${dir}" )"
|
dir="$( sed -r -e 's:/+:/:g; s:/$::;' <<<"${dir}" )"
|
||||||
[ "${dir}" = "${hostdir}/usr/lib" ] && return 0
|
[ "${dir}" = "${hostdir}/usr/lib" -o "${dir}" = "\$ORIGIN/../../usr/lib" ] && return 0
|
||||||
done
|
done
|
||||||
done < <( readelf -d "${file}" \
|
done < <( readelf -d "${file}" \
|
||||||
|sed -r -e '/.* \(R(UN)?PATH\) +Library r(un)?path: \[(.+)\]$/!d' \
|
|sed -r -e '/.* \(R(UN)?PATH\) +Library r(un)?path: \[(.+)\]$/!d' \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user