Skip to content

Commit 17e0d3e

Browse files
committed
[OPENJDK-2427] s2i: use --archive flag for rsync
Switch from '-rl' to '--archive' which attempts to preserve as much metadata from the source files as possible, including timestamps, the motivation behind OPENJDK-2427. https://issues.redhat.com/browse/OPENJDK-2427 Signed-off-by: Jonathan Dowland <[email protected]>
1 parent 3620922 commit 17e0d3e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ 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 -rl --out-format='%n' "${binary_dir}"/ "${S2I_TARGET_DEPLOYMENTS_DIR}"
31+
rsync --archive --out-format='%n' "${binary_dir}"/ "${S2I_TARGET_DEPLOYMENTS_DIR}"
3232
}
3333

3434
function maven_s2i_deploy_artifacts_override() {

modules/s2i/core/bash/artifacts/opt/jboss/container/s2i/core/s2i-core

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function s2i_core_copy_configuration() {
6464
mkdir -pm 775 "${S2I_TARGET_CONFIGURATION_DIR}"
6565
fi
6666
log_info "Copying configuration from $(realpath --relative-to ${S2I_SOURCE_DIR} ${1}/${S2I_SOURCE_CONFIGURATION_DIR}) to ${S2I_TARGET_CONFIGURATION_DIR}..."
67-
rsync -rl --out-format='%n' "${1}/${S2I_SOURCE_CONFIGURATION_DIR}"/ "${S2I_TARGET_CONFIGURATION_DIR}"
67+
rsync --archive --out-format='%n' "${1}/${S2I_SOURCE_CONFIGURATION_DIR}"/ "${S2I_TARGET_CONFIGURATION_DIR}"
6868
fi
6969
fi
7070
}
@@ -81,7 +81,7 @@ function s2i_core_copy_data() {
8181
mkdir -pm 775 "${S2I_TARGET_DATA_DIR}"
8282
fi
8383
log_info "Copying app data from $(realpath --relative-to ${S2I_SOURCE_DIR} ${1}/${S2I_SOURCE_DATA_DIR}) to ${S2I_TARGET_DATA_DIR}..."
84-
rsync -rl --out-format='%n' "${1}/${S2I_SOURCE_DATA_DIR}"/ "${S2I_TARGET_DATA_DIR}"
84+
rsync --archive --out-format='%n' "${1}/${S2I_SOURCE_DATA_DIR}"/ "${S2I_TARGET_DATA_DIR}"
8585
# s2i used to be more forgiving, but the build will fail if this call
8686
# fails. emit a warning and allow the build to succeed
8787
chmod -R g+rwX "${S2I_TARGET_DATA_DIR}" || log_warning "Errors occurred while adding read/write permissions to S2I_TARGET_DATA_DIR ($S2I_TARGET_DATA_DIR)."

0 commit comments

Comments
 (0)