Skip to content

Commit 309d1c9

Browse files
committed
[OPENJDK-2850] 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-2850 See also https://issues.redhat.com/browse/OPENJDK-2408 Signed-off-by: Jonathan Dowland <[email protected]>
1 parent 7bf1934 commit 309d1c9

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
@@ -29,7 +29,12 @@ function maven_s2i_custom_binary_build() {
2929
binary_dir="${S2I_SOURCE_DIR}"
3030
fi
3131
log_info "Copying binaries from ${binary_dir} to ${S2I_TARGET_DEPLOYMENTS_DIR} ..."
32-
rsync --archive --out-format='%n' "${binary_dir}"/ "${S2I_TARGET_DEPLOYMENTS_DIR}"
32+
33+
( # OPENJDK-2850: use glob (dotglob to match hidden files) to stop rsync altering
34+
# timestamps of S2I_TARGET_DEPLOYMENTS_DIR. Don't alter parent shell's dotglob.
35+
shopt -s dotglob
36+
rsync --archive --out-format='%n' "${binary_dir}"/* "${S2I_TARGET_DEPLOYMENTS_DIR}"
37+
)
3338
}
3439

3540
function maven_s2i_deploy_artifacts_override() {

0 commit comments

Comments
 (0)