Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Jun 2023 07:25:21 GMT
From:      Muhammad Moinur Rahman <bofh@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 6370a26a6715 - main - www/node20: Fix build with OpenSSL 3
Message-ID:  <202306070725.3577PLkT084990@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by bofh:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6370a26a67152c1fe012832f86a59dae39150f24

commit 6370a26a67152c1fe012832f86a59dae39150f24
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-06-07 05:48:13 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-06-07 07:25:09 +0000

    www/node20: Fix build with OpenSSL 3
    
    - This was tested only with OpenSSL 3 from base but not with
      openssl30 or openssl31 ports
    - Refresh patches
    
    PR:             271868
    Reported by:    emaste
    Approved by:    portmgr (blanket)
---
 ...eps_openssl_config_archs_linux-elf_no-asm_openssl.gypi |  4 ++--
 www/node20/files/patch-deps_openssl_openssl__no__asm.gypi |  6 +++---
 www/node20/files/patch-deps_v8_src_libsampler_sampler.cc  |  4 ++--
 www/node20/files/patch-node.gypi                          |  4 ++--
 www/node20/files/patch-src_cares__wrap.h                  |  4 ++--
 www/node20/files/patch-src_crypto_crypto__util.cc         | 15 +++++++++++++++
 www/node20/files/patch-tools_v8__gypfiles_v8.gyp          |  4 ++--
 7 files changed, 28 insertions(+), 13 deletions(-)

diff --git a/www/node20/files/patch-deps_openssl_config_archs_linux-elf_no-asm_openssl.gypi b/www/node20/files/patch-deps_openssl_config_archs_linux-elf_no-asm_openssl.gypi
index 271bebf2f6b0..5a7ce627e099 100644
--- a/www/node20/files/patch-deps_openssl_config_archs_linux-elf_no-asm_openssl.gypi
+++ b/www/node20/files/patch-deps_openssl_config_archs_linux-elf_no-asm_openssl.gypi
@@ -1,6 +1,6 @@
---- deps/openssl/config/archs/linux-elf/no-asm/openssl.gypi.orig	2021-10-19 00:48:28 UTC
+--- deps/openssl/config/archs/linux-elf/no-asm/openssl.gypi.orig	2023-05-16 06:58:19 UTC
 +++ deps/openssl/config/archs/linux-elf/no-asm/openssl.gypi
-@@ -980,7 +980,7 @@
+@@ -977,7 +977,7 @@
        '-Wall -O3 -fomit-frame-pointer',
      ],
      'openssl_ex_libs_linux-elf': [
diff --git a/www/node20/files/patch-deps_openssl_openssl__no__asm.gypi b/www/node20/files/patch-deps_openssl_openssl__no__asm.gypi
index 1fef0c4ca71f..f7fb266e350c 100644
--- a/www/node20/files/patch-deps_openssl_openssl__no__asm.gypi
+++ b/www/node20/files/patch-deps_openssl_openssl__no__asm.gypi
@@ -1,7 +1,7 @@
---- deps/openssl/openssl_no_asm.gypi.orig	2020-09-08 12:17:11 UTC
+--- deps/openssl/openssl_no_asm.gypi.orig	2023-05-16 06:58:20 UTC
 +++ deps/openssl/openssl_no_asm.gypi
-@@ -48,7 +48,7 @@
-       'includes': ['config/archs/linux64-mips64/no-asm/openssl.gypi'],
+@@ -44,7 +44,7 @@
+       'includes': ['config/archs/linux64-riscv64/no-asm/openssl.gypi'],
      }, {
        # Other architectures don't use assembly
 -      'includes': ['config/archs/linux-x86_64/no-asm/openssl.gypi'],
diff --git a/www/node20/files/patch-deps_v8_src_libsampler_sampler.cc b/www/node20/files/patch-deps_v8_src_libsampler_sampler.cc
index 4a1f24a4a3c4..dd19d75d8196 100644
--- a/www/node20/files/patch-deps_v8_src_libsampler_sampler.cc
+++ b/www/node20/files/patch-deps_v8_src_libsampler_sampler.cc
@@ -1,6 +1,6 @@
---- deps/v8/src/libsampler/sampler.cc.orig	2021-10-19 00:48:30 UTC
+--- deps/v8/src/libsampler/sampler.cc.orig	2023-05-16 06:58:20 UTC
 +++ deps/v8/src/libsampler/sampler.cc
-@@ -497,6 +497,10 @@ void SignalHandler::FillRegisterState(void* context, R
+@@ -511,6 +511,10 @@ void SignalHandler::FillRegisterState(void* context, R
    state->pc = reinterpret_cast<void*>(mcontext.__gregs[_REG_PC]);
    state->sp = reinterpret_cast<void*>(mcontext.__gregs[_REG_SP]);
    state->fp = reinterpret_cast<void*>(mcontext.__gregs[_REG_FP]);
diff --git a/www/node20/files/patch-node.gypi b/www/node20/files/patch-node.gypi
index f48b5b1091cb..c1f4c867c303 100644
--- a/www/node20/files/patch-node.gypi
+++ b/www/node20/files/patch-node.gypi
@@ -1,6 +1,6 @@
---- node.gypi.orig	2021-10-19 00:48:32 UTC
+--- node.gypi.orig	2023-05-16 06:58:21 UTC
 +++ node.gypi
-@@ -319,6 +319,9 @@
+@@ -349,6 +349,9 @@
      [ 'node_use_openssl=="true"', {
        'defines': [ 'HAVE_OPENSSL=1' ],
        'conditions': [
diff --git a/www/node20/files/patch-src_cares__wrap.h b/www/node20/files/patch-src_cares__wrap.h
index 7f57f6d8b333..7bac6f049408 100644
--- a/www/node20/files/patch-src_cares__wrap.h
+++ b/www/node20/files/patch-src_cares__wrap.h
@@ -1,6 +1,6 @@
---- src/cares_wrap.h.orig	2021-08-18 22:13:12 UTC
+--- src/cares_wrap.h.orig	2023-05-16 06:58:21 UTC
 +++ src/cares_wrap.h
-@@ -22,7 +22,7 @@
+@@ -23,7 +23,7 @@
  # include <netdb.h>
  #endif  // __POSIX__
  
diff --git a/www/node20/files/patch-src_crypto_crypto__util.cc b/www/node20/files/patch-src_crypto_crypto__util.cc
new file mode 100644
index 000000000000..63f4881e7b81
--- /dev/null
+++ b/www/node20/files/patch-src_crypto_crypto__util.cc
@@ -0,0 +1,15 @@
+--- src/crypto/crypto_util.cc.orig	2023-06-06 21:54:38 UTC
++++ src/crypto/crypto_util.cc
+@@ -205,10 +205,12 @@ void InitCryptoOnce() {
+   // No-op with OPENSSL_NO_COMP builds of OpenSSL.
+   sk_SSL_COMP_zero(SSL_COMP_get_compression_methods());
+ 
++#if OPENSSL_VERSION_MAJOR < 3
+ #ifndef OPENSSL_NO_ENGINE
+   ERR_load_ENGINE_strings();
+   ENGINE_load_builtin_engines();
+ #endif  // !OPENSSL_NO_ENGINE
++#endif
+ }
+ 
+ void GetFipsCrypto(const FunctionCallbackInfo<Value>& args) {
diff --git a/www/node20/files/patch-tools_v8__gypfiles_v8.gyp b/www/node20/files/patch-tools_v8__gypfiles_v8.gyp
index a37d30b37981..61657d4c24a1 100644
--- a/www/node20/files/patch-tools_v8__gypfiles_v8.gyp
+++ b/www/node20/files/patch-tools_v8__gypfiles_v8.gyp
@@ -1,6 +1,6 @@
---- tools/v8_gypfiles/v8.gyp.orig	2022-11-14 02:26:08 UTC
+--- tools/v8_gypfiles/v8.gyp.orig	2023-05-16 06:58:22 UTC
 +++ tools/v8_gypfiles/v8.gyp
-@@ -975,7 +975,7 @@
+@@ -1091,7 +1091,7 @@
          }],
          # Platforms that don't have Compare-And-Swap (CAS) support need to link atomic library
          # to implement atomic memory access



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202306070725.3577PLkT084990>