NodeJS has announced that security patch releases are scheduled for all
currently
supported versions of NodeJS on January 21st:
https://nodejs.org/en/blog/vulnerability/january-2025-security-releases
In preparation for that, I tried to update our -stable version to the
latest available v20.x release. The diff is reasonably simple, and it works
fine here, so I expect no issues when the security release is out.
Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/node/Makefile,v
diff -u -p -r1.139 Makefile
--- Makefile 28 Aug 2024 17:44:40 -0000 1.139
+++ Makefile 18 Jan 2025 18:59:31 -0000
@@ -5,7 +5,7 @@ USE_WXNEEDED = Yes
COMMENT = JavaScript runtime built on Chrome's V8 JavaScript engine
-NODE_VERSION = v20.17.0
+NODE_VERSION = v20.18.1
PLEDGE_VER = 1.1.3
DISTFILES = ${DISTNAME}-headers.tar.gz \
${DISTNAME}.tar.xz
Index: distinfo
===================================================================
RCS file: /cvs/ports/lang/node/distinfo,v
diff -u -p -r1.80 distinfo
--- distinfo 28 Aug 2024 17:44:40 -0000 1.80
+++ distinfo 18 Jan 2025 18:59:31 -0000
@@ -1,6 +1,6 @@
SHA256 (node-pledge-1.1.3.tar.gz) =
fEaXvLg6hYEJ69K+mgQFizf8DiJY2/DtyFJB/pEanVU=
-SHA256 (node-v20.17.0-headers.tar.gz) =
zNgJhC5QysYMM8Qpbwq4M1GQ4mVkSWEiipgsk5Qgve0=
-SHA256 (node-v20.17.0.tar.xz) = mr8DrCM2LGA4frtjOlFjA2NxRcs8F3vjNIsWiA/Ysow=
+SHA256 (node-v20.18.1-headers.tar.gz) =
SiKMmf88HqnAUjNvM1O/FX978KM52prKu6jsTsco2HE=
+SHA256 (node-v20.18.1.tar.xz) = kd9D+KtsP3voFSLXMxPb3VY0u8oijvDm2Taf4KuMzNA=
SIZE (node-pledge-1.1.3.tar.gz) = 3167
-SIZE (node-v20.17.0-headers.tar.gz) = 8761389
-SIZE (node-v20.17.0.tar.xz) = 41751520
+SIZE (node-v20.18.1-headers.tar.gz) = 8752364
+SIZE (node-v20.18.1.tar.xz) = 41962272
Index: patches/patch-Makefile
===================================================================
RCS file: /cvs/ports/lang/node/patches/patch-Makefile,v
diff -u -p -r1.23 patch-Makefile
--- patches/patch-Makefile 28 Aug 2024 17:44:42 -0000 1.23
+++ patches/patch-Makefile 18 Jan 2025 18:59:31 -0000
@@ -1,7 +1,7 @@
Index: Makefile
--- Makefile.orig
+++ Makefile
-@@ -190,7 +190,7 @@ config.gypi: configure configure.py src/node_version.h
+@@ -188,7 +188,7 @@ config.gypi: configure configure.py src/node_version.h
fi
.PHONY: install
@@ -10,7 +10,7 @@ Index: Makefile
$(PYTHON) tools/install.py $@ --dest-dir '$(DESTDIR)' --prefix
'$(PREFIX)'
.PHONY: uninstall
-@@ -438,6 +438,12 @@ test/addons/.buildstamp: $(ADDONS_PREREQS) \
+@@ -440,6 +440,12 @@ test/addons/.buildstamp: $(ADDONS_PREREQS) \
# Just goes to show that recursive make really is harmful...
# TODO(bnoordhuis) Force rebuild after gyp update.
build-addons: | $(NODE_EXE) test/addons/.buildstamp
Index: patches/patch-common_gypi
===================================================================
RCS file: /cvs/ports/lang/node/patches/patch-common_gypi,v
diff -u -p -r1.32 patch-common_gypi
--- patches/patch-common_gypi 28 Aug 2024 17:44:42 -0000 1.32
+++ patches/patch-common_gypi 18 Jan 2025 18:59:31 -0000
@@ -1,7 +1,7 @@
Index: common.gypi
--- common.gypi.orig
+++ common.gypi
-@@ -190,7 +190,6 @@
+@@ -188,7 +188,6 @@
}],
],
},
@@ -9,7 +9,7 @@ Index: common.gypi
'conditions': [
['enable_lto=="true"', {
'cflags': ['<(lto)'],
-@@ -474,7 +473,9 @@
+@@ -472,7 +471,9 @@
}],
['OS=="openbsd"', {
'cflags': [ '-I/usr/local/include' ],
@@ -20,7 +20,7 @@ Index: common.gypi
}],
['_toolset=="host"', {
'conditions': [
-@@ -491,7 +492,7 @@
+@@ -489,7 +490,7 @@
'ldflags': [ '-m32' ],
}],
[ 'host_arch=="ppc64" and OS not in "aix os400"', {
@@ -29,7 +29,7 @@ Index: common.gypi
'ldflags': [ '-m64' ],
}],
[ 'host_arch=="s390x" and OS=="linux"', {
-@@ -515,7 +516,7 @@
+@@ -513,7 +514,7 @@
'ldflags': [ '-m32' ],
}],
[ 'target_arch=="ppc64" and OS not in "aix os400"', {
Index: patches/patch-configure_py
===================================================================
RCS file: /cvs/ports/lang/node/patches/patch-configure_py,v
diff -u -p -r1.7 patch-configure_py
--- patches/patch-configure_py 28 Aug 2024 17:44:42 -0000 1.7
+++ patches/patch-configure_py 18 Jan 2025 18:59:31 -0000
@@ -1,7 +1,7 @@
Index: configure.py
--- configure.py.orig
+++ configure.py
-@@ -1599,6 +1599,10 @@ def configure_v8(o):
+@@ -1625,6 +1625,10 @@ def configure_v8(o):
raise Exception(
'Only one of the --v8-enable-object-print or
--v8-disable-object-print options '
'can be specified at a time.')
Index: patches/patch-include_node_common_gypi
===================================================================
RCS file: /cvs/ports/lang/node/patches/patch-include_node_common_gypi,v
diff -u -p -r1.6 patch-include_node_common_gypi
--- patches/patch-include_node_common_gypi 28 Aug 2024 17:44:42 -0000
1.6
+++ patches/patch-include_node_common_gypi 18 Jan 2025 18:59:31 -0000
@@ -1,7 +1,7 @@
Index: include/node/common.gypi
--- include/node/common.gypi.orig
+++ include/node/common.gypi
-@@ -190,7 +190,6 @@
+@@ -188,7 +188,6 @@
}],
],
},
@@ -9,7 +9,7 @@ Index: include/node/common.gypi
'conditions': [
['enable_lto=="true"', {
'cflags': ['<(lto)'],
-@@ -491,7 +490,7 @@
+@@ -489,7 +488,7 @@
'ldflags': [ '-m32' ],
}],
[ 'host_arch=="ppc64" and OS not in "aix os400"', {
@@ -18,7 +18,7 @@ Index: include/node/common.gypi
'ldflags': [ '-m64' ],
}],
[ 'host_arch=="s390x" and OS=="linux"', {
-@@ -515,7 +514,7 @@
+@@ -513,7 +512,7 @@
'ldflags': [ '-m32' ],
}],
[ 'target_arch=="ppc64" and OS not in "aix os400"', {
Index: patches/patch-lib_net_js
===================================================================
RCS file: /cvs/ports/lang/node/patches/patch-lib_net_js,v
diff -u -p -r1.11 patch-lib_net_js
--- patches/patch-lib_net_js 27 Jul 2024 15:17:56 -0000 1.11
+++ patches/patch-lib_net_js 18 Jan 2025 18:59:31 -0000
@@ -13,7 +13,7 @@ for "any address" but that's not really
Index: lib/net.js
--- lib/net.js.orig
+++ lib/net.js
-@@ -1861,22 +1861,12 @@ function setupListenHandle(address, port, addressType,
+@@ -1865,22 +1865,12 @@ function setupListenHandle(address, port, addressType,
let rval = null;
Index: patches/patch-node_gyp
===================================================================
RCS file: /cvs/ports/lang/node/patches/Attic/patch-node_gyp,v
diff -u -p -r1.24 patch-node_gyp
--- patches/patch-node_gyp 27 Jul 2024 15:17:56 -0000 1.24
+++ patches/patch-node_gyp 18 Jan 2025 18:59:31 -0000
@@ -4,7 +4,7 @@ devel/gtest if installed.
Index: node.gyp
--- node.gyp.orig
+++ node.gyp
-@@ -828,7 +828,7 @@
+@@ -831,7 +831,7 @@
],
'dependencies': [
'deps/base64/base64.gyp:base64',
@@ -13,7 +13,7 @@ Index: node.gyp
'deps/histogram/histogram.gyp:histogram',
'deps/uvwasi/uvwasi.gyp:uvwasi',
'deps/simdutf/simdutf.gyp:simdutf',
-@@ -1146,8 +1146,8 @@
+@@ -1149,8 +1149,8 @@
'dependencies': [
'<(node_lib_target_name)',
'deps/base64/base64.gyp:base64',
@@ -24,7 +24,7 @@ Index: node.gyp
'deps/histogram/histogram.gyp:histogram',
'deps/uvwasi/uvwasi.gyp:uvwasi',
'deps/simdutf/simdutf.gyp:simdutf',
-@@ -1195,6 +1195,10 @@
+@@ -1197,6 +1197,10 @@
}],
['OS=="solaris"', {
'ldflags': [ '-I<(SHARED_INTERMEDIATE_DIR)' ]
Index: patches/patch-src_env_cc
===================================================================
RCS file: /cvs/ports/lang/node/patches/patch-src_env_cc,v
diff -u -p -r1.10 patch-src_env_cc
--- patches/patch-src_env_cc 27 Jul 2024 15:17:56 -0000 1.10
+++ patches/patch-src_env_cc 18 Jan 2025 18:59:31 -0000
@@ -1,7 +1,7 @@
Index: src/env.cc
--- src/env.cc.orig
+++ src/env.cc
-@@ -757,29 +757,7 @@ std::unique_ptr<v8::BackingStore> Environment::release
+@@ -773,29 +773,7 @@ std::unique_ptr<v8::BackingStore> Environment::release
}
std::string Environment::GetExecPath(const std::vector<std::string>& argv) {
Index: patches/patch-tools_v8_gypfiles_toolchain_gypi
===================================================================
RCS file: /cvs/ports/lang/node/patches/patch-tools_v8_gypfiles_toolchain_gypi,v
diff -u -p -r1.2 patch-tools_v8_gypfiles_toolchain_gypi
--- patches/patch-tools_v8_gypfiles_toolchain_gypi 18 May 2024 12:10:22
-0000 1.2
+++ patches/patch-tools_v8_gypfiles_toolchain_gypi 18 Jan 2025 18:59:31
-0000
@@ -1,7 +1,7 @@
Index: tools/v8_gypfiles/toolchain.gypi
--- tools/v8_gypfiles/toolchain.gypi.orig
+++ tools/v8_gypfiles/toolchain.gypi
-@@ -861,11 +861,9 @@
+@@ -865,11 +865,9 @@
# Don't use -O3 with sanitizers.
['asan==0 and msan==0 and lsan==0 \
and tsan==0 and ubsan==0 and ubsan_vptr==0', {