From b784a4d23cd09b3bf9ef73194ca54fbf625b68d2 Mon Sep 17 00:00:00 2001 From: Mehmet Yilmaz Date: Wed, 23 Jul 2025 17:24:37 +0300 Subject: [PATCH 1/4] Add symbolic link for libpq and update ld.so cache --- circleci/images/exttester/Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/circleci/images/exttester/Dockerfile b/circleci/images/exttester/Dockerfile index 7b00a44..91618a3 100644 --- a/circleci/images/exttester/Dockerfile +++ b/circleci/images/exttester/Dockerfile @@ -186,4 +186,11 @@ RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgres # copy the collected files from the collection container at once into the final container COPY --from=dev-tools-collection /collect/ / +ARG PG_MAJOR +RUN set -eux; \ + ln -sf /usr/lib/x86_64-linux-gnu/libpq.so.5 \ + /usr/lib/postgresql/${PG_MAJOR}/lib/libpq.so.5; \ + echo "/usr/lib/x86_64-linux-gnu" > /etc/ld.so.conf.d/libpq.conf; \ + ldconfig + WORKDIR /home/circleci From fd93fbbd691606b17a863975d164019a2e3cb008 Mon Sep 17 00:00:00 2001 From: Mehmet Yilmaz Date: Wed, 23 Jul 2025 18:43:09 +0300 Subject: [PATCH 2/4] Fix broken system symlinks for libpq in Dockerfile --- circleci/images/exttester/Dockerfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/circleci/images/exttester/Dockerfile b/circleci/images/exttester/Dockerfile index 91618a3..576a02b 100644 --- a/circleci/images/exttester/Dockerfile +++ b/circleci/images/exttester/Dockerfile @@ -187,9 +187,14 @@ RUN mkdir -p /var/run/postgresql && chown -R postgres:postgres /var/run/postgres COPY --from=dev-tools-collection /collect/ / ARG PG_MAJOR +# fix broken system symlinks for libpq RUN set -eux; \ - ln -sf /usr/lib/x86_64-linux-gnu/libpq.so.5 \ - /usr/lib/postgresql/${PG_MAJOR}/lib/libpq.so.5; \ + cd /usr/lib/x86_64-linux-gnu; \ + # pick the one real libpq.so.5.* file: + tgt=$(ls -1 libpq.so.5.* 2>/dev/null | head -n1) || exit 1; \ + ln -sf "${tgt}" libpq.so.5; \ + ln -sf "${tgt}" libpq.so; \ + # teach ld.so about it echo "/usr/lib/x86_64-linux-gnu" > /etc/ld.so.conf.d/libpq.conf; \ ldconfig From fa05720220a6200c8c42d3f30665f6186419462b Mon Sep 17 00:00:00 2001 From: Mehmet Yilmaz Date: Thu, 24 Jul 2025 14:56:40 +0300 Subject: [PATCH 3/4] Add shared library files to Dockerfile for isolation testing --- circleci/images/exttester/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/circleci/images/exttester/Dockerfile b/circleci/images/exttester/Dockerfile index 576a02b..70939fe 100644 --- a/circleci/images/exttester/Dockerfile +++ b/circleci/images/exttester/Dockerfile @@ -74,6 +74,10 @@ ARG PG_VERSION ARG PG_VERSION_CLEAN ARG PG_MAJOR +COPY --from=dev-tools-builder \ + /build/postgresql-${PG_VERSION_CLEAN}/build/lib/*.so \ + /build/postgresql-${PG_VERSION_CLEAN}/build/lib/ + COPY --from=dev-tools-builder \ /build/postgresql-${PG_VERSION_CLEAN}/build/src/test/isolation/pg_isolation_regress \ /build/postgresql-${PG_VERSION_CLEAN}/build/src/test/isolation/isolationtester \ From b2b54e7028825eb185be9dd753594f8f966287d8 Mon Sep 17 00:00:00 2001 From: Mehmet Yilmaz Date: Fri, 25 Jul 2025 12:21:52 +0300 Subject: [PATCH 4/4] Fix paths for shared libraries in Dockerfile to use PG_MAJOR variable --- circleci/images/exttester/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/circleci/images/exttester/Dockerfile b/circleci/images/exttester/Dockerfile index 70939fe..a65ab61 100644 --- a/circleci/images/exttester/Dockerfile +++ b/circleci/images/exttester/Dockerfile @@ -75,8 +75,8 @@ ARG PG_VERSION_CLEAN ARG PG_MAJOR COPY --from=dev-tools-builder \ - /build/postgresql-${PG_VERSION_CLEAN}/build/lib/*.so \ - /build/postgresql-${PG_VERSION_CLEAN}/build/lib/ + /build/postgresql-${PG_MAJOR}/build/lib/*.so \ + /build/postgresql-${PG_MAJOR}/build/lib/ COPY --from=dev-tools-builder \ /build/postgresql-${PG_VERSION_CLEAN}/build/src/test/isolation/pg_isolation_regress \