Skip to content

Commit

Permalink
support ArchLinux Node.js 17 ABI
Browse files Browse the repository at this point in the history
  • Loading branch information
mmomtchev committed Jan 13, 2022
1 parent 5a3e462 commit ad3e92c
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ jobs:
- fedora:33
- fedora:34
- amazonlinux:latest
node-version: [ 12, 14, 16, 17 ]
include:
- linux-version: archlinux:latest
node-version: 17

steps:
- uses: actions/checkout@v2
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.4.2] WIP
- Support the ArchLinux Node.js 17 ABI - see https://github.com/nodejs/node/issues/41410

## [3.4.1] 2021-01-05

### Added
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,6 @@ Release binaries with pre-built bundled GDAL are tested against the full matrix

On Ubuntu 16.04, Amazon Linux, Windows and macOS only the bundled GDAL version is officially supported. On all other platforms both the bundled and the system-installed versions are supported.

On ArchLinux rebuilding from source is mandatory since it uses a non-standard binary ABI.

Development versions are unit tested for the following targets:

---
Expand All @@ -294,7 +292,7 @@ Development versions are unit tested for the following targets:
| Node.js 14.x | Fedora 34 | system-installed GDAL 3.2.2
| Node.js 14.x | Fedora 34 | bundled GDAL
| Node.js 16.x | Arch Linux current | system installed GDAL 3.2.3
| Node.js 16.x | Arch Linux current | bundled GDAL (*requires rebuilding as Arch Linux has a non-standard ABI*)
| Node.js 16.x | Arch Linux current | bundled GDAL
| Node.js 14.x | Ubuntu 16.04 | bundled GDAL (*glibc target platform*)
| Node.js 14.x | Ubuntu 18.04 | system-installed GDAL 2.2.3
| Node.js 14.x | Ubuntu 18.04 | bundled GDAL
Expand Down
8 changes: 8 additions & 0 deletions deps/libcurl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ fi
tar -xzf curl-${CURL_VERSION}.tar.gz
mv curl-${CURL_VERSION} $dir_curl

#
# apply patches
#
for PATCH in patches/*.diff; do
echo "Applying ${PATCH}"
patch -p1 < $PATCH
done

# update the CA bundle
curl -L https://curl.se/ca/cacert.pem -o cacert.pem
[ -d ${dir_curl} ] && rm -rf ${dir_curl}/{tests,projects}
2 changes: 1 addition & 1 deletion deps/libcurl/curl/lib/vtls/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -3052,7 +3052,7 @@ static CURLcode ossl_connect_step1(struct Curl_easy *data,
}
}

#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3)
#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) && NEVERDEFINED
/* OpenSSL 3.0.0 has deprecated SSL_CTX_load_verify_locations */
{
if(ssl_cafile) {
Expand Down
6 changes: 5 additions & 1 deletion deps/libcurl/libcurl.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,11 @@
"defines": [
"BUILDING_LIBCURL=1",
"OPENSSL_API_COMPAT=0x10100001L",
"OPENSSL_CONFIGURED_API=0x30000000L",
"OPENSSL_CONFIGURED_API=10100",
"OPENSSL_MIN_API=10100",
"OPENSSL_VERSION_MAJOR=1",
"OPENSSL_VERSION_MINOR=1"
"STATIC_LEGACY",
"CURL_DISABLE_GOPHER=1",
"CURL_DISABLE_IMAP=1",
"CURL_DISABLE_LDAP=1",
Expand Down
11 changes: 11 additions & 0 deletions deps/libcurl/patches/libcurl_curl_lib_vtls_openssl.c.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- libcurl/curl/lib/vtls/openssl.c.orig 2022-01-13 19:12:10.183880350 +0100
+++ libcurl/curl/lib/vtls/openssl.c 2022-01-13 19:13:21.131414933 +0100
@@ -3052,7 +3052,7 @@
}
}

-#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3)
+#if defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3) && NEVERDEFINED
/* OpenSSL 3.0.0 has deprecated SSL_CTX_load_verify_locations */
{
if(ssl_cafile) {

0 comments on commit ad3e92c

Please sign in to comment.