Skip to content

Commit c988d17

Browse files
authored
GH-45449: [R][CI] Remove OpenSSL 1.x builds (#48297)
### Rationale for this change We support old OpenSSL versions which are now deprecated. It complicates our CI by having unnecessary things running too. ### What changes are included in this PR? Stop supporting OpenSSL < 3.0 ### Are these changes tested? Will trigger CI ### Are there any user-facing changes? Not unless they're using deprecated versions of OpenSSL, which isn't something we should support anyway * GitHub Issue: #45449 Authored-by: Nic Crane <[email protected]> Signed-off-by: Nic Crane <[email protected]>
1 parent 016e3cf commit c988d17

File tree

6 files changed

+110
-149
lines changed

6 files changed

+110
-149
lines changed

.github/workflows/r_nightly.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,9 @@ jobs:
172172
done
173173
174174
# New packages: repo/libarrow/${TARGET}-arrow-${VERSION}.zip
175-
prune repo/libarrow/r-libarrow-darwin-arm64-openssl-1.1-* || :
176-
prune repo/libarrow/r-libarrow-darwin-arm64-openssl-3.0-* || :
177-
prune repo/libarrow/r-libarrow-darwin-x86_64-openssl-1.1-* || :
178-
prune repo/libarrow/r-libarrow-darwin-x86_64-openssl-3.0-* || :
179-
prune repo/libarrow/r-libarrow-linux-x86_64-openssl-1.0-* || :
180-
prune repo/libarrow/r-libarrow-linux-x86_64-openssl-1.1-* || :
181-
prune repo/libarrow/r-libarrow-linux-x86_64-openssl-3.0-* || :
175+
prune repo/libarrow/r-libarrow-darwin-arm64-* || :
176+
prune repo/libarrow/r-libarrow-darwin-x86_64-* || :
177+
prune repo/libarrow/r-libarrow-linux-x86_64-* || :
182178
prune repo/libarrow/r-libarrow-windows-x86_64-* || :
183179
- name: Update Repository Index
184180
shell: Rscript {0}

dev/tasks/macros.jinja

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -247,23 +247,19 @@ env:
247247
path: repo/libarrow
248248
{% endif %}
249249
{% if get_nix %}
250-
{% for openssl_version in ["1.0", "1.1", "3.0"] %}
251-
- name: Get Linux OpenSSL {{ openssl_version }} binary
250+
- name: Get Linux binary
252251
uses: actions/download-artifact@v4
253252
with:
254-
name: r-libarrow-linux-x86_64-openssl-{{ openssl_version }}
253+
name: r-libarrow-linux-x86_64
255254
path: repo/libarrow
256-
{% endfor %}
257255
{% endif %}
258256
{% if get_mac %}
259-
{% for openssl_version in ["1.1", "3.0"] %}
260-
{% for arch in ["x86_64", "arm64"] %}
261-
- name: Get macOS {{ arch }} OpenSSL {{ openssl_version }} binary
257+
{% for arch in ["x86_64", "arm64"] %}
258+
- name: Get macOS {{ arch }} binary
262259
uses: actions/download-artifact@v4
263260
with:
264-
name: r-libarrow-darwin-{{ arch }}-openssl-{{ openssl_version }}
261+
name: r-libarrow-darwin-{{ arch }}
265262
path: repo/libarrow
266-
{% endfor %}
267263
{% endfor %}
268264
{% endif %}
269265
- name: Get src pkg

dev/tasks/r/github.packages.yml

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
path: arrow/r/arrow_*.tar.gz
5858

5959
macos-cpp:
60-
name: C++ Binary macOS OpenSSL {{ '${{ matrix.openssl }}' }} {{ '${{ matrix.platform.arch }}' }}
60+
name: C++ Binary macOS {{ '${{ matrix.platform.arch }}' }}
6161
runs-on: {{ '${{ matrix.platform.runs_on }}' }}
6262
needs: source
6363
strategy:
@@ -66,17 +66,16 @@ jobs:
6666
platform:
6767
- { runs_on: macos-15-intel, arch: "x86_64" }
6868
- { runs_on: macos-14, arch: "arm64" }
69-
openssl: ['3.0', '1.1']
7069
env:
71-
PKG_ID: r-libarrow-darwin-{{ '${{ matrix.platform.arch }}' }}-openssl-{{ '${{ matrix.openssl }}' }}
72-
PKG_FILE: r-libarrow-darwin-{{ '${{ matrix.platform.arch }}' }}-openssl-{{ '${{ matrix.openssl }}' }}-{{ '${{ needs.source.outputs.pkg_version }}' }}.zip
70+
PKG_ID: r-libarrow-darwin-{{ '${{ matrix.platform.arch }}' }}
71+
PKG_FILE: r-libarrow-darwin-{{ '${{ matrix.platform.arch }}' }}-{{ '${{ needs.source.outputs.pkg_version }}' }}.zip
7372
steps:
7473
{{ macros.github_checkout_arrow(action_v="3")|indent }}
7574
{{ macros.github_change_r_pkg_version(is_fork, '${{ needs.source.outputs.pkg_version }}')|indent }}
7675
- name: Install Deps
7776
run: |
7877
brew install sccache ninja
79-
brew install openssl@{{ '${{ matrix.openssl }}' }}
78+
brew install openssl@3.0
8079
- name: Build libarrow
8180
shell: bash
8281
env:
@@ -89,7 +88,7 @@ jobs:
8988
LIBARROW_MINIMAL: false
9089
run: |
9190
sccache --start-server
92-
export EXTRA_CMAKE_FLAGS="-DOPENSSL_ROOT_DIR=$(brew --prefix openssl@{{ '${{ matrix.openssl }}' }})"
91+
export EXTRA_CMAKE_FLAGS="-DOPENSSL_ROOT_DIR=$(brew --prefix openssl@3.0)"
9392
cd arrow
9493
r/inst/build_arrow_static.sh
9594
- name: Bundle libarrow
@@ -112,40 +111,26 @@ jobs:
112111
{{ '${{ env.PKG_FILE }}' }}.sha512
113112
114113
linux-cpp:
115-
name: C++ Binary Linux OpenSSL {{ '${{ matrix.openssl }}' }}
114+
name: C++ Binary Linux
116115
runs-on: ubuntu-latest
117116
needs: source
118117
strategy:
119118
fail-fast: false
120-
matrix:
121-
include:
122-
- openssl: "3.0"
123-
os: ubuntu
124-
ubuntu: "22.04"
125-
- extra-cmake-flags: >-
126-
-DCMAKE_INCLUDE_PATH=/usr/include/openssl11
127-
-DCMAKE_LIBRARY_PATH=/usr/lib64/openssl11
128-
openssl: "1.1"
129-
os: centos
130-
- openssl: "1.0"
131-
os: centos
132119
env:
133-
PKG_ID: r-libarrow-linux-x86_64-openssl-{{ '${{ matrix.openssl }}' }}
134-
PKG_FILE: r-libarrow-linux-x86_64-openssl-{{ '${{ matrix.openssl }}' }}-{{ '${{ needs.source.outputs.pkg_version }}' }}.zip
120+
PKG_ID: r-libarrow-linux-x86_64
121+
PKG_FILE: r-libarrow-linux-x86_64-{{ '${{ needs.source.outputs.pkg_version }}' }}.zip
135122
steps:
136123
{{ macros.github_checkout_arrow()|indent }}
137124
{{ macros.github_change_r_pkg_version(is_fork, '${{ needs.source.outputs.pkg_version }}')|indent }}
138125
{{ macros.github_install_archery()|indent }}
139126
- name: Build libarrow
140127
shell: bash
141128
env:
142-
UBUNTU: {{ '"${{ matrix.ubuntu }}"' }}
129+
UBUNTU: "22.04"
143130
{{ macros.github_set_sccache_envvars()|indent(8) }}
144131
run: |
145132
source arrow/ci/scripts/util_enable_core_dumps.sh
146-
archery docker run \
147-
-e EXTRA_CMAKE_FLAGS="{{ '${{ matrix.extra-cmake-flags }}' }}" \
148-
{{ '${{ matrix.os }}' }}-cpp-static
133+
archery docker run ubuntu-cpp-static
149134
- name: Bundle libarrow
150135
shell: bash
151136
run: |

dev/tasks/tasks.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -283,13 +283,9 @@ tasks:
283283
custom_version: Unset
284284
artifacts:
285285
- r-libarrow-windows-x86_64-{no_rc_r_version}\.zip
286-
- r-libarrow-linux-x86_64-openssl-1.0-{no_rc_r_version}\.zip
287-
- r-libarrow-linux-x86_64-openssl-1.1-{no_rc_r_version}\.zip
288-
- r-libarrow-linux-x86_64-openssl-3.0-{no_rc_r_version}\.zip
289-
- r-libarrow-darwin-arm64-openssl-1.1-{no_rc_r_version}\.zip
290-
- r-libarrow-darwin-arm64-openssl-3.0-{no_rc_r_version}\.zip
291-
- r-libarrow-darwin-x86_64-openssl-1.1-{no_rc_r_version}\.zip
292-
- r-libarrow-darwin-x86_64-openssl-3.0-{no_rc_r_version}\.zip
286+
- r-libarrow-linux-x86_64-{no_rc_r_version}\.zip
287+
- r-libarrow-darwin-arm64-{no_rc_r_version}\.zip
288+
- r-libarrow-darwin-x86_64-{no_rc_r_version}\.zip
293289
- r-pkg__bin__windows__contrib__4.5__arrow_{no_rc_r_version}\.zip
294290
- r-pkg__bin__windows__contrib__4.4__arrow_{no_rc_r_version}\.zip
295291
- r-pkg__bin__macosx__big-sur-x86_64__contrib__4.5__arrow_{no_rc_r_version}\.tgz

r/tools/nixlibs.R

Lines changed: 35 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -192,17 +192,12 @@ download_binary <- function(lib) {
192192
# of action based on the current system. Other values you can set it to:
193193
# * "FALSE" (not case-sensitive), to skip this option altogether
194194
# * "TRUE" (not case-sensitive), to try to discover your current OS, or
195-
# * Some other string: a "linux-openssl-${OPENSSL_VERSION}" that corresponds to
196-
# a binary that is available, to override what this function may discover by
197-
# default.
195+
# * Some other string: a binary identifier that corresponds to a binary that is
196+
# available, to override what this function may discover by default.
198197
# Possible values are:
199-
# * "linux-x86_64-openssl-1.0" (OpenSSL 1.0)
200-
# * "linux-x86_64-openssl-1.1" (OpenSSL 1.1)
201-
# * "linux-x86_64-openssl-3.0" (OpenSSL 3.0)
202-
# * "macos-arm64-openssl-1.1" (OpenSSL 1.1)
203-
# * "macos-arm64-openssl-3.0" (OpenSSL 3.0)
204-
# * "macos-x86_64-openssl-1.1" (OpenSSL 1.1)
205-
# * "macos-x86_64-openssl-3.0" (OpenSSL 3.0)
198+
# * "linux-x86_64"
199+
# * "darwin-arm64"
200+
# * "darwin-x86_64"
206201
# * "windows-x86_64"
207202
# These string values, along with `NULL`, are the potential return values of
208203
# this function.
@@ -228,6 +223,17 @@ identify_binary <- function(lib = Sys.getenv("LIBARROW_BINARY"), info = distro()
228223
# Env var provided an os-version to use, to override our logic.
229224
# We don't validate that this exists. If it doesn't, the download will fail
230225
# and the build will fall back to building from source
226+
if (grepl("openssl-1", lib)) {
227+
stop(
228+
"OpenSSL 1.x binaries are no longer provided. Use LIBARROW_BINARY='",
229+
sub("-openssl-1.*$", "", lib),
230+
"'"
231+
)
232+
}
233+
if (grepl("openssl-3", lib)) {
234+
lib <- sub("-openssl-3.*$", "", lib)
235+
lg("OpenSSL suffix deprecated in LIBARROW_BINARY, using '%s'", lib)
236+
}
231237
} else {
232238
# See if we can find a suitable binary
233239
lib <- select_binary()
@@ -261,11 +267,10 @@ select_binary <- function(
261267
# so globally handle the possibility that this could fail
262268
{
263269
errs <- compile_test_program(test_program)
264-
openssl_version <- determine_binary_from_stderr(errs)
265-
if (is.null(openssl_version)) {
266-
NULL
270+
if (has_binary_sysreqs(errs)) {
271+
paste0(os, "-", arch)
267272
} else {
268-
paste0(os, "-", arch, "-", openssl_version)
273+
NULL
269274
}
270275
},
271276
error = function(e) {
@@ -293,14 +298,8 @@ test_for_curl_and_openssl <- "
293298
294299
#include <curl/curl.h>
295300
#include <openssl/opensslv.h>
296-
#if OPENSSL_VERSION_NUMBER < 0x10002000L
297-
#error OpenSSL version too old
298-
#endif
299-
#if OPENSSL_VERSION_NUMBER < 0x10100000L
300-
#error Using OpenSSL version 1.0
301-
#endif
302-
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
303-
#error Using OpenSSL version 3
301+
#if OPENSSL_VERSION_NUMBER < 0x30000000L
302+
#error OpenSSL version must be 3.0 or greater
304303
#endif
305304
"
306305

@@ -339,40 +338,27 @@ get_macos_openssl_dir <- function() {
339338
openssl_root_dir
340339
}
341340

342-
# (built with newer devtoolset but older glibc (2.17) for broader compatibility, like manylinux2014)
343-
determine_binary_from_stderr <- function(errs) {
344-
if (is.null(attr(errs, "status"))) {
345-
# There was no error in compiling: so we found libcurl and OpenSSL >= 1.1,
346-
# openssl is < 3.0
347-
lg("Found libcurl and OpenSSL >= 1.1")
348-
return("openssl-1.1")
349-
# Else, check for dealbreakers:
350-
} else if (!on_macos && any(grepl("Using libc++", errs, fixed = TRUE))) {
341+
has_binary_sysreqs <- function(errs) {
342+
# Check for dealbreakers:
343+
if (!on_macos && any(grepl("Using libc++", errs, fixed = TRUE))) {
351344
# Our linux binaries are all built with GNU stdlib so they fail with libc++
352345
lg("Linux binaries incompatible with libc++")
353-
return(NULL)
346+
return(FALSE)
354347
} else if (header_not_found("curl/curl", errs)) {
355348
lg("libcurl not found")
356-
return(NULL)
349+
return(FALSE)
357350
} else if (header_not_found("openssl/opensslv", errs)) {
358351
lg("OpenSSL not found")
359-
return(NULL)
360-
} else if (any(grepl("OpenSSL version too old", errs))) {
361-
lg("OpenSSL found but version >= 1.0.2 is required for some features")
362-
return(NULL)
363-
# Else, determine which other binary will work
364-
} else if (any(grepl("Using OpenSSL version 1.0", errs))) {
365-
if (on_macos) {
366-
lg("OpenSSL 1.0 is not supported on macOS")
367-
return(NULL)
368-
}
369-
lg("Found libcurl and OpenSSL < 1.1")
370-
return("openssl-1.0")
371-
} else if (any(grepl("Using OpenSSL version 3", errs))) {
372-
lg("Found libcurl and OpenSSL >= 3.0.0")
373-
return("openssl-3.0")
352+
return(FALSE)
353+
} else if (any(grepl("OpenSSL version must be 3.0 or greater", errs))) {
354+
lg("OpenSSL found but version >= 3.0 is required")
355+
return(FALSE)
356+
} else if (is.null(attr(errs, "status"))) {
357+
# Successful compile = OpenSSL >= 3.0 found
358+
lg("Found libcurl and OpenSSL >= 3.0")
359+
return(TRUE)
374360
}
375-
NULL
361+
FALSE
376362
}
377363

378364
header_not_found <- function(header, errs) {

0 commit comments

Comments
 (0)