diff --git a/.devcontainer/r-devel-alpine/Dockerfile b/.devcontainer/r-devel-alpine/Dockerfile new file mode 100644 index 0000000000..39194563d3 --- /dev/null +++ b/.devcontainer/r-devel-alpine/Dockerfile @@ -0,0 +1,22 @@ +FROM docker.io/rhub/r-minimal:devel + +RUN apk update \ + && apk add --no-cache \ + gcc git musl-dev openmp pkgconf tzdata zlib-dev \ + && echo 'options("repos"="https://cloud.r-project.org")' >> /usr/local/lib/R/etc/Rprofile.site + +ENV TZDIR=/usr/share/zoneinfo + +COPY DESCRIPTION . + +RUN Rscript -e ' \ +read.dcf("DESCRIPTION", c("Imports", "Suggests")) |> \ + tools:::.split_dependencies() |> \ + names() |> \ + setdiff(tools:::.get_standard_package_names()$base) |> \ + install.packages(repos="https://cloud.r-project.org") \ +' + +# setup cc() +WORKDIR /root +COPY .devcontainer/.Rprofile . diff --git a/.devcontainer/r-devel-alpine/devcontainer.json b/.devcontainer/r-devel-alpine/devcontainer.json new file mode 100644 index 0000000000..74c039fb7a --- /dev/null +++ b/.devcontainer/r-devel-alpine/devcontainer.json @@ -0,0 +1,9 @@ +{ + "build": { "dockerfile": "Dockerfile", "context": "../.." }, + "customizations": { "vscode": { + "extensions": [ + "REditorSupport.r", + "ms-vscode.cpptools-extension-pack" + ] + }} + } diff --git a/configure b/configure index 2402ecef1f..8e450c10b8 100755 --- a/configure +++ b/configure @@ -34,15 +34,11 @@ else NOZLIB=0 lib=`pkg-config --libs zlib` cflag=`pkg-config --cflags zlib` - expr -- "$lib" : ".*-lz$" >> config.log # -- for FreeBSD, #4652 + echo "$lib" | grep -qE '[-]lz($| )' >> config.log if [ $? -ne 0 ]; then - expr -- "$lib" : ".*-lz " >> config.log - # would use \b in one expr but MacOS does not support \b - if [ $? -ne 0 ]; then - echo "*** pkg-config is installed and 'pkg-config --exists zlib' succeeds but" - echo "*** 'pkg-config --libs zlib' returns '${lib}' which does not include the standard -lz." - msg=1 - fi + echo "*** pkg-config is installed and 'pkg-config --exists zlib' succeeds but" + echo "*** 'pkg-config --libs zlib' returns '${lib}' which does not include the standard -lz." + msg=1 fi fi fi diff --git a/inst/tests/tests.Rraw b/inst/tests/tests.Rraw index a86e7a8a63..724c6f1630 100644 --- a/inst/tests/tests.Rraw +++ b/inst/tests/tests.Rraw @@ -8448,11 +8448,9 @@ baseR = base::order(c(x2,x1,x1,x2)) # are so relaxed now that they barely testing anything. It appears base R behaviour is undefined in this rare case of identical strings in different encodings. test(1590.04, identical(baseR, INT(1,4,2,3)) || identical(baseR, INT(2,3,1,4)) || identical(baseR, 1:4)) Encoding(x2) = "unknown" -# TODO(#6350): Decide if this test should be adjusted for Alpine Linux, or just dropped. -if (!file.exists("/etc/alpine-release")) { - test(1590.05, x1!=x2) - test(1590.06, forderv( c(x2,x1,x1,x2)), INT(1,4,2,3)) # consistent with Windows-1252 result, tested further below -} +# test(1590.05, x1!=x2) # Skip this test of R's own behavior since R itself does not give platform-consistent results, #6350 +# TODO(#6350): Restore this test. On Alpine, forder() finds this input to be sorted, but we want to be platform-independent. +if (!file.exists("/etc/alpine-release")) test(1590.06, forderv( c(x2,x1,x1,x2)), INT(1,4,2,3)) # consistent with Windows-1252 result, tested further below baseR = base::order(c(x2,x1,x1,x2)) test(1590.07, identical(baseR, INT(1,4,2,3)) || identical(baseR, INT(2,3,1,4)) || identical(baseR, 1:4)) Sys.setlocale("LC_CTYPE", ctype)