Skip to content

Commit b51a2ec

Browse files
committed
Remove old OpenSSL
1 parent 6180908 commit b51a2ec

File tree

5 files changed

+41
-80
lines changed

5 files changed

+41
-80
lines changed

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 OpenSSL 3.0 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-openssl-3.0
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 }} OpenSSL 3.0 binary
262259
uses: actions/download-artifact@v4
263260
with:
264-
name: r-libarrow-darwin-{{ arch }}-openssl-{{ openssl_version }}
261+
name: r-libarrow-darwin-{{ arch }}-openssl-3.0
265262
path: repo/libarrow
266-
{% endfor %}
267263
{% endfor %}
268264
{% endif %}
269265
- name: Get src pkg

dev/tasks/r/github.packages.yml

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -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 }}' }}-openssl-3.0
71+
PKG_FILE: r-libarrow-darwin-{{ '${{ matrix.platform.arch }}' }}-openssl-3.0-{{ '${{ 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:
@@ -117,35 +116,21 @@ jobs:
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-openssl-3.0
121+
PKG_FILE: r-libarrow-linux-x86_64-openssl-3.0-{{ '${{ 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: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,12 +283,8 @@ 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
288286
- 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
290287
- 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
292288
- r-libarrow-darwin-x86_64-openssl-3.0-{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

r/tools/nixlibs.R

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,8 @@ download_binary <- function(lib) {
196196
# a binary that is available, to override what this function may discover by
197197
# default.
198198
# Possible values are:
199-
# * "linux-x86_64-openssl-1.0" (OpenSSL 1.0)
200-
# * "linux-x86_64-openssl-1.1" (OpenSSL 1.1)
201199
# * "linux-x86_64-openssl-3.0" (OpenSSL 3.0)
202-
# * "macos-arm64-openssl-1.1" (OpenSSL 1.1)
203200
# * "macos-arm64-openssl-3.0" (OpenSSL 3.0)
204-
# * "macos-x86_64-openssl-1.1" (OpenSSL 1.1)
205201
# * "macos-x86_64-openssl-3.0" (OpenSSL 3.0)
206202
# * "windows-x86_64"
207203
# These string values, along with `NULL`, are the potential return values of
@@ -341,13 +337,8 @@ get_macos_openssl_dir <- function() {
341337

342338
# (built with newer devtoolset but older glibc (2.17) for broader compatibility, like manylinux2014)
343339
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))) {
340+
# Check for dealbreakers:
341+
if (!on_macos && any(grepl("Using libc++", errs, fixed = TRUE))) {
351342
# Our linux binaries are all built with GNU stdlib so they fail with libc++
352343
lg("Linux binaries incompatible with libc++")
353344
return(NULL)
@@ -357,18 +348,14 @@ determine_binary_from_stderr <- function(errs) {
357348
} else if (header_not_found("openssl/opensslv", errs)) {
358349
lg("OpenSSL not found")
359350
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")
351+
} else if (
352+
any(grepl("OpenSSL version too old", errs)) ||
353+
any(grepl("Using OpenSSL version 1\\.", errs))
354+
) {
355+
lg("OpenSSL found but version >= 3.0.0 is required")
362356
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))) {
357+
} else if (any(grepl("Using OpenSSL version 3", errs)) || is.null(attr(errs, "status"))) {
358+
# Either explicitly found OpenSSL 3, or no error (assumes OpenSSL 3+)
372359
lg("Found libcurl and OpenSSL >= 3.0.0")
373360
return("openssl-3.0")
374361
}

r/tools/test-nixlibs.R

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ capture.output(source("nixlibs.R", local = nixlibs_env))
2929
test_that("identify_binary() based on LIBARROW_BINARY", {
3030
expect_null(identify_binary("FALSE"))
3131
expect_identical(
32-
identify_binary("linux-x86_64-openssl-1.0"),
33-
"linux-x86_64-openssl-1.0"
32+
identify_binary("linux-x86_64-openssl-3.0"),
33+
"linux-x86_64-openssl-3.0"
3434
)
3535
expect_null(identify_binary("", info = list(id = "debian")))
3636
})
@@ -53,25 +53,23 @@ test_that("determine_binary_from_stderr", {
5353
expect_output(
5454
expect_identical(
5555
determine_binary_from_stderr(compile_test_program("int a;")),
56-
"openssl-1.1"
56+
"openssl-3.0"
5757
),
58-
"Found libcurl and OpenSSL >= 1.1"
58+
"Found libcurl and OpenSSL >= 3.0.0"
5959
)
6060

6161
nixlibs_env$on_macos <- FALSE
6262
expect_output(
63-
expect_identical(
64-
determine_binary_from_stderr(compile_test_program("#error Using OpenSSL version 1.0")),
65-
"openssl-1.0"
63+
expect_null(
64+
determine_binary_from_stderr(compile_test_program("#error Using OpenSSL version 1.0"))
6665
),
67-
"Found libcurl and OpenSSL < 1.1"
66+
"OpenSSL found but version >= 3.0.0 is required"
6867
)
69-
nixlibs_env$on_macos <- TRUE
7068
expect_output(
7169
expect_null(
72-
determine_binary_from_stderr(compile_test_program("#error Using OpenSSL version 1.0"))
70+
determine_binary_from_stderr(compile_test_program("#error Using OpenSSL version 1.1"))
7371
),
74-
"OpenSSL 1.0 is not supported on macOS"
72+
"OpenSSL found but version >= 3.0.0 is required"
7573
)
7674
expect_output(
7775
expect_identical(
@@ -84,7 +82,7 @@ test_that("determine_binary_from_stderr", {
8482
expect_null(
8583
determine_binary_from_stderr(compile_test_program("#error OpenSSL version too old"))
8684
),
87-
"OpenSSL found but version >= 1.0.2 is required for some features"
85+
"OpenSSL found but version >= 3.0.0 is required"
8886
)
8987
})
9088

@@ -93,16 +91,15 @@ test_that("select_binary() with test program", {
9391
expect_output(
9492
expect_identical(
9593
select_binary("linux", "x86_64", "int a;"),
96-
"linux-x86_64-openssl-1.1"
94+
"linux-x86_64-openssl-3.0"
9795
),
98-
"Found libcurl and OpenSSL >= 1.1"
96+
"Found libcurl and OpenSSL >= 3.0.0"
9997
)
10098
expect_output(
101-
expect_identical(
102-
select_binary("linux", "x86_64", "#error Using OpenSSL version 1.0"),
103-
"linux-x86_64-openssl-1.0"
99+
expect_null(
100+
select_binary("linux", "x86_64", "#error Using OpenSSL version 1.0")
104101
),
105-
"Found libcurl and OpenSSL < 1.1"
102+
"OpenSSL found but version >= 3.0.0 is required"
106103
)
107104
expect_output(
108105
expect_identical(
@@ -115,9 +112,9 @@ test_that("select_binary() with test program", {
115112
expect_output(
116113
expect_identical(
117114
select_binary("darwin", "x86_64", "int a;"),
118-
"darwin-x86_64-openssl-1.1"
115+
"darwin-x86_64-openssl-3.0"
119116
),
120-
"Found libcurl and OpenSSL >= 1.1"
117+
"Found libcurl and OpenSSL >= 3.0.0"
121118
)
122119
expect_output(
123120
expect_identical(
@@ -129,9 +126,9 @@ test_that("select_binary() with test program", {
129126
expect_output(
130127
expect_identical(
131128
select_binary("darwin", "arm64", "int a;"),
132-
"darwin-arm64-openssl-1.1"
129+
"darwin-arm64-openssl-3.0"
133130
),
134-
"Found libcurl and OpenSSL >= 1.1"
131+
"Found libcurl and OpenSSL >= 3.0.0"
135132
)
136133
expect_output(
137134
expect_identical(
@@ -144,7 +141,7 @@ test_that("select_binary() with test program", {
144141
expect_null(
145142
select_binary("darwin", "x86_64", "#error Using OpenSSL version 1.0")
146143
),
147-
"OpenSSL 1.0 is not supported on macOS"
144+
"OpenSSL found but version >= 3.0.0 is required"
148145
)
149146
})
150147

0 commit comments

Comments
 (0)