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/19 23:17:34 UTC

[commons-crypto] branch sebb-docker updated: Add missing win and linux builds from pom profiles

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 7937428  Add missing win and linux builds from pom profiles
7937428 is described below

commit 79374289bdd227b5b668039c9336cd10d9e3bf7c
Author: Sebb <se...@apache.org>
AuthorDate: Mon Jun 20 00:17:27 2022 +0100

    Add missing win and linux builds from pom profiles
---
 src/docker/README.md                      |  2 ++
 src/docker/build.sh                       |  4 ++++
 src/docker/{build.sh => build_linux32.sh} | 15 ++++++---------
 3 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/src/docker/README.md b/src/docker/README.md
index fb00d06..be38962 100644
--- a/src/docker/README.md
+++ b/src/docker/README.md
@@ -45,4 +45,6 @@ target/classes/org/apache/commons/crypto/native/Mac/x86_64/libcommons-crypto.jni
   docker compose run crypto # run shell; can then use Maven to do builds
   OR
   docker compose run --entrypoint src/docker/build.sh crypto # run full build
+  docker compose run --entrypoint src/docker/build_linux32.sh crypto # optionally run linux32 build
+  # N.B. the linux32 build needs an additional install, but that causes linux 64 bit builds to fail.
 ```
\ No newline at end of file
diff --git a/src/docker/build.sh b/src/docker/build.sh
index 0bd8072..992db61 100755
--- a/src/docker/build.sh
+++ b/src/docker/build.sh
@@ -25,7 +25,11 @@ cd /home/crypto # must agree with virtual mount in docker-compose.yaml
 mvn package
 mvn -DskipTests package -P linux-aarch64
 mvn -DskipTests package -P win64
+mvn -DskipTests package -P linux64
 
 # Run the 32-bit builds.
 mvn -DskipTests package -P linux-armhf
 mvn -DskipTests package -P linux-arm
+mvn -DskipTests package -P win32
+
+# see separate script for optional linux32 build
diff --git a/src/docker/build.sh b/src/docker/build_linux32.sh
similarity index 77%
copy from src/docker/build.sh
copy to src/docker/build_linux32.sh
index 0bd8072..5ccf4c7 100755
--- a/src/docker/build.sh
+++ b/src/docker/build_linux32.sh
@@ -15,17 +15,14 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# Script to build native files under Docker
+# Script to build linux32 native file under Docker
+
+# MUST not be run before build.sh
 
 set -e
 
 cd /home/crypto # must agree with virtual mount in docker-compose.yaml
 
-# Run the 64-bit builds.
-mvn package
-mvn -DskipTests package -P linux-aarch64
-mvn -DskipTests package -P win64
-
-# Run the 32-bit builds.
-mvn -DskipTests package -P linux-armhf
-mvn -DskipTests package -P linux-arm
+# 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