Add support for Ubuntu 24.04
This commit is contained in:
parent
49fd6fef5d
commit
111621f79a
3 changed files with 153 additions and 4 deletions
33
builder/Dockerfile.ubuntu-2404
Normal file
33
builder/Dockerfile.ubuntu-2404
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
FROM ubuntu:noble
|
||||
|
||||
ENV OS_IDENTIFIER ubuntu-2404
|
||||
|
||||
RUN set -x \
|
||||
&& sed -i "s|Types: deb|Types: deb deb-src|g" /etc/apt/sources.list.d/ubuntu.sources \
|
||||
&& export DEBIAN_FRONTEND=noninteractive \
|
||||
&& apt update \
|
||||
&& apt install -y curl libcurl4-openssl-dev libicu-dev libopenblas0-pthread libpcre2-dev libpcre3-dev unzip wget \
|
||||
&& apt build-dep -y r-base
|
||||
|
||||
# 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 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
|
||||
|
||||
# R 3.x requires PCRE2 for Pango support on Ubuntu 24
|
||||
ENV INCLUDE_PCRE2_IN_R_3 yes
|
||||
|
||||
COPY package.ubuntu-2404 /package.sh
|
||||
COPY build.sh .
|
||||
COPY patches /patches
|
||||
ENTRYPOINT ./build.sh
|
||||
|
|
@ -23,6 +23,18 @@ services:
|
|||
image: r-builds:ubuntu-2204
|
||||
volumes:
|
||||
- ./integration/tmp:/tmp/output
|
||||
ubuntu-2404:
|
||||
command: ./build.sh
|
||||
environment:
|
||||
- R_VERSION=${R_VERSION}
|
||||
- R_INSTALL_PATH=${R_INSTALL_PATH}
|
||||
- LOCAL_STORE=/tmp/output
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.ubuntu-2404
|
||||
image: r-builds:ubuntu-2404
|
||||
volumes:
|
||||
- ./integration/tmp:/tmp/output
|
||||
debian-10:
|
||||
command: ./build.sh
|
||||
environment:
|
||||
|
|
|
|||
77
builder/package.ubuntu-2404
Normal file
77
builder/package.ubuntu-2404
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ ! -d /tmp/output/${OS_IDENTIFIER} ]]; then
|
||||
mkdir -p "/tmp/output/${OS_IDENTIFIER}"
|
||||
fi
|
||||
|
||||
# R 3.x requires PCRE1. On Ubuntu 24, R 3.x also requires PCRE2 for Pango support.
|
||||
pcre_libs='- libpcre2-dev'
|
||||
if [[ "${R_VERSION}" =~ ^3 ]]; then
|
||||
pcre_libs='- libpcre2-dev
|
||||
- libpcre3-dev'
|
||||
fi
|
||||
|
||||
deflate_libs='# - libdeflate-dev'
|
||||
if grep -q '^LIBS *=.*[-]ldeflate' ${R_INSTALL_PATH}/lib/R/etc/Makeconf; then
|
||||
deflate_libs='- libdeflate-dev'
|
||||
fi
|
||||
|
||||
cat <<EOF > /tmp/nfpm.yml
|
||||
name: r-${R_VERSION}
|
||||
version: 1
|
||||
version_schema: none
|
||||
section: universe/math
|
||||
priority: optional
|
||||
arch: $(dpkg --print-architecture)
|
||||
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
|
||||
- libcurl4t64
|
||||
${deflate_libs}
|
||||
- libglib2.0-0t64
|
||||
- libgomp1
|
||||
- libicu-dev
|
||||
- libjpeg8
|
||||
- liblzma-dev
|
||||
- libopenblas-dev
|
||||
- libpango-1.0-0
|
||||
- libpangocairo-1.0-0
|
||||
- libpaper-utils
|
||||
${pcre_libs}
|
||||
- libpng16-16t64
|
||||
- libreadline8t64
|
||||
- libtcl8.6
|
||||
- libtiff6
|
||||
- libtirpc-dev
|
||||
- libtk8.6
|
||||
- libx11-6
|
||||
- libxt6t64
|
||||
- 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)
|
||||
Loading…
Reference in a new issue