You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by jo...@apache.org on 2025/05/15 01:04:13 UTC
(impala) 05/05: IMPALA-13937: (Addendum) Replace diff with manual bash script
This is an automated email from the ASF dual-hosted git repository.
joemcdonnell pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
commit 02fb5e1ccbc1f405a19d70f82ad654bc89182639
Author: Riza Suminto <ri...@cloudera.com>
AuthorDate: Tue May 13 17:45:59 2025 -0700
IMPALA-13937: (Addendum) Replace diff with manual bash script
diff require BASE_IMAGE to have diffutils preinstalled. However, not all
BASE_IMAGE have it preinstalled. This patch replace the diff invocation
with manual bash script.
Testing:
Completed build with ubi8:latest that does not have diffutils
preinstalled.
Change-Id: I58e9ef7c344caffd198664e3f9683f54ce2c1914
Reviewed-on: http://gerrit.cloudera.org:8080/22898
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
docker/install_os_packages.sh | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/docker/install_os_packages.sh b/docker/install_os_packages.sh
index acdb04dc3..328ffb5ea 100755
--- a/docker/install_os_packages.sh
+++ b/docker/install_os_packages.sh
@@ -291,8 +291,17 @@ mkdir -p /var/tmp
chmod a=rwxt /var/tmp /tmp
# The busybox implementation of chmod is known to ignore certain chmod syntax variations,
# so check if the directories actually have the correct permissions
-diff <(stat -c '%u %g %a' /tmp) - <<<'0 0 1777'
-diff <(stat -c '%u %g %a' /var/tmp) - <<<'0 0 1777'
+check_dir_stat() {
+ target_dir=$1
+ stat_expect=$2
+ stat=$(stat -c '%u %g %a' $target_dir)
+ if [[ "$stat" != "$stat_expect" ]]; then
+ echo "Expect $target_dir permission '$stat_expect' but got '$stat' instead."
+ exit 1
+ fi
+}
+check_dir_stat "/tmp" "0 0 1777"
+check_dir_stat "/var/tmp" "0 0 1777"
# To minimize the size for the Docker image, clean up any unnecessary files.
if [[ $DISTRIBUTION == Ubuntu ]]; then