From 09e29e69fa8c27edb3143e4b5ece08c81ee22fa9 Mon Sep 17 00:00:00 2001 From: Greg Lin Date: Tue, 18 Apr 2023 14:15:09 -0500 Subject: [PATCH 1/2] Remove R-devel patches for openSUSE 15.3/15.4 Now fixed upstream in R-devel / R 4.3.0. --- builder/Dockerfile.opensuse-153 | 1 - builder/Dockerfile.opensuse-154 | 1 - builder/build.sh | 1 + builder/patches/R-devel.patch | 28 ---------------------------- builder/patches/README.md | 9 +++++++++ 5 files changed, 10 insertions(+), 30 deletions(-) delete mode 100644 builder/patches/R-devel.patch create mode 100644 builder/patches/README.md diff --git a/builder/Dockerfile.opensuse-153 b/builder/Dockerfile.opensuse-153 index 6bb332c..fbea3b1 100644 --- a/builder/Dockerfile.opensuse-153 +++ b/builder/Dockerfile.opensuse-153 @@ -92,5 +92,4 @@ ENV CONFIGURE_OPTIONS="\ COPY package.opensuse-153 /package.sh COPY build.sh . -COPY patches /patches ENTRYPOINT ./build.sh diff --git a/builder/Dockerfile.opensuse-154 b/builder/Dockerfile.opensuse-154 index 9b6af15..f3134fa 100644 --- a/builder/Dockerfile.opensuse-154 +++ b/builder/Dockerfile.opensuse-154 @@ -102,5 +102,4 @@ 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/build.sh b/builder/build.sh index 7f49b3e..143a2af 100755 --- a/builder/build.sh +++ b/builder/build.sh @@ -64,6 +64,7 @@ fetch_r_source() { rm /tmp/R-${1}.tar.gz } +# Apply a patch for this R version if present. Typically for R-devel. patch_r() { cd /tmp/R-${1} diff --git a/builder/patches/R-devel.patch b/builder/patches/R-devel.patch deleted file mode 100644 index 4495917..0000000 --- a/builder/patches/R-devel.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/src/extra/blas/Makefile.in b/src/extra/blas/Makefile.in -index 3661416..c9b53e2 100644 ---- a/src/extra/blas/Makefile.in -+++ b/src/extra/blas/Makefile.in -@@ -17,7 +17,7 @@ include $(top_builddir)/Makeconf - - ALL_CFLAGS = $(ALL_CFLAGS_LO) - ALL_FFLAGS = $(ALL_FFLAGS_LO) --ALL_FCLAGS = $(ALL_FFLAGS_LO) -+ALL_FCFLAGS = $(ALL_FFLAGS_LO) - - SOURCES = blas00.c blas.f cmplxblas.f blas2.f90 cmplxblas2.f90 - -diff --git a/src/modules/lapack/Makefile.in b/src/modules/lapack/Makefile.in -index 8e593ea..e35c956 100644 ---- a/src/modules/lapack/Makefile.in -+++ b/src/modules/lapack/Makefile.in -@@ -15,6 +15,10 @@ include $(top_builddir)/Makeconf - .f90.o: - $(FC) $(ALL_FCFLAGS) -c @FCFLAGS_f90@ $< -o $@ - -+ALL_CFLAGS = $(ALL_CFLAGS_LO) -+ALL_FFLAGS = $(ALL_FFLAGS_LO) -+ALL_FCFLAGS = $(ALL_FFLAGS_LO) -+ - SOURCES_C = Lapack.c @USE_VECLIB_G95FIX_TRUE@ vecLibg95c.c - SOURCES_F = @USE_VECLIB_G95FIX_TRUE@ vecLibg95f.f - diff --git a/builder/patches/README.md b/builder/patches/README.md new file mode 100644 index 0000000..e510596 --- /dev/null +++ b/builder/patches/README.md @@ -0,0 +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: + +```dockerfile +COPY patches /patches +``` From 5fd5d31a085315e3136314647e3a42df0ad92878 Mon Sep 17 00:00:00 2001 From: Greg Lin Date: Tue, 18 Apr 2023 15:10:50 -0500 Subject: [PATCH 2/2] Add R-devel to GHA CI tests --- .github/workflows/test.yml | 4 ++-- test/get_r_versions.py | 15 +++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bc70168..777ba60 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,9 +25,9 @@ on: description: | Comma-separated list of R versions. Specify "last-N" to use the last N minor R versions, or "all" to use all minor R versions since R 3.1. - Defaults to "last-5". + Defaults to "last-5,devel". required: false - default: 'last-5' + default: 'last-5,devel' type: string permissions: diff --git a/test/get_r_versions.py b/test/get_r_versions.py index 7e7a668..413a7ac 100644 --- a/test/get_r_versions.py +++ b/test/get_r_versions.py @@ -15,10 +15,10 @@ def main(): 'versions', type=str, nargs='?', - default='last-5', + default='last-5,devel', help="""Comma-separated list of R versions. Specify "last-N" to use the last N minor R versions, or "all" to use all minor R versions since R 3.1. - Defaults to "last-5". + Defaults to "last-5,devel". """ ) args = parser.parse_args() @@ -28,14 +28,17 @@ def main(): def _get_versions(which='all'): supported_versions = sorted(_get_supported_versions(), reverse=True) - + versions = [] + for version in which.split(','): + versions.extend(_expand_version(version, supported_versions)) + return versions + +def _expand_version(which, supported_versions): last_n_versions = None if which.startswith('last-'): last_n_versions = int(which.replace('last-', '')) elif which != 'all': - versions = which.split(',') - versions = [v for v in versions if v in supported_versions] - return versions + return [which] if which in supported_versions else [] versions = {} for ver in supported_versions: