Skip to content

Commit

Permalink
scripts: rstrip.sh: allow rpath with sole $ORIGIN token
Browse files Browse the repository at this point in the history
2efe776 introduces rpath checks with the commit message:

> Remove all rpath entries which do not point to a location below /lib or
> /usr/lib and which do not begin with '$ORIGIN'.

However the implementation failed to support rpath entries with only the
'$ORIGIN' token and no trailing slash, so allow these as well.

Signed-off-by: Yorkie Liu <yazhong.liu@rokid.com>
[reword commit message]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
  • Loading branch information
rokidbot authored and jow- committed Dec 19, 2018
1 parent 386803a commit 8b2efc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/rstrip.sh
Expand Up @@ -34,7 +34,7 @@ find $TARGETS -type f -a -exec file {} \; | \
old_rpath="$($PATCHELF --print-rpath $F)"; new_rpath=""
for path in $old_rpath; do
case "$path" in
/lib/[^/]*|/usr/lib/[^/]*|\$ORIGIN/*) new_rpath="${new_rpath:+$new_rpath:}$path" ;;
/lib/[^/]*|/usr/lib/[^/]*|\$ORIGIN/*|\$ORIGIN) new_rpath="${new_rpath:+$new_rpath:}$path" ;;
*) echo "$SELF: $F: removing rpath $path" ;;
esac
done
Expand Down

0 comments on commit 8b2efc8

Please sign in to comment.