mirror of
https://src.fedoraproject.org/rpms/nodejs18.git
synced 2024-11-28 11:06:08 +00:00
Add patch for nghttp2
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
This commit is contained in:
parent
fb6fa8bce8
commit
733d54662f
6 changed files with 110 additions and 30 deletions
|
@ -1,17 +1,19 @@
|
|||
From c2aff16cc196a61f4ab1cdae4a91c7926123c239 Mon Sep 17 00:00:00 2001
|
||||
From c651b81df4132f5a1db173d1317ba64673de6f01 Mon Sep 17 00:00:00 2001
|
||||
From: Zuzana Svetlikova <zsvetlik@redhat.com>
|
||||
Date: Thu, 27 Apr 2017 14:25:42 +0200
|
||||
Subject: [PATCH] Disable running gyp on shared deps
|
||||
Subject: [PATCH 1/4] Disable running gyp on shared deps
|
||||
|
||||
---
|
||||
Makefile | 7 +++----
|
||||
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 0a217bd893..e1229ad07f 100644
|
||||
index 2c62bf29cd233479e7c56b86d293519dcf9cce6e..10198b11fac2171b6b1c381dbba72596f350870d 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -79,10 +79,9 @@ $(NODE_G_EXE): config.gypi out/Makefile
|
||||
@@ -90,14 +90,13 @@ $(NODE_EXE): config.gypi out/Makefile
|
||||
|
||||
$(NODE_G_EXE): config.gypi out/Makefile
|
||||
$(MAKE) -C out BUILDTYPE=Debug V=$(V)
|
||||
if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Debug/$(NODE_EXE) $@; fi
|
||||
|
||||
|
@ -25,5 +27,8 @@ index 0a217bd893..e1229ad07f 100644
|
|||
$(PYTHON) tools/gyp_node.py -f make
|
||||
|
||||
config.gypi: configure
|
||||
$(error Missing or stale $@, please run ./$<)
|
||||
|
||||
--
|
||||
2.12.2
|
||||
2.17.0
|
||||
|
|
@ -1,17 +1,19 @@
|
|||
From 058e4efd61c7c9ab4efd55bd9aa37e2184654050 Mon Sep 17 00:00:00 2001
|
||||
From 1ce4b0bab75380351ab04cc97ee7f86d7c988d44 Mon Sep 17 00:00:00 2001
|
||||
From: Zuzana Svetlikova <zsvetlik@redhat.com>
|
||||
Date: Wed, 20 Sep 2017 13:05:01 +0200
|
||||
Subject: [PATCH] Fix aarch64 debug
|
||||
Subject: [PATCH 2/4] Fix aarch64 debug
|
||||
|
||||
---
|
||||
deps/v8/src/v8.gyp | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/deps/v8/src/v8.gyp b/deps/v8/src/v8.gyp
|
||||
index c269f245aa..2ebbd393a9 100644
|
||||
index 1c56842f81a548f91b1e5f7b62690d50e012e039..0f34d104f7fff89c5321a54b4cc3ca577aed1be4 100644
|
||||
--- a/deps/v8/src/v8.gyp
|
||||
+++ b/deps/v8/src/v8.gyp
|
||||
@@ -348,7 +348,7 @@
|
||||
@@ -350,11 +350,11 @@
|
||||
],
|
||||
'outputs': [
|
||||
'<(INTERMEDIATE_DIR)/snapshot.cc',
|
||||
],
|
||||
'variables': {
|
||||
|
@ -20,7 +22,11 @@ index c269f245aa..2ebbd393a9 100644
|
|||
'conditions': [
|
||||
['v8_random_seed!=0', {
|
||||
'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'],
|
||||
@@ -449,7 +449,7 @@
|
||||
}],
|
||||
['v8_vector_stores!=0', {
|
||||
@@ -451,11 +451,11 @@
|
||||
'action_name': 'run_mksnapshot (external)',
|
||||
'inputs': [
|
||||
'<(mksnapshot_exec)',
|
||||
],
|
||||
'variables': {
|
||||
|
@ -29,6 +35,8 @@ index c269f245aa..2ebbd393a9 100644
|
|||
'conditions': [
|
||||
['v8_random_seed!=0', {
|
||||
'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'],
|
||||
}],
|
||||
['v8_vector_stores!=0', {
|
||||
--
|
||||
2.14.1
|
||||
2.17.0
|
||||
|
34
0003-Suppress-message-to-update-npm.patch
Normal file
34
0003-Suppress-message-to-update-npm.patch
Normal file
|
@ -0,0 +1,34 @@
|
|||
From 78ba46ffc5b0bd1dd30470a8b4fa21ce75b36c67 Mon Sep 17 00:00:00 2001
|
||||
From: Stephen Gallagher <sgallagh@redhat.com>
|
||||
Date: Fri, 18 May 2018 08:25:06 -0400
|
||||
Subject: [PATCH 3/4] Suppress message to update npm
|
||||
|
||||
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
|
||||
---
|
||||
deps/npm/bin/npm-cli.js | 6 ------
|
||||
1 file changed, 6 deletions(-)
|
||||
|
||||
diff --git a/deps/npm/bin/npm-cli.js b/deps/npm/bin/npm-cli.js
|
||||
index e2c013b5df86371b5a0e5b5ac5cc73613f47fd2c..50691e6f82b7f102cbbf40ba568345836dc849fb 100755
|
||||
--- a/deps/npm/bin/npm-cli.js
|
||||
+++ b/deps/npm/bin/npm-cli.js
|
||||
@@ -23,16 +23,10 @@
|
||||
log.pause() // will be unpaused when config is loaded.
|
||||
log.info('it worked if it ends with', 'ok')
|
||||
|
||||
unsupported.checkForUnsupportedNode()
|
||||
|
||||
- if (!unsupported.checkVersion(process.version).unsupported) {
|
||||
- var updater = require('update-notifier')
|
||||
- var pkg = require('../package.json')
|
||||
- updater({pkg: pkg}).notify({defer: true})
|
||||
- }
|
||||
-
|
||||
var path = require('path')
|
||||
var npm = require('../lib/npm.js')
|
||||
var npmconf = require('../lib/config/core.js')
|
||||
var errorHandler = require('../lib/utils/error-handler.js')
|
||||
var output = require('../lib/utils/output.js')
|
||||
--
|
||||
2.17.0
|
||||
|
43
0004-http2-pass-session-to-DEBUG_HTTP2SESSION2.patch
Normal file
43
0004-http2-pass-session-to-DEBUG_HTTP2SESSION2.patch
Normal file
|
@ -0,0 +1,43 @@
|
|||
From 138926210083b2a9d1bd7a224204e02199242dab Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Bevenius <daniel.bevenius@gmail.com>
|
||||
Date: Fri, 18 May 2018 09:58:37 +0200
|
||||
Subject: [PATCH 4/4] http2: pass session to DEBUG_HTTP2SESSION2
|
||||
|
||||
When configure with --debug-http2 --debug-nghttp2 the following
|
||||
compilation error is generated:
|
||||
|
||||
DEBUG_HTTP2SESSION2(this, "fatal error receiving data: %d", ret);
|
||||
^
|
||||
../src/node_http2.cc:1690:27:
|
||||
error: invalid use of 'this' outside of a non-static member function
|
||||
|
||||
1 errors generated.
|
||||
|
||||
OnStreamReadImpl is static and I think the intention was to pass in the
|
||||
session variable here.
|
||||
|
||||
Refs: https://github.com/nodejs/node/issues/20806
|
||||
---
|
||||
src/node_http2.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/node_http2.cc b/src/node_http2.cc
|
||||
index b31878582301ed2fc974e1ff75bd0776bfd3293e..4aa9fceec18ced426195039da4814be3898d9689 100644
|
||||
--- a/src/node_http2.cc
|
||||
+++ b/src/node_http2.cc
|
||||
@@ -1685,11 +1685,11 @@ void Http2Session::OnStreamReadImpl(ssize_t nread,
|
||||
|
||||
// Note: if ssize_t is not defined (e.g. on Win32), nghttp2 will typedef
|
||||
// ssize_t to int. Cast here so that the < 0 check actually works on
|
||||
// Windows.
|
||||
if (static_cast<int>(ret) < 0) {
|
||||
- DEBUG_HTTP2SESSION2(this, "fatal error receiving data: %d", ret);
|
||||
+ DEBUG_HTTP2SESSION2(session, "fatal error receiving data: %d", ret);
|
||||
|
||||
Local<Value> argv[1] = {
|
||||
Integer::New(isolate, ret),
|
||||
};
|
||||
session->MakeCallback(env->error_string(), arraysize(argv), argv);
|
||||
--
|
||||
2.17.0
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
diff '--color=auto' -ruN node-v9.11.1.orig/deps/npm/bin/npm-cli.js node-v9.11.1/deps/npm/bin/npm-cli.js
|
||||
--- node-v9.11.1.orig/deps/npm/bin/npm-cli.js 2018-04-05 00:34:51.000000000 -0400
|
||||
+++ node-v9.11.1/deps/npm/bin/npm-cli.js 2018-04-09 16:57:31.595166069 -0400
|
||||
@@ -25,12 +25,6 @@
|
||||
|
||||
unsupported.checkForUnsupportedNode()
|
||||
|
||||
- if (!unsupported.checkVersion(process.version).unsupported) {
|
||||
- var updater = require('update-notifier')
|
||||
- var pkg = require('../package.json')
|
||||
- updater({pkg: pkg}).notify({defer: true})
|
||||
- }
|
||||
-
|
||||
var path = require('path')
|
||||
var npm = require('../lib/npm.js')
|
||||
var npmconf = require('../lib/config/core.js')
|
12
nodejs.spec
12
nodejs.spec
|
@ -109,15 +109,19 @@ Source100: %{name}-tarball.sh
|
|||
Source7: nodejs_native.attr
|
||||
|
||||
# Disable running gyp on bundled deps we don't use
|
||||
Patch1: 0001-Disable-running-gyp-files-for-bundled-deps.patch
|
||||
Patch1: 0001-Disable-running-gyp-on-shared-deps.patch
|
||||
|
||||
# Being fixed upstream.
|
||||
# Follow https://bugs.chromium.org/p/v8/issues/detail?id=6939
|
||||
Patch2: 0001-Fix-aarch64-debug.patch
|
||||
Patch2: 0002-Fix-aarch64-debug.patch
|
||||
|
||||
# Suppress the message from npm to run `npm -g update npm`
|
||||
# This does bad things on an RPM-managed npm.
|
||||
Patch3: no-npm-update-msg.patch
|
||||
Patch3: 0003-Suppress-message-to-update-npm.patch
|
||||
|
||||
# Fix nghttp2 debug builds
|
||||
# https://github.com/nodejs/node/pull/20815
|
||||
Patch4: 0004-http2-pass-session-to-DEBUG_HTTP2SESSION2.patch
|
||||
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: libicu-devel
|
||||
|
@ -281,6 +285,8 @@ rm -rf deps/icu-small \
|
|||
|
||||
%patch3 -p1
|
||||
|
||||
%patch4 -p1
|
||||
|
||||
%build
|
||||
# build with debugging symbols and add defines from libuv (#892601)
|
||||
# Node's v8 breaks with GCC 6 because of incorrect usage of methods on
|
||||
|
|
Loading…
Reference in a new issue