You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ko...@apache.org on 2022/02/07 14:36:58 UTC

[couchdb-pkg] 02/03: Use --platform to select container arch at runtime

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

kocolosk pushed a commit to branch 3.2.1
in repository https://gitbox.apache.org/repos/asf/couchdb-pkg.git

commit ac4e680468488e48929bbdd340ea700692788419
Author: Adam Kocoloski <ko...@apache.org>
AuthorDate: Mon Feb 7 09:32:49 2022 -0500

    Use --platform to select container arch at runtime
    
    The bugs seem to have been worked out here, so we can use multi-platform
    container images like the ones we've generated for CI and still select
    the runtime architecture we want if we need to build packages via QEMU.
---
 Makefile | 1 +
 build.sh | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 8366e15..d000a56 100644
--- a/Makefile
+++ b/Makefile
@@ -91,6 +91,7 @@ debian-bullseye: SPIDERMONKEY_DEV=libmozjs-78-dev
 debian-bullseye: SM_VER=78
 debian-bullseye: bullseye
 
+arm64-debian-bullseye: aarch64-debian-bullseye
 arm64v8-debian-bullseye: aarch64-debian-bullseye
 aarch64-debian-bullseye: PLATFORM=bullseye
 aarch64-debian-bullseye: DIST=debian-bullseye
diff --git a/build.sh b/build.sh
index ac6cd37..1a4aaf4 100755
--- a/build.sh
+++ b/build.sh
@@ -32,7 +32,7 @@ DEBIANS="debian-stretch debian-buster debian-bullseye"
 UBUNTUS="ubuntu-bionic ubuntu-focal"
 CENTOSES="centos-7 centos-8"
 XPLAT_BASE="debian-bullseye"
-XPLAT_ARCHES="arm64v8 ppc64le"
+XPLAT_ARCHES="arm64 ppc64le"
 BINARY_API="https://apache.jfrog.io/artifactory"
 ERLANGVERSION=${ERLANGVERSION:-23.3.4.10}
 
@@ -88,12 +88,14 @@ build-couch() {
     docker run \
         --mount type=bind,src=${SCRIPTPATH},dst=/home/jenkins/couchdb-pkg \
         -u 0 -w /home/jenkins/couchdb-pkg \
+        --platform linux/amd64 \
         apache/couchdbci-${os}:${version}-erlang-${ERLANGVERSION} \
         make copy-couch $1 COUCHTARBALL=${COUCHTARBALL}
   else
     docker run \
         --mount type=bind,src=${SCRIPTPATH},dst=/home/jenkins/couchdb-pkg \
         -u 0 -w /home/jenkins/couchdb-pkg \
+        --platform linux/${CONTAINERARCH} \
         apache/couchdbci-${os}:${version}-erlang-${ERLANGVERSION} \
         make copy-couch ${CONTAINERARCH}-$1 COUCHTARBALL=${COUCHTARBALL}
   fi