diff --git a/.gitignore b/.gitignore index f2da31b..6d9bba8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/node-v8.9.4-stripped.tar.gz +SOURCES/node-v8.11.4-stripped.tar.gz diff --git a/.rh-nodejs8-nodejs.metadata b/.rh-nodejs8-nodejs.metadata index 5efbac4..64a1634 100644 --- a/.rh-nodejs8-nodejs.metadata +++ b/.rh-nodejs8-nodejs.metadata @@ -1 +1 @@ -9b8b583a213b76c7d091bed39ec42022359055eb SOURCES/node-v8.9.4-stripped.tar.gz +7e28a81e77873d7ddc380296ee39f025a83d5ac0 SOURCES/node-v8.11.4-stripped.tar.gz diff --git a/SOURCES/0001-fix-minizlib-dependency.patch b/SOURCES/0001-fix-minizlib-dependency.patch deleted file mode 100644 index 3e85ad4..0000000 --- a/SOURCES/0001-fix-minizlib-dependency.patch +++ /dev/null @@ -1,128 +0,0 @@ -diff --git a/deps/npm/node_modules/tar/node_modules/minizlib/index.js b/deps/npm/node_modules/tar/node_modules/minizlib/index.js -index 7d595dec4f..8c0df2ac43 100644 ---- a/deps/npm/node_modules/tar/node_modules/minizlib/index.js -+++ b/deps/npm/node_modules/tar/node_modules/minizlib/index.js -@@ -52,6 +52,7 @@ const _offset = Symbol('offset') - const _level = Symbol('level') - const _strategy = Symbol('strategy') - const _ended = Symbol('ended') -+const _writeState = Symbol('writeState') - - class Zlib extends MiniPass { - constructor (opts, mode) { -@@ -127,11 +128,27 @@ class Zlib extends MiniPass { - var strategy = typeof opts.strategy === 'number' ? opts.strategy - : constants.Z_DEFAULT_STRATEGY - -- this[_handle].init(opts.windowBits || constants.Z_DEFAULT_WINDOWBITS, -- level, -- opts.memLevel || constants.Z_DEFAULT_MEMLEVEL, -- strategy, -- opts.dictionary) -+ this[_writeState] = new Uint32Array(2); -+ const window = opts.windowBits || constants.Z_DEFAULT_WINDOWBITS -+ const memLevel = opts.memLevel || constants.Z_DEFAULT_MEMLEVEL -+ -+ // API changed in node v9 -+ /* istanbul ignore next */ -+ if (/^v[0-8]\./.test(process.version)) { -+ this[_handle].init(window, -+ level, -+ memLevel, -+ strategy, -+ opts.dictionary) -+ } else { -+ this[_handle].init(window, -+ level, -+ memLevel, -+ strategy, -+ this[_writeState], -+ () => {}, -+ opts.dictionary) -+ } - - this[_buffer] = Buffer.allocUnsafe(this[_chunkSize]) - this[_offset] = 0 -@@ -234,11 +251,15 @@ class Zlib extends MiniPass { - this[_offset], //out_off - availOutBefore // out_len - ) -+ - if (this[_hadError]) - break - -- let availInAfter = res[0] -- let availOutAfter = res[1] -+ // API changed in v9 -+ /* istanbul ignore next */ -+ let availInAfter = res ? res[0] : this[_writeState][1] -+ /* istanbul ignore next */ -+ let availOutAfter = res ? res[1] : this[_writeState][0] - - const have = availOutBefore - availOutAfter - assert(have >= 0, 'have should not go down') -diff --git a/deps/npm/node_modules/tar/node_modules/minizlib/package.json b/deps/npm/node_modules/tar/node_modules/minizlib/package.json -index ae7fb898d4..0a41e31c82 100644 ---- a/deps/npm/node_modules/tar/node_modules/minizlib/package.json -+++ b/deps/npm/node_modules/tar/node_modules/minizlib/package.json -@@ -1,27 +1,27 @@ - { -- "_from": "minizlib@^1.0.3", -- "_id": "minizlib@1.0.3", -+ "_from": "minizlib@1.0.4", -+ "_id": "minizlib@1.0.4", - "_inBundle": false, -- "_integrity": "sha1-1cGr93vhVGGZUuJTM27Mq5sqMvU=", -+ "_integrity": "sha512-sN4U9tIJtBRwKbwgFh9qJfrPIQ/GGTRr1MGqkgOeMTLy8/lM0FcWU//FqlnZ3Vb7gJ+Mxh3FOg1EklibdajbaQ==", - "_location": "/tar/minizlib", - "_phantomChildren": {}, - "_requested": { -- "type": "range", -+ "type": "version", - "registry": true, -- "raw": "minizlib@^1.0.3", -+ "raw": "minizlib@1.0.4", - "name": "minizlib", - "escapedName": "minizlib", -- "rawSpec": "^1.0.3", -+ "rawSpec": "1.0.4", - "saveSpec": null, -- "fetchSpec": "^1.0.3" -+ "fetchSpec": "1.0.4" - }, - "_requiredBy": [ - "/tar" - ], -- "_resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.0.3.tgz", -- "_shasum": "d5c1abf77be154619952e253336eccab9b2a32f5", -- "_spec": "minizlib@^1.0.3", -- "_where": "/Users/rebecca/code/npm/node_modules/tar", -+ "_resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.0.4.tgz", -+ "_shasum": "8ebb51dd8bbe40b0126b5633dbb36b284a2f523c", -+ "_spec": "minizlib@1.0.4", -+ "_where": "/Users/rebecca/code/npm", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", -@@ -32,12 +32,12 @@ - }, - "bundleDependencies": false, - "dependencies": { -- "minipass": "^2.0.0" -+ "minipass": "^2.2.1" - }, - "deprecated": false, - "description": "A small fast zlib stream built on [minipass](http://npm.im/minipass) and Node.js's zlib binding.", - "devDependencies": { -- "tap": "^10.3.0" -+ "tap": "^10.7.2" - }, - "files": [ - "index.js", -@@ -67,5 +67,5 @@ - "preversion": "npm test", - "test": "tap test/*.js --100 -J" - }, -- "version": "1.0.3" -+ "version": "1.0.4" - } diff --git a/SOURCES/openssl-error-message.patch b/SOURCES/openssl-error-message.patch new file mode 100644 index 0000000..9a4abc8 --- /dev/null +++ b/SOURCES/openssl-error-message.patch @@ -0,0 +1,15 @@ +# OpenSSL changed error message for bad passwords in newer version. +# Changing it back to match the OpenSSL version used in RHEL. + +diff -up node-v8.11.4/test/parallel/test-tls-passphrase.js.orig node-v8.11.4/test/parallel/test-tls-passphrase.js +--- node-v8.11.4/test/parallel/test-tls-passphrase.js.orig 2018-09-07 12:35:43.576779151 +0200 ++++ node-v8.11.4/test/parallel/test-tls-passphrase.js 2018-09-07 12:36:03.591781498 +0200 +@@ -221,7 +221,7 @@ server.listen(0, common.mustCall(functio + }, common.mustCall()); + })).unref(); + +-const errMessagePassword = /bad decrypt/; ++const errMessagePassword = /bad password read/; + + // Missing passphrase + assert.throws(function() { diff --git a/SOURCES/pass-session-to-http2-debug.patch b/SOURCES/pass-session-to-http2-debug.patch new file mode 100644 index 0000000..b9c8e3a --- /dev/null +++ b/SOURCES/pass-session-to-http2-debug.patch @@ -0,0 +1,39 @@ +From f7d96acb6d990b4d68116214e3ab351def63b1d7 Mon Sep 17 00:00:00 2001 +From: Daniel Bevenius +Date: Fri, 18 May 2018 09:58:37 +0200 +Subject: [PATCH] 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. + +PR-URL: https://github.com/nodejs/node/pull/20815 +Refs: https://github.com/nodejs/node/issues/20806 +Reviewed-By: James M Snell +Reviewed-By: Anatoli Papirovski +--- + 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 b3187858230..4aa9fceec18 100644 +--- a/src/node_http2.cc ++++ b/src/node_http2.cc +@@ -1687,7 +1687,7 @@ void Http2Session::OnStreamReadImpl(ssize_t nread, + // ssize_t to int. Cast here so that the < 0 check actually works on + // Windows. + if (static_cast(ret) < 0) { +- DEBUG_HTTP2SESSION2(this, "fatal error receiving data: %d", ret); ++ DEBUG_HTTP2SESSION2(session, "fatal error receiving data: %d", ret); + + Local argv[1] = { + Integer::New(isolate, ret), diff --git a/SPECS/nodejs.spec b/SPECS/nodejs.spec index f00f476..dc93dc6 100644 --- a/SPECS/nodejs.spec +++ b/SPECS/nodejs.spec @@ -19,18 +19,18 @@ # feature releases that are only supported for nine months, which is shorter # than a Fedora release lifecycle. %global nodejs_major 8 -%global nodejs_minor 9 +%global nodejs_minor 11 %global nodejs_patch 4 %global nodejs_abi %{nodejs_major}.%{nodejs_minor} %global nodejs_version %{nodejs_major}.%{nodejs_minor}.%{nodejs_patch} -%global nodejs_release 2 +%global nodejs_release 1 # == Bundled Dependency Versions == # v8 - from deps/v8/include/v8-version.h %global v8_major 6 -%global v8_minor 1 -%global v8_build 534 -%global v8_patch 50 +%global v8_minor 2 +%global v8_build 414 +%global v8_patch 54 # V8 presently breaks ABI at least every x.y release while never bumping SONAME %global v8_abi %{v8_major}.%{v8_minor} %global v8_version %{v8_major}.%{v8_minor}.%{v8_build}.%{v8_patch} @@ -43,13 +43,13 @@ # http-parser - from deps/http_parser/http_parser.h %global http_parser_major 2 -%global http_parser_minor 7 +%global http_parser_minor 8 %global http_parser_patch 0 %global http_parser_version %{http_parser_major}.%{http_parser_minor}.%{http_parser_patch} # libuv - from deps/uv/include/uv-version/h %global libuv_major 1 -%global libuv_minor 15 +%global libuv_minor 19 %global libuv_patch 0 %global libuv_version %{libuv_major}.%{libuv_minor}.%{libuv_patch} @@ -102,8 +102,10 @@ Patch1: 0001-Disable-running-gyp-files-for-bundled-deps.patch Patch2: 0001-Fix-aarch64-debug.patch -# npm outputs ugly err when npm ls -g -Patch3: 0001-fix-minizlib-dependency.patch +# Fix debugging macro implementation +Patch3: pass-session-to-http2-debug.patch +# Adjust tests for system version of OpenSSL +Patch4: openssl-error-message.patch # Disable tests that are failing # https://github.com/nodejs/help/issues/687 @@ -617,8 +619,8 @@ The API documentation for the Node.js JavaScript runtime. # https://github.com/nodejs/node/issues/15395 %patch2 -p1 -# fix outdated minizlib modules in npm node_modules tree -%patch3 -p1 +%patch3 -p1 -b.http2-debug +%patch4 -p1 -b.ssl-error-msg rm -rf deps/zlib @@ -764,10 +766,12 @@ NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules %{buildroot}/%{_bindir}/node - mv test/parallel/test-v8-serdes.js test/known_issues # eslint is not included -> test always fail +mv test/parallel/test-eslint-inspector-check.js test/known_issues/test-eslint-insp-check.js # gets run without renaming mv test/parallel/test-eslint-* test/known_issues mv test/doctool/test-make-doc.js test/known_issues -mv test/parallel/test-regress-GH-746.js test/known_issues +# previously known as test/parallel/test-regress-GH-746.js +mv test/parallel/test-net-listen-after-destroying-stdin.js test/known_issues python tools/test.py --mode=release --verbose \ async-hooks doctool inspector message \ @@ -825,6 +829,10 @@ parallel pseudo-tty sequential %changelog +* Thu Sep 06 2018 Jan Staněk - 8.11.4-1 +- Rebase to 8.11.4 LTS version for security reasons +- Resolves: RHBZ#1621761 RHBZ#161762 + * Tue Feb 06 2018 Zuzana Svetlikova - 8.9.4-2 - Resolves: RHBZ#1513560 #1542079 - fix outdated minizlib dependency in npm node_modules tree @@ -885,7 +893,7 @@ parallel pseudo-tty sequential - remove merged certs patch - build with updated system openssl - use fedora-style packaging, bundle npm and dependencies -- bootstrap is modularity conditional to bundle http-parser +- bootstrap is modularity conditional to bundle http-parser - missing from base-runtime/shared-userspace - RHSCL 3.0 should be built for more arches