Skip to content

Commit

Permalink
Anchor runpath at $ORIGIN
Browse files Browse the repository at this point in the history
  • Loading branch information
vicr123 committed Apr 13, 2024
1 parent ba206ca commit 2559c8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/linux-appimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ jobs:
do
# Check if elf is an executable
if file "${elf}" | grep -q ELF; then
path_to_lib=$(realpath --relative-to="$(dirname "${elf}")" ./appdir/usr/lib)
echo "Setting RUNPATH of ${elf} to ${path_to_lib}"
patchelf --set-rpath "${path_to_lib}" "${elf}"
rpath="\$ORIGIN/$(realpath --relative-to="$(dirname "${elf}")" ./appdir/usr/lib)"
echo "Setting RUNPATH of ${elf} to ${rpath}"
patchelf --set-rpath "${rpath}" "${elf}"
fi
done
Expand Down

0 comments on commit 2559c8b

Please sign in to comment.