diff --git a/builder/Dockerfile.centos-7 b/builder/Dockerfile.centos-7 index 61451ec..a038cad 100644 --- a/builder/Dockerfile.centos-7 +++ b/builder/Dockerfile.centos-7 @@ -73,4 +73,5 @@ ENV R_RD4PDF="times,hyper" COPY package.centos-7 /package.sh COPY build.sh . +COPY patches /patches ENTRYPOINT ./build.sh diff --git a/builder/Dockerfile.centos-8 b/builder/Dockerfile.centos-8 index 5c535ab..fa8d8f6 100644 --- a/builder/Dockerfile.centos-8 +++ b/builder/Dockerfile.centos-8 @@ -74,4 +74,5 @@ ENV R_RD4PDF="times,hyper" COPY package.centos-8 /package.sh COPY build.sh . +COPY patches /patches ENTRYPOINT ./build.sh diff --git a/builder/Dockerfile.debian-10 b/builder/Dockerfile.debian-10 index 67b5e08..1afcac5 100644 --- a/builder/Dockerfile.debian-10 +++ b/builder/Dockerfile.debian-10 @@ -23,4 +23,5 @@ ENV PAGER /usr/bin/pager COPY package.debian-10 /package.sh COPY build.sh . +COPY patches /patches ENTRYPOINT ./build.sh diff --git a/builder/Dockerfile.debian-11 b/builder/Dockerfile.debian-11 index b31afda..b8328af 100644 --- a/builder/Dockerfile.debian-11 +++ b/builder/Dockerfile.debian-11 @@ -26,4 +26,5 @@ ENV INCLUDE_PCRE2_IN_R_3 yes COPY package.debian-11 /package.sh COPY build.sh . +COPY patches /patches ENTRYPOINT ./build.sh diff --git a/builder/Dockerfile.debian-12 b/builder/Dockerfile.debian-12 index 5bc8746..f5f4d2b 100644 --- a/builder/Dockerfile.debian-12 +++ b/builder/Dockerfile.debian-12 @@ -30,4 +30,5 @@ ENV INCLUDE_PCRE2_IN_R_3 yes COPY package.debian-12 /package.sh COPY build.sh . +COPY patches /patches ENTRYPOINT ./build.sh diff --git a/builder/Dockerfile.opensuse-154 b/builder/Dockerfile.opensuse-154 index 1271a03..780bbfc 100644 --- a/builder/Dockerfile.opensuse-154 +++ b/builder/Dockerfile.opensuse-154 @@ -99,4 +99,5 @@ ENV JAVA_HOME=/usr/lib64/jvm/jre-11-openjdk COPY package.opensuse-154 /package.sh COPY build.sh . +COPY patches /patches ENTRYPOINT ./build.sh diff --git a/builder/Dockerfile.rhel-9 b/builder/Dockerfile.rhel-9 index 0985ae1..c30f876 100644 --- a/builder/Dockerfile.rhel-9 +++ b/builder/Dockerfile.rhel-9 @@ -90,4 +90,5 @@ ENV INCLUDE_PCRE2_IN_R_3 yes COPY package.rhel-9 /package.sh COPY build.sh . +COPY patches /patches ENTRYPOINT ./build.sh diff --git a/builder/Dockerfile.ubuntu-2004 b/builder/Dockerfile.ubuntu-2004 index 6e89ff7..7560ea8 100644 --- a/builder/Dockerfile.ubuntu-2004 +++ b/builder/Dockerfile.ubuntu-2004 @@ -22,4 +22,5 @@ ENV PAGER /usr/bin/pager COPY package.ubuntu-2004 /package.sh COPY build.sh . +COPY patches /patches ENTRYPOINT ./build.sh diff --git a/builder/Dockerfile.ubuntu-2204 b/builder/Dockerfile.ubuntu-2204 index 18ea4a0..4a7bb38 100644 --- a/builder/Dockerfile.ubuntu-2204 +++ b/builder/Dockerfile.ubuntu-2204 @@ -25,4 +25,5 @@ ENV INCLUDE_PCRE2_IN_R_3 yes COPY package.ubuntu-2204 /package.sh COPY build.sh . +COPY patches /patches ENTRYPOINT ./build.sh diff --git a/builder/build.sh b/builder/build.sh index 6cee816..ae3dcda 100755 --- a/builder/build.sh +++ b/builder/build.sh @@ -71,6 +71,10 @@ patch_r() { if [ -f "/patches/R-${1}.patch" ]; then patch -p1 < "/patches/R-${1}.patch" fi + + if [ -f "/patches/R-${1}-${OS_IDENTIFIER}.patch" ]; then + patch -p1 < "/patches/R-${1}-${OS_IDENTIFIER}.patch" + fi } # compile_r() - $1 as r version diff --git a/builder/patches/R-3.3.0.patch b/builder/patches/R-3.3.0.patch new file mode 100644 index 0000000..f87bf6b --- /dev/null +++ b/builder/patches/R-3.3.0.patch @@ -0,0 +1,20 @@ +diff --git a/configure b/configure +index e53821d..d26fd72 100755 +--- a/configure ++++ b/configure +@@ -35496,10 +35496,11 @@ else + #include + #include + int main() { +-#ifdef ZLIB_VERSION +-/* Work around Debian bug: it uses 1.2.3.4 even though there was no such +- version on the master site zlib.net */ +- exit(strncmp(ZLIB_VERSION, "1.2.5", 5) < 0); ++#ifdef ZLIB_VERNUM ++ if (ZLIB_VERNUM < 0x1250) { ++ exit(1); ++ } ++ exit(0); + #else + exit(1); + #endif diff --git a/builder/patches/R-3.3.1.patch b/builder/patches/R-3.3.1.patch new file mode 100644 index 0000000..f87bf6b --- /dev/null +++ b/builder/patches/R-3.3.1.patch @@ -0,0 +1,20 @@ +diff --git a/configure b/configure +index e53821d..d26fd72 100755 +--- a/configure ++++ b/configure +@@ -35496,10 +35496,11 @@ else + #include + #include + int main() { +-#ifdef ZLIB_VERSION +-/* Work around Debian bug: it uses 1.2.3.4 even though there was no such +- version on the master site zlib.net */ +- exit(strncmp(ZLIB_VERSION, "1.2.5", 5) < 0); ++#ifdef ZLIB_VERNUM ++ if (ZLIB_VERNUM < 0x1250) { ++ exit(1); ++ } ++ exit(0); + #else + exit(1); + #endif diff --git a/builder/patches/R-3.3.2.patch b/builder/patches/R-3.3.2.patch new file mode 100644 index 0000000..f87bf6b --- /dev/null +++ b/builder/patches/R-3.3.2.patch @@ -0,0 +1,20 @@ +diff --git a/configure b/configure +index e53821d..d26fd72 100755 +--- a/configure ++++ b/configure +@@ -35496,10 +35496,11 @@ else + #include + #include + int main() { +-#ifdef ZLIB_VERSION +-/* Work around Debian bug: it uses 1.2.3.4 even though there was no such +- version on the master site zlib.net */ +- exit(strncmp(ZLIB_VERSION, "1.2.5", 5) < 0); ++#ifdef ZLIB_VERNUM ++ if (ZLIB_VERNUM < 0x1250) { ++ exit(1); ++ } ++ exit(0); + #else + exit(1); + #endif diff --git a/builder/patches/README.md b/builder/patches/README.md index e510596..3276631 100644 --- a/builder/patches/README.md +++ b/builder/patches/README.md @@ -1,9 +1,9 @@ # Patches -Patches can be applied for specific R versions and platforms. To add a patch, create a patch file -at `patches/R-${R_VERSION}.patch` (such as `patches/R-devel.patch`), and add the following line -to the platform Dockerfile: +Patches can be applied for specific R versions and platforms. To add a patch for an R version on +all platforms, create a patch file at `patches/R-${R_VERSION}.patch` (such as +`patches/R-devel.patch`). -```dockerfile -COPY patches /patches -``` +To add a patch for an R version on a specific platform create a patch file at +`patches/R-${R_VERSION}-${OS_IDENTIFIER}.patch` (such as +`patches/R-3.3.0-centos-8.patch`). diff --git a/handler.py b/handler.py index 91baf50..f2f9fc9 100644 --- a/handler.py +++ b/handler.py @@ -146,12 +146,6 @@ def queue_builds(event, context): job_ids = [] for version in event['versions_to_build']: for platform in event['supported_platforms']: - # In R 3.3.0, 3.3.1, and 3.3.2, the configure script check for the - # zlib version fails to handle versions longer than 5 characters. - # Skip builds affected by this bug. Most newer distros will be affected. - # https://github.com/rstudio/r-builds/issues/76 - if version in ['3.3.0', '3.3.1', '3.3.2'] and platform not in ['centos-7']: - continue job_ids.append(_submit_job(version, platform)) event['jobIds'] = job_ids return event