You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by mc...@apache.org on 2021/03/02 17:11:40 UTC

[cassandra-builds] branch trunk updated: Fix selections of JDKs in debian docker images on arm64

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

mck pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-builds.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 29dccda  Fix selections of JDKs in debian docker images on arm64
29dccda is described below

commit 29dccda73cec1c80ffa838a3109c8bef68f162ee
Author: Mick Semb Wever <mc...@apache.org>
AuthorDate: Sat Feb 6 10:26:50 2021 +0100

    Fix selections of JDKs in debian docker images on arm64
    
     patch by Mick Semb Wever; reviewed by Zhao Renhai,Brandon Williams for CASSANDRA-16428
---
 docker/buster-image.docker           |  2 +-
 docker/jessie-image.docker           |  2 +-
 docker/testing/ubuntu1910_j11.docker | 11 ++++-------
 docker/testing/ubuntu2004_j11.docker | 11 ++++-------
 4 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/docker/buster-image.docker b/docker/buster-image.docker
index 04fbc13..b0a384f 100644
--- a/docker/buster-image.docker
+++ b/docker/buster-image.docker
@@ -24,7 +24,7 @@ RUN echo 'deb http://ftp.debian.org/debian stretch main' >> /etc/apt/sources.lis
     && apt-get install -y --no-install-recommends openjdk-8-jdk openjdk-11-jdk \
     && sed -i '$d' /etc/apt/sources.list \
     && apt-get update \
-    && update-java-alternatives --set java-1.8.0-openjdk-amd64
+    && update-java-alternatives --set java-1.8.0-openjdk-$(dpkg --print-architecture)
 
 # create and change to build user
 RUN adduser --disabled-login --gecos build build && gpasswd -a build sudo
diff --git a/docker/jessie-image.docker b/docker/jessie-image.docker
index 1f92425..22c8a16 100644
--- a/docker/jessie-image.docker
+++ b/docker/jessie-image.docker
@@ -25,7 +25,7 @@ RUN apt-get -y -t jessie-backports install \
    python-sphinx \
    python-sphinx-rtd-theme
 
-RUN update-java-alternatives --set java-1.8.0-openjdk-amd64
+RUN update-java-alternatives --set java-1.8.0-openjdk-$(dpkg --print-architecture)
 
 # create and change to build user
 RUN adduser --disabled-login --gecos build build && gpasswd -a build sudo
diff --git a/docker/testing/ubuntu1910_j11.docker b/docker/testing/ubuntu1910_j11.docker
index 7c28c14..8226d9f 100644
--- a/docker/testing/ubuntu1910_j11.docker
+++ b/docker/testing/ubuntu1910_j11.docker
@@ -69,7 +69,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
     apt-get install -y --no-install-recommends openjdk-8-jdk openjdk-11-jdk ant ant-optional
 
 # make Java 8 the default executable (we use to run all tests against Java 8)
-RUN update-java-alternatives -s java-1.8.0-openjdk-amd64
+RUN update-java-alternatives --set java-1.8.0-openjdk-$(dpkg --print-architecture)
 
 # setup our user -- if we don't do this docker will default to root and Cassandra will fail to start
 # as we appear to have a check that the user isn't starting Cassandra as root
@@ -89,14 +89,11 @@ WORKDIR /home/cassandra
 
 # Add environment variables for Ant and Java and add them to the PATH
 RUN echo 'export ANT_HOME=/usr/share/ant' >> /home/cassandra/.bashrc && \
-    echo 'export JAVA8_HOME=/usr/lib/jvm/java-8-openjdk-amd64' >> /home/cassandra/.bashrc && \
-    echo 'export JAVA11_HOME=/usr/lib/jvm/java-11-openjdk-amd64' >> /home/cassandra/.bashrc && \
+    echo 'export JAVA8_HOME=/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)' >> /home/cassandra/.bashrc && \
+    echo 'export JAVA11_HOME=/usr/lib/jvm/java-11-openjdk-$(dpkg --print-architecture)' >> /home/cassandra/.bashrc && \
     echo 'export JAVA_HOME=$JAVA8_HOME' >> /home/cassandra/.bashrc
 
-ENV ANT_HOME=/usr/share/ant \
-    JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 \
-    JAVA8_HOME=/usr/lib/jvm/java-8-openjdk-amd64 \
-    JAVA11_HOME=/usr/lib/jvm/java-11-openjdk-amd64
+ENV ANT_HOME=/usr/share/ant
 
 # run pip commands and setup virtualenv (note we do this after we switch to cassandra user so we
 # setup the virtualenv for the cassandra user and not the root user by accident) for Python 3.6/3.7/3.8
diff --git a/docker/testing/ubuntu2004_j11.docker b/docker/testing/ubuntu2004_j11.docker
index fc4a6ed..3672cbf 100644
--- a/docker/testing/ubuntu2004_j11.docker
+++ b/docker/testing/ubuntu2004_j11.docker
@@ -67,7 +67,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
     apt-get install -y --no-install-recommends openjdk-8-jdk openjdk-11-jdk ant ant-optional
 
 # make Java 8 the default executable (we use to run all tests against Java 8)
-RUN update-java-alternatives -s java-1.8.0-openjdk-amd64
+RUN update-java-alternatives --set java-1.8.0-openjdk-$(dpkg --print-architecture)
 
 # setup our user -- if we don't do this docker will default to root and Cassandra will fail to start
 # as we appear to have a check that the user isn't starting Cassandra as root
@@ -87,14 +87,11 @@ WORKDIR /home/cassandra
 
 # Add environment variables for Ant and Java and add them to the PATH
 RUN echo 'export ANT_HOME=/usr/share/ant' >> /home/cassandra/.bashrc && \
-    echo 'export JAVA8_HOME=/usr/lib/jvm/java-8-openjdk-amd64' >> /home/cassandra/.bashrc && \
-    echo 'export JAVA11_HOME=/usr/lib/jvm/java-11-openjdk-amd64' >> /home/cassandra/.bashrc && \
+    echo 'export JAVA8_HOME=/usr/lib/jvm/java-8-openjdk-$(dpkg --print-architecture)' >> /home/cassandra/.bashrc && \
+    echo 'export JAVA11_HOME=/usr/lib/jvm/java-11-openjdk-$(dpkg --print-architecture)' >> /home/cassandra/.bashrc && \
     echo 'export JAVA_HOME=$JAVA8_HOME' >> /home/cassandra/.bashrc
 
-ENV ANT_HOME=/usr/share/ant \
-    JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 \
-    JAVA8_HOME=/usr/lib/jvm/java-8-openjdk-amd64 \
-    JAVA11_HOME=/usr/lib/jvm/java-11-openjdk-amd64
+ENV ANT_HOME=/usr/share/ant
 
 # run pip commands and setup virtualenv (note we do this after we switch to cassandra user so we
 # setup the virtualenv for the cassandra user and not the root user by accident) for Python 3.6/3.7/3.8


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org