You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2025/02/17 23:19:43 UTC

(commons-crypto) 03/03: Add an AARCH64 build script

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

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

commit d3b4f09709ac632f6936ea23cc0ff004cd354093
Author: Gary D. Gregory <ga...@gmail.com>
AuthorDate: Mon Feb 17 18:19:35 2025 -0500

    Add an AARCH64 build script
    
    Rename other build script
---
 .github/workflows/maven_crosstest.yml     | 2 +-
 build_dist.sh                             | 2 +-
 src/docker/README.md                      | 6 +++---
 src/docker/{build.sh => build-aarch64.sh} | 2 +-
 src/docker/{build.sh => build-x86_64.sh}  | 0
 src/docker/build_linux32.sh               | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/maven_crosstest.yml b/.github/workflows/maven_crosstest.yml
index 0d33fed1..c0881f6a 100644
--- a/.github/workflows/maven_crosstest.yml
+++ b/.github/workflows/maven_crosstest.yml
@@ -80,7 +80,7 @@ jobs:
           echo "IMAGE_PREFIX=$(echo ${{ env.REGISTRY }}/${{ github.repository }} | tr '[A-Z]' '[a-z]')" >>$GITHUB_ENV
       - name: Build 64 bit native code
         run: |
-          time IMAGE_PREFIX=${IMAGE_PREFIX} docker compose -f src/docker/docker-compose-gh.yaml run --quiet-pull crypto-gh src/docker/build.sh
+          time IMAGE_PREFIX=${IMAGE_PREFIX} docker compose -f src/docker/docker-compose-gh.yaml run --quiet-pull crypto-gh src/docker/build-x86_64.sh
       - name: Build 32 bit native code
         run: |
           time IMAGE_PREFIX=${IMAGE_PREFIX} docker compose -f src/docker/docker-compose-gh.yaml run --quiet-pull crypto-gh src/docker/build_linux32.sh
diff --git a/build_dist.sh b/build_dist.sh
index fe9695fe..6be60bbe 100755
--- a/build_dist.sh
+++ b/build_dist.sh
@@ -18,7 +18,7 @@ set -ex
 mvn clean
 
 # build linux 64 bit libraries
-docker compose -f src/docker/docker-compose.yaml run --quiet-pull crypto src/docker/build.sh
+docker compose -f src/docker/docker-compose.yaml run --quiet-pull crypto src/docker/build-x86_64
 
 # build linux 32 bit libraries
 docker compose -f src/docker/docker-compose.yaml run crypto src/docker/build_linux32.sh
diff --git a/src/docker/README.md b/src/docker/README.md
index 1551e472..eafe4c4a 100644
--- a/src/docker/README.md
+++ b/src/docker/README.md
@@ -21,7 +21,7 @@
 This directory contains scripts needed to build Crypto native code using a Docker image.
 
 The Docker image runs on Ubuntu and includes Maven and cross-compilation tools
-which are used to build Linux and Windows native code files (see build.sh for the list).
+which are used to build Linux and Windows native code files (see build-*.sh for the list).
 The image uses virtual mounts for the source code and Maven repository, so the output
 of the build is available on the host system and can be included in a subsequent release
 build.
@@ -44,7 +44,7 @@ target/classes/org/apache/commons/crypto/native/Mac/x86_64/libcommons-crypto.jni
   cd src/docker
   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-x86_64.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.
 ```
@@ -57,7 +57,7 @@ The steps are:
 
 - mvn clean
 - cd src/docker
-- docker compose run --entrypoint src/docker/build.sh crypto
+- docker compose run --entrypoint src/docker/build-x86_64.sh crypto
 - docker compose run --entrypoint src/docker/build_linux32.sh crypto # optional
 - cd ../..
 
diff --git a/src/docker/build.sh b/src/docker/build-aarch64.sh
similarity index 96%
copy from src/docker/build.sh
copy to src/docker/build-aarch64.sh
index a891b611..489445df 100755
--- a/src/docker/build.sh
+++ b/src/docker/build-aarch64.sh
@@ -22,7 +22,7 @@ set -ex
 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
+cp /usr/include/aarch64-linux-gnu/openssl/opensslconf.h /usr/include/openssl
 
 # Speed up builds by disabling unnecessary plugins
 # Note: spdx.skip requires version 0.7.1+
diff --git a/src/docker/build.sh b/src/docker/build-x86_64.sh
similarity index 100%
rename from src/docker/build.sh
rename to src/docker/build-x86_64.sh
diff --git a/src/docker/build_linux32.sh b/src/docker/build_linux32.sh
index cbc168b5..ed7c94e2 100755
--- a/src/docker/build_linux32.sh
+++ b/src/docker/build_linux32.sh
@@ -17,7 +17,7 @@
 
 # Script to build linux32 native file under Docker
 
-# MUST not be run before build.sh
+# MUST not be run before build-x86_64
 
 set -ex