You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2024/08/18 17:46:18 UTC
(couchdb-ci) branch main updated: Install packaged java 21 for rpm distoros
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb-ci.git
The following commit(s) were added to refs/heads/main by this push:
new 50564be Install packaged java 21 for rpm distoros
50564be is described below
commit 50564bea320a696a0a4385cb7b47e243d594a693
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Sun Aug 18 02:42:35 2024 -0400
Install packaged java 21 for rpm distoros
All supported rpm distros seems to have it.
Since something else seems to bring in java 8 rpm we uninstall it at
the end leaving just the 21 as the default and the java 8 jre
installed from docker (for clouseau).
---
bin/yum-dependencies.sh | 6 +++++-
dockerfiles/almalinux-8 | 5 +----
dockerfiles/almalinux-9 | 5 +----
3 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/bin/yum-dependencies.sh b/bin/yum-dependencies.sh
index c6e0913..00bb4c8 100755
--- a/bin/yum-dependencies.sh
+++ b/bin/yum-dependencies.sh
@@ -112,7 +112,7 @@ yum groupinstall -y 'Development Tools'
# help2man is for docs
yum install -y sudo git wget which autoconf autoconf-archive automake curl-devel libicu-devel \
libtool ncurses-devel nspr-devel zip readline-devel unzip perl \
- createrepo xfsprogs-devel rpmdevtools
+ createrepo xfsprogs-devel java-21-openjdk-devel rpmdevtools
if [[ ${VERSION_ID} -eq 9 ]]; then
dnf --enablerepo=crb install -y help2man
else
@@ -181,5 +181,9 @@ else
yum install -y libffi-devel
fi
+# remove openjdk8 and jna, java 21 is installed and should be the default
+# and clouseau installs it's own JRE 8 in /opt via a docker layer
+yum remove -y java-1.8.0-openjdk-headless jna
+
# clean up
yum clean all -y
diff --git a/dockerfiles/almalinux-8 b/dockerfiles/almalinux-8
index 0fe6a5b..e4007ad 100644
--- a/dockerfiles/almalinux-8
+++ b/dockerfiles/almalinux-8
@@ -19,10 +19,7 @@
FROM almalinux:8
-# Install Java
-ENV JAVA_HOME=/opt/java/openjdk
-COPY --from=eclipse-temurin:11 $JAVA_HOME $JAVA_HOME
-ENV PATH="${JAVA_HOME}/bin:${PATH}"
+# Java 21 installed via RPM: java-21-openjdk-devel
# These are needed for the Clouseau integration
ENV CLOUSEAU_JAVA_HOME=/opt/java/openjdk8
diff --git a/dockerfiles/almalinux-9 b/dockerfiles/almalinux-9
index 838d99f..79ced59 100644
--- a/dockerfiles/almalinux-9
+++ b/dockerfiles/almalinux-9
@@ -19,10 +19,7 @@
FROM almalinux:9
-# Install Java
-ENV JAVA_HOME=/opt/java/openjdk
-COPY --from=eclipse-temurin:11 $JAVA_HOME $JAVA_HOME
-ENV PATH="${JAVA_HOME}/bin:${PATH}"
+# Java 21 installed via RPM: java-21-openjdk-devel
# These are needed for the Clouseau integration
ENV CLOUSEAU_JAVA_HOME=/opt/java/openjdk8