From dc56017a15d8f136d3577ab87dfed365f6588d65 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Tue, 20 Feb 2024 13:56:47 -0500 Subject: [PATCH] jjb: Update java CLASSPATH for sles15sp5 Change-Id: Ic1a34fc505d1a47c1fe3021ac2b834aa68af0581 Signed-off-by: Kienan Stewart --- scripts/lttng-tools/build.sh | 7 +++++++ scripts/lttng-ust/build.sh | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/scripts/lttng-tools/build.sh b/scripts/lttng-tools/build.sh index 387832f..c4b4fdb 100755 --- a/scripts/lttng-tools/build.sh +++ b/scripts/lttng-tools/build.sh @@ -326,6 +326,13 @@ agents) export JAVA_HOME="/usr/lib/jvm/default-java" 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 + 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" + fi + fi + CONF_OPTS+=("--enable-python-bindings" "--enable-test-java-agent-all") diff --git a/scripts/lttng-ust/build.sh b/scripts/lttng-ust/build.sh index 7c7bb35..8d83d29 100755 --- a/scripts/lttng-ust/build.sh +++ b/scripts/lttng-ust/build.sh @@ -199,6 +199,13 @@ freebsd*) ;; esac +if [[ -f /etc/products.d/SLES.prod ]] ; then + 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' + fi +fi + # Print build env details print_header "Build environment details" print_hardware || true -- 2.34.1