Copilot commented on code in PR #50299: URL: https://github.com/apache/arrow/pull/50299#discussion_r3804105574
########## ci/scripts/r_docker_configure.sh: ########## @@ -86,5 +86,17 @@ else fi +# Update clang version to latest available. +# The rhub/ubuntu-clang image ships clang-15 but CRAN's debian-clang now uses +# clang 22. Install clang-22 from LLVM's apt repos to match. +if [ "$R_UPDATE_CLANG" = true ]; then + apt-get update -y --allow-releaseinfo-change + apt-get install -y gnupg + curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor -o /etc/apt/trusted.gpg.d/llvm.gpg + echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-22 main" > /etc/apt/sources.list.d/llvm22.list + apt-get update -y --allow-releaseinfo-change + apt-get install -y clang-22 lld-22 +fi Review Comment: The clang update block hardcodes the Ubuntu codename (jammy), adds the LLVM repo over plain HTTP, and installs the GPG key into /etc/apt/trusted.gpg.d (global trust). Also, installing clang-22 doesn’t guarantee it will be used (the image may still invoke the existing `clang` symlink), and this block should be guarded to apt-based images only. Consider (a) deriving the codename from /etc/os-release, (b) using HTTPS + a dedicated keyring with `signed-by=...`, (c) setting `clang`/`clang++` alternatives (or CC/CXX) to point to clang-22, and (d) cleaning apt lists to keep the image smaller. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
