Merge pull request #177 from rstudio/glin-eol

Discontinue openSUSE 15.3 and Ubuntu 18.04 builds for EOL
This commit is contained in:
Greg Lin 2023-07-11 11:52:32 -05:00 committed by GitHub
commit b541a8ff7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 354 deletions

View file

@ -1,92 +0,0 @@
FROM opensuse/leap:15.3
ENV OS_IDENTIFIER opensuse-153
# 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 \
bzip2 \
cairo-devel \
curl \
fdupes \
gcc \
gcc-c++ \
gcc-fortran \
glib2-devel \
glibc-locale \
help2man \
# openSUSE/SLES 15.3 originally shipped with ICU 65 (libicu-devel), but later
# added ICU 69 (icu.691-devel) in a patch update. Prefer ICU 69 because the devel
# packages can't coexist, and zypper now resolves libicu-devel to icu.691-devel.
icu.691-devel \
java-1_8_0-openjdk-devel \
libX11-devel \
libXScrnSaver-devel \
libXmu-devel \
libXt-devel \
libbz2-devel \
libcurl-devel \
libjpeg-devel \
libpng-devel \
libtiff-devel \
make \
pango-devel \
pcre-devel \
pcre2-devel \
perl \
perl-macros \
python \
python-pip \
readline-devel \
rpm-build \
shadow \
tcl-devel \
texinfo \
texlive-ae \
texlive-bibtex \
texlive-cm-super \
texlive-dvips \
texlive-fancyvrb \
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 if [ "$(arch)" == "aarch64" ]; then echo arm64; else echo amd64; fi > /tmp/arch
RUN curl -LO "https://github.com/goreleaser/nfpm/releases/download/v2.18.1/nfpm_$(cat /tmp/arch).rpm" && \
zypper --non-interactive --no-gpg-checks install "nfpm_$(cat /tmp/arch).rpm" && \
rm "nfpm_$(cat /tmp/arch).rpm"
RUN chmod 0777 /opt
# Configure flags for SUSE that don't use the defaults in build.sh
ENV CONFIGURE_OPTIONS="\
--enable-R-shlib \
--with-tcltk \
--with-x \
--enable-memory-profiling \
--with-tcl-config=/usr/lib64/tclConfig.sh \
--with-tk-config=/usr/lib64/tkConfig.sh"
COPY package.opensuse-153 /package.sh
COPY build.sh .
ENTRYPOINT ./build.sh

View file

@ -1,25 +0,0 @@
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 curl libcurl4-openssl-dev libicu-dev libopenblas-base libpcre2-dev wget python-pip \
&& apt-get build-dep -y r-base
RUN pip install awscli
RUN curl -LO "https://github.com/goreleaser/nfpm/releases/download/v2.18.1/nfpm_$(dpkg --print-architecture).deb" && \
apt install -y "./nfpm_$(dpkg --print-architecture).deb" && \
rm "nfpm_$(dpkg --print-architecture).deb"
RUN chmod 0777 /opt
# Override the default pager used by R
ENV PAGER /usr/bin/pager
COPY package.ubuntu-1804 /package.sh
COPY build.sh .
ENTRYPOINT ./build.sh

View file

@ -1,16 +1,4 @@
services:
ubuntu-1804:
command: ./build.sh
environment:
- R_VERSION=${R_VERSION}
- R_INSTALL_PATH=${R_INSTALL_PATH}
- LOCAL_STORE=/tmp/output
build:
context: .
dockerfile: Dockerfile.ubuntu-1804
image: r-builds:ubuntu-1804
volumes:
- ./integration/tmp:/tmp/output
ubuntu-2004:
command: ./build.sh
environment:
@ -107,18 +95,6 @@ services:
image: r-builds:rhel-9
volumes:
- ./integration/tmp:/tmp/output
opensuse-153:
command: ./build.sh
environment:
- R_VERSION=${R_VERSION}
- R_INSTALL_PATH=${R_INSTALL_PATH}
- LOCAL_STORE=/tmp/output
build:
context: .
dockerfile: Dockerfile.opensuse-153
image: r-builds:opensuse-153
volumes:
- ./integration/tmp:/tmp/output
opensuse-154:
command: ./build.sh
environment:

View file

@ -1,84 +0,0 @@
#!/bin/bash
if [[ ! -d /tmp/output/${OS_IDENTIFIER} ]]; then
mkdir -p "/tmp/output/${OS_IDENTIFIER}"
fi
# R 3.x requires PCRE1
pcre_lib='pcre2-devel'
if [[ "${R_VERSION}" =~ ^3 ]]; then
pcre_lib='pcre-devel'
fi
# create post-install script required for openblas
cat <<EOF >> /post-install.sh
mv ${R_INSTALL_PATH}/lib/R/lib/libRblas.so ${R_INSTALL_PATH}/lib/R/lib/libRblas.so.keep
ln -s /usr/lib64/libopenblas.so ${R_INSTALL_PATH}/lib/R/lib/libRblas.so
EOF
# create after-remove script to remove internal blas
cat <<EOF >> /after-remove.sh
if [ -d ${R_INSTALL_PATH} ]; then
rm -r ${R_INSTALL_PATH}
fi
EOF
if [ "$(arch)" == "aarch64" ]; then echo arm64; else echo amd64; fi > /tmp/arch
cat <<EOF > /tmp/nfpm.yml
name: R-${R_VERSION}
version: 1
version_schema: none
arch: $(cat /tmp/arch)
release: 1
maintainer: Posit Software, PBC <https://github.com/rstudio/r-builds>
description: |
GNU R statistical computation and graphics system
vendor: Posit Software, PBC
homepage: https://www.r-project.org
license: GPLv2+
depends:
- fontconfig
- gcc
- gcc-c++
- gcc-fortran
- glibc-locale
- gzip
- icu.691-devel
- libbz2-devel
- libcairo2
- libcurl-devel
- libfreetype6
- libgomp1
- libjpeg62
- libpango-1_0-0
- libreadline7
- libtiff5
- make
- openblas-devel
- ${pcre_lib}
- tar
- tcl
- tk
- unzip
- which
- xorg-x11
- xorg-x11-fonts-100dpi
- xorg-x11-fonts-75dpi
- xz-devel
- zip
- zlib-devel
contents:
- src: ${R_INSTALL_PATH}
dst: ${R_INSTALL_PATH}
scripts:
postinstall: /post-install.sh
postremove: /after-remove.sh
EOF
nfpm package \
-f /tmp/nfpm.yml \
-p rpm \
-t "/tmp/output/${OS_IDENTIFIER}"
export PKG_FILE=$(ls /tmp/output/${OS_IDENTIFIER}/R-${R_VERSION}*.rpm | head -1)

View file

@ -1,69 +0,0 @@
#!/bin/bash
if [[ ! -d /tmp/output/${OS_IDENTIFIER} ]]; then
mkdir -p "/tmp/output/${OS_IDENTIFIER}"
fi
# R 3.x requires PCRE1
pcre_lib='libpcre2-dev'
if [[ "${R_VERSION}" =~ ^3 ]]; then
pcre_lib='libpcre3-dev'
fi
cat <<EOF > /tmp/nfpm.yml
name: r-${R_VERSION}
version: 1
version_schema: none
section: universe/math
arch: $(dpkg --print-architecture)
priority: optional
maintainer: Posit Software, PBC <https://github.com/rstudio/r-builds>
description: |
GNU R statistical computation and graphics system
vendor: Posit Software, PBC
homepage: https://www.r-project.org
license: GPL-2
deb:
fields:
Bugs: https://github.com/rstudio/r-builds/issues
depends:
- g++
- gcc
- gfortran
- libbz2-dev
- libc6
- libcairo2
- libcurl4
- libglib2.0-0
- libgomp1
- libicu-dev
- libjpeg8
- liblzma-dev
- libopenblas-dev
- libpango-1.0-0
- libpangocairo-1.0-0
- libpaper-utils
- ${pcre_lib}
- libpng16-16
- libreadline7
- libtcl8.6
- libtiff5
- libtk8.6
- libx11-6
- libxt6
- make
- ucf
- unzip
- zip
- zlib1g-dev
contents:
- src: ${R_INSTALL_PATH}
dst: ${R_INSTALL_PATH}
EOF
nfpm package \
-f /tmp/nfpm.yml \
-p deb \
-t "/tmp/output/${OS_IDENTIFIER}"
export PKG_FILE=$(ls /tmp/output/${OS_IDENTIFIER}/r-${R_VERSION}*.deb | head -1)