From e6368e97faf11a9a4a5d470b64d4f65d915ca4f7 Mon Sep 17 00:00:00 2001 From: Robin Wohlers-Reichel Date: Thu, 27 Aug 2020 10:32:00 +1000 Subject: [PATCH] Update patchelf and remove so filtering in patch-rpath --- Dockerfile | 4 ++-- scripts/patch-rpath | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8160e27a01..f55c4ac1d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -127,9 +127,9 @@ RUN wget -O /tmp/Python-${PYTHON_VERSION}.tgz https://www.python.org/ftp/python/ # Compile patchelf statically from source RUN cd /tmp &&\ - wget https://nixos.org/releases/patchelf/patchelf-0.10/patchelf-0.10.tar.gz &&\ + wget https://nixos.org/releases/patchelf/patchelf-0.11/patchelf-0.11.tar.gz &&\ tar -xf patchelf*.tar.gz &&\ - cd patchelf-0.10 &&\ + cd patchelf-0.11* &&\ ./configure LDFLAGS="-static" &&\ make &&\ make install diff --git a/scripts/patch-rpath b/scripts/patch-rpath index 7b06c01135..585a4b790b 100755 --- a/scripts/patch-rpath +++ b/scripts/patch-rpath @@ -11,7 +11,7 @@ echo "Using final root directory of $root" cd $root -for f in $(find bin lib jre -type f -executable -or -name "*.so*" | grep -v libc.so.6 | grep -v libpthread.so.0); do +for f in $(find bin lib jre -type f -executable -or -name "*.so*"); do existing_rpath=$(patchelf --print-rpath $f 2>/dev/null || true) patchelf --set-rpath '$ORIGIN/'$(/usr/bin/realpath --relative-to $(dirname $f) ${root%/}/lib):$existing_rpath $f 2>/dev/null || true done