make repo public

This commit is contained in:
Steve Nolen 2019-03-25 12:59:14 -04:00
commit bd3505e426
11 changed files with 5447 additions and 0 deletions

206
builder/Dockerfile.centos-6 Normal file
View file

@ -0,0 +1,206 @@
FROM centos:centos6
ENV OS_IDENTIFIER centos-6
RUN yum -y update \
&& yum -y install epel-release \
&& yum clean all
RUN yum -y update \
&& yum -y install \
atlas-devel \
blas-devel \
bzip2-devel \
cairo-devel \
gcc-c++ \
gcc-gfortran \
gcc-objc \
glibc-devel \
groff \
java-1.8.0-openjdk-devel \
krb5-devel \
krb5-libs \
lapack-devel \
less \
libICE-devel \
libSM-devel \
libX11-devel \
libXmu-devel \
libXt-devel \
libgssapi-devel \
libicu-devel \
libidn-devel \
libjpeg-devel \
libmetalink-devel \
libpng-devel \
libssh2-devel \
libtiff-devel \
ncurses-devel \
openldap \
openldap-devel \
openssh-clients \
openssh-server \
openssl-devel \
pango-devel \
pcre-devel \
pcre2-devel \
pkgconfig \
python \
python-pip \
readline-devel \
stunnel \
tcl-devel \
tex \
texinfo-tex \
texlive-latex \
tk-devel \
valgrind-devel \
wget \
xz-devel \
zlib-devel \
&& yum clean all
RUN pip install awscli
RUN chmod 0777 /opt
# Compile newer versions of zlib, bzip2, xz, pcre, and curl.
#
# Several compression libraries that were at one time included in R-devel have been removed.
# Instead of providing these libraries, R-devel assumes they are pre-installed. On RedHat 6,
# this results in build errors when zlib, bzip, pcre, curl, and xz are required. These
# libraries must be downloaded and compiled before building R-devel. Reference:
# http://pj.freefaculty.org/blog/?p=315
#
# It's also import to build the static versions of these libraries and link them
# statically when building R. This allows us to use the R binaries we build on
# another CentOS/RHEL 6 OS without updating the same five libraries.
# For more info, see the "R.spec" RPM spec file in the EPEL source archive at:
# http://download-ib01.fedoraproject.org/pub/epel/7/SRPMS/Packages/r/R-3.5.2-2.el7.src.rpm
# (search for "zlibhack" in R.spec).
#
# First, reate a directory for the additional libraries.
RUN mkdir -p /tmp/extra
# zlib 1.2.8
#
# Note: zlib 1.2.11 works fine for all R versions except 3.3.0, 3.3.1, and 3.3.2,
# so I went with an older version (1.2.8) to accommodate the flaky R versions. See the
# following note on https://www.r-statistics.com/2017/03/r-3-3-3-is-released/:
#
# The configure check for the zlib version is now robust to versions longer than 5 characters,
# including 1.2.11.
#
ARG ZLIB_VERSION=1.2.8
ARG ZLIB_DOWNLOAD_SHA256=36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d
RUN curl -fsSL "https://zlib.net/fossils/zlib-${ZLIB_VERSION}.tar.gz" -o zlib.tar.gz \
&& echo "$ZLIB_DOWNLOAD_SHA256 zlib.tar.gz" | sha256sum -c - \
&& CWD=`pwd` && TMP=`mktemp -d` \
&& tar -C $TMP -zxvf zlib.tar.gz \
&& cd $TMP/zlib* \
&& ./configure --prefix=/tmp/extra --static \
&& make CFLAGS="-fpic -fPIC" \
&& make install \
&& cd $CWD && rm -rf $TMP && rm -rf zlib.tar.gz
# bzip2 1.0.6
ARG BZIP2_VERSION=1.0.6
ARG BZIP2_DOWNLOAD_SHA1=3f89f861209ce81a6bab1fd1998c0ef311712002
RUN curl -fsSL "https://sourceforge.net/projects/bzip2/files/bzip2-{$BZIP2_VERSION}.tar.gz/download" -o bzip2.tar.gz \
&& echo "$BZIP2_DOWNLOAD_SHA1 bzip2.tar.gz" | sha1sum -c - \
&& CWD=`pwd` && TMP=`mktemp -d` \
&& tar -C $TMP -zxvf bzip2.tar.gz \
&& cd $TMP/bzip2* \
&& make libbz2.a CFLAGS="-D_FILE_OFFSET_BITS=64 -fpic -fPIC" PREFIX=/tmp/extra \
&& make install PREFIX=/tmp/extra \
&& cd $CWD && rm -rf $TMP && rm -rf bzip2.tar.gz
# xz 5.2.4 (for lzma libraries)
ARG XZ_VERSION=5.2.4
ARG XZ_DOWNLOAD_SHA1=63ca380029597b951ce9afc6dec28f44f70bb5bd
RUN curl -fsSL "https://sourceforge.net/projects/lzmautils/files/xz-{$XZ_VERSION}.tar.gz/download" -o xz.tar.gz \
&& echo "$XZ_DOWNLOAD_SHA1 xz.tar.gz" | sha1sum -c - \
&& CWD=`pwd` && TMP=`mktemp -d` \
&& tar -C $TMP -zxvf xz.tar.gz \
&& cd $TMP/xz* \
&& CFLAGS="-fpic -fPIC" ./configure --enable-static=yes --enable-shared=no --prefix=/tmp/extra \
&& make -j8 \
&& make install \
&& cd $CWD && rm -rf $TMP && rm -rf xz.tar.gz
# PCRE 8.42
#
# The PCRE library provides PGP signatures for verifying downloads. Originally, I tried to do some
# PGP validation in the Dockerfile, but I ran into trouble with flaky key servers. To streamline
# things, I verified the download manually and then generated a sha256 checksum with the following
# commands:
# gpg --recv-key FB0F43D8
# gpg pcre-8.42.tar.gz.sig
# sha256sum pcre-8.42.tar.gz
#
ARG PCRE_VERSION=8.42
ARG PCRE_DOWNLOAD_SHA256=69acbc2fbdefb955d42a4c606dfde800c2885711d2979e356c0636efde9ec3b5
RUN curl -fsSL "https://ftp.pcre.org/pub/pcre/pcre-{$PCRE_VERSION}.tar.gz" -o pcre.tar.gz \
&& echo "$PCRE_DOWNLOAD_SHA256 pcre.tar.gz" | sha256sum -c - \
&& CWD=`pwd` && TMP=`mktemp -d` \
&& tar -C $TMP -zxvf pcre.tar.gz \
&& cd $TMP/pcre* \
&& mkdir -p /tmp/extra \
&& CFLAGS="-fpic -fPIC" ./configure --enable-static=yes --enable-shared=no --enable-utf --enable-unicode-properties --enable-pcre8 --enable-pcre16 --enable-pcre32 --prefix=/tmp/extra \
&& make -j8 \
&& make install \
&& cd $CWD && rm -rf $TMP && rm -rf pcre.tar.gz
# Curl 7.63.0
#
# The curl library provides PGP signatures for verifying downloads. Originally, I tried to do some
# PGP validation in the Dockerfile, but I ran into trouble with flaky key servers. To streamline
# things, I verified the download manually and then generated a sha256 checksum with the following
# commands:
# gpg --recv-key B71E12C2
# gpg curl-7.63.0.tar.gz.asc
# sha256sum curl-7.63.0.tar.gz
#
ARG CURL_VERSION=7.63.0
ARG CURL_DOWNLOAD_SHA256=d483b89062832e211c887d7cf1b65c902d591b48c11fe7d174af781681580b41
RUN curl -fsSL "https://curl.haxx.se/download/curl-{$CURL_VERSION}.tar.gz" -o curl.tar.gz \
&& echo "$CURL_DOWNLOAD_SHA256 curl.tar.gz" | sha256sum -c - \
&& CWD=`pwd` && TMP=`mktemp -d` \
&& tar -C $TMP -zxvf curl.tar.gz \
&& cd $TMP/curl* \
&& CFLAGS="-fpic -fPIC" ./configure --enable-static=yes --enable-shared=no --with-ssl --enable-ipv6 --with-gssapi --with-libidn --enable-ldaps --with-libssh2 --enable-threaded-resolver --with-libmetalink --prefix=/tmp/extra \
&& make V=1 \
&& make install \
&& cd $CWD && rm -rf $TMP && rm -rf curl.tar.gz
# Compiler and linker flags for statically linking updated libraries
ENV CFLAGS="-fpic -fPIC -I/tmp/extra/include"
ENV CURL_CFLAGS='-DCURL_STATICLIB -I/tmp/extra/include'
ENV CURL_CPPFLAGS='-DCURL_STATICLIB -I/tmp/extra/include'
# Configure flags for CentOS 6 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-BLAS-shlib \
--enable-prebuilt-html"
# RHEL 6 doesn't have texi2any, so use makeinfo.
ENV MAKEINFO=makeinfo
# RHEL 6 doesn't have the inconsolata font, so override the defaults.
ENV R_RD4PDF="times,hyper"
# Copy a script to help set up the environment
COPY env_centos6.sh ./env.sh
COPY build.sh .
# Copy a script to clean up after the build
COPY clean_centos6.sh ./clean.sh
ENTRYPOINT ./build.sh

View file

@ -0,0 +1,77 @@
FROM centos:centos7
ENV OS_IDENTIFIER centos-7
RUN yum -y update \
&& yum -y install epel-release \
&& yum clean all
RUN yum -y update \
&& yum -y install \
atlas-devel \
autoconf \
automake \
blas-devel \
bzip2-devel \
cairo-devel \
gcc-c++ \
gcc-gfortran \
gcc-objc \
java-1.8.0-openjdk-devel \
java-1.8.0-openjdk-headless \
lapack-devel \
less \
libICE-devel \
libSM-devel \
libX11-devel \
libXmu-devel \
libXt-devel \
libcurl-devel \
libicu-devel \
libjpeg-devel \
libpng-devel \
libtiff-devel \
libtool \
make \
ncurses-devel \
openblas-devel \
pango-devel \
pcre-devel \
pcre2-devel \
python-pip \
readline-devel \
tcl-devel \
tex \
texinfo-tex \
texlive-collection-latexrecommended \
tk-devel \
tre-devel \
valgrind-devel \
wget \
xpdf \
xz-devel \
zlib-devel \
&& yum clean all
RUN pip install awscli
RUN chmod 0777 /opt
# Configure flags for CentOS 7 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-BLAS-shlib \
--enable-prebuilt-html \
--with-system-tre"
# RHEL 7 doesn't have the inconsolata font, so override the defaults.
ENV R_RD4PDF="times,hyper"
COPY build.sh .
ENTRYPOINT ./build.sh

View file

@ -0,0 +1,17 @@
FROM debian:stretch
ENV OS_IDENTIFIER debian-9
RUN set -x \
&& export DEBIAN_FRONTEND=noninteractive \
&& echo 'deb-src http://deb.debian.org/debian stretch main' >> /etc/apt/sources.list \
&& apt-get update \
&& apt-get install -y libatlas3-base libcurl4-openssl-dev libicu-dev wget python-pip \
&& apt-get build-dep -y r-base
RUN pip install awscli
RUN chmod 0777 /opt
COPY build.sh .
ENTRYPOINT ./build.sh

View file

@ -0,0 +1,82 @@
FROM opensuse/leap:15.0
ENV OS_IDENTIFIER opensuse-15
# Most of these packages, and also the configure options that follow were determined
# by reviewing "R-base.spec" from the following OpenSUSE RPM:
# https://download.opensuse.org/repositories/devel:/languages:/R:/released/openSUSE_Leap_42.3/src/R-base-3.5.3-103.1.src.rpm
RUN zypper --non-interactive update
RUN zypper --non-interactive --gpg-auto-import-keys -n install \
atlascpp-devel \
blas-devel \
bzip2 \
cairo-devel \
fdupes \
gcc \
gcc-c++ \
gcc-fortran \
glib2-devel \
glibc-locale \
help2man \
java-1_8_0-openjdk-devel \
lapack-devel \
libX11-devel \
libXScrnSaver-devel \
libXmu-devel \
libXt-devel \
libbz2-devel \
libcurl-devel \
libicu-devel \
libjpeg-devel \
libpng-devel \
libtiff-devel \
pango-devel \
pcre-devel \
perl \
perl-macros \
python \
python-pip \
readline-devel \
rpm-build \
shadow \
tcl-devel \
texinfo \
texlive-bibtex \
texlive-cm-super \
texlive-dvips \
texlive-helvetic \
texlive-inconsolata \
texlive-latex \
texlive-makeindex \
texlive-metafont \
texlive-psnfss \
texlive-tex \
texlive-times \
tk-devel \
unzip \
wget \
xdg-utils \
xorg-x11-devel \
xz-devel \
zip \
zlib-devel \
&& zypper clean
RUN pip install awscli
RUN chmod 0777 /opt
# Configure flags for SUSE that don't use the defaults in build.sh
ENV CONFIGURE_OPTIONS="\
--enable-R-shlib \
--with-blas \
--with-lapack \
--with-tcltk \
--with-x \
--enable-memory-profiling \
--with-tcl-config=/usr/lib64/tclConfig.sh \
--with-tk-config=/usr/lib64/tkConfig.sh"
COPY build.sh .
ENTRYPOINT ./build.sh

View file

@ -0,0 +1,86 @@
FROM opensuse:42.3
ENV OS_IDENTIFIER opensuse-42
# Most of these packages, and also the configure options that follow were determined
# by reviewing "R-base.spec" from the following OpenSUSE RPM:
# https://download.opensuse.org/repositories/devel:/languages:/R:/released/openSUSE_Leap_42.3/src/R-base-3.5.3-103.1.src.rpm
RUN zypper --non-interactive update
RUN zypper --non-interactive --gpg-auto-import-keys -n install \
atlascpp-devel \
blas-devel \
bzip2 \
cairo-devel \
fdupes \
gcc \
gcc-c++ \
gcc-fortran \
glib2-devel \
glibc-locale \
help2man \
java-1_8_0-openjdk-devel \
lapack-devel \
libX11-devel \
libXScrnSaver-devel \
libXmu-devel \
libXt-devel \
libbz2-devel \
libcurl-devel \
libicu-devel \
libjpeg-devel \
libpng-devel \
libtiff-devel \
pango-devel \
pcre-devel \
perl \
perl-macros \
python \
python-pip \
readline-devel \
rpm-build \
shadow \
tcl-devel \
texinfo \
texlive-bibtex \
texlive-cm-super \
texlive-dvips \
texlive-helvetic \
texlive-inconsolata \
texlive-latex \
texlive-makeindex \
texlive-metafont \
texlive-psnfss \
texlive-tex \
texlive-times \
tk-devel \
unzip \
wget \
xdg-utils \
xorg-x11-devel \
xz-devel \
zip \
zlib-devel \
&& zypper clean
RUN pip install awscli
RUN chmod 0777 /opt
# SUSE 12 doesn't have texi2any, so use makeinfo.
ENV MAKEINFO=makeinfo
# Configure flags for SUSE that don't use the defaults in build.sh
ENV CONFIGURE_OPTIONS="\
--enable-R-shlib \
--with-blas \
--with-lapack \
--with-tcltk \
--with-x \
--enable-memory-profiling \
--with-tcl-config=/usr/lib64/tclConfig.sh \
--with-tk-config=/usr/lib64/tkConfig.sh \
--enable-prebuilt-html"
COPY build.sh .
ENTRYPOINT ./build.sh

View file

@ -0,0 +1,17 @@
FROM ubuntu:xenial
ENV OS_IDENTIFIER ubuntu-1604
RUN set -x \
&& sed -i "s|# deb-src|deb-src|g" /etc/apt/sources.list \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y libatlas3-base libcurl4-openssl-dev libicu-dev wget python-pip \
&& apt-get build-dep -y r-base
RUN pip install awscli
RUN chmod 0777 /opt
COPY build.sh .
ENTRYPOINT ./build.sh

View file

@ -0,0 +1,17 @@
FROM ubuntu:bionic
ENV OS_IDENTIFIER ubuntu-1804
RUN set -x \
&& sed -i "s|# deb-src|deb-src|g" /etc/apt/sources.list \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y libatlas3-base libcurl4-openssl-dev libicu-dev wget python-pip \
&& apt-get build-dep -y r-base
RUN pip install awscli
RUN chmod 0777 /opt
COPY build.sh .
ENTRYPOINT ./build.sh

107
builder/build.sh Executable file
View file

@ -0,0 +1,107 @@
#!/bin/bash
set -e
export CRAN=${CRAN-"https://cran.rstudio.com"}
export S3_BUCKET_PREFIX=${S3_BUCKET_PREFIX-""}
export OS_IDENTIFIER=${OS_IDENTIFIER-"unknown"}
export TARBALL_NAME="R-${R_VERSION}-${OS_IDENTIFIER}.tar.gz"
# Some Dockerfiles may copy a `/env.sh` to set up environment variables
# that require command substitution. If this file exists, source it.
if [[ -f /env.sh ]]; then
echo "Sourcing environment variables"
source /env.sh
fi
# upload_r()
upload_r() {
baseName="r/${OS_IDENTIFIER}"
if [ -n "$S3_BUCKET" ] && [ "$S3_BUCKET" != "" ]; then
echo "Storing artifact on s3: ${S3_BUCKET}, tarball: ${TARBALL_NAME}"
aws s3 cp /tmp/${TARBALL_NAME} s3://${S3_BUCKET}/${S3_BUCKET_PREFIX}${baseName}/${TARBALL_NAME}
fi
if [ -n "$LOCAL_STORE" ] && [ "$LOCAL_STORE" != '' ]; then
echo "Storing artifact locally: ${LOCAL_STORE}, tarball: ${TARBALL_NAME}"
mkdir -p ${LOCAL_STORE}/${baseName}
cp /tmp/${TARBALL_NAME} ${LOCAL_STORE}/${baseName}/${TARBALL_NAME}.tar.gz
fi
}
# archive_r() - $1 as r version
archive_r() {
tar czf /tmp/${TARBALL_NAME} --directory=/opt/R ${1} --owner=0 --group=0
}
fetch_r_source() {
echo "Downloading R-${1}"
wget -q ${CRAN}/src/base/R-3/R-${1}.tar.gz -O /tmp/R-${1}.tar.gz
echo "Extracting R-${1}"
tar xf /tmp/R-${1}.tar.gz -C /tmp
rm /tmp/R-${1}.tar.gz
}
# On CentOS 6, we need to clean up references to the static library and header paths.
clean_r() {
if [[ -f /clean.sh ]]; then
echo "Cleaning R build on CentOS 6"
source /clean.sh
fi
}
# compile_r() - $1 as r version
compile_r() {
cd /tmp/R-${1}
# tools/config.guess in R versions older than 3.2.2 guess 'unknown' instead of 'pc'
# test the version and properly set the flag.
build_flag='--build=x86_64-pc-linux-gnu'
if _version_is_greater_than ${R_VERSION} 3.2.2; then
build_flag=''
fi
# Default configure options. Some Dockerfiles override this with an ENV directive.
default_configure_options="\
--enable-R-shlib \
--with-tcltk \
--enable-memory-profiling \
--with-x \
--with-blas \
--with-lapack"
CONFIGURE_OPTIONS=${CONFIGURE_OPTIONS:-$default_configure_options}
# set some common environment variables for the configure step
AWK=/usr/bin/awk \
LIBnn=lib \
PAGER=/usr/bin/pager \
PERL=/usr/bin/perl \
R_PDFVIEWER=xdg-open \
R_BROWSER=xdg-open \
R_PAPERSIZE=letter \
R_PRINTCMD=/usr/bin/lpr \
R_UNZIPCMD=/usr/bin/unzip \
R_ZIPCMD=/usr/bin/zip \
./configure \
--prefix=/opt/R/${1} \
${CONFIGURE_OPTIONS} \
${build_flag}
make clean
make
make install
}
set_up_environment() {
mkdir -p /opt/R
}
_version_is_greater_than() {
test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"
}
###### RUN R COMPILE PROCEDURE ######
set_up_environment
fetch_r_source $R_VERSION
compile_r $R_VERSION
clean_r
archive_r $R_VERSION
upload_r $R_VERSION

14
builder/clean_centos6.sh Executable file
View file

@ -0,0 +1,14 @@
#!/bin/bash
# For CentOS 6, we need to clean references to the static library and header paths
# out of the R configuration files
sed -i 's|-Wl,--whole-archive /tmp/extra/lib/libz.a /tmp/extra/lib/libbz2.a /tmp/extra/lib/liblzma.a /tmp/extra/lib/libpcre.a /tmp/extra/lib/libcurl.a -Wl,--no-whole-archive -L/tmp/extra/lib/||g' /opt/R/${R_VERSION}/lib/R/etc/Makeconf
sed -i 's|-Wl,--whole-archive /tmp/extra/lib/libz.a /tmp/extra/lib/libbz2.a /tmp/extra/lib/liblzma.a /tmp/extra/lib/libpcre.a /tmp/extra/lib/libcurl.a -Wl,--no-whole-archive -L/tmp/extra/lib/||g' /opt/R/${R_VERSION}/lib/pkgconfig/libR.pc
sed -i 's|-ldl -lpthread .* -lldap -lz -lrt||g' /opt/R/${R_VERSION}/lib/R/etc/Makeconf
sed -i 's|-ldl -lpthread .* -lldap -lz -lrt||g' /opt/R/${R_VERSION}/lib/pkgconfig/libR.pc
sed -i 's|-I/tmp/extra/include||g' /opt/R/${R_VERSION}/lib/R/etc/Makeconf
sed -i 's|-I/tmp/extra/include||g' /opt/R/${R_VERSION}/lib/R/bin/libtool
sed -i 's|-ldl -lpthread .* -lldap -lz||g' /opt/R/${R_VERSION}/lib/R/etc/Makeconf
sed -i 's|-ldl -lpthread .* -lldap||g' /opt/R/${R_VERSION}/lib/R/etc/Makeconf
sed -i 's|:/tmp/extra/lib||g' /opt/R/${R_VERSION}/lib/R/etc/ldpaths
sed -i 's|/tmp/extra/lib||g' /opt/R/${R_VERSION}/lib/R/etc/ldpaths

View file

@ -0,0 +1,80 @@
version: '2.0'
services:
ubuntu-1604:
command: ./build.sh
environment:
- R_VERSION=${R_VERSION}
- LOCAL_STORE=/tmp/output
build:
context: .
dockerfile: Dockerfile.ubuntu-1604
image: r-builds:ubuntu-1604
volumes:
- ./integration/tmp:/tmp/output
ubuntu-1804:
command: ./build.sh
environment:
- R_VERSION=${R_VERSION}
- LOCAL_STORE=/tmp/output
build:
context: .
dockerfile: Dockerfile.ubuntu-1804
image: r-builds:ubuntu-1804
volumes:
- ./integration/tmp:/tmp/output
debian-9:
command: ./build.sh
environment:
- R_VERSION=${R_VERSION}
- LOCAL_STORE=/tmp/output
build:
context: .
dockerfile: Dockerfile.debian-9
image: r-builds:debian-9
volumes:
- ./integration/tmp:/tmp/output
centos-6:
command: ./build.sh
environment:
- R_VERSION=${R_VERSION}
- LOCAL_STORE=/tmp/output
build:
context: .
dockerfile: Dockerfile.centos-6
image: r-builds:centos-6
volumes:
- ./integration/tmp:/tmp/output
centos-7:
command: ./build.sh
environment:
- R_VERSION=${R_VERSION}
- LOCAL_STORE=/tmp/output
build:
context: .
dockerfile: Dockerfile.centos-7
image: r-builds:centos-7
volumes:
- ./integration/tmp:/tmp/output
opensuse-42:
command: ./build.sh
environment:
- R_VERSION=${R_VERSION}
- LOCAL_STORE=/tmp/output
build:
context: .
dockerfile: Dockerfile.opensuse-42
image: r-builds:opensuse-42
volumes:
- ./integration/tmp:/tmp/output
opensuse-15:
command: ./build.sh
environment:
- R_VERSION=${R_VERSION}
- LOCAL_STORE=/tmp/output
build:
context: .
dockerfile: Dockerfile.opensuse-15
image: r-builds:opensuse-15
volumes:
- ./integration/tmp:/tmp/output

14
builder/env_centos6.sh Executable file
View file

@ -0,0 +1,14 @@
# Test to see if $R_VERSION is <= 3.1.3. If so, append some additional configure options
# to the $CONFIGURE_OPTIONS env var.
NEWLINE=$'\n'
if [[ "$(printf '%s\n' "${R_VERSION}${NEWLINE}3.1.3" | sort -V | head -n 1)" == "$R_VERSION" ]]; then \
export CONFIGURE_OPTIONS="${CONFIGURE_OPTIONS} \
--with-system-zlib \
--with-system-bzlib \
--with-system-pcre \
--with-system-xz"
fi
# Get library linking information from CURL. This is then used to populate LDFLAGS
export CURL_LIBS="`/tmp/extra/bin/curl-config --libs`"
export LDFLAGS="-ldl -lpthread -lc -lrt -Wl,--as-needed -Wl,--whole-archive /tmp/extra/lib/libz.a /tmp/extra/lib/libbz2.a /tmp/extra/lib/liblzma.a /tmp/extra/lib/libpcre.a /tmp/extra/lib/libcurl.a -Wl,--no-whole-archive -L/tmp/extra/lib/ ${CURL_LIBS}"