From ede160f08a37c3a01f5aaace044d5d659e4c2918 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Mon, 13 May 2024 01:54:17 +0200 Subject: [PATCH 1/6] install cran openssl version --- dev/tasks/r/github.packages.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dev/tasks/r/github.packages.yml b/dev/tasks/r/github.packages.yml index 41d8b230f8bf..ea0626b71f3d 100644 --- a/dev/tasks/r/github.packages.yml +++ b/dev/tasks/r/github.packages.yml @@ -227,10 +227,11 @@ jobs: working-directory: 'arrow' extra-packages: cpp11 - name: Set CRAN like openssl - if: contains(matrix.platform.name, 'arm64') + if: startsWith('macos', matrix.platform.runs_on) run: | - # The arm64 runners contain openssl 1.1.1t in this path that is always included first so we need to override the - # default setting of the brew --prefix as root dir to avoid version conflicts. + # get the mac-recipes version of openssl from CRAN + Rscript -e 'source("https://mac.R-project.org/bin/install.R"); install.libs("openssl")' + # override our cmakes default setting of the brew --prefix as root dir to avoid version conflicts. echo "OPENSSL_ROOT_DIR=/opt/R/arm64" >> $GITHUB_ENV - name: Build Binary id: build @@ -239,6 +240,7 @@ jobs: NOT_CRAN: "false" # actions/setup-r sets this implicitly ARROW_R_DEV: "true" LIBARROW_BINARY: "true" # has to be set as long as allowlist not updated + LIBARROW_BUILD: "false" ARROW_R_ENFORCE_CHECKSUM: "true" ARROW_R_CHECKSUM_PATH: "{{ '${{ github.workspace }}' }}/repo/libarrow/bin" run: | From b1f5e69e9475ad710026dfa6717ae1a74b5d8a86 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Mon, 13 May 2024 02:08:14 +0200 Subject: [PATCH 2/6] fix openssl dir for x86 --- dev/tasks/r/github.packages.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dev/tasks/r/github.packages.yml b/dev/tasks/r/github.packages.yml index ea0626b71f3d..b9d29916da5a 100644 --- a/dev/tasks/r/github.packages.yml +++ b/dev/tasks/r/github.packages.yml @@ -228,11 +228,18 @@ jobs: extra-packages: cpp11 - name: Set CRAN like openssl if: startsWith('macos', matrix.platform.runs_on) + shell: Rscript {0} run: | # get the mac-recipes version of openssl from CRAN - Rscript -e 'source("https://mac.R-project.org/bin/install.R"); install.libs("openssl")' + source("https://mac.R-project.org/bin/install.R") + install.libs("openssl") + # override our cmakes default setting of the brew --prefix as root dir to avoid version conflicts. - echo "OPENSSL_ROOT_DIR=/opt/R/arm64" >> $GITHUB_ENV + if (Sys.info()[["machine"]] == "arm64"){ + cat("OPENSSL_ROOT_DIR=/opt/R/arm64\n", file=Sys.getenv("GITHUB_ENV"), append = TRUE) + } else { + cat("OPENSSL_ROOT_DIR=/opt/R/x86_64\n", file=Sys.getenv("GITHUB_ENV"), append = TRUE) + } - name: Build Binary id: build shell: Rscript {0} From 34020a21117cfbc1cf3ca956cd2cd17288ec84d4 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Mon, 13 May 2024 02:41:09 +0200 Subject: [PATCH 3/6] fix if --- dev/tasks/r/github.packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tasks/r/github.packages.yml b/dev/tasks/r/github.packages.yml index b9d29916da5a..a51e8cdf2363 100644 --- a/dev/tasks/r/github.packages.yml +++ b/dev/tasks/r/github.packages.yml @@ -227,7 +227,7 @@ jobs: working-directory: 'arrow' extra-packages: cpp11 - name: Set CRAN like openssl - if: startsWith('macos', matrix.platform.runs_on) + if: contains(matrix.platform.name, 'macOS') shell: Rscript {0} run: | # get the mac-recipes version of openssl from CRAN From 0bb4a98b8719169dcf995488088fcae8406bd722 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Mon, 13 May 2024 03:20:07 +0200 Subject: [PATCH 4/6] use sudo shell --- dev/tasks/r/github.packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tasks/r/github.packages.yml b/dev/tasks/r/github.packages.yml index a51e8cdf2363..285ef304981d 100644 --- a/dev/tasks/r/github.packages.yml +++ b/dev/tasks/r/github.packages.yml @@ -228,7 +228,7 @@ jobs: extra-packages: cpp11 - name: Set CRAN like openssl if: contains(matrix.platform.name, 'macOS') - shell: Rscript {0} + shell: sudo Rscript {0} run: | # get the mac-recipes version of openssl from CRAN source("https://mac.R-project.org/bin/install.R") From a35c9224aa9b95f5c2dc7c9f8d3bba8b7c5b24b1 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Mon, 13 May 2024 04:00:19 +0200 Subject: [PATCH 5/6] sudo preserve env --- dev/tasks/r/github.packages.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dev/tasks/r/github.packages.yml b/dev/tasks/r/github.packages.yml index 285ef304981d..0539eae6cc9d 100644 --- a/dev/tasks/r/github.packages.yml +++ b/dev/tasks/r/github.packages.yml @@ -228,7 +228,8 @@ jobs: extra-packages: cpp11 - name: Set CRAN like openssl if: contains(matrix.platform.name, 'macOS') - shell: sudo Rscript {0} + # The -E forwards the GITHUB_* envvars + shell: sudo -E Rscript {0} run: | # get the mac-recipes version of openssl from CRAN source("https://mac.R-project.org/bin/install.R") From f3cf9f8d3bedd4083223eca720faf084a8c599d7 Mon Sep 17 00:00:00 2001 From: Jacob Wujciak-Jens Date: Tue, 14 May 2024 03:45:08 +0200 Subject: [PATCH 6/6] pass openssl_root_dir to cmake --- r/inst/build_arrow_static.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/r/inst/build_arrow_static.sh b/r/inst/build_arrow_static.sh index d28cbcb08fbe..825a230e78e5 100755 --- a/r/inst/build_arrow_static.sh +++ b/r/inst/build_arrow_static.sh @@ -99,6 +99,7 @@ ${CMAKE} -DARROW_BOOST_USE_SHARED=OFF \ -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON \ -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON \ -DCMAKE_UNITY_BUILD=${CMAKE_UNITY_BUILD:-OFF} \ + -DOPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR} \ -Dre2_SOURCE=${re2_SOURCE:-BUNDLED} \ -Dxsimd_SOURCE=${xsimd_SOURCE:-} \ -Dzstd_SOURCE=${zstd_SOURCE:-} \