From: Kienan Stewart Date: Mon, 26 Feb 2024 14:04:17 +0000 (-0500) Subject: jjb: Use alternative log4j classpath on sles 15.4+ X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=247873aa5832b9bab44ea94c068f295f5e1a0d72;p=lttng-ci.git 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 --- 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