Skip to content

Commit

Permalink
[OPENJDK-2824] assemble: binary: Don't set times on directories
Browse files Browse the repository at this point in the history
If the S2I build runs as a user other than 185 (such as s2i's default
of 1001), attempting to set the timestamp of /deployments will fail,
causing the build to fail.

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

See also
https://issues.redhat.com/browse/OPENJDK-2408

Signed-off-by: Jonathan Dowland <[email protected]>
  • Loading branch information
jmtd committed Apr 15, 2024
1 parent be9e76d commit 347382c
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ function maven_s2i_custom_binary_build() {
binary_dir="${S2I_SOURCE_DIR}"
fi
log_info "Copying binaries from ${binary_dir} to ${S2I_TARGET_DEPLOYMENTS_DIR} ..."
rsync --archive --out-format='%n' "${binary_dir}"/ "${S2I_TARGET_DEPLOYMENTS_DIR}"

( # OPENJDK-2850: use glob (dotglob to match hidden files) to stop rsync altering
# timestamps of S2I_TARGET_DEPLOYMENTS_DIR. Don't alter parent shell's dotglob.
shopt -s dotglob
rsync --archive --out-format='%n' "${binary_dir}"/* "${S2I_TARGET_DEPLOYMENTS_DIR}"
)
}

function maven_s2i_deploy_artifacts_override() {
Expand Down

0 comments on commit 347382c

Please sign in to comment.