Skip to content

Commit a696a60

Browse files
committed
Update old broken version of patchelf in snap image
Seems that snapcraft ships a version of patchelf which corrupts libraries when making the rpath longer
1 parent 57f1d5c commit a696a60

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Dockerfile.snap

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,17 @@ RUN snap_version="$(awk '/^version:/{print $2}' /snap/snapcraft/current/meta/sna
4040
RUN echo 'exec "$SNAP/usr/bin/python3" "$SNAP/bin/snapcraft" "$@"' >> /snap/bin/snapcraft
4141
RUN chmod +x /snap/bin/snapcraft
4242

43+
# Workaround for old buggy version of patchelf
44+
ADD https://github.com/NixOS/patchelf/releases/download/0.17.2/patchelf-0.17.2-x86_64.tar.gz /opt/patchelf/patchelf.tar.gz
45+
RUN cd /opt/patchelf && tar -xvf patchelf.tar.gz
46+
4347
# Multi-stage build, only need the snaps from the builder. Copy them one at a
4448
# time so they can be cached.
4549
FROM ubuntu:$UBUNTU
4650
COPY --from=builder /snap/core20 /snap/core20
4751
COPY --from=builder /snap/snapcraft /snap/snapcraft
4852
COPY --from=builder /snap/bin/snapcraft /snap/bin/snapcraft
53+
COPY --from=builder /opt/patchelf/bin/patchelf /snap/snapcraft/current/bin
4954

5055
# Generate locale and install dependencies.
5156
RUN apt-get update && apt-get dist-upgrade --yes && apt-get install --yes snapd sudo locales && locale-gen en_US.UTF-8 && \

0 commit comments

Comments
 (0)