From ada7f88434517dac081a5303275a1fccc5af4488 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Thu, 22 Feb 2024 13:06:56 -0500 Subject: [PATCH] jjb: Use java 1.8 with SLES builds Change-Id: I087b79efbd3490f9a854625beb8c29fec082ecb5 Signed-off-by: Kienan Stewart --- scripts/lttng-tools/build.sh | 2 ++ scripts/lttng-ust/build.sh | 3 +++ 2 files changed, 5 insertions(+) diff --git a/scripts/lttng-tools/build.sh b/scripts/lttng-tools/build.sh index c4b4fdb..6c9f03b 100755 --- a/scripts/lttng-tools/build.sh +++ b/scripts/lttng-tools/build.sh @@ -327,6 +327,8 @@ agents) fi export CLASSPATH="$DEPS_JAVA/lttng-ust-agent-all.jar:/usr/share/java/log4j-api.jar:/usr/share/java/log4j-core.jar:/usr/share/java/log4j-1.2.jar" if [[ -f /etc/products.d/SLES.prod ]] ; then + export JAVA_HOME="/usr/${LIBDIR_ARCH}/jvm/java-1.8.0-openjdk-1.8.0" + export PATH="/usr/${LIBDIR_ARCH}/jvm/java-1.8.0-openjdk-1.8.0/bin:/usr/${LIBDIR_ARCH}/jvm/jre-1.8.0-openjdk/bin:${PATH}" SLES_VERSION="$(grep -E '' /etc/products.d/SLES.prod | grep -E -o '[0-9]+\.[0-9]+')" if vergte "${SLES_VERSION}" "15.5" ; then export CLASSPATH="${DEPS_JAVA}/lttng-ust-agent-all.jar:/usr/share/java/log4j/log4j-api.jar:/usr/share/java/log4j/log4j-core.jar:/usr/share/java/log4j12/log4j-12.jar" diff --git a/scripts/lttng-ust/build.sh b/scripts/lttng-ust/build.sh index 8d83d29..68fd2da 100755 --- a/scripts/lttng-ust/build.sh +++ b/scripts/lttng-ust/build.sh @@ -200,6 +200,9 @@ freebsd*) esac if [[ -f /etc/products.d/SLES.prod ]] ; then + export JAVA_HOME="/usr/${LIBDIR_ARCH}/jvm/java-1.8.0-openjdk-1.8.0" + export PATH="/usr/${LIBDIR_ARCH}/jvm/java-1.8.0-openjdk-1.8.0/bin:/usr/${LIBDIR_ARCH}/jvm/jre-1.8.0-openjdk/bin:${PATH}" + # Used by automake SLES_VERSION="$(grep -E '' /etc/products.d/SLES.prod | grep -E -o '[0-9]+\.[0-9]+')" if vergte "${SLES_VERSION}" "15.5" ; then export CLASSPATH='/usr/share/java/log4j/log4j-api.jar:/usr/share/java/log4j/log4j-core.jar:/usr/share/java/log4j12/log4j-12.jar' -- 2.34.1