You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2022/06/22 14:21:13 UTC

[commons-crypto] branch sebb-docker updated: Ensure the correct openssl config file is present

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch sebb-docker
in repository https://gitbox.apache.org/repos/asf/commons-crypto.git


The following commit(s) were added to refs/heads/sebb-docker by this push:
     new 514b857  Ensure the correct openssl config file is present
514b857 is described below

commit 514b857ecd9d59cc6c336cd3e57045ed3e6c8260
Author: Sebb <se...@apache.org>
AuthorDate: Wed Jun 22 15:21:02 2022 +0100

    Ensure the correct openssl config file is present
---
 src/docker/Dockerfile       |  4 +---
 src/docker/build.sh         | 20 ++++++++++++++------
 src/docker/build_linux32.sh |  3 +++
 3 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/src/docker/Dockerfile b/src/docker/Dockerfile
index 4a3cc35..60b190e 100644
--- a/src/docker/Dockerfile
+++ b/src/docker/Dockerfile
@@ -36,9 +36,7 @@ RUN apt-get update && apt-get --assume-yes install software-properties-common \
       && apt-get --assume-yes install mingw-w64 \
       && apt-get --assume-yes install wget \
 # Bug workaround see https://github.com/docker-library/openjdk/issues/19.
-      && /var/lib/dpkg/info/ca-certificates-java.postinst configure \
-# Copy the opensslconf.h file to the base openssl include directory.
-      && cp /usr/include/x86_64-linux-gnu/openssl/opensslconf.h /usr/include/openssl
+      && /var/lib/dpkg/info/ca-certificates-java.postinst configure
 
 # Install 32-bit dependencies and tooling.
 RUN dpkg --add-architecture i386 && apt-get update \
diff --git a/src/docker/build.sh b/src/docker/build.sh
index 992db61..bd863f2 100755
--- a/src/docker/build.sh
+++ b/src/docker/build.sh
@@ -21,15 +21,23 @@ set -e
 
 cd /home/crypto # must agree with virtual mount in docker-compose.yaml
 
+# Ensure the correct config file is installed
+cp /usr/include/x86_64-linux-gnu/openssl/opensslconf.h /usr/include/openssl
+
 # Run the 64-bit builds.
 mvn package
-mvn -DskipTests package -P linux-aarch64
-mvn -DskipTests package -P win64
-mvn -DskipTests package -P linux64
+
+# use process-classes rather than package to speed up builds
+mvn -DskipTests -Drat.skip process-classes -P linux-aarch64
+mvn -DskipTests -Drat.skip process-classes -P win64
+mvn -DskipTests -Drat.skip process-classes -P linux64
+
+# Ensure the correct config file is installed
+cp /usr/include/i386-linux-gnu/openssl/opensslconf.h /usr/include/openssl
 
 # Run the 32-bit builds.
-mvn -DskipTests package -P linux-armhf
-mvn -DskipTests package -P linux-arm
-mvn -DskipTests package -P win32
+mvn -DskipTests -Drat.skip process-classes -P linux-armhf
+mvn -DskipTests -Drat.skip process-classes -P linux-arm
+mvn -DskipTests -Drat.skip process-classes -P win32
 
 # see separate script for optional linux32 build
diff --git a/src/docker/build_linux32.sh b/src/docker/build_linux32.sh
index 5ccf4c7..e7f6e73 100755
--- a/src/docker/build_linux32.sh
+++ b/src/docker/build_linux32.sh
@@ -23,6 +23,9 @@ set -e
 
 cd /home/crypto # must agree with virtual mount in docker-compose.yaml
 
+# Ensure the correct config file is installed
+cp /usr/include/i386-linux-gnu/openssl/opensslconf.h /usr/include/openssl
+
 # Needed for linux32, but causes linux 64 builds to fail
 apt-get --assume-yes install g++-multilib
 mvn -DskipTests package -P linux32
\ No newline at end of file