From 782707f3523144e7011e148ebd4f379af8aae8a1 Mon Sep 17 00:00:00 2001 From: pat-s Date: Fri, 24 Apr 2026 13:20:25 +0200 Subject: [PATCH] feat: add Ubuntu 26.04 (Resolute) support Add Dockerfile, package script, and CI/build configuration for ubuntu-2604 across all build targets. --- .crow/build.yaml | 8 ++++ Justfile | 5 +++ Makefile | 2 +- builder/Dockerfile.ubuntu-2604 | 31 ++++++++++++++ builder/docker-compose.yml | 12 ++++++ builder/package.ubuntu-2604 | 77 ++++++++++++++++++++++++++++++++++ test/docker-compose.yml | 8 ++++ 7 files changed, 142 insertions(+), 1 deletion(-) create mode 100644 builder/Dockerfile.ubuntu-2604 create mode 100644 builder/package.ubuntu-2604 diff --git a/.crow/build.yaml b/.crow/build.yaml index b77cddc..0059c29 100644 --- a/.crow/build.yaml +++ b/.crow/build.yaml @@ -43,6 +43,14 @@ matrix: PLATFORM_ID: 2404 ARCH: amd64 ARCH_ID: amd64 + - PLATFORM: ubuntu-2604 + PLATFORM_ID: 2604 + ARCH: arm64 + ARCH_ID: arm64 + - PLATFORM: ubuntu-2604 + PLATFORM_ID: 2604 + ARCH: amd64 + ARCH_ID: amd64 # - PLATFORM: alpine-320 # PLATFORM_ID: alpine320 # ARCH: arm64 diff --git a/Justfile b/Justfile index 6d15aad..1a9d969 100644 --- a/Justfile +++ b/Justfile @@ -8,6 +8,11 @@ build-r-ubuntu-2404 R_VERSION: export R_VERSION={{R_VERSION}}; \ make build-r-$PLATFORM +build-r-ubuntu-2604 R_VERSION: + export PLATFORM=ubuntu-2604; \ + export R_VERSION={{R_VERSION}}; \ + make build-r-$PLATFORM + build-r-centos-8 R_VERSION: export PLATFORM=centos-8; \ export R_VERSION={{R_VERSION}}; \ diff --git a/Makefile b/Makefile index 38ef764..4b3bde4 100644 --- a/Makefile +++ b/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 fedora-40 alpine-321 alpine-322 alpine-323 rhel-10 +PLATFORMS := ubuntu-2004 ubuntu-2204 ubuntu-2404 ubuntu-2604 debian-10 debian-11 debian-12 centos-7 centos-8 rhel-9 opensuse-155 fedora-38 fedora-39 fedora-40 alpine-321 alpine-322 alpine-323 rhel-10 SLS_BINARY ?= ./node_modules/serverless/bin/serverless.js deps: diff --git a/builder/Dockerfile.ubuntu-2604 b/builder/Dockerfile.ubuntu-2604 new file mode 100644 index 0000000..d290325 --- /dev/null +++ b/builder/Dockerfile.ubuntu-2604 @@ -0,0 +1,31 @@ +FROM ubuntu:resolute + +ENV OS_IDENTIFIER ubuntu-2604 + +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 s5cmd for S3 uploads (much faster than AWS CLI) +RUN ARCH=$(uname -m); if [ "$ARCH" = "x86_64" ]; then S5CMD_ARCH="64bit"; else S5CMD_ARCH="arm64"; fi && \ + curl -sL "https://github.com/peak/s5cmd/releases/download/v2.3.0/s5cmd_2.3.0_Linux-${S5CMD_ARCH}.tar.gz" | tar xz -C /usr/local/bin s5cmd + +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 26 +ENV INCLUDE_PCRE2_IN_R_3 yes + +COPY package.ubuntu-2604 /package.sh +COPY build.sh . +COPY patches /patches +ENTRYPOINT ./build.sh diff --git a/builder/docker-compose.yml b/builder/docker-compose.yml index 63094ea..ee72ab7 100644 --- a/builder/docker-compose.yml +++ b/builder/docker-compose.yml @@ -35,6 +35,18 @@ services: image: r-builds:ubuntu-2404 volumes: - /tmp/ubuntu-2404:/tmp/output/ubuntu-2404 + ubuntu-2604: + command: ./build.sh + environment: + - R_VERSION=${R_VERSION} + - R_INSTALL_PATH=${R_INSTALL_PATH} + - LOCAL_STORE=/tmp/output + build: + context: . + dockerfile: Dockerfile.ubuntu-2604 + image: r-builds:ubuntu-2604 + volumes: + - /tmp/ubuntu-2604:/tmp/output/ubuntu-2604 alpine-320: command: ./build.sh environment: diff --git a/builder/package.ubuntu-2604 b/builder/package.ubuntu-2604 new file mode 100644 index 0000000..bae464d --- /dev/null +++ b/builder/package.ubuntu-2604 @@ -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 26, 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 < /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 +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) diff --git a/test/docker-compose.yml b/test/docker-compose.yml index 7c11ff4..13d125d 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -23,6 +23,14 @@ services: - R_VERSION=${R_VERSION} volumes: - ../:/r-builds + ubuntu-2604: + image: ubuntu:resolute + command: /r-builds/test/test-apt.sh + environment: + - OS_IDENTIFIER=ubuntu-2604 + - R_VERSION=${R_VERSION} + volumes: + - ../:/r-builds debian-12: image: debian:bookworm command: /r-builds/test/test-apt.sh