Merge pull request #92 from rstudio/fix-suse

Fix R 4.1.0 builds for openSUSE
This commit is contained in:
Greg Lin 2021-05-17 14:17:19 -05:00 committed by GitHub
commit d07acfe0cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 48 additions and 4 deletions

View file

@ -247,3 +247,37 @@ serverless invoke stepf -n rBuilds -d '{"force": true}'
# Rebuild specific R versions
serverless invoke stepf -n rBuilds -d '{"force": true, "versions": ["3.6.3", "4.0.2"]}'
```
## Testing
To test the R builds locally, you can build the images:
```bash
# Build images for all platforms
make docker-build
# Or build the image for a single platform
(cd builder && docker-compose build ubuntu-2004)
```
Then run the build script:
```bash
# Build R for all platforms
R_VERSION=4.0.5 make docker-build-r
# Build R for a single platform
(cd builder && R_VERSION=4.0.5 docker-compose up ubuntu-2004)
# Alternatively, run the build script from within a container
docker run -it --rm --entrypoint "/bin/bash" r-builds:ubuntu-2004
# Build R 4.0.5
R_VERSION=4.0.5 ./build.sh
# Build R devel
R_VERSION=devel ./build.sh
# Build a prerelease version of R (e.g., alpha or beta)
R_VERSION=rc R_TARBALL_URL=https://cran.r-project.org/src/base-prerelease/R-latest.tar.gz ./build.sh
```

View file

@ -43,9 +43,11 @@ RUN zypper --non-interactive --gpg-auto-import-keys -n install \
shadow \
tcl-devel \
texinfo \
texlive-ae \
texlive-bibtex \
texlive-cm-super \
texlive-dvips \
texlive-fancyvrb \
texlive-helvetic \
texlive-inconsolata \
texlive-latex \

View file

@ -43,9 +43,11 @@ RUN zypper --non-interactive --gpg-auto-import-keys -n install \
shadow \
tcl-devel \
texinfo \
texlive-ae \
texlive-bibtex \
texlive-cm-super \
texlive-dvips \
texlive-fancyvrb \
texlive-helvetic \
texlive-inconsolata \
texlive-latex \

View file

@ -35,8 +35,6 @@ RUN zypper --non-interactive --gpg-auto-import-keys -n install \
pcre2-devel \
perl \
perl-macros \
python \
python-pip \
readline-devel \
rpm-build \
ruby \
@ -44,9 +42,11 @@ RUN zypper --non-interactive --gpg-auto-import-keys -n install \
shadow \
tcl-devel \
texinfo \
texlive-ae \
texlive-bibtex \
texlive-cm-super \
texlive-dvips \
texlive-fancyvrb \
texlive-helvetic \
texlive-inconsolata \
texlive-latex \
@ -64,7 +64,10 @@ RUN zypper --non-interactive --gpg-auto-import-keys -n install \
zlib-devel \
&& zypper clean
RUN pip install awscli
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install && \
rm -rf aws awscliv2.zip
# Pin fpm for compatibility with Ruby < 2.3
RUN gem install ffi:1.12.2 fpm:1.11.0 && \

View file

@ -40,7 +40,10 @@ archive_r() {
fetch_r_source() {
echo "Downloading R-${1}"
if [ "${1}" = devel ]; then
if [ -n "${R_TARBALL_URL}" ]; then
# Custom tarball URL for testing (e.g., R alpha and beta releases)
wget -q "${R_TARBALL_URL}" -O /tmp/R-${1}.tar.gz
elif [ "${1}" = devel ]; then
# Download the daily tarball of R devel
wget -q https://stat.ethz.ch/R/daily/R-devel.tar.gz -O /tmp/R-devel.tar.gz
else