From 0ca0faafc449aadaff2682f3a87b5be12b068e46 Mon Sep 17 00:00:00 2001 From: Hirokazu MORIKAWA Date: Thu, 23 Feb 2023 11:29:42 +0900 Subject: [PATCH] node: bump to v18.14.2 Update to v18.14.2 Support for OpenSSL v3.0.x Signed-off-by: Hirokazu MORIKAWA --- lang/node/Makefile | 4 +- lang/node/patches/003-path.patch | 2 +- lang/node/patches/004-musl_support.patch | 4 +- .../patches/007-fix_host_build_on_macos.patch | 2 +- .../010-execvp-arg-list-too-long.patch | 236 ------------------ ...ecessary_libraries_for_host_execute.patch} | 20 +- ...upport.patch => 991-v8_zlib_support.patch} | 29 +-- .../992-v8_compiler_add_include_dirs.patch | 10 + lang/node/patches/999-cast_for_mips32.patch | 2 +- ...s-v8-src-trap-handler-trap-handler.h.patch | 29 --- lang/node/patches/999-fix_icu_conflict.patch | 18 +- .../patches/999-localhost-no-addrconfig.patch | 2 +- ...able_pointer_authentication_on_arm64.patch | 13 +- 13 files changed, 54 insertions(+), 317 deletions(-) delete mode 100644 lang/node/patches/010-execvp-arg-list-too-long.patch rename lang/node/patches/{999-delete_unnecessary_libraries_for_host_execute.patch => 990-delete_unnecessary_libraries_for_host_execute.patch} (91%) rename lang/node/patches/{999-v8_zlib_support.patch => 991-v8_zlib_support.patch} (84%) create mode 100644 lang/node/patches/992-v8_compiler_add_include_dirs.patch delete mode 100644 lang/node/patches/999-deps-v8-src-trap-handler-trap-handler.h.patch diff --git a/lang/node/Makefile b/lang/node/Makefile index f292d1565e..f1eacd891e 100644 --- a/lang/node/Makefile +++ b/lang/node/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=node -PKG_VERSION:=v16.19.1 +PKG_VERSION:=v18.14.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://nodejs.org/dist/$(PKG_VERSION) -PKG_HASH:=17fb716406198125b30c94dd3d1756207b297705626afe16d8dc479a65a1d8b5 +PKG_HASH:=fbc364dd25fee2cacc0f2033db2d86115fc07575310ea0e64408b8170d09c685 PKG_MAINTAINER:=Hirokazu MORIKAWA , Adrian Panella PKG_LICENSE:=MIT diff --git a/lang/node/patches/003-path.patch b/lang/node/patches/003-path.patch index d3183cb669..a1103be0df 100644 --- a/lang/node/patches/003-path.patch +++ b/lang/node/patches/003-path.patch @@ -1,6 +1,6 @@ --- a/lib/internal/modules/cjs/loader.js +++ b/lib/internal/modules/cjs/loader.js -@@ -1326,7 +1326,8 @@ Module._initPaths = function() { +@@ -1389,7 +1389,8 @@ Module._initPaths = function() { path.resolve(process.execPath, '..') : path.resolve(process.execPath, '..', '..'); diff --git a/lang/node/patches/004-musl_support.patch b/lang/node/patches/004-musl_support.patch index 172b8010d9..5e7e54b72c 100644 --- a/lang/node/patches/004-musl_support.patch +++ b/lang/node/patches/004-musl_support.patch @@ -20,8 +20,8 @@ result = clock_gettime(CLOCK_MONOTONIC, &ts); --- a/deps/v8/src/base/platform/platform-posix.cc +++ b/deps/v8/src/base/platform/platform-posix.cc -@@ -883,7 +883,7 @@ bool Thread::Start() { - #if V8_OS_MACOSX +@@ -1066,7 +1066,7 @@ bool Thread::Start() { + #if V8_OS_DARWIN // Default on Mac OS X is 512kB -- bump up to 1MB stack_size = 1 * 1024 * 1024; -#elif V8_OS_AIX diff --git a/lang/node/patches/007-fix_host_build_on_macos.patch b/lang/node/patches/007-fix_host_build_on_macos.patch index 5def2bd431..eeb5c2d1ca 100644 --- a/lang/node/patches/007-fix_host_build_on_macos.patch +++ b/lang/node/patches/007-fix_host_build_on_macos.patch @@ -1,6 +1,6 @@ --- a/tools/gyp/pylib/gyp/generator/make.py +++ b/tools/gyp/pylib/gyp/generator/make.py -@@ -181,7 +181,7 @@ cmd_solink_module = $(LINK.$(TOOLSET)) - +@@ -206,7 +206,7 @@ cmd_solink_module = $(LINK.$(TOOLSET)) - LINK_COMMANDS_MAC = """\ quiet_cmd_alink = LIBTOOL-STATIC $@ diff --git a/lang/node/patches/010-execvp-arg-list-too-long.patch b/lang/node/patches/010-execvp-arg-list-too-long.patch deleted file mode 100644 index 8074ba149c..0000000000 --- a/lang/node/patches/010-execvp-arg-list-too-long.patch +++ /dev/null @@ -1,236 +0,0 @@ ---- a/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py -+++ b/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py -@@ -154,6 +154,32 @@ cmd_alink_thin = rm -f $@ && $(AR.$(TOOL - quiet_cmd_link = LINK($(TOOLSET)) $@ - cmd_link = $(LINK.$(TOOLSET)) -o $@ $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,--start-group $(LD_INPUTS) $(LIBS) -Wl,--end-group - -+define xargs -+ $(1) $(wordlist 1,100,$(2)) -+ $(if $(word 101,$(2)),$(call xargs,$(1),$(wordlist 101,$(words $(2)),$(2)))) -+endef -+ -+define write-to-file -+ @echo >$(1) -+ $(call xargs,printf "%s\\n" >>$(1),$(2)) -+endef -+ -+OBJ_FILE_LIST_SFX := ar-file-list -+ -+define create_archive -+ $(eval OBJ_FILE_LIST := $(basename $(notdir $(1))).$(OBJ_FILE_LIST_SFX)) -+ rm -f $(1) $(1).$(OBJ_FILE_LIST); mkdir -p `dirname $(1)` -+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2))) -+ $(AR.$(TOOLSET)) crs $(1) @$(1).$(OBJ_FILE_LIST) -+endef -+ -+define create_thin_archive -+ $(eval OBJ_FILE_LIST := $(basename $(notdir $(1))).$(OBJ_FILE_LIST_SFX)) -+ rm -f $(1) $(OBJ_FILE_LIST); mkdir -p `dirname $(1)` -+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2))) -+ $(AR.$(TOOLSET)) crsT $(1) @$(1).$(OBJ_FILE_LIST) -+endef -+ - # We support two kinds of shared objects (.so): - # 1) shared_library, which is just bundling together many dependent libraries - # into a link line. -@@ -198,6 +224,32 @@ cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) - quiet_cmd_alink_thin = AR($(TOOLSET)) $@ - cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^) - -+define xargs -+ $(1) $(wordlist 1,100,$(2)) -+ $(if $(word 101,$(2)),$(call xargs,$(1),$(wordlist 101,$(words $(2)),$(2)))) -+endef -+ -+define write-to-file -+ @echo >$(1) -+ $(call xargs,printf "%s\\n" >>$(1),$(2)) -+endef -+ -+OBJ_FILE_LIST_SFX := ar-file-list -+ -+define create_archive -+ $(eval OBJ_FILE_LIST := $(basename $(notdir $(1))).$(OBJ_FILE_LIST_SFX)) -+ rm -f $(1) $(1).$(OBJ_FILE_LIST); mkdir -p `dirname $(1)` -+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2))) -+ $(AR.$(TOOLSET)) crs $(1) @$(1).$(OBJ_FILE_LIST) -+endef -+ -+define create_thin_archive -+ $(eval OBJ_FILE_LIST := $(basename $(notdir $(1))).$(OBJ_FILE_LIST_SFX)) -+ rm -f $(1) $(OBJ_FILE_LIST); mkdir -p `dirname $(1)` -+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2))) -+ $(AR.$(TOOLSET)) crsT $(1) @$(1).$(OBJ_FILE_LIST) -+endef -+ - # Due to circular dependencies between libraries :(, we wrap the - # special "figure out circular dependencies" flags around the entire - # input list during linking. -@@ -1768,21 +1820,35 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj) - self.flavor not in ("mac", "openbsd", "netbsd", "win") - and not self.is_standalone_static_library - ): -- self.WriteDoCmd( -- [self.output_binary], -- link_deps, -- "alink_thin", -- part_of_all, -- postbuilds=postbuilds, -- ) -+ if self.flavor in ('linux', 'android'): -+ self.WriteMakeRule( -+ [self.output_binary], -+ link_deps, -+ actions = ['$(call create_thin_archive,$@,$^)'] -+ ) -+ else: -+ self.WriteDoCmd( -+ [self.output_binary], -+ link_deps, -+ "alink_thin", -+ part_of_all, -+ postbuilds=postbuilds, -+ ) - else: -- self.WriteDoCmd( -- [self.output_binary], -- link_deps, -- "alink", -- part_of_all, -- postbuilds=postbuilds, -- ) -+ if self.flavor in ('linux', 'android'): -+ self.WriteMakeRule( -+ [self.output_binary], -+ link_deps, -+ actions = ['$(call create_archive,$@,$^)'] -+ ) -+ else: -+ self.WriteDoCmd( -+ [self.output_binary], -+ link_deps, -+ "alink", -+ part_of_all, -+ postbuilds=postbuilds, -+ ) - elif self.type == "shared_library": - self.WriteLn( - "%s: LD_INPUTS := %s" ---- a/tools/gyp/pylib/gyp/generator/make.py -+++ b/tools/gyp/pylib/gyp/generator/make.py -@@ -156,6 +156,32 @@ cmd_alink_thin = rm -f $@ && $(AR.$(TOOL - quiet_cmd_link = LINK($(TOOLSET)) $@ - cmd_link = $(LINK.$(TOOLSET)) -o $@ $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,--start-group $(LD_INPUTS) $(LIBS) -Wl,--end-group - -+define xargs -+ $(1) $(wordlist 1,100,$(2)) -+ $(if $(word 101,$(2)),$(call xargs,$(1),$(wordlist 101,$(words $(2)),$(2)))) -+endef -+ -+define write-to-file -+ @echo >$(1) -+ $(call xargs,printf "%s\\n" >>$(1),$(2)) -+endef -+ -+OBJ_FILE_LIST_SFX := ar-file-list -+ -+define create_archive -+ $(eval OBJ_FILE_LIST := $(basename $(notdir $(1))).$(OBJ_FILE_LIST_SFX)) -+ rm -f $(1) $(1).$(OBJ_FILE_LIST); mkdir -p `dirname $(1)` -+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2))) -+ $(AR.$(TOOLSET)) crs $(1) @$(1).$(OBJ_FILE_LIST) -+endef -+ -+define create_thin_archive -+ $(eval OBJ_FILE_LIST := $(basename $(notdir $(1))).$(OBJ_FILE_LIST_SFX)) -+ rm -f $(1) $(OBJ_FILE_LIST); mkdir -p `dirname $(1)` -+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2))) -+ $(AR.$(TOOLSET)) crsT $(1) @$(1).$(OBJ_FILE_LIST) -+endef -+ - # We support two kinds of shared objects (.so): - # 1) shared_library, which is just bundling together many dependent libraries - # into a link line. -@@ -200,6 +226,32 @@ cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) - quiet_cmd_alink_thin = AR($(TOOLSET)) $@ - cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^) - -+define xargs -+ $(1) $(wordlist 1,100,$(2)) -+ $(if $(word 101,$(2)),$(call xargs,$(1),$(wordlist 101,$(words $(2)),$(2)))) -+endef -+ -+define write-to-file -+ @echo >$(1) -+ $(call xargs,printf "%s\\n" >>$(1),$(2)) -+endef -+ -+OBJ_FILE_LIST_SFX := ar-file-list -+ -+define create_archive -+ $(eval OBJ_FILE_LIST := $(basename $(notdir $(1))).$(OBJ_FILE_LIST_SFX)) -+ rm -f $(1) $(1).$(OBJ_FILE_LIST); mkdir -p `dirname $(1)` -+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2))) -+ $(AR.$(TOOLSET)) crs $(1) @$(1).$(OBJ_FILE_LIST) -+endef -+ -+define create_thin_archive -+ $(eval OBJ_FILE_LIST := $(basename $(notdir $(1))).$(OBJ_FILE_LIST_SFX)) -+ rm -f $(1) $(OBJ_FILE_LIST); mkdir -p `dirname $(1)` -+ $(call write-to-file,$(1).$(OBJ_FILE_LIST),$(filter %.o,$(2))) -+ $(AR.$(TOOLSET)) crsT $(1) @$(1).$(OBJ_FILE_LIST) -+endef -+ - # Due to circular dependencies between libraries :(, we wrap the - # special "figure out circular dependencies" flags around the entire - # input list during linking. -@@ -1809,21 +1861,35 @@ $(obj).$(TOOLSET)/$(TARGET)/%%.o: $(obj) - self.flavor not in ("mac", "openbsd", "netbsd", "win") - and not self.is_standalone_static_library - ): -- self.WriteDoCmd( -- [self.output_binary], -- link_deps, -- "alink_thin", -- part_of_all, -- postbuilds=postbuilds, -- ) -+ if self.flavor in ('linux', 'android'): -+ self.WriteMakeRule( -+ [self.output_binary], -+ link_deps, -+ actions = ['$(call create_thin_archive,$@,$^)'] -+ ) -+ else: -+ self.WriteDoCmd( -+ [self.output_binary], -+ link_deps, -+ 'alink_thin', -+ part_of_all, -+ postbuilds=postbuilds -+ ) - else: -- self.WriteDoCmd( -- [self.output_binary], -- link_deps, -- "alink", -- part_of_all, -- postbuilds=postbuilds, -- ) -+ if self.flavor in ('linux', 'android'): -+ self.WriteMakeRule( -+ [self.output_binary], -+ link_deps, -+ actions = ['$(call create_archive,$@,$^)'] -+ ) -+ else: -+ self.WriteDoCmd( -+ [self.output_binary], -+ link_deps, -+ 'alink', -+ part_of_all, -+ postbuilds=postbuilds -+ ) - elif self.type == "shared_library": - self.WriteLn( - "%s: LD_INPUTS := %s" diff --git a/lang/node/patches/999-delete_unnecessary_libraries_for_host_execute.patch b/lang/node/patches/990-delete_unnecessary_libraries_for_host_execute.patch similarity index 91% rename from lang/node/patches/999-delete_unnecessary_libraries_for_host_execute.patch rename to lang/node/patches/990-delete_unnecessary_libraries_for_host_execute.patch index e39e29dfac..f9e5329db0 100644 --- a/lang/node/patches/999-delete_unnecessary_libraries_for_host_execute.patch +++ b/lang/node/patches/990-delete_unnecessary_libraries_for_host_execute.patch @@ -1,14 +1,14 @@ --- a/tools/icu/icu-generic.gyp +++ b/tools/icu/icu-generic.gyp -@@ -419,6 +419,7 @@ +@@ -418,6 +418,7 @@ 'target_name': 'genrb', 'type': 'executable', 'toolsets': [ 'host' ], + 'libraries!':[ '-lcrypto', '-lssl', '-lz', '-lhttp_parser', '-luv', '-lnghttp2', '-lcares' ], - 'dependencies': [ 'icutools' ], + 'dependencies': [ 'icutools', 'icu_implementation' ], 'sources': [ '<@(icu_src_genrb)' -@@ -435,6 +436,7 @@ +@@ -434,6 +435,7 @@ 'target_name': 'iculslocs', 'toolsets': [ 'host' ], 'type': 'executable', @@ -16,7 +16,7 @@ 'dependencies': [ 'icutools' ], 'sources': [ 'iculslocs.cc', -@@ -447,6 +449,7 @@ +@@ -446,6 +448,7 @@ 'target_name': 'icupkg', 'toolsets': [ 'host' ], 'type': 'executable', @@ -24,7 +24,7 @@ 'dependencies': [ 'icutools' ], 'sources': [ '<@(icu_src_icupkg)', -@@ -458,6 +461,7 @@ +@@ -457,6 +460,7 @@ 'target_name': 'genccode', 'toolsets': [ 'host' ], 'type': 'executable', @@ -34,7 +34,7 @@ '<@(icu_src_genccode)', --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp -@@ -1373,6 +1373,7 @@ +@@ -1397,6 +1397,7 @@ { 'target_name': 'bytecode_builtins_list_generator', 'type': 'executable', @@ -42,7 +42,7 @@ 'conditions': [ ['want_separate_host_toolset', { 'toolsets': ['host'], -@@ -1397,6 +1398,8 @@ +@@ -1421,6 +1422,8 @@ { 'target_name': 'mksnapshot', 'type': 'executable', @@ -51,7 +51,7 @@ 'dependencies': [ 'v8_base_without_compiler', 'v8_compiler_for_mksnapshot', -@@ -1418,6 +1421,7 @@ +@@ -1442,6 +1445,7 @@ { 'target_name': 'torque', 'type': 'executable', @@ -59,7 +59,7 @@ 'dependencies': [ 'torque_base', # "build/win:default_exe_manifest", -@@ -1456,6 +1460,7 @@ +@@ -1480,6 +1484,7 @@ { 'target_name': 'torque-language-server', 'type': 'executable', @@ -67,7 +67,7 @@ 'conditions': [ ['want_separate_host_toolset', { 'toolsets': ['host'], -@@ -1483,6 +1488,8 @@ +@@ -1507,6 +1512,8 @@ { 'target_name': 'gen-regexp-special-case', 'type': 'executable', diff --git a/lang/node/patches/999-v8_zlib_support.patch b/lang/node/patches/991-v8_zlib_support.patch similarity index 84% rename from lang/node/patches/999-v8_zlib_support.patch rename to lang/node/patches/991-v8_zlib_support.patch index 8bcd674cd0..d8c478b8f7 100644 --- a/lang/node/patches/999-v8_zlib_support.patch +++ b/lang/node/patches/991-v8_zlib_support.patch @@ -1,18 +1,13 @@ --- a/deps/zlib/zlib.gyp +++ b/deps/zlib/zlib.gyp -@@ -43,10 +43,12 @@ - 'zutil.c', - 'zutil.h', - ], -+ 'include_dirs!': [ '