commit
fd4068ee09
7 changed files with 201 additions and 2 deletions
2
Makefile
2
Makefile
|
|
@ -1,4 +1,4 @@
|
||||||
PLATFORMS := ubuntu-2004 ubuntu-2204 ubuntu-2404 debian-10 debian-11 debian-12 centos-7 centos-8 rhel-9 opensuse-155 fedora-38 fedora-39
|
PLATFORMS := ubuntu-2004 ubuntu-2204 ubuntu-2404 debian-10 debian-11 debian-12 centos-7 centos-8 rhel-9 opensuse-155 fedora-38 fedora-39 fedora-40
|
||||||
SLS_BINARY ?= ./node_modules/serverless/bin/serverless.js
|
SLS_BINARY ?= ./node_modules/serverless/bin/serverless.js
|
||||||
|
|
||||||
deps:
|
deps:
|
||||||
|
|
|
||||||
88
builder/Dockerfile.fedora-40
Normal file
88
builder/Dockerfile.fedora-40
Normal file
|
|
@ -0,0 +1,88 @@
|
||||||
|
FROM fedora:40
|
||||||
|
|
||||||
|
ENV OS_IDENTIFIER fedora-40
|
||||||
|
|
||||||
|
RUN dnf -y upgrade \
|
||||||
|
&& dnf -y install dnf-plugins-core \
|
||||||
|
&& dnf -y install \
|
||||||
|
autoconf \
|
||||||
|
automake \
|
||||||
|
bzip2-devel \
|
||||||
|
cairo-devel \
|
||||||
|
flexiblas-devel \
|
||||||
|
gcc-c++ \
|
||||||
|
gcc-gfortran \
|
||||||
|
java-11-openjdk-devel \
|
||||||
|
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 \
|
||||||
|
readline-devel \
|
||||||
|
rpm-build \
|
||||||
|
tcl-devel \
|
||||||
|
tex \
|
||||||
|
texinfo-tex \
|
||||||
|
texlive-collection-latexrecommended \
|
||||||
|
tk-devel \
|
||||||
|
unzip \
|
||||||
|
valgrind-devel \
|
||||||
|
which \
|
||||||
|
wget \
|
||||||
|
xz-devel \
|
||||||
|
zlib-devel \
|
||||||
|
&& dnf clean all
|
||||||
|
|
||||||
|
# Install AWS CLI
|
||||||
|
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip" && \
|
||||||
|
unzip awscliv2.zip && \
|
||||||
|
./aws/install && \
|
||||||
|
rm -rf aws awscliv2.zip
|
||||||
|
|
||||||
|
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" && \
|
||||||
|
dnf install -y "nfpm_$(cat /tmp/arch).rpm" && \
|
||||||
|
rm "nfpm_$(cat /tmp/arch).rpm"
|
||||||
|
|
||||||
|
RUN chmod 0777 /opt
|
||||||
|
|
||||||
|
# Configure flags for 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 \
|
||||||
|
--with-blas=flexiblas \
|
||||||
|
--with-lapack=flexiblas"
|
||||||
|
|
||||||
|
# Make sure that patching Java does not break R.
|
||||||
|
# R's default JAVA_HOME path includes the exact Java version on CentOS/RHEL, which
|
||||||
|
# requires users to run `R CMD javareconf` even on minor/patch upgrades. Use the
|
||||||
|
# major version symlink to avoid this.
|
||||||
|
# https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Java-support
|
||||||
|
# https://solutions.posit.co/envs-pkgs/using-rjava/
|
||||||
|
ENV JAVA_HOME=/usr/lib/jvm/jre-11-openjdk
|
||||||
|
|
||||||
|
# R 3.x requires PCRE2 for Pango support on RHEL 9
|
||||||
|
ENV INCLUDE_PCRE2_IN_R_3 yes
|
||||||
|
|
||||||
|
COPY package.fedora-40 /package.sh
|
||||||
|
COPY build.sh .
|
||||||
|
COPY patches /patches
|
||||||
|
ENTRYPOINT ./build.sh
|
||||||
|
|
@ -143,3 +143,15 @@ services:
|
||||||
image: r-builds:fedora-39
|
image: r-builds:fedora-39
|
||||||
volumes:
|
volumes:
|
||||||
- ./integration/tmp:/tmp/output
|
- ./integration/tmp:/tmp/output
|
||||||
|
fedora-40:
|
||||||
|
command: ./build.sh
|
||||||
|
environment:
|
||||||
|
- R_VERSION=${R_VERSION}
|
||||||
|
- R_INSTALL_PATH=${R_INSTALL_PATH}
|
||||||
|
- LOCAL_STORE=/tmp/output
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile.fedora-40
|
||||||
|
image: r-builds:fedora-40
|
||||||
|
volumes:
|
||||||
|
- ./integration/tmp:/tmp/output
|
||||||
|
|
|
||||||
75
builder/package.fedora-40
Normal file
75
builder/package.fedora-40
Normal file
|
|
@ -0,0 +1,75 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [[ ! -d /tmp/output/${OS_IDENTIFIER} ]]; then
|
||||||
|
mkdir -p "/tmp/output/${OS_IDENTIFIER}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# R 3.x requires PCRE1. On RHEL 9, R 3.x also requires PCRE2 for Pango support.
|
||||||
|
pcre_libs='- pcre2-devel'
|
||||||
|
if [[ "${R_VERSION}" =~ ^3 ]]; then
|
||||||
|
pcre_libs='- pcre2-devel
|
||||||
|
- pcre-devel'
|
||||||
|
fi
|
||||||
|
|
||||||
|
blas_lib='flexiblas-devel'
|
||||||
|
|
||||||
|
# Create postremove script to remove empty directories, as nFPM doesn't include them in the RPM files.
|
||||||
|
cat <<EOF >> /after-remove.sh
|
||||||
|
if [ -d ${R_INSTALL_PATH} ]; then
|
||||||
|
rm -r ${R_INSTALL_PATH}
|
||||||
|
fi
|
||||||
|
EOF
|
||||||
|
|
||||||
|
scripts="scripts:
|
||||||
|
postremove: /after-remove.sh
|
||||||
|
"
|
||||||
|
|
||||||
|
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:
|
||||||
|
- bzip2-devel
|
||||||
|
- gcc
|
||||||
|
- gcc-c++
|
||||||
|
- gcc-gfortran
|
||||||
|
- libcurl-devel
|
||||||
|
- libicu-devel
|
||||||
|
- libSM
|
||||||
|
- libtiff
|
||||||
|
- libXmu
|
||||||
|
- libXt
|
||||||
|
- make
|
||||||
|
- ${blas_lib}
|
||||||
|
- pango
|
||||||
|
${pcre_libs}
|
||||||
|
- tcl
|
||||||
|
- tk
|
||||||
|
- unzip
|
||||||
|
- util-linux-core
|
||||||
|
- which
|
||||||
|
- xz-devel
|
||||||
|
- zip
|
||||||
|
- zlib-devel
|
||||||
|
contents:
|
||||||
|
- src: ${R_INSTALL_PATH}
|
||||||
|
dst: ${R_INSTALL_PATH}
|
||||||
|
${scripts}
|
||||||
|
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)
|
||||||
|
|
@ -299,6 +299,20 @@ rBuildsBatchJobDefinitionFedora39:
|
||||||
Image: !Sub "${AWS::AccountId}.dkr.ecr.${AWS::Region}.amazonaws.com/r-builds:fedora-39"
|
Image: !Sub "${AWS::AccountId}.dkr.ecr.${AWS::Region}.amazonaws.com/r-builds:fedora-39"
|
||||||
Timeout:
|
Timeout:
|
||||||
AttemptDurationSeconds: 7200
|
AttemptDurationSeconds: 7200
|
||||||
|
rBuildsBatchJobDefinitionFedora40:
|
||||||
|
Type: AWS::Batch::JobDefinition
|
||||||
|
Properties:
|
||||||
|
Type: container
|
||||||
|
ContainerProperties:
|
||||||
|
Command:
|
||||||
|
- ./build.sh
|
||||||
|
Vcpus: 4
|
||||||
|
Memory: 4096
|
||||||
|
JobRoleArn:
|
||||||
|
"Fn::GetAtt": [ rBuildsEcsTaskIamRole, Arn ]
|
||||||
|
Image: "#{AWS::AccountId}.dkr.ecr.#{AWS::Region}.amazonaws.com/r-builds:fedora-40"
|
||||||
|
Timeout:
|
||||||
|
AttemptDurationSeconds: 7200
|
||||||
|
|
||||||
# step function cloudwatch event trigger resources
|
# step function cloudwatch event trigger resources
|
||||||
rBuildsEventRuleIamRole:
|
rBuildsEventRuleIamRole:
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,9 @@ provider:
|
||||||
Ref: rBuildsBatchJobDefinitionFedora38
|
Ref: rBuildsBatchJobDefinitionFedora38
|
||||||
JOB_DEFINITION_ARN_fedora_39:
|
JOB_DEFINITION_ARN_fedora_39:
|
||||||
Ref: rBuildsBatchJobDefinitionFedora39
|
Ref: rBuildsBatchJobDefinitionFedora39
|
||||||
SUPPORTED_PLATFORMS: ubuntu-2004,ubuntu-2204,ubuntu-2404,debian-10,debian-11,debian-12,centos-7,centos-8,rhel-9,opensuse-155,fedora-38,fedora-39
|
JOB_DEFINITION_ARN_fedora_40:
|
||||||
|
Ref: rBuildsBatchJobDefinitionFedora40
|
||||||
|
SUPPORTED_PLATFORMS: ubuntu-2004,ubuntu-2204,ubuntu-2404,debian-10,debian-11,debian-12,centos-7,centos-8,rhel-9,opensuse-155,fedora-38,fedora-39,fedora-40
|
||||||
|
|
||||||
functions:
|
functions:
|
||||||
queueBuilds:
|
queueBuilds:
|
||||||
|
|
|
||||||
|
|
@ -95,3 +95,11 @@ services:
|
||||||
- R_VERSION=${R_VERSION}
|
- R_VERSION=${R_VERSION}
|
||||||
volumes:
|
volumes:
|
||||||
- ../:/r-builds
|
- ../:/r-builds
|
||||||
|
fedora-40:
|
||||||
|
image: fedora:40
|
||||||
|
command: /r-builds/test/test-yum.sh
|
||||||
|
environment:
|
||||||
|
- OS_IDENTIFIER=fedora-40
|
||||||
|
- R_VERSION=${R_VERSION}
|
||||||
|
volumes:
|
||||||
|
- ../:/r-builds
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue