Merge pull request #38 from rstudio/centos-8
Add R builds for CentOS/RHEL 8
This commit is contained in:
commit
6d0ff57098
3 changed files with 167 additions and 5 deletions
75
builder/Dockerfile.centos-8
Normal file
75
builder/Dockerfile.centos-8
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
FROM centos:centos8
|
||||
|
||||
ENV OS_IDENTIFIER centos-8
|
||||
|
||||
RUN dnf -y upgrade \
|
||||
&& dnf -y install dnf-plugins-core \
|
||||
&& dnf config-manager --set-enabled PowerTools \
|
||||
&& dnf -y install \
|
||||
autoconf \
|
||||
automake \
|
||||
bzip2-devel \
|
||||
cairo-devel \
|
||||
gcc-c++ \
|
||||
gcc-gfortran \
|
||||
java-1.8.0-openjdk-devel \
|
||||
java-1.8.0-openjdk-headless \
|
||||
libICE-devel \
|
||||
libSM-devel \
|
||||
libX11-devel \
|
||||
libXmu-devel \
|
||||
libXt-devel \
|
||||
libcurl-devel \
|
||||
libicu-devel \
|
||||
libjpeg-devel \
|
||||
libpng-devel \
|
||||
libtiff-devel \
|
||||
libtool \
|
||||
make \
|
||||
ncurses-devel \
|
||||
pango-devel \
|
||||
pcre-devel \
|
||||
pcre2-devel \
|
||||
python36 \
|
||||
python3-pip \
|
||||
readline-devel \
|
||||
rpm-build \
|
||||
ruby \
|
||||
ruby-devel \
|
||||
tcl-devel \
|
||||
tex \
|
||||
texinfo-tex \
|
||||
texlive-collection-latexrecommended \
|
||||
tk-devel \
|
||||
valgrind-devel \
|
||||
which \
|
||||
wget \
|
||||
xz-devel \
|
||||
zlib-devel \
|
||||
&& dnf clean all
|
||||
|
||||
# Install AWS CLI.
|
||||
RUN pip3 install awscli --upgrade --user \
|
||||
&& ln -s /root/.local/bin/aws /usr/bin/aws
|
||||
|
||||
RUN gem install fpm
|
||||
|
||||
RUN chmod 0777 /opt
|
||||
|
||||
# Configure flags for CentOS 8 that don't use the defaults in build.sh
|
||||
ENV CONFIGURE_OPTIONS="\
|
||||
--enable-R-shlib \
|
||||
--with-tcltk \
|
||||
--enable-memory-profiling \
|
||||
--with-x \
|
||||
--with-system-valgrind-headers \
|
||||
--with-tcl-config=/usr/lib64/tclConfig.sh \
|
||||
--with-tk-config=/usr/lib64/tkConfig.sh \
|
||||
--enable-prebuilt-html"
|
||||
|
||||
# RHEL 8 doesn't have the inconsolata font, so override the defaults.
|
||||
ENV R_RD4PDF="times,hyper"
|
||||
|
||||
COPY package.centos-8 /package.sh
|
||||
COPY build.sh .
|
||||
ENTRYPOINT ./build.sh
|
||||
|
|
@ -56,6 +56,17 @@ services:
|
|||
image: r-builds:centos-7
|
||||
volumes:
|
||||
- ./integration/tmp:/tmp/output
|
||||
centos-8:
|
||||
command: ./build.sh
|
||||
environment:
|
||||
- R_VERSION=${R_VERSION}
|
||||
- LOCAL_STORE=/tmp/output
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.centos-8
|
||||
image: r-builds:centos-8
|
||||
volumes:
|
||||
- ./integration/tmp:/tmp/output
|
||||
opensuse-42:
|
||||
command: ./build.sh
|
||||
environment:
|
||||
|
|
|
|||
59
builder/package.centos-8
Normal file
59
builder/package.centos-8
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
if [[ ! -d /tmp/output/centos-8 ]]; then
|
||||
mkdir -p /tmp/output/centos-8
|
||||
fi
|
||||
|
||||
# create post-install script required for openblas
|
||||
cat <<EOF >> /post-install.sh
|
||||
mv /opt/R/${R_VERSION}/lib/R/lib/libRblas.so /opt/R/${R_VERSION}/lib/R/lib/libRblas.so.keep
|
||||
ln -s /usr/lib64/libopenblasp.so.0 /opt/R/${R_VERSION}/lib/R/lib/libRblas.so
|
||||
EOF
|
||||
|
||||
# create after-remove script to remove internal blas
|
||||
cat <<EOF >> /before-remove.sh
|
||||
if [ -d /opt/R/${R_VERSION} ]; then
|
||||
rm -r /opt/R/${R_VERSION}
|
||||
fi
|
||||
EOF
|
||||
|
||||
fpm \
|
||||
-s dir \
|
||||
-t rpm \
|
||||
-v 1 \
|
||||
-n R-${R_VERSION} \
|
||||
--vendor "RStudio Inc." \
|
||||
--deb-priority "optional" \
|
||||
--deb-field 'Bugs: https://github.com/rstudio/r-builds/issues' \
|
||||
--url "http://www.r-project.org/" \
|
||||
--description "GNU R statistical computation and graphics system" \
|
||||
--maintainer "RStudio Inc https://github.com/rstudio/r-builds" \
|
||||
--license "GPL-2" \
|
||||
--after-install /post-install.sh \
|
||||
--after-remove /before-remove.sh \
|
||||
-p /tmp/output/centos-8/ \
|
||||
-d bzip2-devel \
|
||||
-d gcc \
|
||||
-d gcc-c++ \
|
||||
-d gcc-gfortran \
|
||||
-d libcurl-devel \
|
||||
-d libicu-devel \
|
||||
-d libSM \
|
||||
-d libtiff \
|
||||
-d libXmu \
|
||||
-d libXt \
|
||||
-d make \
|
||||
-d openblas-threads \
|
||||
-d pango \
|
||||
-d pcre-devel \
|
||||
-d pcre2-devel \
|
||||
-d tcl \
|
||||
-d tk \
|
||||
-d unzip \
|
||||
-d which \
|
||||
-d xz-devel \
|
||||
-d zip \
|
||||
-d zlib-devel \
|
||||
/opt/R/${R_VERSION}
|
||||
|
||||
shopt -s extglob
|
||||
export PKG_FILE=$(ls /tmp/output/centos-8/[rR]-${R_VERSION}*.@(deb|rpm) | head -1)
|
||||
|
||||
Loading…
Reference in a new issue