Skip to content

Commit 3992197

Browse files
authored
Merge pull request #655 from infosiftr/rpath-fixes
Ensure that custom openssl is where rpath is configured on all arches
2 parents a3aac33 + 87380c1 commit 3992197

File tree

10 files changed

+35
-35
lines changed

10 files changed

+35
-35
lines changed

3.10/alpine/Dockerfile

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.10/ubuntu/Dockerfile

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.11/alpine/Dockerfile

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.11/ubuntu/Dockerfile

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.12/alpine/Dockerfile

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.12/ubuntu/Dockerfile

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.9/alpine/Dockerfile

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.9/ubuntu/Dockerfile

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile-alpine.template

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,9 @@ RUN set -eux; \
101101
./config \
102102
enable-fips \
103103
--openssldir="$OPENSSL_CONFIG_DIR" \
104-
# add -rpath to avoid conflicts between our OpenSSL's "libssl.so" and the libssl package by making sure /usr/local/lib64 is searched first (but only for Erlang/OpenSSL to avoid issues with other tools using libssl; https://github.com/docker-library/rabbitmq/issues/364)
105-
-Wl,-rpath=/usr/local/lib64 \
104+
--libdir=/usr/local/lib \
105+
# add -rpath to avoid conflicts between our OpenSSL's "libssl.so" and the libssl package by making sure /usr/local/lib is searched first (but only for Erlang/OpenSSL to avoid issues with other tools using libssl; https://github.com/docker-library/rabbitmq/issues/364)
106+
-Wl,-rpath=/usr/local/lib \
106107
; \
107108
# Compile, install OpenSSL, verify that the command-line works & development headers are present
108109
make -j "$(getconf _NPROCESSORS_ONLN)"; \
@@ -135,8 +136,8 @@ RUN set -eux; \
135136
cd "$OTP_PATH"; \
136137
export ERL_TOP="$OTP_PATH"; \
137138
export CFLAGS='-g -O2'; \
138-
# add -rpath to avoid conflicts between our OpenSSL's "libssl.so" and the libssl package by making sure /usr/local/lib64 is searched first (but only for Erlang/OpenSSL to avoid issues with other tools using libssl; https://github.com/docker-library/rabbitmq/issues/364)
139-
export CFLAGS="$CFLAGS -Wl,-rpath=/usr/local/lib64"; \
139+
# add -rpath to avoid conflicts between our OpenSSL's "libssl.so" and the libssl package by making sure /usr/local/lib is searched first (but only for Erlang/OpenSSL to avoid issues with other tools using libssl; https://github.com/docker-library/rabbitmq/issues/364)
140+
export CFLAGS="$CFLAGS -Wl,-rpath=/usr/local/lib"; \
140141
hostArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)"; \
141142
buildArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
142143
dpkgArch="$(dpkg --print-architecture)"; dpkgArch="${dpkgArch##*-}"; \
@@ -196,7 +197,6 @@ FROM alpine:{{ .alpine.version }}
196197
COPY --from=erlang-builder /usr/local/bin/ /usr/local/bin/
197198
COPY --from=erlang-builder /usr/local/etc/ssl/ /usr/local/etc/ssl/
198199
COPY --from=erlang-builder /usr/local/lib/ /usr/local/lib/
199-
COPY --from=erlang-builder /usr/local/lib64/ /usr/local/lib64/
200200

201201
ENV RABBITMQ_DATA_DIR=/var/lib/rabbitmq
202202

@@ -209,7 +209,7 @@ RUN set -eux; \
209209
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \
210210
| tr ',' '\n' \
211211
| sort -u \
212-
| awk 'system("test -e /usr/local/lib64/" $1) == 0 { next } { print "so:" $1 }' \
212+
| awk 'system("test -e /usr/local/lib/" $1) == 0 { next } { print "so:" $1 }' \
213213
)"; \
214214
apk add --no-cache --virtual .otp-run-deps $runDeps; \
215215
\

Dockerfile-ubuntu.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ RUN set -eux; \
101101
./config \
102102
enable-fips \
103103
--openssldir="$OPENSSL_CONFIG_DIR" \
104-
--libdir="lib/$debMultiarch" \
104+
--libdir="/usr/local/lib/$debMultiarch" \
105105
# add -rpath to avoid conflicts between our OpenSSL's "libssl.so" and the libssl package by making sure /usr/local/lib/$debMultiarch is searched first (but only for Erlang/OpenSSL to avoid issues with other tools using libssl; https://github.com/docker-library/rabbitmq/issues/364)
106106
-Wl,-rpath="/usr/local/lib/$debMultiarch" \
107107
; \

0 commit comments

Comments
 (0)