From 29c525d271490e274bf2e6d65786ca97e23960bd Mon Sep 17 00:00:00 2001 From: "Ralf S. Engelschall" Date: Sun, 25 Apr 2021 01:23:21 +0200 Subject: [PATCH] upgrading package: node 14.16.1 -> 16.0.0 --- node/node.patch | 366 +++++++++++++++++++++++++++++++----------------- node/node.spec | 8 +- 2 files changed, 238 insertions(+), 136 deletions(-) diff --git a/node/node.patch b/node/node.patch index 87467660b7..aa3c68a53b 100644 --- a/node/node.patch +++ b/node/node.patch @@ -1,16 +1,16 @@ Index: common.gypi ---- common.gypi.orig 2020-03-26 07:31:00.000000000 +0100 -+++ common.gypi 2020-03-27 21:03:47.846361000 +0100 -@@ -160,7 +160,7 @@ +--- common.gypi.orig 2021-04-20 13:30:12.000000000 +0200 ++++ common.gypi 2021-04-20 20:28:46.089838000 +0200 +@@ -173,7 +173,7 @@ }], ], }, - 'cflags': [ '-O3' ], + 'cflags': [ '-O2' ], 'conditions': [ - ['OS=="solaris"', { - # pull in V8's postmortem metadata -@@ -333,7 +333,7 @@ + ['OS=="linux"', { + 'conditions': [ +@@ -374,7 +374,7 @@ 'ldflags': [ '-pthread' ], }], [ 'OS in "linux freebsd openbsd solaris android aix cloudabi"', { @@ -19,7 +19,7 @@ Index: common.gypi 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++1y' ], 'defines': [ '__STDC_FORMAT_MACROS' ], 'ldflags': [ '-rdynamic' ], -@@ -436,10 +436,7 @@ +@@ -486,10 +486,7 @@ '-fno-strict-aliasing', ], 'WARNING_CFLAGS': [ @@ -32,8 +32,8 @@ Index: common.gypi }, 'target_conditions': [ Index: deps/uv/common.gypi ---- deps/uv/common.gypi.orig 2020-03-26 07:31:02.000000000 +0100 -+++ deps/uv/common.gypi 2020-03-27 21:03:47.846518000 +0100 +--- deps/uv/common.gypi.orig 2021-04-20 13:30:13.000000000 +0200 ++++ deps/uv/common.gypi 2021-04-20 20:28:46.089975000 +0200 @@ -46,7 +46,7 @@ 'Release': { 'defines': [ 'NDEBUG' ], @@ -44,8 +44,8 @@ Index: deps/uv/common.gypi 'msvs_settings': { 'VCCLCompilerTool': { Index: deps/uv/uv.gyp ---- deps/uv/uv.gyp.orig 2020-03-26 07:31:02.000000000 +0100 -+++ deps/uv/uv.gyp 2020-03-27 21:03:47.846674000 +0100 +--- deps/uv/uv.gyp.orig 2021-04-20 13:30:13.000000000 +0200 ++++ deps/uv/uv.gyp 2021-04-20 20:28:46.090103000 +0200 @@ -178,7 +178,7 @@ 'src/unix/udp.c', ], @@ -56,9 +56,9 @@ Index: deps/uv/uv.gyp ['OS=="solaris"', { 'ldflags': [ '-pthreads' ], Index: deps/v8/src/base/platform/platform-freebsd.cc ---- deps/v8/src/base/platform/platform-freebsd.cc.orig 2020-03-26 07:31:02.000000000 +0100 -+++ deps/v8/src/base/platform/platform-freebsd.cc 2020-03-27 21:03:47.846825000 +0100 -@@ -27,6 +27,7 @@ +--- deps/v8/src/base/platform/platform-freebsd.cc.orig 2021-04-20 13:30:13.000000000 +0200 ++++ deps/v8/src/base/platform/platform-freebsd.cc 2021-04-20 20:28:46.090222000 +0200 +@@ -28,6 +28,7 @@ #include // index #include @@ -66,52 +66,9 @@ Index: deps/v8/src/base/platform/platform-freebsd.cc #undef MAP_TYPE -Index: deps/v8/src/builtins/base.tq ---- deps/v8/src/builtins/base.tq.orig 2020-03-26 07:31:02.000000000 +0100 -+++ deps/v8/src/builtins/base.tq 2020-03-27 21:08:14.697990000 +0100 -@@ -999,10 +999,6 @@ - return UnsafeCast(LoadNativeContext( - context)[NativeContextSlot::JS_ARRAY_PACKED_ELEMENTS_MAP_INDEX]); - } --macro GetFastPackedSmiElementsJSArrayMap(implicit context: Context)(): Map { -- return UnsafeCast(LoadNativeContext( -- context)[NativeContextSlot::JS_ARRAY_PACKED_SMI_ELEMENTS_MAP_INDEX]); --} - macro GetProxyRevocableResultMap(implicit context: Context)(): Map { - return UnsafeCast(LoadNativeContext( - context)[NativeContextSlot::PROXY_REVOCABLE_RESULT_MAP_INDEX]); -Index: deps/v8/src/objects/js-array.tq ---- deps/v8/src/objects/js-array.tq.orig 2020-03-26 07:31:02.000000000 +0100 -+++ deps/v8/src/objects/js-array.tq 2020-03-27 21:03:47.846982000 +0100 -@@ -9,9 +9,6 @@ - } - - extern class JSArray extends JSObject { -- macro IsEmpty(): bool { -- return this.length == 0; -- } - length: Number; - } - -@@ -25,15 +22,6 @@ - }; - } - --macro NewJSArray(implicit context: Context)(): JSArray { -- return new JSArray{ -- map: GetFastPackedSmiElementsJSArrayMap(), -- properties_or_hash: kEmptyFixedArray, -- elements: kEmptyFixedArray, -- length: 0 -- }; --} -- - // A HeapObject with a JSArray map, and either fast packed elements, or fast - // holey elements when the global NoElementsProtector is not invalidated. - transient type FastJSArray extends JSArray; Index: deps/v8/src/wasm/wasm-result.cc ---- deps/v8/src/wasm/wasm-result.cc.orig 2020-03-26 07:31:02.000000000 +0100 -+++ deps/v8/src/wasm/wasm-result.cc 2020-03-27 21:03:47.847111000 +0100 +--- deps/v8/src/wasm/wasm-result.cc.orig 2021-04-20 13:30:14.000000000 +0200 ++++ deps/v8/src/wasm/wasm-result.cc 2021-04-20 20:28:46.090724000 +0200 @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -122,9 +79,9 @@ Index: deps/v8/src/wasm/wasm-result.cc #include "src/execution/isolate-inl.h" Index: lib/dns.js ---- lib/dns.js.orig 2020-03-26 07:31:04.000000000 +0100 -+++ lib/dns.js 2020-03-27 21:03:47.847249000 +0100 -@@ -148,6 +148,10 @@ +--- lib/dns.js.orig 2021-04-20 13:30:15.000000000 +0200 ++++ lib/dns.js 2021-04-20 20:28:46.090840000 +0200 +@@ -150,6 +150,10 @@ req.hostname = hostname; req.oncomplete = all ? onlookupall : onlookup; @@ -136,70 +93,63 @@ Index: lib/dns.js req, toASCII(hostname), family, hints, verbatim ); Index: lib/internal/modules/cjs/loader.js ---- lib/internal/modules/cjs/loader.js.orig 2020-03-26 07:31:04.000000000 +0100 -+++ lib/internal/modules/cjs/loader.js 2020-03-27 21:03:47.847478000 +0100 -@@ -1309,7 +1309,10 @@ +--- lib/internal/modules/cjs/loader.js.orig 2021-04-20 13:30:15.000000000 +0200 ++++ lib/internal/modules/cjs/loader.js 2021-04-20 20:28:46.091036000 +0200 +@@ -1218,7 +1218,10 @@ path.resolve(process.execPath, '..') : path.resolve(process.execPath, '..', '..'); -- let paths = [path.resolve(prefixDir, 'lib', 'node')]; -+ let paths = [ +- const paths = [path.resolve(prefixDir, 'lib', 'node')]; ++ const paths = [ + path.resolve(prefixDir, '..', 'lib', 'node', 'usr'), + path.resolve(prefixDir, '..', 'lib', 'node', 'pkg') + ]; if (homeDir) { - paths.unshift(path.resolve(homeDir, '.node_libraries')); -Index: src/inspector_socket_server.cc ---- src/inspector_socket_server.cc.orig 2020-03-26 07:31:04.000000000 +0100 -+++ src/inspector_socket_server.cc 2020-03-27 21:03:47.847642000 +0100 -@@ -20,7 +20,7 @@ - bool include_protocol); - namespace { + ArrayPrototypeUnshift(paths, path.resolve(homeDir, '.node_libraries')); +Index: src/crypto/crypto_aes.cc +--- src/crypto/crypto_aes.cc.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/crypto/crypto_aes.cc 2021-04-20 20:28:46.091177000 +0200 +@@ -10,8 +10,8 @@ + #include "threadpoolwork-inl.h" + #include "v8.h" --static const uint8_t PROTOCOL_JSON[] = { -+static uint8_t PROTOCOL_JSON[] = { - #include "v8_inspector_protocol_json.h" // NOLINT(build/include_order) - }; +-#include +-#include ++#include "openssl/bn.h" ++#include "openssl/aes.h" -Index: src/node_constants.cc ---- src/node_constants.cc.orig 2020-03-26 07:31:04.000000000 +0100 -+++ src/node_constants.cc 2020-03-27 21:03:47.847817000 +0100 -@@ -36,10 +36,10 @@ + #include +Index: src/crypto/crypto_bio.cc +--- src/crypto/crypto_bio.cc.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/crypto/crypto_bio.cc 2021-04-20 20:28:46.091294000 +0200 +@@ -25,7 +25,7 @@ + #include "allocated_buffer-inl.h" + #include "util-inl.h" - #if HAVE_OPENSSL --#include --#include -+#include "openssl/ec.h" -+#include "openssl/ssl.h" - #ifndef OPENSSL_NO_ENGINE --#include -+#include "openssl/engine.h" - #endif // !OPENSSL_NO_ENGINE - #endif // HAVE_OPENSSL +-#include ++#include "openssl/bio.h" -Index: src/node_crypto.cc ---- src/node_crypto.cc.orig 2020-03-26 07:31:04.000000000 +0100 -+++ src/node_crypto.cc 2020-03-27 21:03:47.848478000 +0100 -@@ -39,17 +39,17 @@ - #include "util-inl.h" + #include + #include +Index: src/crypto/crypto_common.cc +--- src/crypto/crypto_common.cc.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/crypto/crypto_common.cc 2021-04-20 20:28:46.091456000 +0200 +@@ -11,14 +11,14 @@ + #include "memory_tracker-inl.h" #include "v8.h" -#include -#include -+#include "openssl/ec.h" -+#include "openssl/ecdh.h" - #ifndef OPENSSL_NO_ENGINE --# include -+# include "openssl/engine.h" - #endif // !OPENSSL_NO_ENGINE -#include -#include -#include -#include -#include -#include ++#include "openssl/ec.h" ++#include "openssl/ecdh.h" +#include "openssl/evp.h" +#include "openssl/pem.h" +#include "openssl/x509v3.h" @@ -207,12 +157,107 @@ Index: src/node_crypto.cc +#include "openssl/rand.h" +#include "openssl/pkcs12.h" - #include - #include // INT_MAX -Index: src/tls_wrap.h ---- src/tls_wrap.h.orig 2020-03-26 07:31:04.000000000 +0100 -+++ src/tls_wrap.h 2020-03-27 21:03:47.848603000 +0100 -@@ -30,7 +30,7 @@ + #include + #include +Index: src/crypto/crypto_common.h +--- src/crypto/crypto_common.h.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/crypto/crypto_common.h 2021-04-20 20:28:46.091556000 +0200 +@@ -5,8 +5,8 @@ + + #include "node_crypto.h" + #include "v8.h" +-#include +-#include ++#include "openssl/ssl.h" ++#include "openssl/x509v3.h" + + #include + #include +Index: src/crypto/crypto_context.cc +--- src/crypto/crypto_context.cc.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/crypto/crypto_context.cc 2021-04-20 20:28:46.091754000 +0200 +@@ -11,10 +11,10 @@ + #include "util.h" + #include "v8.h" + +-#include +-#include ++#include "openssl/x509.h" ++#include "openssl/pkcs12.h" + #ifndef OPENSSL_NO_ENGINE +-#include ++#include "openssl/engine.h" + #endif // !OPENSSL_NO_ENGINE + + namespace node { +Index: src/crypto/crypto_dsa.cc +--- src/crypto/crypto_dsa.cc.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/crypto/crypto_dsa.cc 2021-04-20 20:28:46.091853000 +0200 +@@ -7,8 +7,8 @@ + #include "threadpoolwork-inl.h" + #include "v8.h" + +-#include +-#include ++#include "openssl/bn.h" ++#include "openssl/dsa.h" + + #include + +Index: src/crypto/crypto_keys.h +--- src/crypto/crypto_keys.h.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/crypto/crypto_keys.h 2021-04-20 20:28:46.091966000 +0200 +@@ -11,7 +11,7 @@ + #include "node_worker.h" + #include "v8.h" + +-#include ++#include "openssl/evp.h" + + #include + #include +Index: src/crypto/crypto_rsa.cc +--- src/crypto/crypto_rsa.cc.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/crypto/crypto_rsa.cc 2021-04-20 20:28:46.092090000 +0200 +@@ -10,8 +10,8 @@ + #include "threadpoolwork-inl.h" + #include "v8.h" + +-#include +-#include ++#include "openssl/bn.h" ++#include "openssl/rsa.h" + + namespace node { + +Index: src/crypto/crypto_spkac.h +--- src/crypto/crypto_spkac.h.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/crypto/crypto_spkac.h 2021-04-20 20:28:46.092181000 +0200 +@@ -6,7 +6,7 @@ + #include "env.h" + #include "v8.h" + +-#include ++#include "openssl/evp.h" + + namespace node { + namespace crypto { +Index: src/crypto/crypto_timing.cc +--- src/crypto/crypto_timing.cc.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/crypto/crypto_timing.cc 2021-04-20 20:28:46.092269000 +0200 +@@ -5,7 +5,7 @@ + #include "v8.h" + #include "node.h" + +-#include ++#include "openssl/crypto.h" + + namespace node { + +Index: src/crypto/crypto_tls.h +--- src/crypto/crypto_tls.h.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/crypto/crypto_tls.h 2021-04-20 20:28:46.092375000 +0200 +@@ -32,7 +32,7 @@ #include "stream_wrap.h" #include "v8.h" @@ -221,10 +266,78 @@ Index: src/tls_wrap.h #include +Index: src/crypto/crypto_util.h +--- src/crypto/crypto_util.h.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/crypto/crypto_util.h 2021-04-20 20:28:46.092517000 +0200 +@@ -12,15 +12,15 @@ + #include "v8.h" + #include "string_bytes.h" + +-#include +-#include +-#include +-#include +-#include +-#include +-#include ++#include "openssl/err.h" ++#include "openssl/evp.h" ++#include "openssl/ec.h" ++#include "openssl/kdf.h" ++#include "openssl/rsa.h" ++#include "openssl/dsa.h" ++#include "openssl/ssl.h" + #ifndef OPENSSL_NO_ENGINE +-# include ++# include "openssl/engine.h" + #endif // !OPENSSL_NO_ENGINE + // The FIPS-related functions are only available + // when the OpenSSL itself was compiled with FIPS support. +Index: src/inspector_socket_server.cc +--- src/inspector_socket_server.cc.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/inspector_socket_server.cc 2021-04-20 20:28:46.092647000 +0200 +@@ -20,7 +20,7 @@ + bool include_protocol); + namespace { + +-static const uint8_t PROTOCOL_JSON[] = { ++static uint8_t PROTOCOL_JSON[] = { + #include "v8_inspector_protocol_json.h" // NOLINT(build/include_order) + }; + +Index: src/node_constants.cc +--- src/node_constants.cc.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/node_constants.cc 2021-04-20 20:28:46.092815000 +0200 +@@ -36,10 +36,10 @@ + + + #if HAVE_OPENSSL +-#include +-#include ++#include "openssl/ec.h" ++#include "openssl/ssl.h" + #ifndef OPENSSL_NO_ENGINE +-#include ++#include "openssl/engine.h" + #endif // !OPENSSL_NO_ENGINE + #endif // HAVE_OPENSSL + +Index: src/node_metadata.cc +--- src/node_metadata.cc.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/node_metadata.cc 2021-04-20 20:28:46.092915000 +0200 +@@ -10,7 +10,7 @@ + #include "zlib.h" + + #if HAVE_OPENSSL +-#include ++#include "openssl/opensslv.h" + #endif // HAVE_OPENSSL + + #ifdef OPENSSL_INFO_QUIC Index: src/util.h ---- src/util.h.orig 2020-03-26 07:31:04.000000000 +0100 -+++ src/util.h 2020-03-27 21:03:47.848764000 +0100 -@@ -159,14 +159,23 @@ +--- src/util.h.orig 2021-04-20 13:30:15.000000000 +0200 ++++ src/util.h 2021-04-20 20:28:46.093071000 +0200 +@@ -150,14 +150,23 @@ } \ } while (0) @@ -248,7 +361,7 @@ Index: src/util.h #define CHECK_IMPLIES(a, b) CHECK(!(a) || (b)) #ifdef DEBUG -@@ -194,6 +203,7 @@ +@@ -185,6 +194,7 @@ #endif @@ -257,9 +370,9 @@ Index: src/util.h ERROR_AND_ABORT("Unreachable code reached" __VA_OPT__(": ") __VA_ARGS__) Index: tools/install.py ---- tools/install.py.orig 2020-03-26 07:31:04.000000000 +0100 -+++ tools/install.py 2020-03-27 21:03:47.848902000 +0100 -@@ -151,10 +151,7 @@ +--- tools/install.py.orig 2021-04-20 13:30:16.000000000 +0200 ++++ tools/install.py 2021-04-20 20:28:46.093182000 +0200 +@@ -147,10 +147,7 @@ action(['deps/v8/tools/gdbinit'], 'share/doc/node/') action(['deps/v8/tools/lldb_commands.py'], 'share/doc/node/') @@ -272,9 +385,9 @@ Index: tools/install.py if 'true' == variables.get('node_install_npm'): npm_files(action) Index: tools/v8_gypfiles/toolchain.gypi ---- tools/v8_gypfiles/toolchain.gypi.orig 2020-03-26 07:31:05.000000000 +0100 -+++ tools/v8_gypfiles/toolchain.gypi 2020-03-27 21:03:47.849236000 +0100 -@@ -1120,12 +1120,6 @@ +--- tools/v8_gypfiles/toolchain.gypi.orig 2021-04-20 13:30:16.000000000 +0200 ++++ tools/v8_gypfiles/toolchain.gypi 2021-04-20 20:28:46.093385000 +0200 +@@ -1087,12 +1087,6 @@ ['OS=="solaris"', { 'defines': [ '__C99FEATURES__=1' ], # isinf() etc. }], @@ -287,7 +400,7 @@ Index: tools/v8_gypfiles/toolchain.gypi ['OS=="aix"', { 'defines': [ # Support for malloc(0) -@@ -1288,8 +1282,8 @@ +@@ -1235,8 +1229,8 @@ # Don't use -O3 with sanitizers. ['asan==0 and msan==0 and lsan==0 \ and tsan==0 and ubsan==0 and ubsan_vptr==0', { @@ -298,7 +411,7 @@ Index: tools/v8_gypfiles/toolchain.gypi }, { 'cflags': ['-O2'], 'cflags!': ['-O3'], -@@ -1337,8 +1331,8 @@ +@@ -1283,8 +1277,8 @@ # Don't use -O3 with sanitizers. ['asan==0 and msan==0 and lsan==0 \ and tsan==0 and ubsan==0 and ubsan_vptr==0', { @@ -309,14 +422,3 @@ Index: tools/v8_gypfiles/toolchain.gypi }, { 'cflags': ['-O2'], 'cflags!': ['-O3'], -Index: tools/v8_gypfiles/v8.gyp ---- tools/v8_gypfiles/v8.gyp.orig 2020-03-26 07:31:05.000000000 +0100 -+++ tools/v8_gypfiles/v8.gyp 2020-03-27 21:03:47.849467000 +0100 -@@ -167,7 +167,6 @@ - "<(V8_ROOT)/src/objects/template-objects.tq", - "<(V8_ROOT)/src/objects/template.tq", - "<(V8_ROOT)/src/wasm/wasm-objects.tq", -- "<(V8_ROOT)/test/torque/test-torque.tq", - "<(V8_ROOT)/third_party/v8/builtins/array-sort.tq", - ], - 'torque_output_root': '<(SHARED_INTERMEDIATE_DIR)/torque-output-root', diff --git a/node/node.spec b/node/node.spec index e8bf5a3a15..63aed3b2b0 100644 --- a/node/node.spec +++ b/node/node.spec @@ -22,8 +22,8 @@ ## # package version -%define V_opkg 14.16.1 -%define V_dist 14.16.1 +%define V_opkg 16.0.0 +%define V_dist 16.0.0 # package information Name: node @@ -36,7 +36,7 @@ Class: PLUS Group: Web License: MIT/BSD Version: %{V_opkg} -Release: 20210407 +Release: 20210425 # package options %option with_icu yes @@ -59,7 +59,7 @@ PreReq: icu %description Node.js provides an easy way to build scalable network servers in JavaScript. It is an event-driven I/O environment based - on Google V8 JavaScript virtual machine version 8.4.371.19. + on Google V8 JavaScript virtual machine version 9.0.257.17. %track prog node = {