Skip to content

Commit c3e3210

Browse files
authored
layers/meta-opentrons: nodejs 18.18.2 (#128)
Backport nodejs 18.18.2 from mickledore and prefer it in the distro
1 parent d3b8da0 commit c3e3210

15 files changed

+759
-0
lines changed

layers/meta-opentrons/conf/distro/opentrons.conf

+1
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ PREFERRED_VERSION_libical = "3.0.10"
1515
PREFERRED_VERSION_python3-pyjwt = "2.6.0"
1616
PREFERRED_VERSION_python3-setuptools = "62.3.1"
1717
PREFERRED_VERSION_python3-jupyter-packaging = "0.12.0"
18+
PREFERRED_VERSION_nodejs = "18.18.2"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
#!/usr/bin/env node
2+
3+
/// Usage: oe-npm-cache <cache-dir> <type> <key> <file-name>
4+
/// <type> ... meta - metainformation about package
5+
/// tgz - tarball
6+
7+
const process = require("node:process");
8+
9+
module.paths.unshift("@@libdir@@/node_modules/npm/node_modules");
10+
11+
const cacache = require('cacache')
12+
const fs = require('fs')
13+
14+
// argv[0] is 'node', argv[1] is this script
15+
const cache_dir = process.argv[2]
16+
const type = process.argv[3]
17+
const key = process.argv[4]
18+
const file = process.argv[5]
19+
20+
const data = fs.readFileSync(file)
21+
22+
// metadata content is highly nodejs dependent; when cache entries are not
23+
// found, place debug statements in 'make-fetch-happen/lib/cache/policy.js'
24+
// (CachePolicy::satisfies())
25+
const xlate = {
26+
'meta': {
27+
'key_prefix': 'make-fetch-happen:request-cache:',
28+
'metadata': function() {
29+
return {
30+
time: Date.now(),
31+
url: key,
32+
reqHeaders: {
33+
'accept': 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*',
34+
},
35+
resHeaders: {
36+
"content-type": "application/json",
37+
"status": 200,
38+
},
39+
options: {
40+
compress: true,
41+
}
42+
};
43+
},
44+
},
45+
46+
'tgz': {
47+
'key_prefix': 'make-fetch-happen:request-cache:',
48+
'metadata': function() {
49+
return {
50+
time: Date.now(),
51+
url: key,
52+
reqHeaders: {
53+
'accept': '*/*',
54+
},
55+
resHeaders: {
56+
"content-type": "application/octet-stream",
57+
"status": 200,
58+
},
59+
options: {
60+
compress: true,
61+
},
62+
};
63+
},
64+
},
65+
};
66+
67+
const info = xlate[type];
68+
let opts = {}
69+
70+
if (info.metadata) {
71+
opts['metadata'] = info.metadata();
72+
}
73+
74+
cacache.put(cache_dir, info.key_prefix + key, data, opts)
75+
.then(integrity => {
76+
console.log(`Saved content of ${key} (${file}).`);
77+
})
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
DESCRIPTION = "OE helper for manipulating npm cache"
2+
LICENSE = "Apache-2.0"
3+
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
4+
5+
SRC_URI = "\
6+
file://oe-npm-cache \
7+
"
8+
9+
inherit native
10+
11+
B = "${WORKDIR}/build"
12+
13+
do_configure() {
14+
sed -e 's!@@libdir@@!${libdir}!g' < '${WORKDIR}/oe-npm-cache' > '${B}/oe-npm-cache'
15+
}
16+
17+
do_install() {
18+
install -D -p -m 0755 ${B}/oe-npm-cache ${D}${bindir}/oe-npm-cache
19+
}
20+
21+
RDEPENDS:${PN} = "nodejs-native"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
From 7d94bfe53beeb2d25eb5f2ff6b1d509df7e6ab80 Mon Sep 17 00:00:00 2001
2+
From: Zuzana Svetlikova <[email protected]>
3+
Date: Thu, 27 Apr 2017 14:25:42 +0200
4+
Subject: [PATCH] Disable running gyp on shared deps
5+
6+
Upstream-Status: Inappropriate [embedded specific]
7+
8+
Probably imported from:
9+
https://src.fedoraproject.org/rpms/nodejs/c/41af04f2a3c050fb44628e91ac65fd225b927acb?branch=22609d8c1bfeaa21fe0057645af20b3a2ccc7f53
10+
which is probably based on dont-run-gyp-files-for-bundled-deps.patch added in:
11+
https://github.com/alpinelinux/aports/commit/6662eb3199902e8451fb20dce82554ad96f796bb
12+
13+
We also explicitly prune some dependencies from source in the bitbake recipe:
14+
15+
python prune_sources() {
16+
import shutil
17+
18+
shutil.rmtree(d.getVar('S') + '/deps/openssl')
19+
if 'ares' in d.getVar('PACKAGECONFIG'):
20+
shutil.rmtree(d.getVar('S') + '/deps/cares')
21+
if 'brotli' in d.getVar('PACKAGECONFIG'):
22+
shutil.rmtree(d.getVar('S') + '/deps/brotli')
23+
if 'libuv' in d.getVar('PACKAGECONFIG'):
24+
shutil.rmtree(d.getVar('S') + '/deps/uv')
25+
if 'nghttp2' in d.getVar('PACKAGECONFIG'):
26+
shutil.rmtree(d.getVar('S') + '/deps/nghttp2')
27+
if 'zlib' in d.getVar('PACKAGECONFIG'):
28+
shutil.rmtree(d.getVar('S') + '/deps/zlib')
29+
}
30+
do_unpack[postfuncs] += "prune_sources"
31+
32+
Signed-off-by: Archana Polampalli <[email protected]>
33+
---
34+
Makefile | 2 +-
35+
1 file changed, 1 insertion(+), 1 deletion(-)
36+
37+
diff --git a/Makefile b/Makefile
38+
index 0be0659d..3c442014 100644
39+
--- a/Makefile
40+
+++ b/Makefile
41+
@@ -169,7 +169,7 @@ with-code-cache test-code-cache:
42+
$(warning '$@' target is a noop)
43+
44+
out/Makefile: config.gypi common.gypi node.gyp \
45+
- deps/uv/uv.gyp deps/llhttp/llhttp.gyp deps/zlib/zlib.gyp \
46+
+ deps/llhttp/llhttp.gyp \
47+
deps/simdutf/simdutf.gyp deps/ada/ada.gyp \
48+
tools/v8_gypfiles/toolchain.gypi tools/v8_gypfiles/features.gypi \
49+
tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp
50+
--
51+
2.40.0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
From 6c3ac20477a4bac643088f24df3c042e627fafa9 Mon Sep 17 00:00:00 2001
2+
From: Guillaume Burel <[email protected]>
3+
Date: Fri, 3 Jan 2020 11:25:54 +0100
4+
Subject: [PATCH] Using native binaries
5+
6+
Upstream-Status: Inappropriate [embedded specific]
7+
8+
Originally added in:
9+
https://git.openembedded.org/meta-openembedded/commit/?id=1c8e4a679ae382f953b2e5c7a4966a4646314f3e
10+
later extended and renamed in:
11+
https://git.openembedded.org/meta-openembedded/commit/?id=feeb172d1a8bf010490d22b8df9448b20d9d2aed
12+
13+
Signed-off-by: Archana Polampalli <[email protected]>
14+
---
15+
node.gyp | 1 +
16+
tools/v8_gypfiles/v8.gyp | 5 +++++
17+
2 files changed, 6 insertions(+)
18+
19+
diff --git a/node.gyp b/node.gyp
20+
index e8e1d9f9..e60ccc10 100644
21+
--- a/node.gyp
22+
+++ b/node.gyp
23+
@@ -320,6 +320,7 @@
24+
'action_name': 'node_mksnapshot',
25+
'process_outputs_as_sources': 1,
26+
'inputs': [
27+
+ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh',
28+
'<(node_mksnapshot_exec)',
29+
'<(node_snapshot_main)',
30+
],
31+
diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp
32+
index 42e26cd9..bc721991 100644
33+
--- a/tools/v8_gypfiles/v8.gyp
34+
+++ b/tools/v8_gypfiles/v8.gyp
35+
@@ -68,6 +68,7 @@
36+
{
37+
'action_name': 'run_torque_action',
38+
'inputs': [ # Order matters.
39+
+ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh',
40+
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)torque<(EXECUTABLE_SUFFIX)',
41+
'<@(torque_files)',
42+
],
43+
@@ -99,6 +100,7 @@
44+
'<@(torque_outputs_inc)',
45+
],
46+
'action': [
47+
+ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh',
48+
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)torque<(EXECUTABLE_SUFFIX)',
49+
'-o', '<(SHARED_INTERMEDIATE_DIR)/torque-generated',
50+
'-v8-root', '<(V8_ROOT)',
51+
@@ -211,6 +213,7 @@
52+
{
53+
'action_name': 'generate_bytecode_builtins_list_action',
54+
'inputs': [
55+
+ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh',
56+
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)bytecode_builtins_list_generator<(EXECUTABLE_SUFFIX)',
57+
],
58+
'outputs': [
59+
@@ -400,6 +403,7 @@
60+
],
61+
},
62+
'inputs': [
63+
+ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh',
64+
'<(mksnapshot_exec)',
65+
],
66+
'outputs': [
67+
@@ -1539,6 +1543,7 @@
68+
{
69+
'action_name': 'run_gen-regexp-special-case_action',
70+
'inputs': [
71+
+ '<(PRODUCT_DIR)/v8-qemu-wrapper.sh',
72+
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)gen-regexp-special-case<(EXECUTABLE_SUFFIX)',
73+
],
74+
'outputs': [
75+
--
76+
2.34.1
77+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
From dc3652c0abcdf8573fd044907b19d8eda7ca1124 Mon Sep 17 00:00:00 2001
2+
From: Khem Raj <[email protected]>
3+
Date: Wed, 20 Oct 2021 12:49:58 -0700
4+
Subject: [PATCH] [liftoff] Correct function signatures
5+
6+
Fixes builds on mips where clang reports an error
7+
../deps/v8/src/wasm/baseline/mips/liftoff-assembler-mips.h:661:5: error: no matching member function for call to 'Move'
8+
Move(tmp, src, type.value_type());
9+
^~~~
10+
11+
Upstream-Status: Submitted [https://chromium-review.googlesource.com/c/v8/v8/+/3235674]
12+
13+
Signed-off-by: Archana Polampalli <[email protected]>
14+
---
15+
deps/v8/src/wasm/baseline/liftoff-assembler.h | 6 +++---
16+
deps/v8/src/wasm/baseline/mips/liftoff-assembler-mips.h | 2 +-
17+
deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h | 2 +-
18+
.../src/wasm/baseline/riscv64/liftoff-assembler-riscv64.h | 2 +-
19+
4 files changed, 6 insertions(+), 6 deletions(-)
20+
21+
diff --git a/deps/v8/src/wasm/baseline/liftoff-assembler.h b/deps/v8/src/wasm/baseline/liftoff-assembler.h
22+
index 22c7f73a..db4cb168 100644
23+
--- a/deps/v8/src/wasm/baseline/liftoff-assembler.h
24+
+++ b/deps/v8/src/wasm/baseline/liftoff-assembler.h
25+
@@ -646,7 +646,7 @@ class LiftoffAssembler : public TurboAssembler {
26+
void FinishCall(const ValueKindSig*, compiler::CallDescriptor*);
27+
28+
// Move {src} into {dst}. {src} and {dst} must be different.
29+
- void Move(LiftoffRegister dst, LiftoffRegister src, ValueKind);
30+
+ void Move(LiftoffRegister dst, LiftoffRegister src, ValueKind kind);
31+
32+
// Parallel register move: For a list of tuples <dst, src, kind>, move the
33+
// {src} register of kind {kind} into {dst}. If {src} equals {dst}, ignore
34+
@@ -795,8 +795,8 @@ class LiftoffAssembler : public TurboAssembler {
35+
inline void MoveStackValue(uint32_t dst_offset, uint32_t src_offset,
36+
ValueKind);
37+
38+
- inline void Move(Register dst, Register src, ValueKind);
39+
- inline void Move(DoubleRegister dst, DoubleRegister src, ValueKind);
40+
+ inline void Move(Register dst, Register src, ValueKind kind);
41+
+ inline void Move(DoubleRegister dst, DoubleRegister src, ValueKind kind);
42+
43+
inline void Spill(int offset, LiftoffRegister, ValueKind);
44+
inline void Spill(int offset, WasmValue);
45+
diff --git a/deps/v8/src/wasm/baseline/mips/liftoff-assembler-mips.h b/deps/v8/src/wasm/baseline/mips/liftoff-assembler-mips.h
46+
index c76fd2f4..0fffe231 100644
47+
--- a/deps/v8/src/wasm/baseline/mips/liftoff-assembler-mips.h
48+
+++ b/deps/v8/src/wasm/baseline/mips/liftoff-assembler-mips.h
49+
@@ -661,7 +661,7 @@ void LiftoffAssembler::Store(Register dst_addr, Register offset_reg,
50+
pinned = pinned | LiftoffRegList{dst_op.rm(), src};
51+
LiftoffRegister tmp = GetUnusedRegister(src.reg_class(), pinned);
52+
// Save original value.
53+
- Move(tmp, src, type.value_type());
54+
+ Move(tmp, src, type.value_type().kind());
55+
56+
src = tmp;
57+
pinned.set(tmp);
58+
diff --git a/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h b/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h
59+
index 36413545..48207337 100644
60+
--- a/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h
61+
+++ b/deps/v8/src/wasm/baseline/mips64/liftoff-assembler-mips64.h
62+
@@ -593,7 +593,7 @@ void LiftoffAssembler::Store(Register dst_addr, Register offset_reg,
63+
pinned.set(dst_op.rm());
64+
LiftoffRegister tmp = GetUnusedRegister(src.reg_class(), pinned);
65+
// Save original value.
66+
- Move(tmp, src, type.value_type());
67+
+ Move(tmp, src, type.value_type().kind());
68+
69+
src = tmp;
70+
pinned.set(tmp);
71+
diff --git a/deps/v8/src/wasm/baseline/riscv64/liftoff-assembler-riscv64.h b/deps/v8/src/wasm/baseline/riscv64/liftoff-assembler-riscv64.h
72+
index 642a7d2a..56ffcc2a 100644
73+
--- a/deps/v8/src/wasm/baseline/riscv64/liftoff-assembler-riscv64.h
74+
+++ b/deps/v8/src/wasm/baseline/riscv64/liftoff-assembler-riscv64.h
75+
@@ -589,7 +589,7 @@ void LiftoffAssembler::Store(Register dst_addr, Register offset_reg,
76+
pinned.set(dst_op.rm());
77+
LiftoffRegister tmp = GetUnusedRegister(src.reg_class(), pinned);
78+
// Save original value.
79+
- Move(tmp, src, type.value_type());
80+
+ Move(tmp, src, type.value_type().kind());
81+
82+
src = tmp;
83+
pinned.set(tmp);
84+
--
85+
2.34.1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
From e65dde8db17da5acddeef7eb9316199c4e5e0811 Mon Sep 17 00:00:00 2001
2+
From: Khem Raj <[email protected]>
3+
Date: Tue, 19 Apr 2022 12:40:25 -0700
4+
Subject: [PATCH] mips: Use 32bit cast for operand on mips32
5+
6+
Fixes
7+
deps/v8/src/compiler/backend/mips/code-generator-mips.cc: In member function 'void v8::internal::compiler::CodeGenerator::AssembleReturn(v8::internal::compiler::InstructionOperand*)':
8+
../deps/v8/src/compiler/backend/mips/code-generator-mips.cc:4233:48: error: call of overloaded 'Operand(int64_t)' is ambiguous
9+
4233 | Operand(static_cast<int64_t>(0)));
10+
| ^
11+
12+
Upstream-Status: Pending
13+
14+
Signed-off-by: Khem Raj <[email protected]>
15+
---
16+
deps/v8/src/compiler/backend/mips/code-generator-mips.cc | 2 +-
17+
1 file changed, 1 insertion(+), 1 deletion(-)
18+
19+
diff --git a/deps/v8/src/compiler/backend/mips/code-generator-mips.cc b/deps/v8/src/compiler/backend/mips/code-generator-mips.cc
20+
index 2b8197e..b226140 100644
21+
--- a/deps/v8/src/compiler/backend/mips/code-generator-mips.cc
22+
+++ b/deps/v8/src/compiler/backend/mips/code-generator-mips.cc
23+
@@ -4230,7 +4230,7 @@ void CodeGenerator::AssembleReturn(InstructionOperand* additional_pop_count) {
24+
} else if (FLAG_debug_code) {
25+
__ Assert(eq, AbortReason::kUnexpectedAdditionalPopValue,
26+
g.ToRegister(additional_pop_count),
27+
- Operand(static_cast<int64_t>(0)));
28+
+ Operand(static_cast<int32_t>(0)));
29+
}
30+
}
31+
// Functions with JS linkage have at least one parameter (the receiver).
32+
--
33+
2.36.0
34+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
From 0976af0f3b328436ea44a74a406f311adb2ab211 Mon Sep 17 00:00:00 2001
2+
From: Khem Raj <[email protected]>
3+
Date: Tue, 15 Jun 2021 19:01:31 -0700
4+
Subject: [PATCH] ppc64: Do not use -mminimal-toc with clang
5+
6+
clang does not support this option
7+
8+
Signed-off-by: Khem Raj <[email protected]>
9+
---
10+
common.gypi | 2 +-
11+
1 file changed, 1 insertion(+), 1 deletion(-)
12+
13+
--- a/common.gypi
14+
+++ b/common.gypi
15+
@@ -417,7 +417,7 @@
16+
'ldflags': [ '-m32' ],
17+
}],
18+
[ 'target_arch=="ppc64" and OS!="aix"', {
19+
- 'cflags': [ '-m64', '-mminimal-toc' ],
20+
+ 'cflags': [ '-m64' ],
21+
'ldflags': [ '-m64' ],
22+
}],
23+
[ 'target_arch=="s390x"', {

0 commit comments

Comments
 (0)