From 247873aa5832b9bab44ea94c068f295f5e1a0d72 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Mon, 26 Feb 2024 09:04:17 -0500 Subject: [PATCH] jjb: Use alternative log4j classpath on sles 15.4+ A fresh installation of SLES15SP4 doesn't have the symbolic links that exist on ci-node-sles15sp4, eg. `/usr/share/java/log4j-1.2.jar` -> `/usr/share/java/log4j12/log4j-12.jar`. I suspect that the symlinks were installed manually at some point to simplify the build scripts. As the complexity is already added to support SLES15SP5 from fresh installations, the proper locations for log412 can be used on SLES15SP4 as well. Change-Id: Id2747abd029a4b4978dd6f0214f5ed3ab1bb267c Signed-off-by: Kienan Stewart --- scripts/lttng-tools/build.sh | 2 +- scripts/lttng-ust/build.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/lttng-tools/build.sh b/scripts/lttng-tools/build.sh index 6c9f03b..9c1a539 100755 --- a/scripts/lttng-tools/build.sh +++ b/scripts/lttng-tools/build.sh @@ -330,7 +330,7 @@ agents) 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 + if vergte "${SLES_VERSION}" "15.4" ; 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 diff --git a/scripts/lttng-ust/build.sh b/scripts/lttng-ust/build.sh index 68fd2da..842206c 100755 --- a/scripts/lttng-ust/build.sh +++ b/scripts/lttng-ust/build.sh @@ -204,7 +204,7 @@ if [[ -f /etc/products.d/SLES.prod ]] ; then 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 + if vergte "${SLES_VERSION}" "15.4" ; 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 -- 2.34.1