Skip to content
Snippets Groups Projects
Commit be8964b0 authored by Simon McVittie's avatar Simon McVittie
Browse files

debian: Make symlinks in RPATH point to libraries by SONAME


This means they don't stop working when the real path to a library
happens to have changed, for example upgrading GLib 2.32.3 to 2.32.4,
which changes the real file implementing the library from
libglib-2.0.so.0.3200.3 to libglib-2.0.so.0.3200.4.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 304efd9c
No related branches found
No related tags found
1 merge request!263debian: Make symlinks in RPATH point to libraries by SONAME
Pipeline #9787 passed
...@@ -126,14 +126,27 @@ override_dh_link: ...@@ -126,14 +126,27 @@ override_dh_link:
# Make the links in $(pkglibdir) relative. This is contrary # Make the links in $(pkglibdir) relative. This is contrary
# to Debian policy, but is what we need for the LD_LIBRARY_PATH # to Debian policy, but is what we need for the LD_LIBRARY_PATH
# Steam Runtime, where GLib is in /lib. # Steam Runtime, where GLib is in /lib.
set -e; for link in $(relocatable_pkglibdir)/lib*; do \ # Also make them point to the SONAME if possible.
set -e; \
cd $(relocatable_pkglibdir); \
for link in lib*; do \
target="$$(readlink -v "$$link")"; \ target="$$(readlink -v "$$link")"; \
echo "before: $$link -> $$target"; \ echo "before: $$link -> $$target"; \
by_soname="$${target%/*}/$$link"; \
if ! [ -e "$$by_soname" ]; then \
echo "$$by_soname does not exist"; \
elif ! command test "$$target" -ef "$$by_soname"; then \
echo "$$target is not the same file as $$by_soname"; \
else \
target="$$by_soname"; \
fi; \
case "$$target" in \ case "$$target" in \
(/*) \ (/*) \
ln -fnsv "../../../..$${target}" "$${link}"; \ target="../../../..$${target}"; \
;; \ ;; \
esac; \ esac; \
echo "after: $$link -> $$target"; \
ln -fnsv "$${target}" "$${link}"; \
done done
override_dh_missing: override_dh_missing:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment