Skip to content

Commit 347382c

Browse files
committed
[OPENJDK-2824] assemble: binary: Don't set times on directories
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]>
1 parent be9e76d commit 347382c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

modules/s2i/bash/artifacts/opt/jboss/container/java/s2i/maven-s2i-overrides

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ function maven_s2i_custom_binary_build() {
2828
binary_dir="${S2I_SOURCE_DIR}"
2929
fi
3030
log_info "Copying binaries from ${binary_dir} to ${S2I_TARGET_DEPLOYMENTS_DIR} ..."
31-
rsync --archive --out-format='%n' "${binary_dir}"/ "${S2I_TARGET_DEPLOYMENTS_DIR}"
31+
32+
( # OPENJDK-2850: use glob (dotglob to match hidden files) to stop rsync altering
33+
# timestamps of S2I_TARGET_DEPLOYMENTS_DIR. Don't alter parent shell's dotglob.
34+
shopt -s dotglob
35+
rsync --archive --out-format='%n' "${binary_dir}"/* "${S2I_TARGET_DEPLOYMENTS_DIR}"
36+
)
3237
}
3338

3439
function maven_s2i_deploy_artifacts_override() {

0 commit comments

Comments
 (0)