From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJVfs-0005pA-08 for guix-patches@gnu.org; Mon, 27 Nov 2017 21:31:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eJVfq-0001Ju-At for guix-patches@gnu.org; Mon, 27 Nov 2017 21:31:04 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:52828) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eJVfq-0001Jq-6M for guix-patches@gnu.org; Mon, 27 Nov 2017 21:31:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eJVfq-00021r-04 for guix-patches@gnu.org; Mon, 27 Nov 2017 21:31:02 -0500 Subject: [bug#29449] [PATCH] gnu: node: Update to 8.9.1. Resent-Message-ID: From: Mike Gerwitz In-Reply-To: <87wp2cnmaa.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Mon, 27 Nov 2017 09:44:29 +0100") Date: Mon, 27 Nov 2017 21:29:04 -0500 Message-ID: <87k1yb9lvz.fsf@gnu.org> References: <877eudg6d7.fsf@gnu.org> <87zi79ueck.fsf@gnu.org> <87d144vh69.fsf@fsfe.org> <87r2skb9p9.fsf@gnu.org> <87wp2cnmaa.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 29449@debbugs.gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon, Nov 27, 2017 at 09:44:29 +0100, Ludovic Court=C3=A8s wrote: > Mike Gerwitz skribis: >> Thanks for doing the research. I'll do whatever everyone thinks is >> best. > > Unless the fix of that test is big, I=E2=80=99d be in favor of including = the > patch for that test in our repo. I was able to reproduce the failure when rebuilding. Updated patch attached. --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-node-Update-to-8.9.1.patch Content-Transfer-Encoding: quoted-printable From=20a07f3f92a0768661dbcb2a4b87fe08dd04149190 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Sat, 25 Nov 2017 20:34:12 -0500 Subject: [PATCH] gnu: node: Update to 8.9.1. * gnu/packages/node.scm (node): Update to 8.9.1. [source]: Apply 'node-test-http2-server-rst-stream.patch'. [arguments]: Skip 'doc-only' target in 'check', which attempts to use npm to retrieve 'js-yaml' package. Remove test/doctool/test-make-doc.js. Do not remove now-missing test case. Remove new test case that fails in containers due to networking. * gnu/packages/patches/node-test-http2-server-rst-stream.patch: New file. =2D-- gnu/packages/node.scm | 23 +++- .../node-test-http2-server-rst-stream.patch | 131 +++++++++++++++++= ++++ 2 files changed, 151 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/node-test-http2-server-rst-stream.= patch diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index e354130ad..fade8b23d 100644 =2D-- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm @@ -3,6 +3,7 @@ ;;; Copyright =C2=A9 2015 Andreas Enge ;;; Copyright =C2=A9 2015, 2016 David Thompson ;;; Copyright =C2=A9 2016 Ludovic Court=C3=A8s +;;; Copyright =C2=A9 2017 Mike Gerwitz ;;; ;;; This file is part of GNU Guix. ;;; @@ -40,14 +41,18 @@ (define-public node (package (name "node") =2D (version "8.7.0") + (version "8.9.1") (source (origin (method url-fetch) (uri (string-append "http://nodejs.org/dist/v" version "/node-v" version ".tar.gz")) (sha256 (base32 =2D "1a0ginagx3pav6v7adyp76jisia4qgbsq6pz3als4kshwlk4a667"))= )) + "1qbiz7hgwlirhwpd71c8yzcbwsyi5bjlfp6lxb6v55j6rizinj9j")) + ;; See https://github.com/nodejs/node/issues/16688 + ;; Remove this next update (>8.9.1). + (patches + (search-patches "node-test-http2-server-rst-stream.patch")= ))) (build-system gnu-build-system) (arguments ;; TODO: Purge the bundled copies from the source. @@ -76,6 +81,10 @@ (("'/usr/bin/env'") (string-append "'" (which "env") "'"))) =20 + + ;; test-make-doc needs doc-only target, which is inhibited be= low + (for-each delete-file + '("test/doctool/test-make-doc.js")) ;; FIXME: This test seems to depends on files that are not ;; available in the bundled v8. See ;; https://github.com/nodejs/node/issues/13344 @@ -88,12 +97,12 @@ "test/parallel/test-util-inspect.js" "test/parallel/test-v8-serdes.js" "test/parallel/test-dgram-membership.js" =2D "test/parallel/test-dgram-multicast-set-interfa= ce-lo.js" "test/parallel/test-dns-cancel-reverse-lookup.js" "test/parallel/test-dns-resolveany.js" "test/parallel/test-cluster-master-error.js" "test/parallel/test-cluster-master-kill.js" "test/parallel/test-npm-install.js" + "test/parallel/test-regress-GH-746.js" "test/sequential/test-child-process-emfile.js" "test/sequential/test-benchmark-child-process.js" "test/sequential/test-http-regr-gh-2928.js")) @@ -115,6 +124,14 @@ (string-append (assoc-ref inputs "python") "/bin/python") "configure" flags))))) + (add-before 'check 'skip-check-doc-only + (lambda _ + (substitute* "Makefile" + ;; requires js-yaml, which is not part of the distribution, + ;; and falls back to using npm to download it + (("\\$\\(MAKE\\) doc-only" all) + (string-append "#" all))) + #t)) (add-after 'patch-shebangs 'patch-npm-shebang (lambda* (#:key outputs #:allow-other-keys) (let* ((bindir (string-append (assoc-ref outputs "out") diff --git a/gnu/packages/patches/node-test-http2-server-rst-stream.patch b= /gnu/packages/patches/node-test-http2-server-rst-stream.patch new file mode 100644 index 000000000..c2f85010b =2D-- /dev/null +++ b/gnu/packages/patches/node-test-http2-server-rst-stream.patch @@ -0,0 +1,131 @@ +From a41cc020fd6e40b358103425edfa50e6a10fc973 Mon Sep 17 00:00:00 2001 +From: Anatoli Papirovski +Date: Thu, 2 Nov 2017 12:46:31 -0400 +Subject: [PATCH] test: fix flaky test-http2-server-rst-stream.js + +PR-URL: https://github.com/nodejs/node/pull/16690 +Fixes: https://github.com/nodejs/node/issues/16688 +Reviewed-By: James M Snell +Reviewed-By: Matteo Collina +--- + test/parallel/test-http2-server-rst-stream.js | 93 ++++++++++------------= ----- + 1 file changed, 35 insertions(+), 58 deletions(-) + +diff --git a/test/parallel/test-http2-server-rst-stream.js b/test/parallel= /test-http2-server-rst-stream.js +index b92217dc99..dd38efb42f 100644 +--- a/test/parallel/test-http2-server-rst-stream.js ++++ b/test/parallel/test-http2-server-rst-stream.js +@@ -5,11 +5,9 @@ if (!common.hasCrypto) + common.skip('missing crypto'); + const assert =3D require('assert'); + const http2 =3D require('http2'); ++const Countdown =3D require('../common/countdown'); +=20 + const { +- HTTP2_HEADER_METHOD, +- HTTP2_HEADER_PATH, +- HTTP2_METHOD_POST, + NGHTTP2_CANCEL, + NGHTTP2_NO_ERROR, + NGHTTP2_PROTOCOL_ERROR, +@@ -17,63 +15,42 @@ const { + NGHTTP2_INTERNAL_ERROR + } =3D http2.constants; +=20 +-const errCheck =3D common.expectsError({ code: 'ERR_HTTP2_STREAM_ERROR' }= , 6); ++const tests =3D [ ++ ['rstStream', NGHTTP2_NO_ERROR, false], ++ ['rstWithNoError', NGHTTP2_NO_ERROR, false], ++ ['rstWithProtocolError', NGHTTP2_PROTOCOL_ERROR, true], ++ ['rstWithCancel', NGHTTP2_CANCEL, false], ++ ['rstWithRefuse', NGHTTP2_REFUSED_STREAM, true], ++ ['rstWithInternalError', NGHTTP2_INTERNAL_ERROR, true] ++]; ++ ++const server =3D http2.createServer(); ++server.on('stream', (stream, headers) =3D> { ++ const method =3D headers['rstmethod']; ++ stream[method](); ++}); ++ ++server.listen(0, common.mustCall(() =3D> { ++ const client =3D http2.connect(`http://localhost:${server.address().por= t}`); ++ ++ const countdown =3D new Countdown(tests.length, common.mustCall(() =3D>= { ++ client.destroy(); ++ server.close(); ++ })); +=20 +-function checkRstCode(rstMethod, expectRstCode) { +- const server =3D http2.createServer(); +- server.on('stream', (stream, headers, flags) =3D> { +- stream.respond({ +- 'content-type': 'text/html', +- ':status': 200 ++ tests.forEach((test) =3D> { ++ const req =3D client.request({ ++ ':method': 'POST', ++ rstmethod: test[0] + }); +- stream.write('test'); +- if (rstMethod =3D=3D=3D 'rstStream') +- stream[rstMethod](expectRstCode); +- else +- stream[rstMethod](); +- +- if (expectRstCode !=3D=3D NGHTTP2_NO_ERROR && +- expectRstCode !=3D=3D NGHTTP2_CANCEL) { +- stream.on('error', common.mustCall(errCheck)); +- } else { +- stream.on('error', common.mustNotCall()); +- } +- }); +- +- server.listen(0, common.mustCall(() =3D> { +- const port =3D server.address().port; +- const client =3D http2.connect(`http://localhost:${port}`); +- +- const headers =3D { +- [HTTP2_HEADER_PATH]: '/', +- [HTTP2_HEADER_METHOD]: HTTP2_METHOD_POST +- }; +- const req =3D client.request(headers); +- +- req.setEncoding('utf8'); +- req.on('streamClosed', common.mustCall((actualRstCode) =3D> { +- assert.strictEqual( +- expectRstCode, actualRstCode, `${rstMethod} is not match rstCode`= ); +- server.close(); +- client.destroy(); ++ req.on('streamClosed', common.mustCall((code) =3D> { ++ assert.strictEqual(code, test[1]); ++ countdown.dec(); + })); +- req.on('data', common.mustCall()); + req.on('aborted', common.mustCall()); +- req.on('end', common.mustCall()); +- +- if (expectRstCode !=3D=3D NGHTTP2_NO_ERROR && +- expectRstCode !=3D=3D NGHTTP2_CANCEL) { +- req.on('error', common.mustCall(errCheck)); +- } else { ++ if (test[2]) ++ req.on('error', common.mustCall()); ++ else + req.on('error', common.mustNotCall()); +- } +- +- })); +-} +- +-checkRstCode('rstStream', NGHTTP2_NO_ERROR); +-checkRstCode('rstWithNoError', NGHTTP2_NO_ERROR); +-checkRstCode('rstWithProtocolError', NGHTTP2_PROTOCOL_ERROR); +-checkRstCode('rstWithCancel', NGHTTP2_CANCEL); +-checkRstCode('rstWithRefuse', NGHTTP2_REFUSED_STREAM); +-checkRstCode('rstWithInternalError', NGHTTP2_INTERNAL_ERROR); ++ }); ++})); +--=20 +2.15.0 + =2D-=20 2.15.0 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable =2D-=20 Mike Gerwitz Free Software Hacker+Activist | GNU Maintainer & Volunteer GPG: D6E9 B930 028A 6C38 F43B 2388 FEF6 3574 5E6F 6D05 https://mikegerwitz.com --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCgAGBQJaHMnwAAoJEIyRe39dxRuiAiEQAIgwT6HiAEb7rZGjU76tQb10 vvEljCAhUmjgSz/qWdnVAIzCa6mmo0kob962uadFcnbCvpxF0xhIMf4BjVmtz7p4 IQA6rx/BwM89sf48441eVW12LeDyKyrgY+wj2zzrwVgb+/m9C0hH9caY6+8/PNWP wF6PbnWCrZSbMBD7DGomqHNwK1C2DeeOyInhBHP+zgbdaXkBu8KXTdzTZ6MdEDyL 8b/sKkDUKsZVhBKCs5gdZBCX2XOK6Y1s/OL/YahaD/EVYlsvTrwJtdU1gPvAczjr 23wI58599wKbx/rjADOXH6STAL0bUsESijG3WyY9ovlA2GfEoI+r4uyNtvmTWtYk nNDhcm4iv7uOwnGoie01su86mIQBuHpUibmgxvcRAXwKPP+L6bnsoTF3mVGWyuZg K9Kv7DzbIJMCtxNi+ErRi9ry9PcDLHt80wR/7mXPxYpNnom9/nBcf4qvNrmEXTbw Z2OAR4JARcQ5+iwfNjY0Ho4VwTGFqPX3wwa36rdh+2p5d5LpBGdbUoAzR1Kv+ias CEtSBt4+idCd2ZCFMVEB4KZHQgMrNA0Q/OQX8zlaVqiZiqn+co9aQfSed/J/CVKI BiC6nnJgLTZw4qNNct/bSymSGPe4Xr7zr8q7H0/nGoLGCAEBgU4AsEQcUmvgAyEm opgtl3EyxSclfq93cWJc =6iJH -----END PGP SIGNATURE----- --==-=-=--