Skip to content

Conversation

jmtd
Copy link
Member

@jmtd jmtd commented Jul 31, 2025

https://issues.redhat.com/browse/OPENJDK-4008

The changes in OPENJDK-3655 (#583) had the unintended side-effect of OSBS builds using the Brew lookaside cache to handle artifacts. We first noticed that this didn't preserve permissions properly (missing +x on scripts) which I initially worked around with some explicit chmod, but I've now also learned that, since this generates a /sources file, this also breaks the generation of source containers.

Revert the move to artifacts: entirely. Retain the tests we added to check file permissions, and add some further changes (mostly deletions) to ensure the installed files have sensible permissions: +x for all where needed, and not where not; and all ownership is root:root.

@jmtd jmtd added the ubi9 RHEL UBI 9 label Jul 31, 2025
@jmtd jmtd requested review from jerboaa and removed request for jerboaa July 31, 2025 13:36
@jmtd jmtd force-pushed the OPENJDK-4008-revert-artifacts branch 2 times, most recently from 29847f3 to 064362d Compare August 1, 2025 10:51
Adjust the permissions of installed files such that files that
should be executable have o+x.

Remove unnecessary chowns and chmods that set g+w etc on files
that should not be modified by running applications anyway.

The results should be:

    $ podman run --rm -ti ubi9/openjdk-21:latest find /opt/jboss /usr/local/s2i -type f -printf "%M %u:%g %h/%f\n"
    -rw-r--r-- root:root /opt/jboss/container/openjdk/jdk/jvm-options
    -rw-r--r-- root:root /opt/jboss/container/s2i/core/s2i-core
    -rw-r--r-- root:root /opt/jboss/container/maven/default/maven.sh
    -rw-r--r-- root:root /opt/jboss/container/maven/default/jboss-settings.xml
    -rw-r--r-- root:root /opt/jboss/container/maven/s2i/maven-overrides
    -rw-r--r-- root:root /opt/jboss/container/maven/s2i/maven-s2i
    -rw-r--r-- root:root /opt/jboss/container/java/proxy/proxy-options
    -rw-r--r-- root:root /opt/jboss/container/java/proxy/parse-proxy-url.sh
    -rw-r--r-- root:root /opt/jboss/container/java/proxy/translate-no-proxy.sh
    -rwxr-xr-x root:root /opt/jboss/container/java/run/run-java.sh
    -rwxr-xr-x root:root /opt/jboss/container/java/jvm/debug-options
    -rwxr-xr-x root:root /opt/jboss/container/java/jvm/java-default-options
    -rw-r--r-- root:root /opt/jboss/container/java/s2i/maven-overrides
    -rw-r--r-- root:root /opt/jboss/container/java/s2i/maven-s2i-overrides
    -rw-r--r-- root:root /opt/jboss/container/java/s2i/s2i-core-hooks
    -rw-r--r-- root:root /opt/jboss/container/util/logging/logging.sh
    -rwxr-xr-x root:root /usr/local/s2i/run
    -rwxr-xr-x root:root /usr/local/s2i/save-artifacts
    -rwxr-xr-x root:root /usr/local/s2i/assemble
    -rwxr-xr-x root:root /usr/local/s2i/usage

Signed-off-by: Jonathan Dowland <[email protected]>
@jmtd jmtd force-pushed the OPENJDK-4008-revert-artifacts branch from 064362d to 36cbe4a Compare August 4, 2025 08:33
@jmtd
Copy link
Member Author

jmtd commented Aug 4, 2025

Tests are good. The failign (error) test for the s2i images is due to the changes made to openjdk-container-test-applications for #593

@jmtd jmtd requested a review from jerboaa August 4, 2025 12:15
Copy link
Contributor

@jerboaa jerboaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to revert the code changes from #583 without reverting the test. OK.

@jmtd jmtd merged commit 50cd494 into rh-openjdk:ubi9 Aug 4, 2025
2 of 4 checks passed
@jmtd jmtd deleted the OPENJDK-4008-revert-artifacts branch August 4, 2025 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ubi9 RHEL UBI 9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants