summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmeta-oe/recipes-devtools/nodejs/nodejs-oe-cache-22.13/oe-npm-cache (renamed from meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-22.12/oe-npm-cache)0
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_22.13.bb (renamed from meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_22.12.bb)0
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/0001-Do-not-use-glob-in-deps.patch22
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/0001-deps-disable-io_uring-support-in-libuv.patch106
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs_22.13.1.bb (renamed from meta-oe/recipes-devtools/nodejs/nodejs_22.12.0.bb)3
5 files changed, 81 insertions, 50 deletions
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-22.12/oe-npm-cache b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-22.13/oe-npm-cache
index eb0f143eae..eb0f143eae 100755
--- a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-22.12/oe-npm-cache
+++ b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-22.13/oe-npm-cache
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_22.12.bb b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_22.13.bb
index d4b818f967..d4b818f967 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_22.12.bb
+++ b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_22.13.bb
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-Do-not-use-glob-in-deps.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-Do-not-use-glob-in-deps.patch
new file mode 100644
index 0000000000..551869523e
--- /dev/null
+++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-Do-not-use-glob-in-deps.patch
@@ -0,0 +1,22 @@
1// Revert the patch found here https://github.com/nodejs/node/commit/fe1dd26398e1887b96b2dc51ab59371ad4d6bc20?diff=unified&w=0
2// so that the dependencies are still explicitly enumerated. That way we
3// can pick and choose which pieces to build and which to use existing system
4// packages for.
5
6Upstream-Status: Inappropriate [embedded specific]
7
8
9--- a/Makefile 2025-01-11 14:37:29.059536707 -0500
10+++ b/Makefile 2025-01-11 14:39:52.419867046 -0500
11@@ -171,7 +171,8 @@
12 $(warning '$@' target is a noop)
13
14 out/Makefile: config.gypi common.gypi common_node.gypi node.gyp \
15- deps/*/*.gyp \
16+ deps/uv/uv.gyp deps/llhttp/llhttp.gyp deps/zlib/zlib.gyp \
17+ deps/simdutf/simdutf.gyp deps/ada/ada.gyp deps/nbytes/nbytes.gyp \
18 tools/v8_gypfiles/toolchain.gypi \
19 tools/v8_gypfiles/features.gypi \
20 tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp
21
22
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-deps-disable-io_uring-support-in-libuv.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-deps-disable-io_uring-support-in-libuv.patch
index 04398ac687..01ae50cdc4 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs/0001-deps-disable-io_uring-support-in-libuv.patch
+++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-deps-disable-io_uring-support-in-libuv.patch
@@ -1,52 +1,60 @@
1From 2bb296f169f86dbb04ee47e9a0dc1e3ee13d4f73 Mon Sep 17 00:00:00 2001 1From 79af9bd6ac1040f1fe3c6cab26b2d040ad907870 Mon Sep 17 00:00:00 2001
2From: Jason Schonberg <schonm@gmail.com> 2From: Changqing Li <changqing.li@windriver.com>
3Date: Thu, 7 Mar 2024 12:55:56 -0500 3Date: Fri, 1 Mar 2024 15:46:11 +0800
4Subject: [PATCH] Update to nodejs 20.11.1 4Subject: [PATCH] deps: disable io_uring support in libuv
5 5
6Upstream-Status: Inappropriate [embedded specific] 6Refer [1], Pseudo fails to intercept some of the syscalls when io_uring
7enabled. Refer [2], always disable io_uring support in libuv to fix
8issue in [1].
9
10[1] https://git.openembedded.org/meta-openembedded/commit/?id=d08453978c31ee41d28206c6ff198d7d9d701d88
11[2] https://github.com/nodejs/node/commit/686da19abb
12
13Upstream-Status: Inappropriate [oe specific]
14
15Signed-off-by: Changqing Li <changqing.li@windriver.com>
16Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
7--- 17---
8 ...ps-disable-io_uring-support-in-libuv.patch | 35 +++++++++++++++++++ 18 deps/uv/src/unix/linux.c | 29 +----------------------------
9 1 file changed, 35 insertions(+) 19 1 file changed, 1 insertion(+), 28 deletions(-)
10 create mode 100644 meta-oe/recipes-devtools/nodejs/nodejs/0001-deps-disable-io_uring-support-in-libuv.patch
11 20
12diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-deps-disable-io_uring-support-in-libuv.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-deps-disable-io_uring-support-in-libuv.patch 21diff --git a/deps/uv/src/unix/linux.c b/deps/uv/src/unix/linux.c
13new file mode 100644 22index 803a9a9d3f0..a4735f56cf0 100644
14index 00000000..5ac711fb 23--- a/deps/uv/src/unix/linux.c
15--- /dev/null 24+++ b/deps/uv/src/unix/linux.c
16+++ b/meta-oe/recipes-devtools/nodejs/nodejs/0001-deps-disable-io_uring-support-in-libuv.patch 25@@ -465,34 +465,7 @@ static int uv__use_io_uring(void) {
17@@ -0,0 +1,35 @@ 26 /* See https://github.com/libuv/libuv/issues/4283. */
18+From 9838be9c710ab4249df86726fa390232a3b6a6e7 Mon Sep 17 00:00:00 2001 27 return 0; /* Random SIGSEGV in signal handler. */
19+From: Changqing Li <changqing.li@windriver.com> 28 #else
20+Date: Fri, 1 Mar 2024 15:46:11 +0800 29- /* Ternary: unknown=0, yes=1, no=-1 */
21+Subject: [PATCH] deps: disable io_uring support in libuv 30- static _Atomic int use_io_uring;
22+ 31- char* val;
23+Refer [1], Pseudo fails to intercept some of the syscalls when io_uring 32- int use;
24+enabled. Refer [2], always disable io_uring support in libuv to fix 33-
25+issue in [1]. 34- use = atomic_load_explicit(&use_io_uring, memory_order_relaxed);
26+ 35-
27+[1] https://git.openembedded.org/meta-openembedded/commit/?id=d08453978c31ee41d28206c6ff198d7d9d701d88 36- if (use == 0) {
28+[2] https://github.com/nodejs/node/commit/686da19abb 37- use = uv__kernel_version() >=
29+ 38-#if defined(__hppa__)
30+Upstream-Status: Inappropriate [oe-specific] 39- /* io_uring first supported on parisc in 6.1, functional in .51 */
31+ 40- /* https://lore.kernel.org/all/cb912694-b1fe-dbb0-4d8c-d608f3526905@gmx.de/ */
32+Signed-off-by: Changqing Li <changqing.li@windriver.com> 41- /* 6.1.51 */ 0x060133
33+--- 42-#else
34+ deps/uv/src/unix/linux.c | 2 +- 43- /* Older kernels have a bug where the sqpoll thread uses 100% CPU. */
35+ 1 file changed, 1 insertion(+), 1 deletion(-) 44- /* 5.10.186 */ 0x050ABA
36+ 45-#endif
37+diff --git a/deps/uv/src/unix/linux.c b/deps/uv/src/unix/linux.c 46- ? 1 : -1;
38+index 0c997185..7508409d 100644 47-
39+--- a/deps/uv/src/unix/linux.c 48- /* But users can still enable it if they so desire. */
40++++ b/deps/uv/src/unix/linux.c 49- val = getenv("UV_USE_IO_URING");
41+@@ -433,7 +433,7 @@ static int uv__use_io_uring(void) { 50- if (val != NULL)
42+ if (use == 0) { 51- use = atoi(val) ? 1 : -1;
43+ /* Disable io_uring by default due to CVE-2024-22017. */ 52-
44+ val = getenv("UV_USE_IO_URING"); 53- atomic_store_explicit(&use_io_uring, use, memory_order_relaxed);
45+- use = val != NULL && atoi(val) ? 1 : -1; 54- }
46++ use = 0; 55-
47+ atomic_store_explicit(&use_io_uring, use, memory_order_relaxed); 56- return use > 0;
48+ } 57+ return 0; /* pseudo doesn't support io_uring https://bugzilla.yoctoproject.org/show_bug.cgi?id=15244 */
49+ 58 #endif
50+-- 59 }
51+2.25.1 60
52+
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_22.12.0.bb b/meta-oe/recipes-devtools/nodejs/nodejs_22.13.1.bb
index 194df4c336..9c145695f7 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs_22.12.0.bb
+++ b/meta-oe/recipes-devtools/nodejs/nodejs_22.13.1.bb
@@ -20,6 +20,7 @@ COMPATIBLE_HOST:riscv32 = "null"
20COMPATIBLE_HOST:powerpc = "null" 20COMPATIBLE_HOST:powerpc = "null"
21 21
22SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \ 22SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
23 file://0001-Do-not-use-glob-in-deps.patch \
23 file://0001-Disable-running-gyp-files-for-bundled-deps.patch \ 24 file://0001-Disable-running-gyp-files-for-bundled-deps.patch \
24 file://0004-v8-don-t-override-ARM-CFLAGS.patch \ 25 file://0004-v8-don-t-override-ARM-CFLAGS.patch \
25 file://system-c-ares.patch \ 26 file://system-c-ares.patch \
@@ -36,7 +37,7 @@ SRC_URI:append:class-target = " \
36SRC_URI:append:toolchain-clang:powerpc64le = " \ 37SRC_URI:append:toolchain-clang:powerpc64le = " \
37 file://0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch \ 38 file://0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch \
38 " 39 "
39SRC_URI[sha256sum] = "fe1bc4be004dc12721ea2cb671b08a21de01c6976960ef8a1248798589679e16" 40SRC_URI[sha256sum] = "cfce282119390f7e0c2220410924428e90dadcb2df1744c0c4a0e7baae387cc2"
40 41
41S = "${WORKDIR}/node-v${PV}" 42S = "${WORKDIR}/node-v${PV}"
42 43