-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #166 from rstudio/feature/debian-12
- Loading branch information
Showing
8 changed files
with
141 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM debian:bookworm | ||
|
||
ENV OS_IDENTIFIER debian-12 | ||
|
||
RUN set -x \ | ||
&& export DEBIAN_FRONTEND=noninteractive \ | ||
&& echo 'deb-src http://deb.debian.org/debian bookworm main' >> /etc/apt/sources.list \ | ||
&& apt-get update \ | ||
&& apt-get install -y curl gcc libcurl4-openssl-dev libicu-dev \ | ||
libopenblas0 libpcre2-dev make pipx wget \ | ||
&& apt-get build-dep -y r-base | ||
|
||
RUN pipx install awscli && pipx ensurepath | ||
|
||
RUN chmod 0777 /opt | ||
|
||
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" | ||
|
||
# Override the default pager used by R | ||
ENV PAGER /usr/bin/pager | ||
|
||
# R 3.x requires PCRE2 for Pango support on Debian 12 | ||
ENV INCLUDE_PCRE2_IN_R_3 yes | ||
|
||
COPY package.debian-12 /package.sh | ||
COPY build.sh . | ||
ENTRYPOINT ./build.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#!/bin/bash | ||
|
||
if [[ ! -d /tmp/output/${OS_IDENTIFIER} ]]; then | ||
mkdir -p "/tmp/output/${OS_IDENTIFIER}" | ||
fi | ||
|
||
# R 3.x requires PCRE1. On Debian 12, 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 | ||
|
||
cat <<EOF > /tmp/nfpm.yml | ||
name: r-${R_VERSION} | ||
version: 1 | ||
version_schema: none | ||
section: gnu-r | ||
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: | ||
- ca-certificates | ||
- g++ | ||
- gcc | ||
- gfortran | ||
- libbz2-dev | ||
- libc6 | ||
- libcairo2 | ||
- libcurl4-openssl-dev | ||
- libglib2.0-0 | ||
- libgomp1 | ||
- libicu-dev | ||
- liblzma-dev | ||
- libopenblas-dev | ||
- libpango-1.0-0 | ||
- libpangocairo-1.0-0 | ||
- libpaper-utils | ||
${pcre_libs} | ||
- libpng16-16 | ||
- libreadline8 | ||
- libtcl8.6 | ||
- libtiff6 | ||
- 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters