From 716c411e2b62e4bb540dce61ae379ab705bcc991 Mon Sep 17 00:00:00 2001 From: Jonathan Dowland Date: Wed, 11 Dec 2024 14:31:42 +0000 Subject: [PATCH] [OPENJDK-2805] Symlink /usr/libexec/s2i The default path within images for S2I scripts is /usr/libexec/s2i. Some tools, in some circumstances, will try to execute scripts in that path. Create a symlink so they work. For RHEL10, we'll move the scripts to that location. https://issues.redhat.com/browse/OPENJDK-2805 Signed-off-by: Jonathan Dowland --- modules/run/tests/features/java.runtime.feature | 5 ++++- modules/s2i/core/configure.sh | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/run/tests/features/java.runtime.feature b/modules/run/tests/features/java.runtime.feature index 38651899..f1225c4a 100644 --- a/modules/run/tests/features/java.runtime.feature +++ b/modules/run/tests/features/java.runtime.feature @@ -1,7 +1,7 @@ @ubi9/openjdk-11 @ubi9/openjdk-17 @ubi9/openjdk-21 -Feature: Openshift OpenJDK Runtime tests (OPENJDK-474) +Feature: Openshift OpenJDK Runtime tests (OPENJDK-474, OPENJDK-2805) Scenario: Ensure JAVA_ARGS is passed through, diagnostic options work correctly, JVM_ARGS not present in run script, OPENJDK-474 JAVA_ARGS not repeated Given s2i build https://github.com/rh-openjdk/openjdk-container-test-applications.git from undertow-servlet @@ -10,5 +10,8 @@ Feature: Openshift OpenJDK Runtime tests (OPENJDK-474) | JAVA_DIAGNOSTICS | true | Then container log should contain /deployments/undertow-servlet.jar unique And container log should contain -XX:NativeMemoryTracking=summary + And file /usr/local/s2i/run should exist And file /usr/local/s2i/run should not contain JVM_ARGS + And file /usr/libexec/s2i/run should exist + And file /usr/libexec/s2i/run should not contain JVM_ARGS And container log should not contain unique unique diff --git a/modules/s2i/core/configure.sh b/modules/s2i/core/configure.sh index b924639e..032068e6 100755 --- a/modules/s2i/core/configure.sh +++ b/modules/s2i/core/configure.sh @@ -17,6 +17,9 @@ mkdir -p /usr/local/s2i \ && chmod 775 /usr/local/s2i \ && chown -R $USER:root /usr/local/s2i +# OPENJDK-2805 +ln -s /usr/local/s2i /usr/libexec/s2i + mkdir -p /deployments \ && chmod -R "ug+rwX" /deployments \ && chown -R $USER:root /deployments