Merge pull request #179 from rstudio/fix/R-3.3.x-zlib

This commit is contained in:
Gábor Csárdi 2023-07-20 09:21:01 +02:00 committed by GitHub
commit 03dbd456d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 79 additions and 12 deletions

View file

@ -73,4 +73,5 @@ ENV R_RD4PDF="times,hyper"
COPY package.centos-7 /package.sh
COPY build.sh .
COPY patches /patches
ENTRYPOINT ./build.sh

View file

@ -74,4 +74,5 @@ ENV R_RD4PDF="times,hyper"
COPY package.centos-8 /package.sh
COPY build.sh .
COPY patches /patches
ENTRYPOINT ./build.sh

View file

@ -23,4 +23,5 @@ ENV PAGER /usr/bin/pager
COPY package.debian-10 /package.sh
COPY build.sh .
COPY patches /patches
ENTRYPOINT ./build.sh

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -22,4 +22,5 @@ ENV PAGER /usr/bin/pager
COPY package.ubuntu-2004 /package.sh
COPY build.sh .
COPY patches /patches
ENTRYPOINT ./build.sh

View file

@ -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

View file

@ -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

View file

@ -0,0 +1,20 @@
diff --git a/configure b/configure
index e53821d..d26fd72 100755
--- a/configure
+++ b/configure
@@ -35496,10 +35496,11 @@ else
#include <string.h>
#include <zlib.h>
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

View file

@ -0,0 +1,20 @@
diff --git a/configure b/configure
index e53821d..d26fd72 100755
--- a/configure
+++ b/configure
@@ -35496,10 +35496,11 @@ else
#include <string.h>
#include <zlib.h>
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

View file

@ -0,0 +1,20 @@
diff --git a/configure b/configure
index e53821d..d26fd72 100755
--- a/configure
+++ b/configure
@@ -35496,10 +35496,11 @@ else
#include <string.h>
#include <zlib.h>
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

View file

@ -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`).

View file

@ -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