diff --git a/mingw-w64-nodejs/0001-Fix-python-invocation-to-python2.patch b/mingw-w64-nodejs/0001-Fix-python-invocation-to-python2.patch index b83ae625ac..34062aff8b 100644 --- a/mingw-w64-nodejs/0001-Fix-python-invocation-to-python2.patch +++ b/mingw-w64-nodejs/0001-Fix-python-invocation-to-python2.patch @@ -1,7 +1,7 @@ -From 7c8fca2e86111cd5e8b47a591f266b1e67a476b0 Mon Sep 17 00:00:00 2001 +From 1ae864e84c7687fbe76bebbaf419a440d992a73b Mon Sep 17 00:00:00 2001 From: Alethea Rose Date: Tue, 14 Feb 2017 20:56:17 -0500 -Subject: [PATCH 1/8] Fix python invocation to python2 +Subject: [PATCH 01/11] Fix python invocation to python2 --- common.gypi | 2 +- @@ -90,7 +90,7 @@ Subject: [PATCH 1/8] Fix python invocation to python2 83 files changed, 103 insertions(+), 103 deletions(-) diff --git a/common.gypi b/common.gypi -index 8a3179d..81d34d0 100644 +index af9c6ba..728ee67 100644 --- a/common.gypi +++ b/common.gypi @@ -9,7 +9,7 @@ @@ -103,7 +103,7 @@ index 8a3179d..81d34d0 100644 'node_shared%': 'false', 'force_dynamic_crt%': 0, diff --git a/configure b/configure -index 6a50e5e..e8441a5 100644 +index 97b41ae..09f095e 100644 --- a/configure +++ b/configure @@ -1,4 +1,4 @@ @@ -1142,5 +1142,5 @@ index 50caace..7120d64 100644 # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -- -2.11.0 +2.13.0 diff --git a/mingw-w64-nodejs/0002-Fix-system-icu-build.patch b/mingw-w64-nodejs/0002-Fix-system-icu-build.patch index f99b223963..9d8a3c7c3c 100644 --- a/mingw-w64-nodejs/0002-Fix-system-icu-build.patch +++ b/mingw-w64-nodejs/0002-Fix-system-icu-build.patch @@ -1,7 +1,7 @@ -From a7bf443b0df4b478c41a0a7ad956c44adebac1ab Mon Sep 17 00:00:00 2001 +From 10a45283de5a9e5e1f41a9d261648e783eab075a Mon Sep 17 00:00:00 2001 From: Alethea Rose Date: Tue, 14 Feb 2017 21:43:31 -0500 -Subject: [PATCH 2/8] Fix system-icu build +Subject: [PATCH 02/11] Fix system-icu build --- deps/v8/tools/gyp/v8.gyp | 5 ----- @@ -24,5 +24,5 @@ index e1ba0b1..8323075 100644 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE'], }, { # else icu_use_data_file_flag !=1 -- -2.11.0 +2.13.0 diff --git a/mingw-w64-nodejs/0003-Include-win32-headers.h-in-v8-atomicops.h.patch b/mingw-w64-nodejs/0003-Include-win32-headers.h-in-v8-atomicops.h.patch index cd8dfaaaa5..5899d88534 100644 --- a/mingw-w64-nodejs/0003-Include-win32-headers.h-in-v8-atomicops.h.patch +++ b/mingw-w64-nodejs/0003-Include-win32-headers.h-in-v8-atomicops.h.patch @@ -1,7 +1,7 @@ -From 035aaa413ba2d015da95154fcf00e8ba4a157a7a Mon Sep 17 00:00:00 2001 +From e05442d383e30a2387f659d579d7d19fe923a621 Mon Sep 17 00:00:00 2001 From: Alethea Rose Date: Tue, 14 Feb 2017 22:26:28 -0500 -Subject: [PATCH 3/8] Include win32-headers.h in v8/atomicops.h +Subject: [PATCH 03/11] Include win32-headers.h in v8/atomicops.h --- deps/v8/src/base/atomicops.h | 4 ++++ @@ -23,5 +23,5 @@ index ea33e48..ac759ad 100644 // windows.h #defines this (only on x64). This causes problems because the // public API also uses MemoryBarrier at the public name for this fence. So, on -- -2.11.0 +2.13.0 diff --git a/mingw-w64-nodejs/0004-Define-localtime_s-for-MinGW.patch b/mingw-w64-nodejs/0004-Define-localtime_s-for-MinGW.patch index 61c48a4570..819866bcb3 100644 --- a/mingw-w64-nodejs/0004-Define-localtime_s-for-MinGW.patch +++ b/mingw-w64-nodejs/0004-Define-localtime_s-for-MinGW.patch @@ -1,7 +1,7 @@ -From 86c142241b4aa2f2e526cb38bdd8ddcadd476a21 Mon Sep 17 00:00:00 2001 +From 5d265a18a1f28651f942b554613c636ab1ebcb4c Mon Sep 17 00:00:00 2001 From: Alethea Rose Date: Tue, 14 Feb 2017 23:07:39 -0500 -Subject: [PATCH 4/8] Define localtime_s for MinGW +Subject: [PATCH 04/11] Define localtime_s for MinGW --- deps/v8/src/base/platform/platform-win32.cc | 3 +-- @@ -29,5 +29,5 @@ index 0076a35..85c115e 100644 int fopen_s(FILE** pFile, const char* filename, const char* mode) { *pFile = fopen(filename, mode); -- -2.11.0 +2.13.0 diff --git a/mingw-w64-nodejs/0005-Remove-.lib-suffix-on-linked-libraries.patch b/mingw-w64-nodejs/0005-Remove-.lib-suffix-on-linked-libraries.patch index 6c9a2b7326..f93346b36b 100644 --- a/mingw-w64-nodejs/0005-Remove-.lib-suffix-on-linked-libraries.patch +++ b/mingw-w64-nodejs/0005-Remove-.lib-suffix-on-linked-libraries.patch @@ -1,7 +1,7 @@ -From 9d3da7597d7deabf41b9a7440f6e180b73483f8b Mon Sep 17 00:00:00 2001 +From 4be19f7e5913b34813fbc241738ebe8b31661e10 Mon Sep 17 00:00:00 2001 From: Alethea Rose Date: Tue, 14 Feb 2017 23:11:03 -0500 -Subject: [PATCH 5/8] Remove .lib suffix on linked libraries +Subject: [PATCH 05/11] Remove .lib suffix on linked libraries --- deps/v8/BUILD.gn | 4 ++-- @@ -38,7 +38,7 @@ index 8323075..79de18f 100644 }], ], diff --git a/node.gyp b/node.gyp -index 23a71cc..bfc4202 100644 +index 73054dc..a76a4a1 100644 --- a/node.gyp +++ b/node.gyp @@ -505,7 +505,7 @@ @@ -51,5 +51,5 @@ index 23a71cc..bfc4202 100644 'defines': [ '__POSIX__' ], 'sources': [ 'src/backtrace_posix.cc' ], -- -2.11.0 +2.13.0 diff --git a/mingw-w64-nodejs/0006-Define-_WIN32_WINNT-in-node.gyp.patch b/mingw-w64-nodejs/0006-Define-_WIN32_WINNT-in-node.gyp.patch index ee9d6ebcf9..36e15e487d 100644 --- a/mingw-w64-nodejs/0006-Define-_WIN32_WINNT-in-node.gyp.patch +++ b/mingw-w64-nodejs/0006-Define-_WIN32_WINNT-in-node.gyp.patch @@ -1,16 +1,14 @@ -From 8384795a7cb844ba2f118c9e28a6d1370386b280 Mon Sep 17 00:00:00 2001 +From 80de4d7779efff56b71f8a1bea502a9dd9a5499e Mon Sep 17 00:00:00 2001 From: Alethea Rose Date: Wed, 15 Feb 2017 02:03:24 -0500 -Subject: [PATCH 6/8] Define _WIN32_WINNT in node.gyp +Subject: [PATCH 06/11] Define _WIN32_WINNT in node.gyp --- - node.gyp | 3 +++ - win32_winnt.py | 3 +++ - 2 files changed, 6 insertions(+) - create mode 100644 win32_winnt.py + node.gyp | 3 +++ + 1 file changed, 3 insertions(+) diff --git a/node.gyp b/node.gyp -index bfc4202..e4f633f 100644 +index a76a4a1..f3f449a 100644 --- a/node.gyp +++ b/node.gyp @@ -236,6 +236,9 @@ @@ -24,5 +22,5 @@ index bfc4202..e4f633f 100644 'msvs_settings': { 'VCManifestTool': { -- -2.11.0 +2.13.0 diff --git a/mingw-w64-nodejs/0007-Skip-sys-resource-and-unneeded-includes-in-node.cc.patch b/mingw-w64-nodejs/0007-Skip-sys-resource-and-unneeded-includes-in-node.cc.patch index d028c7e1cb..a75693e08f 100644 --- a/mingw-w64-nodejs/0007-Skip-sys-resource-and-unneeded-includes-in-node.cc.patch +++ b/mingw-w64-nodejs/0007-Skip-sys-resource-and-unneeded-includes-in-node.cc.patch @@ -1,17 +1,17 @@ -From c5e36c1e70bbc3b6a920fa83d94bcaca1f0c855b Mon Sep 17 00:00:00 2001 +From 2cc95d6fcf4ced5a1cd2ce8d3ec6420aa8e00bc4 Mon Sep 17 00:00:00 2001 From: Alethea Rose Date: Wed, 15 Feb 2017 02:45:09 -0500 -Subject: [PATCH 7/8] Skip sys/resource and unneeded includes in node.cc +Subject: [PATCH 07/11] Skip sys/resource and unneeded includes in node.cc --- src/node.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node.cc b/src/node.cc -index ce39cb4..0ff794a 100644 +index 6579565..c515756 100644 --- a/src/node.cc +++ b/src/node.cc -@@ -76,7 +76,7 @@ +@@ -78,7 +78,7 @@ #define getpid GetCurrentProcessId #define umask _umask typedef int mode_t; @@ -21,5 +21,5 @@ index ce39cb4..0ff794a 100644 #include // getrlimit, setrlimit #include // setuid, getuid -- -2.11.0 +2.13.0 diff --git a/mingw-w64-nodejs/0008-Link-with-municode-and-extern-wmain-for-Unicode.patch b/mingw-w64-nodejs/0008-Link-with-municode-and-extern-wmain-for-Unicode.patch index 26298cb810..23fbba3a20 100644 --- a/mingw-w64-nodejs/0008-Link-with-municode-and-extern-wmain-for-Unicode.patch +++ b/mingw-w64-nodejs/0008-Link-with-municode-and-extern-wmain-for-Unicode.patch @@ -1,7 +1,7 @@ -From dadf7ba5860d6143e42310918cfe51e8feb3a280 Mon Sep 17 00:00:00 2001 +From 5468af22c0582dbcfb40bbc7fbdbc7627d9ef26e Mon Sep 17 00:00:00 2001 From: Alethea Rose Date: Wed, 15 Feb 2017 19:11:53 -0500 -Subject: [PATCH 8/8] Link with -municode and extern wmain for Unicode +Subject: [PATCH 08/11] Link with -municode and extern wmain for Unicode --- node.gyp | 3 ++- @@ -9,7 +9,7 @@ Subject: [PATCH 8/8] Link with -municode and extern wmain for Unicode 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/node.gyp b/node.gyp -index e4f633f..ff9fc3f 100644 +index f3f449a..f6b99b4 100644 --- a/node.gyp +++ b/node.gyp @@ -507,8 +507,9 @@ @@ -51,5 +51,5 @@ index bde3975..85c5c48 100644 // UNIX int main(int argc, char *argv[]) { -- -2.11.0 +2.13.0 diff --git a/mingw-w64-nodejs/0009-Remove-no_rand_screen-from-s_client-invocation.patch b/mingw-w64-nodejs/0009-Remove-no_rand_screen-from-s_client-invocation.patch index 9f9211ce99..5ba41f982b 100644 --- a/mingw-w64-nodejs/0009-Remove-no_rand_screen-from-s_client-invocation.patch +++ b/mingw-w64-nodejs/0009-Remove-no_rand_screen-from-s_client-invocation.patch @@ -1,7 +1,7 @@ -From 555afdbded5a73c5dcbe23b2f7d57197fe485a5d Mon Sep 17 00:00:00 2001 +From f77af2f052c870403cfedfce66bb8923f66e80ce Mon Sep 17 00:00:00 2001 From: Alethea Rose Date: Wed, 15 Feb 2017 21:34:13 -0500 -Subject: [PATCH 9/9] Remove -no_rand_screen from s_client invocation +Subject: [PATCH 09/11] Remove -no_rand_screen from s_client invocation --- test/parallel/test-https-foafssl.js | 4 ---- @@ -17,70 +17,70 @@ Subject: [PATCH 9/9] Remove -no_rand_screen from s_client invocation 10 files changed, 40 deletions(-) diff --git a/test/parallel/test-https-foafssl.js b/test/parallel/test-https-foafssl.js -index 5c9fb61..6d655f3 100644 +index 5a9b8eb..ba07a3c 100644 --- a/test/parallel/test-https-foafssl.js +++ b/test/parallel/test-https-foafssl.js @@ -57,10 +57,6 @@ server.listen(0, function() { - '-cert', join(common.fixturesDir, 'foafssl.crt'), - '-key', join(common.fixturesDir, 'foafssl.key')]; + '-cert', join(common.fixturesDir, 'foafssl.crt'), + '-key', join(common.fixturesDir, 'foafssl.key')]; - // for the performance and stability issue in s_client on Windows - if (common.isWindows) - args.push('-no_rand_screen'); - - var client = spawn(common.opensslCli, args); + const client = spawn(common.opensslCli, args); client.stdout.on('data', function(data) { diff --git a/test/parallel/test-tls-alert.js b/test/parallel/test-tls-alert.js -index db22443..d563576 100644 +index a8c6016..22d54cc 100644 --- a/test/parallel/test-tls-alert.js +++ b/test/parallel/test-tls-alert.js -@@ -34,10 +34,6 @@ var server = tls.Server({ - var args = ['s_client', '-quiet', '-tls1_1', - '-connect', `127.0.0.1:${this.address().port}`]; +@@ -34,10 +34,6 @@ const server = tls.Server({ + const args = ['s_client', '-quiet', '-tls1_1', + '-connect', `127.0.0.1:${this.address().port}`]; - // for the performance and stability issue in s_client on Windows - if (common.isWindows) - args.push('-no_rand_screen'); - - var client = spawn(common.opensslCli, args); - var out = ''; + const client = spawn(common.opensslCli, args); + let out = ''; client.stderr.setEncoding('utf8'); diff --git a/test/parallel/test-tls-dhe.js b/test/parallel/test-tls-dhe.js -index 92ab415..fb5c684 100644 +index 80a2d78..e154285 100644 --- a/test/parallel/test-tls-dhe.js +++ b/test/parallel/test-tls-dhe.js -@@ -44,10 +44,6 @@ function test(keylen, expectedCipher, cb) { - var args = ['s_client', '-connect', `127.0.0.1:${this.address().port}`, - '-cipher', ciphers]; +@@ -50,10 +50,6 @@ function test(keylen, expectedCipher, cb) { + const args = ['s_client', '-connect', `127.0.0.1:${this.address().port}`, + '-cipher', ciphers]; - // for the performance and stability issue in s_client on Windows - if (common.isWindows) - args.push('-no_rand_screen'); - - var client = spawn(common.opensslCli, args); - var out = ''; + const client = spawn(common.opensslCli, args); + let out = ''; client.stdout.setEncoding('utf8'); diff --git a/test/parallel/test-tls-ecdh-disable.js b/test/parallel/test-tls-ecdh-disable.js -index a6ddb15..14638a0 100644 +index eec22c3..d3464f7 100644 --- a/test/parallel/test-tls-ecdh-disable.js +++ b/test/parallel/test-tls-ecdh-disable.js -@@ -24,10 +24,6 @@ server.listen(0, '127.0.0.1', function() { - var cmd = '"' + common.opensslCli + '" s_client -cipher ' + options.ciphers + +@@ -30,10 +30,6 @@ server.listen(0, '127.0.0.1', common.mustCall(function() { + let cmd = '"' + common.opensslCli + '" s_client -cipher ' + options.ciphers + ` -connect 127.0.0.1:${this.address().port}`; - // for the performance and stability issue in s_client on Windows - if (common.isWindows) - cmd += ' -no_rand_screen'; - - exec(cmd, function(err, stdout, stderr) { + exec(cmd, common.mustCall(function(err, stdout, stderr) { // Old versions of openssl will still exit with 0 so we // can't just check if err is not null. diff --git a/test/parallel/test-tls-ecdh.js b/test/parallel/test-tls-ecdh.js -index 99c6e10..bbd06bb 100644 +index 56348d5..012c041 100644 --- a/test/parallel/test-tls-ecdh.js +++ b/test/parallel/test-tls-ecdh.js -@@ -28,10 +28,6 @@ server.listen(0, '127.0.0.1', common.mustCall(function() { +@@ -34,10 +34,6 @@ server.listen(0, '127.0.0.1', common.mustCall(function() { let cmd = '"' + common.opensslCli + '" s_client -cipher ' + options.ciphers + ` -connect 127.0.0.1:${this.address().port}`; @@ -92,12 +92,12 @@ index 99c6e10..bbd06bb 100644 if (err) throw err; assert(stdout.includes(reply)); diff --git a/test/parallel/test-tls-no-sslv3.js b/test/parallel/test-tls-no-sslv3.js -index 16a722e..cbf89c1 100644 +index e7ee788..9865961 100644 --- a/test/parallel/test-tls-no-sslv3.js +++ b/test/parallel/test-tls-no-sslv3.js @@ -28,10 +28,6 @@ server.listen(0, '127.0.0.1', function() { - '-ssl3', - '-connect', address]; + '-ssl3', + '-connect', address]; - // for the performance and stability issue in s_client on Windows - if (common.isWindows) @@ -107,22 +107,22 @@ index 16a722e..cbf89c1 100644 client.stdout.pipe(process.stdout); client.stderr.pipe(process.stderr); diff --git a/test/parallel/test-tls-securepair-server.js b/test/parallel/test-tls-securepair-server.js -index 24ac217..1a41e7f 100644 +index 76d2f88..e0a4cb5 100644 --- a/test/parallel/test-tls-securepair-server.js +++ b/test/parallel/test-tls-securepair-server.js -@@ -93,10 +93,6 @@ server.listen(0, common.mustCall(function() { +@@ -99,10 +99,6 @@ server.listen(0, common.mustCall(function() { - var args = ['s_client', '-connect', `127.0.0.1:${this.address().port}`]; + const args = ['s_client', '-connect', `127.0.0.1:${this.address().port}`]; - // for the performance and stability issue in s_client on Windows - if (common.isWindows) - args.push('-no_rand_screen'); - - var client = spawn(common.opensslCli, args); + const client = spawn(common.opensslCli, args); diff --git a/test/parallel/test-tls-server-verify.js b/test/parallel/test-tls-server-verify.js -index 04c1547..34bf278 100644 +index 61330e2..3eef879 100644 --- a/test/parallel/test-tls-server-verify.js +++ b/test/parallel/test-tls-server-verify.js @@ -135,10 +135,6 @@ function runClient(prefix, port, options, cb) { @@ -137,7 +137,7 @@ index 04c1547..34bf278 100644 switch (options.name) { diff --git a/test/parallel/test-tls-session-cache.js b/test/parallel/test-tls-session-cache.js -index 60a8570..c80cc8c 100644 +index 0b29422..f0cf6be 100644 --- a/test/parallel/test-tls-session-cache.js +++ b/test/parallel/test-tls-session-cache.js @@ -82,10 +82,6 @@ function doTest(testOptions, callback) { @@ -152,11 +152,11 @@ index 60a8570..c80cc8c 100644 const client = spawn(common.opensslCli, args, { stdio: [ 0, 1, 'pipe' ] diff --git a/test/parallel/test-tls-set-ciphers.js b/test/parallel/test-tls-set-ciphers.js -index 5a85e3b..9d3f587 100644 +index 83dcc1f..17ad2b7 100644 --- a/test/parallel/test-tls-set-ciphers.js +++ b/test/parallel/test-tls-set-ciphers.js @@ -37,10 +37,6 @@ server.listen(0, '127.0.0.1', function() { - var cmd = '"' + common.opensslCli + '" s_client -cipher ' + options.ciphers + + let cmd = '"' + common.opensslCli + '" s_client -cipher ' + options.ciphers + ` -connect 127.0.0.1:${this.address().port}`; - // for the performance and stability issue in s_client on Windows @@ -167,5 +167,5 @@ index 5a85e3b..9d3f587 100644 if (err) throw err; response = stdout; -- -2.11.1 +2.13.0 diff --git a/mingw-w64-nodejs/0010-Fix-incorrect-test-assumptions-for-MinGW.patch b/mingw-w64-nodejs/0010-Fix-incorrect-test-assumptions-for-MinGW.patch index a1112ed0b1..d6c3bfa89a 100644 --- a/mingw-w64-nodejs/0010-Fix-incorrect-test-assumptions-for-MinGW.patch +++ b/mingw-w64-nodejs/0010-Fix-incorrect-test-assumptions-for-MinGW.patch @@ -1,42 +1,18 @@ -From 80864f2a7ba0655f5631d7a1e5ab99c74c38486a Mon Sep 17 00:00:00 2001 +From cf3cff9ef513a11fe67c4de540aabb02c78ffa11 Mon Sep 17 00:00:00 2001 From: Alethea Rose Date: Wed, 15 Feb 2017 22:21:51 -0500 -Subject: [PATCH 10/10] Fix incorrect test assumptions for MinGW +Subject: [PATCH 10/11] Fix incorrect test assumptions for MinGW --- - test/common.js | 5 +++++ test/parallel/test-child-process-stdin.js | 2 +- test/parallel/test-debugger-pid.js | 3 ++- test/parallel/test-fs-symlink.js | 5 +++++ test/parallel/test-https-foafssl.js | 6 +++++- test/parallel/test-npm-install.js | 5 +++++ - 6 files changed, 23 insertions(+), 3 deletions(-) + 5 files changed, 18 insertions(+), 3 deletions(-) -diff --git a/test/common.js b/test/common.js -index 7224d87..ee9f51c 100644 ---- a/test/common.js -+++ b/test/common.js -@@ -17,6 +17,8 @@ exports.tmpDirName = 'tmp'; - // PORT should match the definition in test/testpy/__init__.py. - exports.PORT = +process.env.NODE_COMMON_PORT || 12346; - exports.isWindows = process.platform === 'win32'; -+exports.isMinGW = (process.env.MSYSTEM === 'MINGW64') || -+ (process.env.MSYSTEM === 'MINGW32') - exports.isWOW64 = exports.isWindows && - (process.env.PROCESSOR_ARCHITEW6432 !== undefined); - exports.isAix = process.platform === 'aix'; -@@ -479,6 +481,9 @@ exports.nodeProcessAborted = function nodeProcessAborted(exitCode, signal) { - // which corresponds to exit code 3221225477 (0xC0000005) - if (exports.isWindows) - expectedExitCodes = [3221225477]; -+ -+ if (exports.isMinGW) -+ expectedExitCodes = [1]; - - // When using --abort-on-uncaught-exception, V8 will use - // base::OS::Abort to terminate the process. diff --git a/test/parallel/test-child-process-stdin.js b/test/parallel/test-child-process-stdin.js -index eccced0..2340303 100644 +index 8782e46..d144c35 100644 --- a/test/parallel/test-child-process-stdin.js +++ b/test/parallel/test-child-process-stdin.js @@ -33,7 +33,7 @@ cat.on('exit', common.mustCall(function(status) { @@ -49,27 +25,27 @@ index eccced0..2340303 100644 } else { assert.strictEqual('hello world', response); diff --git a/test/parallel/test-debugger-pid.js b/test/parallel/test-debugger-pid.js -index 2b81da7..da8dc35 100644 +index 7617e84..b49d89f 100644 --- a/test/parallel/test-debugger-pid.js +++ b/test/parallel/test-debugger-pid.js -@@ -11,8 +11,9 @@ var interfacer = spawn(process.execPath, ['debug', '-p', '655555']); +@@ -11,8 +11,9 @@ const interfacer = spawn(process.execPath, ['debug', '-p', '655555']); console.error(process.execPath, 'debug', '-p', '655555'); interfacer.stdout.setEncoding('utf-8'); interfacer.stderr.setEncoding('utf-8'); -+var newline = common.isMinGW ? '\r\n' : '\n'; - var onData = function(data) { ++const newline = common.isMinGW ? '\r\n' : '\n'; + const onData = function(data) { - data = (buffer + data).split('\n'); + data = (buffer + data).split(newline); buffer = data.pop(); data.forEach(function(line) { interfacer.emit('line', line); diff --git a/test/parallel/test-fs-symlink.js b/test/parallel/test-fs-symlink.js -index ab52ba2..dd148d2 100644 +index 8200254..38b284d 100644 --- a/test/parallel/test-fs-symlink.js +++ b/test/parallel/test-fs-symlink.js @@ -8,6 +8,11 @@ const exec = require('child_process').exec; - var linkTime; - var fileTime; + let linkTime; + let fileTime; +if (common.isMinGW) { + common.skip('MinGW does not support symlinks'); @@ -80,7 +56,7 @@ index ab52ba2..dd148d2 100644 // On Windows, creating symlinks requires admin privileges. // We'll only try to run symlink test if we have enough privileges. diff --git a/test/parallel/test-https-foafssl.js b/test/parallel/test-https-foafssl.js -index 6d655f3..1be46dc 100644 +index ba07a3c..2b35f5d 100644 --- a/test/parallel/test-https-foafssl.js +++ b/test/parallel/test-https-foafssl.js @@ -66,7 +66,11 @@ server.listen(0, function() { @@ -97,7 +73,7 @@ index 6d655f3..1be46dc 100644 client.on('error', function(error) { throw error; diff --git a/test/parallel/test-npm-install.js b/test/parallel/test-npm-install.js -index e72e731..cbbb599 100644 +index 3952088..04feef4 100644 --- a/test/parallel/test-npm-install.js +++ b/test/parallel/test-npm-install.js @@ -6,6 +6,11 @@ const spawn = require('child_process').spawn; @@ -113,5 +89,5 @@ index e72e731..cbbb599 100644 const npmSandbox = path.join(common.tmpDir, 'npm-sandbox'); fs.mkdirSync(npmSandbox); -- -2.11.1 +2.13.0 diff --git a/mingw-w64-nodejs/0011-detect-architecture.patch b/mingw-w64-nodejs/0011-detect-architecture.patch index b884b140d1..bb4654f1b0 100644 --- a/mingw-w64-nodejs/0011-detect-architecture.patch +++ b/mingw-w64-nodejs/0011-detect-architecture.patch @@ -3,9 +3,9 @@ @@ -755,7 +755,7 @@ o['variables']['node_install_npm'] = b(not options.without_npm) o['default_configuration'] = 'Debug' if options.debug else 'Release' - + - host_arch = host_arch_win() if os.name == 'nt' else host_arch_cc() + host_arch = host_arch_win() if (os.name == 'nt' and not ('GCC' in sys.version)) else host_arch_cc() target_arch = options.dest_cpu or host_arch # ia32 is preferred by the build tools (GYP) over x86 even if we prefer the latter - # the Makefile resets this to x86 afterward +# the Makefile resets this to x86 afterward diff --git a/mingw-w64-nodejs/0012-Use-shell-wrapper-script-for-npm-on-MSYS2-MinGW-w64.patch b/mingw-w64-nodejs/0012-Use-shell-wrapper-script-for-npm-on-MSYS2-MinGW-w64.patch new file mode 100644 index 0000000000..a53f18fdf8 --- /dev/null +++ b/mingw-w64-nodejs/0012-Use-shell-wrapper-script-for-npm-on-MSYS2-MinGW-w64.patch @@ -0,0 +1,21 @@ +--- x86_64/tools/install.py.orig 2017-06-06 21:25:03.000000000 +0200 ++++ x86_64/tools/install.py 2017-06-23 18:32:47.134657400 +0200 +@@ -94,7 +94,17 @@ + if action == uninstall: + action([link_path], 'bin/npm') + elif action == install: +- try_symlink('../lib/node_modules/npm/bin/npm-cli.js', link_path) ++ # Use MSYS2 shell script wrapper. ++ if ((os.name == 'nt' and 'GCC' in sys.version) or ++ (os.name == 'posix' and 'NT' in platform.system())): ++ # Copy the wrapper shell script ++ try_copy('deps/npm/bin/npm', link_path) ++ # deps/npm/bin/npm is a shell script so the shebang must run sh, not node ++ s = open(link_path, 'r').read() ++ s = re.sub(r'#!.*\n', '#!' + '/usr/bin/env sh' + '\n', s) ++ open(link_path, 'w').write(s) ++ else: ++ try_symlink('../lib/node_modules/npm/bin/npm-cli.js', link_path) + else: + assert(0) # unhandled action type + diff --git a/mingw-w64-nodejs/0013-Revert-to-FHS-installation-paths-on-Windows-tests-no.patch b/mingw-w64-nodejs/0013-Revert-to-FHS-installation-paths-on-Windows-tests-no.patch new file mode 100644 index 0000000000..7fa459153b --- /dev/null +++ b/mingw-w64-nodejs/0013-Revert-to-FHS-installation-paths-on-Windows-tests-no.patch @@ -0,0 +1,127 @@ +From c9200c96bd986aacee9f04ae9095e36847fd5b43 Mon Sep 17 00:00:00 2001 +From: Mateusz Mikula +Date: Sat, 24 Jun 2017 13:59:32 +0200 +Subject: [PATCH] Revert to FHS installation paths on Windows (tests not fixed) + + Author: Mateusz Mikula +--- + deps/npm/bin/npm | 4 ++-- + deps/npm/bin/npm.cmd | 4 ++-- + deps/npm/lib/build.js | 2 +- + deps/npm/lib/config/defaults.js | 7 ++----- + deps/npm/lib/npm.js | 6 ++---- + deps/npm/lib/unbuild.js | 1 - + 6 files changed, 9 insertions(+), 15 deletions(-) + +diff --git a/deps/npm/bin/npm b/deps/npm/bin/npm +index 5acd6fb..dc01687 100644 +--- a/deps/npm/bin/npm ++++ b/deps/npm/bin/npm +@@ -12,12 +12,12 @@ if ! [ -x "$NODE_EXE" ]; then + NODE_EXE=node + fi + +-NPM_CLI_JS="$basedir/node_modules/npm/bin/npm-cli.js" ++NPM_CLI_JS="$basedir/../lib/node_modules/npm/bin/npm-cli.js" + + case `uname` in + *MINGW*) + NPM_PREFIX=`"$NODE_EXE" "$NPM_CLI_JS" prefix -g` +- NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/node_modules/npm/bin/npm-cli.js" ++ NPM_PREFIX_NPM_CLI_JS="$NPM_PREFIX/../lib/node_modules/npm/bin/npm-cli.js" + if [ -f "$NPM_PREFIX_NPM_CLI_JS" ]; then + NPM_CLI_JS="$NPM_PREFIX_NPM_CLI_JS" + fi +diff --git a/deps/npm/bin/npm.cmd b/deps/npm/bin/npm.cmd +index 880554d..12507ba 100644 +--- a/deps/npm/bin/npm.cmd ++++ b/deps/npm/bin/npm.cmd +@@ -8,9 +8,9 @@ IF NOT EXIST "%NODE_EXE%" ( + SET "NODE_EXE=node" + ) + +-SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js" ++SET "NPM_CLI_JS=%~dp0\..\lib\node_modules\npm\bin\npm-cli.js" + FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO ( +- SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js" ++ SET "NPM_PREFIX_NPM_CLI_JS=%%F\..\lib\node_modules\npm\bin\npm-cli.js" + ) + IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" ( + SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%" +diff --git a/deps/npm/lib/build.js b/deps/npm/lib/build.js +index fbe78c7..202da86 100644 +--- a/deps/npm/lib/build.js ++++ b/deps/npm/lib/build.js +@@ -229,7 +229,7 @@ function linkBin (from, to, gently, cb) { + } + + function linkMans (pkg, folder, parent, gtop, cb) { +- if (!pkg.man || !gtop || process.platform === 'win32') return cb() ++ if (!pkg.man || !gtop) return cb() + + var manRoot = path.resolve(npm.config.get('prefix'), 'share', 'man') + log.verbose('linkMans', 'man files are', pkg.man, 'in', manRoot) +diff --git a/deps/npm/lib/config/defaults.js b/deps/npm/lib/config/defaults.js +index e93c1e5..b1a16d0 100644 +--- a/deps/npm/lib/config/defaults.js ++++ b/deps/npm/lib/config/defaults.js +@@ -81,8 +81,8 @@ var uidOrPid = process.getuid ? process.getuid() : process.pid + if (home) process.env.HOME = home + else home = path.resolve(temp, 'npm-' + uidOrPid) + +-var cacheExtra = process.platform === 'win32' ? 'npm-cache' : '.npm' +-var cacheRoot = process.platform === 'win32' && process.env.APPDATA || home ++var cacheExtra = '.npm' ++var cacheRoot = home + var cache = path.resolve(cacheRoot, cacheExtra) + + var globalPrefix +@@ -91,9 +91,6 @@ Object.defineProperty(exports, 'defaults', {get: function () { + + if (process.env.PREFIX) { + globalPrefix = process.env.PREFIX +- } else if (process.platform === 'win32') { +- // c:\node\node.exe --> prefix=c:\node\ +- globalPrefix = path.dirname(process.execPath) + } else { + // /usr/local/bin/node --> prefix=/usr/local + globalPrefix = path.dirname(path.dirname(process.execPath)) +diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js +index 4f81015..b84e818 100644 +--- a/deps/npm/lib/npm.js ++++ b/deps/npm/lib/npm.js +@@ -332,7 +332,7 @@ + { + get: function () { + var b = npm.globalPrefix +- if (process.platform !== 'win32') b = path.resolve(b, 'bin') ++ b = path.resolve(b, 'bin') + return b + } + }) +@@ -349,9 +349,7 @@ + Object.defineProperty(npm, 'globalDir', + { + get: function () { +- return (process.platform !== 'win32') +- ? path.resolve(npm.globalPrefix, 'lib', 'node_modules') +- : path.resolve(npm.globalPrefix, 'node_modules') ++ return path.resolve(npm.globalPrefix, 'lib', 'node_modules') + }, + enumerable: true + }) +diff --git a/deps/npm/lib/unbuild.js b/deps/npm/lib/unbuild.js +index 9ba5972..1915a5f 100644 +--- a/deps/npm/lib/unbuild.js ++++ b/deps/npm/lib/unbuild.js +@@ -90,7 +90,6 @@ function rmBins (pkg, folder, parent, top, cb) { + function rmMans (pkg, folder, parent, top, cb) { + if (!pkg.man || + !top || +- process.platform === 'win32' || + !npm.config.get('global')) { + return cb() + } +-- +2.13.0 + diff --git a/mingw-w64-nodejs/PKGBUILD b/mingw-w64-nodejs/PKGBUILD index ab30228380..c190a5b4a4 100644 --- a/mingw-w64-nodejs/PKGBUILD +++ b/mingw-w64-nodejs/PKGBUILD @@ -7,7 +7,7 @@ _realname=nodejs pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=6.9.5 +pkgver=6.11.0 pkgrel=1 pkgdesc="Evented I/O for V8 javascript (mingw-w64)" arch=('any') @@ -36,6 +36,8 @@ source=("https://nodejs.org/dist/v${pkgver}/node-v${pkgver}.tar.xz" '0009-Remove-no_rand_screen-from-s_client-invocation.patch' '0010-Fix-incorrect-test-assumptions-for-MinGW.patch' '0011-detect-architecture.patch' + '0012-Use-shell-wrapper-script-for-npm-on-MSYS2-MinGW-w64.patch' + '0013-Revert-to-FHS-installation-paths-on-Windows-tests-no.patch' 'node') prepare() { @@ -52,6 +54,8 @@ prepare() { patch -Np1 -i "${srcdir}/0009-Remove-no_rand_screen-from-s_client-invocation.patch" patch -Np1 -i "${srcdir}/0010-Fix-incorrect-test-assumptions-for-MinGW.patch" patch -Np1 -i "${srcdir}/0011-detect-architecture.patch" + patch -Np1 -i "${srcdir}/0012-Use-shell-wrapper-script-for-npm-on-MSYS2-MinGW-w64.patch" + patch -Np1 -i "${srcdir}/0013-Revert-to-FHS-installation-paths-on-Windows-tests-no.patch" } build() { @@ -86,7 +90,6 @@ build() { --shared-http-parser \ --without-perfctr \ --without-etw \ - --without-npm \ "${extra_config[@]}" ${MINGW_PREFIX}/bin/python2 tools/gyp_node.py -f make @@ -119,16 +122,18 @@ package() { mv -v "${pkgdir}$MINGW_PREFIX/bin/node"{_exe,.exe} } -sha256sums=('d7fed1a354b29503f3e176d7fdb90b1a9de248e0ce9b3eb56cc26bb1f3d5b6b3' - '9053d5223932f82ddd34beea79cc2c9a48b81df11e7a3d353101772101e3faab' - '40d434001e222280bc047aca9e0fa55eaade0c0a917e70917bf4e50d0b4a619d' - '3d32d2723ca12edad1cb7b435e12855f0e1cdbbd885b7e64f2e92585778f4b02' - '2ed2b1a1ad4a4f042d844a89924ec7324deae7b5349b227108f515a2aea71b74' - '55644dc1483146dc25c643cf3586e78b134fd40a291667ac22a2fb5189c88e8e' - 'cd17d94ce2e514537e65a9e3c5efd312b07710e1c3eb0aa10a1b413bbf6796bd' - '5af48e40f94ba25781226e2400b8440c1bbdc69799464008b5ba3696c66ea95f' - 'd1bdfdc29bee0c3087105fabe34210d7a6418dcb5069d1f7892ab3e9ee85862b' - 'd38537c543b74893e999e0fed59afced97895bfe98806ce1f5eac747fdd62f4a' - 'b10eba7327bdd015e44a56326d771a8a36e70418c6c5c0d8e3181c13914659d6' - '16aade67dd24cd59f369dcaf42caf5a731dd1472df8b6e51998b0c5629060edf' +sha256sums=('02ba35391edea2b294c736489af01954ce6e6c39d318f4423ae6617c69ef0a51' + '4d152a51fb46fe46882516de0cdd695d3e007cf6df1f7797686c7d7c1b6f865b' + '4b87b4dec00eb8aabb600fa89348a575efc84738c571cbebfb0f723da6df8565' + '5f1c899191ca438b0244764718e0ca400a1ffa71a91d5e96388df095ff624f9d' + 'd471133db9061ca2a624de1a5465f7f9423f1a1afc54d65d43401a453eeabbc4' + '5046e30e513adf7024f515804b1bdbeafc980f2d7712c2737c68c042b15fab69' + 'da0fe9cba05d3f39f9521910b2a8c34f4762c5f2426c0086917c7768d686d52b' + '0032722b39795cb9e243afd1fe2f3d44bc517ec0e324f18fa47a100a68cf45a8' + '15032f4f7eb9c54e9e5d1b7792578e540a48794c88b56c297c19be10e5439161' + 'a72b581fd7ac676e31729e32d4789af186b4809ebc9947d2778655a54032f93f' + '816c25397e5b54dbccb12995c22f09716a3b00ebb236df51bcefcb59240aa922' + '998a1b688644d58ce8060ec84d00bd06b0b2bd2d088662ebd0fbfded3151e510' + 'b50f94667125a5bf1c3647252a737c34453750b5d4e0a31c42334f4460531795' + 'de0acd78eed5d1ff86387866b0d65ffd43ff201cbcb15499ff30380cbbc8eace' '284251ff443506cd61530a026afb421d0084e4ad25c037bcfe3a045246d729a2')