Skip to content

Commit

Permalink
[OPENJDK-2805] Symlink /usr/libexec/s2i
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jmtd committed Dec 11, 2024
1 parent 778f62f commit 716c411
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/run/tests/features/java.runtime.feature
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
3 changes: 3 additions & 0 deletions modules/s2i/core/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 716c411

Please sign in to comment.