[OPENJDK-3655] set more sensible permissions on scripts #583
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an alternative approach to #577 , re-using something I landed in the RHEL10 branch.
Prior to this, the images typically use the following method to move files into place within the container: cekit calls
configure.sh
, which copies the files and callschmod
etc manually. Instead, use cekit's existingartifacts
feature to declaratively define which files should be copied into the image. Instead of doingchmod
etc., rely on the default mask (ultimately the defaults for a ContainerfileCOPY
command).If a file should be executable, set the execute bit on the file in Git itself. This is preserved, and maps to anyone-can-execute (resolving OPENJDK-3655).
This is a larger change, but I think results in a cleaner source code, and less deviation between ubi9 and rhel10.
Besides the test suite passing (including the new test), here is an analysis of the differences in the image:
Some of the shell scripts are intended to be sourced, and do not need +x; others are intended to be executed, and do. Unfortunately that's not clear from their filenames (translate-no-proxy.sh should be sourced; java-default-options should be executed). That could be cleaned up in future work.