jonkeane commented on code in PR #48014:
URL: https://github.com/apache/arrow/pull/48014#discussion_r2616401697


##########
ci/docker/alpine-linux-3.22-r.dockerfile:
##########
@@ -0,0 +1,88 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Minimal Alpine Linux container with R for testing Arrow R package
+# on musl libc (CRAN runs checks on Alpine Linux 3.22)
+# Replicates CRAN's Alpine environment as closely as possible
+
+ARG arch=amd64
+FROM ${arch}/alpine:3.22
+
+# Install R and essential build tools
+# Note: bash is needed for Arrow CI scripts, even though CRAN's Alpine uses 
BusyBox
+RUN apk add \
+        R \
+        R-dev \
+        R-doc \
+        bash \
+        checkbashisms \
+        cmake \
+        curl-dev \
+        g++ \
+        gcc \
+        git \
+        linux-headers \
+        make \
+        musl-locales \
+        openssl-dev \
+        pkgconfig \
+        texlive \
+        texlive-xetex \
+        texmf-dist-fontsextra \
+        texmf-dist-most \

Review Comment:
   I'm not saying we should or shouldn't do this, but if I remember correctly 
we could _not_ build and check the manual and not need to install tex here. 
Installing tex might not take super long (especially if these are cached), but 
if that's taking too long, this might help 



##########
compose.yaml:
##########
@@ -1774,6 +1775,35 @@ services:
     command: >
       /bin/bash -c "/arrow/ci/scripts/r_revdepcheck.sh /arrow"
 
+  alpine-linux-r:
+    # Usage:
+    #   docker compose build alpine-linux-r
+    #   docker compose run alpine-linux-r
+    # Tests R package installation on musl (Alpine Linux) for CRAN checks.
+    # R package builds C++ from source (bundled RE2 2023-03-01 supports musl).
+    # Parameters:
+    #   ALPINE_LINUX: 3.22
+    #   R: 4.5 (Alpine's R version)
+    #   ARCH: amd64, arm64v8, ...
+    image: ${REPO}:${ARCH}-alpine-linux-${ALPINE_LINUX}-r
+    build:
+      context: .
+      dockerfile: ci/docker/alpine-linux-${ALPINE_LINUX}-r.dockerfile
+      cache_from:
+        - ${REPO}:${ARCH}-alpine-linux-${ALPINE_LINUX}-r
+      args:
+        arch: ${ARCH}
+    shm_size: *shm-size
+    environment:
+      <<: [*common, *sccache]
+      LIBARROW_BINARY: "false"
+      ARROW_SOURCE_HOME: "/arrow"
+      ARROW_R_DEV: "TRUE"

Review Comment:
   For some of our other CRAN-like (ubuntu-r-valgrind, r-san, etc) builds we 
have `ARROW_R_DEV: ${ARROW_R_DEV}` should we follow the same pattern here?



##########
r/src/Makevars.in:
##########
@@ -31,4 +31,4 @@ PKG_LIBS=@libs@
 all: $(SHLIB) purify
 
 purify: $(SHLIB)
-       @rm -rf ../{libarrow,windows} || true
+       @rm -rf ../libarrow ../windows || true

Review Comment:
   Could you say more about this change? I'm a little surprised, but maybe the 
Alpine shell requires this?



##########
dev/tasks/tasks.yml:
##########
@@ -669,6 +669,13 @@ tasks:
     ci: github
     template: r/github.linux.cran.yml
 
+  test-r-alpine-linux-cran:
+    ci: github
+    template: docker-tests/github.linux.yml
+    params:
+      image: alpine-linux-r
+      flags: -e NOT_CRAN=false

Review Comment:
   Do we need `NOT_CRAN=false` here at all? It being empty should be the same 
as being false, but we don't set it elsewhere (And it's not set on CRAN either 
way). If it is required here, we might have something else up



-- 
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]

Reply via email to