Skip to content

Commit

Permalink
nodejs: refresh patches to apply on 10.15.3 version
Browse files Browse the repository at this point in the history
:Release Notes:
nodejs: remove LGE patches

They need to be reworked a bit to fix:

0004-Fixes-process-pid-getter-to-always-get-actual-pid.patch
    http://caprica.lgsvl.com:8080/Errors/Details/1437531
0009-Provide-option-compile-js-to-node-for-.js-compilatio.patch
    http://caprica.lgsvl.com:8080/Errors/Details/1438067

and there are other runtime issues like segfaults during build:
    http://caprica.lgsvl.com:8080/Errors/Details/1445769
    http://caprica.lgsvl.com:8080/Errors/Details/1445761

:Detailed Notes:

:Testing Performed:
Only build tested.

:QA Notes:
No change to image.

:Issues Addressed:
[PLAT-77937] Create GPVB with Yocto 2.7
[PLAT-115142] CCC: Upgrade to Yocto 2.7 Warrior

Change-Id: If512b4ee0365a2c0210b5460dfae2a1e935ca84f
  • Loading branch information
shr-project authored and Hyunjae Shin committed Sep 26, 2020
1 parent 6683c0d commit 7dc0dca
Show file tree
Hide file tree
Showing 12 changed files with 137 additions and 146 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 11a3e08008899b7fe61c38610416cf52be23948d Mon Sep 17 00:00:00 2001
From fcc7df4a1c862d18f9f4db9f216bec07ae397fe0 Mon Sep 17 00:00:00 2001
From: Oleksandr Ivanov <[email protected]>
Date: Thu, 24 Aug 2017 13:24:35 -0700
Subject: [PATCH] Patch on Flush function for CPU ARM added
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From c9da8f0c0fc91389ff832c54ca8f77296a8468cc Mon Sep 17 00:00:00 2001
From ef1c7df2b181903a9ab70a738567980fe2be21fd Mon Sep 17 00:00:00 2001
From: Lokesh Kumar Goel <[email protected]>
Date: Mon, 28 Aug 2017 14:01:48 -0700
Subject: [PATCH] implement function chroot in process module
Expand Down Expand Up @@ -39,10 +39,10 @@ Reviewed-by: Sergiy Kryvonos <[email protected]>
7 files changed, 51 insertions(+), 1 deletion(-)

diff --git a/deps/uv/include/uv.h b/deps/uv/include/uv.h
index 9794d99..1028363 100644
index 717c2e5..ca138e4 100644
--- a/deps/uv/include/uv.h
+++ b/deps/uv/include/uv.h
@@ -1451,6 +1451,8 @@ UV_EXTERN int uv_cwd(char* buffer, size_t* size);
@@ -1492,6 +1492,8 @@ UV_EXTERN int uv_cwd(char* buffer, size_t* size);

UV_EXTERN int uv_chdir(const char* dir);

Expand All @@ -52,10 +52,10 @@ index 9794d99..1028363 100644
UV_EXTERN uint64_t uv_get_total_memory(void);

diff --git a/deps/uv/src/unix/core.c b/deps/uv/src/unix/core.c
index 3741c1d..96d1937 100644
index f92446f..c5e3399 100644
--- a/deps/uv/src/unix/core.c
+++ b/deps/uv/src/unix/core.c
@@ -717,6 +717,12 @@ int uv_chdir(const char* dir) {
@@ -719,6 +719,12 @@ int uv_chdir(const char* dir) {
return 0;
}

Expand All @@ -69,10 +69,10 @@ index 3741c1d..96d1937 100644
void uv_disable_stdio_inheritance(void) {
int fd;
diff --git a/deps/v8/src/d8-posix.cc b/deps/v8/src/d8-posix.cc
index 18040c8..b6cef96 100644
index 1172bf8..f0c1d86 100644
--- a/deps/v8/src/d8-posix.cc
+++ b/deps/v8/src/d8-posix.cc
@@ -569,6 +569,30 @@ void Shell::ChangeDirectory(const v8::FunctionCallbackInfo<v8::Value>& args) {
@@ -566,6 +566,30 @@ void Shell::ChangeDirectory(const v8::FunctionCallbackInfo<v8::Value>& args) {
}
}

Expand Down Expand Up @@ -103,7 +103,7 @@ index 18040c8..b6cef96 100644

void Shell::SetUMask(const v8::FunctionCallbackInfo<v8::Value>& args) {
if (args.Length() != 1) {
@@ -860,6 +884,9 @@ void Shell::AddOSMethods(Isolate* isolate, Local<ObjectTemplate> os_templ) {
@@ -857,6 +881,9 @@ void Shell::AddOSMethods(Isolate* isolate, Local<ObjectTemplate> os_templ) {
os_templ->Set(String::NewFromUtf8(isolate, "chdir", NewStringType::kNormal)
.ToLocalChecked(),
FunctionTemplate::New(isolate, ChangeDirectory));
Expand All @@ -114,10 +114,10 @@ index 18040c8..b6cef96 100644
.ToLocalChecked(),
FunctionTemplate::New(isolate, SetEnvironment));
diff --git a/deps/v8/src/d8.h b/deps/v8/src/d8.h
index c0922bc..cf5edbf 100644
index e4a5870..bd0e111 100644
--- a/deps/v8/src/d8.h
+++ b/deps/v8/src/d8.h
@@ -441,6 +441,7 @@ class Shell : public i::AllStatic {
@@ -445,6 +445,7 @@ class Shell : public i::AllStatic {
// the "mkdir -p" command.
static void System(const v8::FunctionCallbackInfo<v8::Value>& args);
static void ChangeDirectory(const v8::FunctionCallbackInfo<v8::Value>& args);
Expand All @@ -126,35 +126,35 @@ index c0922bc..cf5edbf 100644
static void UnsetEnvironment(const v8::FunctionCallbackInfo<v8::Value>& args);
static void SetUMask(const v8::FunctionCallbackInfo<v8::Value>& args);
diff --git a/src/node.cc b/src/node.cc
index f4d2709..a6403d5 100644
index 9fb5ab3..9327f5e 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -2967,6 +2967,7 @@ void SetupProcessObject(Environment* env,
@@ -2008,6 +2008,7 @@ void SetupProcessObject(Environment* env,

env->SetMethodNoSideEffect(process, "cwd", Cwd);
env->SetMethod(process, "dlopen", DLOpen);
env->SetMethod(process, "abort", Abort);
env->SetMethod(process, "chdir", Chdir);
+ env->SetMethod(process, "chroot", Chroot);
env->SetMethod(process, "cwd", Cwd);
env->SetMethod(process, "reallyExit", Exit);
env->SetMethod(process, "umask", Umask);
env->SetMethodNoSideEffect(process, "uptime", Uptime);

diff --git a/src/node_internals.h b/src/node_internals.h
index a891b1b..778205e 100644
index 12089bc..4f6ef254 100644
--- a/src/node_internals.h
+++ b/src/node_internals.h
@@ -422,6 +422,7 @@ void PrintErrorString(const char* format, ...);
@@ -883,6 +883,7 @@ void PrintErrorString(const char* format, ...);

void Abort(const v8::FunctionCallbackInfo<v8::Value>& args);
void Chdir(const v8::FunctionCallbackInfo<v8::Value>& args);
+void Chroot(const v8::FunctionCallbackInfo<v8::Value>& args);
void CPUUsage(const v8::FunctionCallbackInfo<v8::Value>& args);
void Cwd(const v8::FunctionCallbackInfo<v8::Value>& args);
void Hrtime(const v8::FunctionCallbackInfo<v8::Value>& args);
void GetActiveHandles(const v8::FunctionCallbackInfo<v8::Value>& args);
diff --git a/src/node_process.cc b/src/node_process.cc
index f953f5f..6355148 100644
index 58f446a..2e973e9 100644
--- a/src/node_process.cc
+++ b/src/node_process.cc
@@ -64,9 +64,21 @@ void Chdir(const FunctionCallbackInfo<Value>& args) {
return env->ThrowUVException(err, "uv_chdir");
@@ -85,6 +85,18 @@ void Chdir(const FunctionCallbackInfo<Value>& args) {
return env->ThrowUVException(err, "chdir", nullptr, *path, nullptr);
}

+void Chroot(const FunctionCallbackInfo<Value>& args) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 98c86af4f282c57b254d956a1b8bcceba25fdf2c Mon Sep 17 00:00:00 2001
From 74c81994b5f895a195c0cae58d70645dfbb9ecdb Mon Sep 17 00:00:00 2001
From: Sergii Nikolaiev <[email protected]>
Date: Thu, 28 May 2015 21:12:34 +0300
Subject: [PATCH] Adds noexec option for fork and spawn APIs of nodejs
Expand Down Expand Up @@ -42,15 +42,15 @@ Reviewed-by: Sergiy Kryvonos <[email protected]>
deps/uv/src/unix/process.c | 47 +++++++++++++++++++++++++++++++++++++------
lib/child_process.js | 3 ++-
lib/internal/child_process.js | 4 ++++
src/env.h | 3 ++-
src/env.h | 1 +
src/process_wrap.cc | 6 ++++++
6 files changed, 61 insertions(+), 9 deletions(-)
6 files changed, 60 insertions(+), 8 deletions(-)

diff --git a/deps/uv/include/uv.h b/deps/uv/include/uv.h
index 1028363..f731acd 100644
index ca138e4..c22ec08 100644
--- a/deps/uv/include/uv.h
+++ b/deps/uv/include/uv.h
@@ -958,7 +958,12 @@ enum uv_process_flags {
@@ -967,7 +967,12 @@ enum uv_process_flags {
* option is only meaningful on Windows systems. On Unix it is silently
* ignored.
*/
Expand All @@ -65,10 +65,10 @@ index 1028363..f731acd 100644

/*
diff --git a/deps/uv/src/unix/process.c b/deps/uv/src/unix/process.c
index 74113e3..1591a75 100644
index 101c9c5..34a01d6 100644
--- a/deps/uv/src/unix/process.c
+++ b/deps/uv/src/unix/process.c
@@ -376,7 +376,29 @@ static void uv__process_child_init(const uv_process_options_t* options,
@@ -373,7 +373,29 @@ static void uv__process_child_init(const uv_process_options_t* options,
}

if (options->env != NULL) {
Expand Down Expand Up @@ -99,7 +99,7 @@ index 74113e3..1591a75 100644
}

/* Reset signal disposition. Use a hard-coded limit because NSIG
@@ -404,9 +426,11 @@ static void uv__process_child_init(const uv_process_options_t* options,
@@ -401,9 +423,11 @@ static void uv__process_child_init(const uv_process_options_t* options,
_exit(127);
}

Expand All @@ -114,7 +114,7 @@ index 74113e3..1591a75 100644
}
#endif

@@ -434,8 +458,8 @@ int uv_spawn(uv_loop_t* loop,
@@ -431,8 +455,8 @@ int uv_spawn(uv_loop_t* loop,
UV_PROCESS_SETGID |
UV_PROCESS_SETUID |
UV_PROCESS_WINDOWS_HIDE |
Expand All @@ -125,7 +125,7 @@ index 74113e3..1591a75 100644
uv__handle_init(loop, (uv_handle_t*)process, UV_PROCESS);
QUEUE_INIT(&process->queue);

@@ -502,6 +526,17 @@ int uv_spawn(uv_loop_t* loop,
@@ -499,6 +523,17 @@ int uv_spawn(uv_loop_t* loop,

if (pid == 0) {
uv__process_child_init(options, stdio_count, pipes, signal_pipe[1]);
Expand All @@ -144,10 +144,10 @@ index 74113e3..1591a75 100644
}

diff --git a/lib/child_process.js b/lib/child_process.js
index aa24c9f..ab641c1 100644
index f08acd7..360f974 100644
--- a/lib/child_process.js
+++ b/lib/child_process.js
@@ -510,7 +510,8 @@ var spawn = exports.spawn = function(/*file, args, options*/) {
@@ -545,7 +545,8 @@ var spawn = exports.spawn = function spawn(/* file, args, options */) {
envPairs: opts.envPairs,
stdio: options.stdio,
uid: options.uid,
Expand All @@ -158,10 +158,10 @@ index aa24c9f..ab641c1 100644

return child;
diff --git a/lib/internal/child_process.js b/lib/internal/child_process.js
index a2d2012..2b77195 100644
index b142237..738dca8 100644
--- a/lib/internal/child_process.js
+++ b/lib/internal/child_process.js
@@ -315,6 +315,10 @@ ChildProcess.prototype.spawn = function(options) {
@@ -368,6 +368,10 @@ ChildProcess.prototype.spawn = function(options) {

this.pid = this._handle.pid;

Expand All @@ -173,24 +173,22 @@ index a2d2012..2b77195 100644
const stream = stdio[i];
if (stream.type === 'ignore') continue;
diff --git a/src/env.h b/src/env.h
index 7b4a699..99431e5 100644
index 66c69e8..968c7ed 100644
--- a/src/env.h
+++ b/src/env.h
@@ -300,7 +300,8 @@ class ModuleWrap;
V(write_host_object_string, "_writeHostObject") \
@@ -314,6 +314,7 @@ struct PackageConfig {
V(write_queue_size_string, "writeQueueSize") \
V(x_forwarded_string, "x-forwarded-for") \
- V(zero_return_string, "ZERO_RETURN")
+ V(zero_return_string, "ZERO_RETURN") \
V(zero_return_string, "ZERO_RETURN") \
+ V(noexec_string, "noexec") \

#define ENVIRONMENT_STRONG_PERSISTENT_PROPERTIES(V) \
V(as_external, v8::External) \
diff --git a/src/process_wrap.cc b/src/process_wrap.cc
index 3667b04..d7b5906 100644
index cd443b3..32e2410 100644
--- a/src/process_wrap.cc
+++ b/src/process_wrap.cc
@@ -179,6 +179,12 @@ class ProcessWrap : public HandleWrap {
@@ -180,6 +180,12 @@ class ProcessWrap : public HandleWrap {
node::Utf8Value file(env->isolate(), file_v);
options.file = *file;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 4bfe9cbd28c154a447e995c6a861c38b6d610a86 Mon Sep 17 00:00:00 2001
From b023b9c86d65a9b1163081e1a9d149726f70c2eb Mon Sep 17 00:00:00 2001
From: Sergii Nikolaiev <[email protected]>
Date: Thu, 28 May 2015 21:31:07 +0300
Subject: [PATCH] Fixes process pid getter to always get actual pid
Expand Down Expand Up @@ -30,15 +30,15 @@ Reviewed-by: Ievgen Sherstobitov <[email protected]>
Reviewed-by: Andrii Koval <[email protected]>
Reviewed-by: Sergiy Kryvonos <[email protected]>
---
src/node.cc | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
src/node.cc | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/node.cc b/src/node.cc
index a6403d5..fcad018 100644
index 9327f5e..0b29a44 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -2389,6 +2389,12 @@ static void EnvSetter(Local<Name> property,
info.GetReturnValue().Set(value);
@@ -1631,6 +1631,13 @@ static void GetLinkedBinding(const FunctionCallbackInfo<Value>& args) {
args.GetReturnValue().Set(effective_exports);
}

+static void ProcessPidGetter(Local<String> property,
Expand All @@ -47,10 +47,11 @@ index a6403d5..fcad018 100644
+ HandleScope scope(env->isolate());
+ info.GetReturnValue().Set(getpid());
+}
+
static Local<Object> GetFeatures(Environment* env) {
EscapableHandleScope scope(env->isolate());

static void EnvQuery(Local<Name> property,
const PropertyCallbackInfo<Integer>& info) {
@@ -2807,8 +2813,7 @@ void SetupProcessObject(Environment* env,
@@ -1843,8 +1850,7 @@ void SetupProcessObject(Environment* env,
process_env_template->NewInstance(env->context()).ToLocalChecked();
process->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "env"), process_env);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 16fe2ba69f603c4892ac5f8211396a191c4e29f2 Mon Sep 17 00:00:00 2001
From a55f1bf398ee20905aa115eca00456d6f93e15c9 Mon Sep 17 00:00:00 2001
From: Alexander Pryadka <[email protected]>
Date: Thu, 9 Jul 2015 12:46:14 +0300
Subject: [PATCH] Flush processor instruction cash
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 7d5b5265004d2fd21eac9c53bbe592f00654f509 Mon Sep 17 00:00:00 2001
From e62756ea1ec0908f02c6ef312de0471229fb7a57 Mon Sep 17 00:00:00 2001
From: Ievgen Sherstobitov <[email protected]>
Date: Fri, 24 Jul 2015 16:04:29 +0300
Subject: [PATCH] Implement initial test suit for forked node.js
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From c0565f841050a80ccdf897d536b5e6be5dbbfc90 Mon Sep 17 00:00:00 2001
From 4ec46cad02673bd27ddafd6c1666bea277133880 Mon Sep 17 00:00:00 2001
From: Andrii Koval <[email protected]>
Date: Wed, 29 Jul 2015 11:15:52 +0300
Subject: [PATCH] Optimize V8's JSON parser
Expand Down Expand Up @@ -35,10 +35,10 @@ Reviewed-by: Tigran Avanesov <[email protected]>
2 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/deps/v8/src/json-parser.cc b/deps/v8/src/json-parser.cc
index 32e4187..75003d3 100644
index 7323b71..efba265 100644
--- a/deps/v8/src/json-parser.cc
+++ b/deps/v8/src/json-parser.cc
@@ -687,7 +687,9 @@ Handle<String> JsonParser<seq_one_byte>::SlowScanJsonString(
@@ -723,7 +723,9 @@ Handle<String> JsonParser<seq_one_byte>::SlowScanJsonString(
Handle<String> prefix, int start, int end) {
int count = end - start;
int max_length = count + source_length_ - position_;
Expand All @@ -50,10 +50,10 @@ index 32e4187..75003d3 100644
NewRawString<StringType>(factory(), length, pretenure_);
// Copy prefix into seq_str.
diff --git a/deps/v8/src/json-parser.h b/deps/v8/src/json-parser.h
index 2d08fef..1565dca 100644
index fc60e29..27d33a3 100644
--- a/deps/v8/src/json-parser.h
+++ b/deps/v8/src/json-parser.h
@@ -58,6 +58,37 @@ class JsonParser BASE_EMBEDDED {
@@ -60,6 +60,37 @@ class JsonParser BASE_EMBEDDED {

INLINE(void Advance());

Expand Down
Loading

0 comments on commit 7dc0dca

Please sign in to comment.