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 <[email protected]>
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 <[email protected]>
    Tested-by: Impala Public Jenkins <[email protected]>
---
 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

Reply via email to