Skip to content

[Velox][Build][MIRROR] Skip sudo on macOS when staging Velox Arrow patches#12129

Merged
zhouyuan merged 1 commit into
apache:mainfrom
jackylee-ch:fix-skip-sudo-macos-velox-arrow-patches
May 26, 2026
Merged

[Velox][Build][MIRROR] Skip sudo on macOS when staging Velox Arrow patches#12129
zhouyuan merged 1 commit into
apache:mainfrom
jackylee-ch:fix-skip-sudo-macos-velox-arrow-patches

Conversation

@jackylee-ch
Copy link
Copy Markdown
Contributor

What changes are proposed in this pull request?

apply_compilation_fixes in ep/build-velox/src/get-velox.sh always
calls sudo cp when staging the two Arrow patch files into
$VELOX_HOME/CMake/resolve_dependency_modules/arrow/. On macOS the
target directory is user-owned, so the sudo triggers an interactive
password prompt on every build with no functional benefit.

Introduce a SUDO_CMD variable that resolves to sudo on Linux and
an empty string elsewhere; behavior on Linux is unchanged.

How was this patch tested?

  • macOS 14 arm64: dev/builddeps-veloxbe.sh no longer prompts for a
    password when re-running apply_compilation_fixes. The two patch
    files land in $VELOX_HOME/CMake/resolve_dependency_modules/arrow/
    with the user's own ownership.
  • Linux x86_64: SUDO_CMD=sudo, identical to the previous behavior.

Was this patch authored or co-authored using generative AI tooling?

co-auth: Claude (Sonnet/Opus) via Claude Code 1.x

…tches

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.
@jackylee-ch
Copy link
Copy Markdown
Contributor Author

cc @zhouyuan

Copy link
Copy Markdown
Member

@philo-he philo-he left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

Copy link
Copy Markdown
Member

@zhouyuan zhouyuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for me i'm setting sudo password-less on mac

@jackylee-ch
Copy link
Copy Markdown
Contributor Author

@zhouyuan Yeap. I previously also used sudo to execute the commands and then installed them to a local macOS path. Recently, I tried disabling sudo permissions and found that compilation still worked normally without affecting the system environment. For many developers, minimizing the impact on the system environment is essential, especially for macOS.

However, the current changes do not affect compilation, they simply change cp to non-sudo execution, so the impact is minimal.

@zhouyuan zhouyuan merged commit 8b8d413 into apache:main May 26, 2026
101 of 107 checks passed
@prestodb-ci
Copy link
Copy Markdown

prestodb-ci commented May 26, 2026

Failed to get lakehouse/gluten rebase URL from queue item URL http://ci.ibm.prestodb.dev/queue/item/300222/: build not available after 6 attempts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants