This is an automated email from the ASF dual-hosted git repository.

zhouyuan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new 8b8d413c48 [Velox][Build][MIRROR] Skip sudo on macOS when staging 
Velox Arrow patches (#12129)
8b8d413c48 is described below

commit 8b8d413c4811a2d8d93c8025bd88b87dc313da01
Author: jackylee <[email protected]>
AuthorDate: Tue May 26 17:14:53 2026 +0800

    [Velox][Build][MIRROR] Skip sudo on macOS when staging Velox Arrow patches 
(#12129)
    
    apply_compilation_fixes copies two Arrow patch files into VELOX_HOME's
    resolve_dependency_modules/arrow/ directory. The script always uses
    `sudo cp`, which on macOS triggers an interactive password prompt every
    time the build is run, even though VELOX_HOME is normally a user-owned
    directory.
    
    Introduce a SUDO_CMD variable that resolves to `sudo` on Linux and an
    empty string elsewhere, so the cp invocations work as the regular user
    on macOS while preserving the existing behavior on Linux.
---
 ep/build-velox/src/get-velox.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/ep/build-velox/src/get-velox.sh b/ep/build-velox/src/get-velox.sh
index 6bc124c5e8..5291d456f0 100755
--- a/ep/build-velox/src/get-velox.sh
+++ b/ep/build-velox/src/get-velox.sh
@@ -141,8 +141,12 @@ function apply_provided_velox_patch {
 }
 
 function apply_compilation_fixes {
-  sudo cp ${CURRENT_DIR}/modify_arrow.patch 
${VELOX_HOME}/CMake/resolve_dependency_modules/arrow/
-  sudo cp ${CURRENT_DIR}/modify_arrow_dataset_scan_option.patch 
${VELOX_HOME}/CMake/resolve_dependency_modules/arrow/
+  local SUDO_CMD=""
+  if [ "$OS" == "Linux" ]; then
+    SUDO_CMD="sudo"
+  fi
+  $SUDO_CMD cp ${CURRENT_DIR}/modify_arrow.patch 
${VELOX_HOME}/CMake/resolve_dependency_modules/arrow/
+  $SUDO_CMD cp ${CURRENT_DIR}/modify_arrow_dataset_scan_option.patch 
${VELOX_HOME}/CMake/resolve_dependency_modules/arrow/
 
   git add 
${VELOX_HOME}/CMake/resolve_dependency_modules/arrow/modify_arrow.patch # to 
avoid the file from being deleted by git clean -dffx :/
   git add 
${VELOX_HOME}/CMake/resolve_dependency_modules/arrow/modify_arrow_dataset_scan_option.patch
 # to avoid the file from being deleted by git clean -dffx :/


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to