jjb: Update java CLASSPATH for sles15sp5
authorKienan Stewart <kstewart@efficios.com>
Tue, 20 Feb 2024 18:56:47 +0000 (13:56 -0500)
committerKienan Stewart <kstewart@efficios.com>
Wed, 21 Feb 2024 12:50:53 +0000 (07:50 -0500)
Change-Id: Ic1a34fc505d1a47c1fe3021ac2b834aa68af0581
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
scripts/lttng-tools/build.sh
scripts/lttng-ust/build.sh

index 387832f4ba7fc152bf4248b0eeca03fb3e860570..c4b4fdb084fc91bcc1a20862de9cec3f2f8048e7 100755 (executable)
@@ -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 '</version>' /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")
 
index 7c7bb35425bede8e26846bec3fe8d3aebec2f566..8d83d29905436ec2a621e354d0b9362997de617e 100755 (executable)
@@ -199,6 +199,13 @@ freebsd*)
     ;;
 esac
 
+if [[ -f /etc/products.d/SLES.prod ]] ; then
+    SLES_VERSION="$(grep -E '</version>' /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
This page took 0.024594 seconds and 4 git commands to generate.