GNU bug report logs - #29449
[PATCH] gnu: node: Update to 8.9.1.

Previous Next

Package: guix-patches;

Reported by: Mike Gerwitz <mtg <at> gnu.org>

Date: Sun, 26 Nov 2017 01:47:02 UTC

Severity: normal

Tags: patch

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 29449 in the body.
You can then email your comments to 29449 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#29449; Package guix-patches. (Sun, 26 Nov 2017 01:47:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mike Gerwitz <mtg <at> gnu.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 26 Nov 2017 01:47:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mike Gerwitz <mtg <at> gnu.org>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: node: Update to 8.9.1.
Date: Sat, 25 Nov 2017 20:45:40 -0500
[Message part 1 (text/plain, inline)]
Let me know if there is a better way to accomplish removing the
`doc-only' invocation as part of the `check' target.  It invokes npm and
attempts to download `js-yaml', so I figured we may as well just skip it
altogether since it isn't otherwise used.

[0001-gnu-node-Update-to-8.9.1.patch (text/x-diff, inline)]
From 918303981e0dd3212f1e0c1f1f87fc8ca608cc5e Mon Sep 17 00:00:00 2001
From: Mike Gerwitz <mtg <at> gnu.org>
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.
[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/node.scm | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm
index e354130ad..4e2990ca3 100644
--- a/gnu/packages/node.scm
+++ b/gnu/packages/node.scm
@@ -40,14 +40,14 @@
 (define-public node
   (package
     (name "node")
-    (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
-                "1a0ginagx3pav6v7adyp76jisia4qgbsq6pz3als4kshwlk4a667"))))
+                "1qbiz7hgwlirhwpd71c8yzcbwsyi5bjlfp6lxb6v55j6rizinj9j"))))
     (build-system gnu-build-system)
     (arguments
      ;; TODO: Purge the bundled copies from the source.
@@ -76,6 +76,10 @@
                (("'/usr/bin/env'")
                 (string-append "'" (which "env") "'")))
 
+
+             ;; test-make-doc needs doc-only target, which is inhibited below
+             (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 +92,12 @@
                          "test/parallel/test-util-inspect.js"
                          "test/parallel/test-v8-serdes.js"
                          "test/parallel/test-dgram-membership.js"
-                         "test/parallel/test-dgram-multicast-set-interface-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 +119,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")
-- 
2.15.0

[signature.asc (application/pgp-signature, inline)]
[Message part 4 (text/plain, inline)]
-- 
Mike Gerwitz
Free Software Hacker+Activist | GNU Maintainer & Volunteer
GPG: D6E9 B930 028A 6C38 F43B  2388 FEF6 3574 5E6F 6D05
https://mikegerwitz.com
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#29449; Package guix-patches. (Sun, 26 Nov 2017 17:42:01 GMT) Full text and rfc822 format available.

Message #8 received at 29449 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Mike Gerwitz <mtg <at> gnu.org>
Cc: 29449 <at> debbugs.gnu.org
Subject: Re: [bug#29449] [PATCH] gnu: node: Update to 8.9.1.
Date: Sun, 26 Nov 2017 18:41:47 +0100
Hello Mike,

Mike Gerwitz <mtg <at> gnu.org> skribis:

> Let me know if there is a better way to accomplish removing the
> `doc-only' invocation as part of the `check' target.  It invokes npm and
> attempts to download `js-yaml', so I figured we may as well just skip it
> altogether since it isn't otherwise used.

What you did LGTM.

> From 918303981e0dd3212f1e0c1f1f87fc8ca608cc5e Mon Sep 17 00:00:00 2001
> From: Mike Gerwitz <mtg <at> gnu.org>
> 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.
> [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.

The ‘check’ phase fails for me (on x86_64):

--8<---------------cut here---------------start------------->8---
[----------] 10 tests from InspectorSocketServerTest (88 ms total)

[----------] Global test environment tear-down
[==========] 62 tests from 7 test cases ran. (3863 ms total)
[  PASSED  ] 62 tests.
/gnu/store/zlbbayv8rv6z7gnhz435gjq8pzjm06v6-python-2.7.13/bin/python tools/test.py --mode=release -J \
        async-hooks \
        default \
        addons addons-napi \
        doctool \
        known_issues
=== release test-http2-server-rst-stream ===
Path: parallel/test-http2-server-rst-stream
(node:12213) ExperimentalWarning: The http2 module is an experimental API.
assert.js:42
  throw new errors.AssertionError({
  ^

AssertionError [ERR_ASSERTION]: rstWithCancel is not match rstCode
    at ClientHttp2Stream.req.on.common.mustCall (/tmp/guix-build-node-8.9.1.drv-0/node-v8.9.1/test/parallel/test-http2-server-rst-stream.js:55:14)
    at ClientHttp2Stream.<anonymous> (/tmp/guix-build-node-8.9.1.drv-0/node-v8.9.1/test/common/index.js:533:15)
    at emitOne (events.js:121:20)
    at ClientHttp2Stream.emit (events.js:211:7)
    at emit (internal/http2/core.js:140:8)
    at _combinedTickCallback (internal/process/next_tick.js:141:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
Command: out/Release/node /tmp/guix-build-node-8.9.1.drv-0/node-v8.9.1/test/parallel/test-http2-server-rst-stream.js
[10:05|% 100|+ 2010|-   1]: Done                                               
make: *** [Makefile:218: test] Error 1
phase `check' failed after 667.7 seconds
--8<---------------cut here---------------end--------------->8---


Any ideas?  Could it be a non-deterministic issue?

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#29449; Package guix-patches. (Sun, 26 Nov 2017 19:12:02 GMT) Full text and rfc822 format available.

Message #11 received at 29449 <at> debbugs.gnu.org (full text, mbox):

From: Mike Gerwitz <mtg <at> gnu.org>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 29449 <at> debbugs.gnu.org
Subject: Re: [bug#29449] [PATCH] gnu: node: Update to 8.9.1.
Date: Sun, 26 Nov 2017 14:10:53 -0500
[Message part 1 (text/plain, inline)]
On Sun, Nov 26, 2017 at 18:41:47 +0100, Ludovic Courtès wrote:
> The ‘check’ phase fails for me (on x86_64):
[...]
> Any ideas?  Could it be a non-deterministic issue?

I'm inclined to think so...I just re-ran that test in one of the build
environments I still had in /tmp and it failed with the same error...!

I feel like this is a question that might have an easy answer, but: how
do I force Guix to re-build the package?  I've tried `./pre-inst-env
guix build --check' and `--rounds=2' and such but it keeps returning the
current derivation without doing any actual work.

-- 
Mike Gerwitz
Free Software Hacker+Activist | GNU Maintainer & Volunteer
GPG: D6E9 B930 028A 6C38 F43B  2388 FEF6 3574 5E6F 6D05
https://mikegerwitz.com
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#29449; Package guix-patches. (Sun, 26 Nov 2017 19:25:02 GMT) Full text and rfc822 format available.

Message #14 received at 29449 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Mike Gerwitz <mtg <at> gnu.org>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 29449 <at> debbugs.gnu.org
Subject: Re: [bug#29449] [PATCH] gnu: node: Update to 8.9.1.
Date: Sun, 26 Nov 2017 14:24:05 -0500
[Message part 1 (text/plain, inline)]
On Sun, Nov 26, 2017 at 02:10:53PM -0500, Mike Gerwitz wrote:
> On Sun, Nov 26, 2017 at 18:41:47 +0100, Ludovic Courtès wrote:
> > The ‘check’ phase fails for me (on x86_64):
> [...]
> > Any ideas?  Could it be a non-deterministic issue?
> 
> I'm inclined to think so...I just re-ran that test in one of the build
> environments I still had in /tmp and it failed with the same error...!
> 
> I feel like this is a question that might have an easy answer, but: how
> do I force Guix to re-build the package?  I've tried `./pre-inst-env
> guix build --check' and `--rounds=2' and such but it keeps returning the
> current derivation without doing any actual work.

--check and --rounds are a bit confusing when the package in question is
grafted.

Basically, grafting is treated as its own derivation, so doing
`./pre-inst-env guix build --check node` just re-does the grafting
derivation, instead of rebuilding node.

Currently every package is grafted because we used a graft to fix a bug
in glibc.

So, try `./pre-inst-env guix build --no-grafts --check node`.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#29449; Package guix-patches. (Sun, 26 Nov 2017 21:56:01 GMT) Full text and rfc822 format available.

Message #17 received at 29449 <at> debbugs.gnu.org (full text, mbox):

From: Jelle Licht <jlicht <at> fsfe.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Mike Gerwitz <mtg <at> gnu.org>, 29449 <at> debbugs.gnu.org
Subject: Re: [bug#29449] [PATCH] gnu: node: Update to 8.9.1.
Date: Sun, 26 Nov 2017 22:55:26 +0100
Ludovic Courtès <ludo <at> gnu.org> writes:

> Hello Mike,
>
> Mike Gerwitz <mtg <at> gnu.org> skribis:
>
>> Let me know if there is a better way to accomplish removing the
>> `doc-only' invocation as part of the `check' target.  It invokes npm and
>> attempts to download `js-yaml', so I figured we may as well just skip it
>> altogether since it isn't otherwise used.
>
> What you did LGTM.
>
>> From 918303981e0dd3212f1e0c1f1f87fc8ca608cc5e Mon Sep 17 00:00:00 2001
>> From: Mike Gerwitz <mtg <at> gnu.org>
>> 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.
>> [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.
>
> The ‘check’ phase fails for me (on x86_64):
>
> --8<---------------cut here---------------start------------->8---
> [----------] 10 tests from InspectorSocketServerTest (88 ms total)
>
> [----------] Global test environment tear-down
> [==========] 62 tests from 7 test cases ran. (3863 ms total)
> [  PASSED  ] 62 tests.
> /gnu/store/zlbbayv8rv6z7gnhz435gjq8pzjm06v6-python-2.7.13/bin/python tools/test.py --mode=release -J \
>         async-hooks \
>         default \
>         addons addons-napi \
>         doctool \
>         known_issues
> === release test-http2-server-rst-stream ===
> Path: parallel/test-http2-server-rst-stream
> (node:12213) ExperimentalWarning: The http2 module is an experimental API.
> assert.js:42
>   throw new errors.AssertionError({
>   ^
>
> AssertionError [ERR_ASSERTION]: rstWithCancel is not match rstCode
>     at ClientHttp2Stream.req.on.common.mustCall (/tmp/guix-build-node-8.9.1.drv-0/node-v8.9.1/test/parallel/test-http2-server-rst-stream.js:55:14)
>     at ClientHttp2Stream.<anonymous> (/tmp/guix-build-node-8.9.1.drv-0/node-v8.9.1/test/common/index.js:533:15)
>     at emitOne (events.js:121:20)
>     at ClientHttp2Stream.emit (events.js:211:7)
>     at emit (internal/http2/core.js:140:8)
>     at _combinedTickCallback (internal/process/next_tick.js:141:11)
>     at process._tickCallback (internal/process/next_tick.js:180:9)
> Command: out/Release/node /tmp/guix-build-node-8.9.1.drv-0/node-v8.9.1/test/parallel/test-http2-server-rst-stream.js
> [10:05|% 100|+ 2010|-   1]: Done
> make: *** [Makefile:218: test] Error 1
> phase `check' failed after 667.7 seconds
> --8<---------------cut here---------------end--------------->8---
>
>
> Any ideas?  Could it be a non-deterministic issue?
>
> Thanks,
> Ludo’.

I get a similar issue to Ludo:

--8<---------------cut here---------------start------------->8---
Path: parallel/test-http2-server-rst-stream
(node:13036) ExperimentalWarning: The http2 module is an experimental API.
assert.js:42
  throw new errors.AssertionError({
  ^

AssertionError [ERR_ASSERTION]: rstWithProtocolError is not match rstCode
    at ClientHttp2Stream.req.on.common.mustCall (/tmp/guix-build-node-8.9.1.drv-0/node-v8.9.1/test/parallel/test-http2-server-rst-stream.js:55:14)
    at ClientHttp2Stream.<anonymous> (/tmp/guix-build-node-8.9.1.drv-0/node-v8.9.1/test/common/index.js:533:15)
    at emitOne (events.js:121:20)
    at ClientHttp2Stream.emit (events.js:211:7)
    at emit (internal/http2/core.js:140:8)
    at _combinedTickCallback (internal/process/next_tick.js:141:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
Command: out/Release/node /tmp/guix-build-node-8.9.1.drv-0/node-v8.9.1/test/parallel/test-http2-server-rst-stream.js
--8<---------------cut here---------------end--------------->8---

I also found a GitHub issue[0], stating that several other people have
similar problems with this specific test. It also seems that commit
a41cc020fd in the node git repo addresses this flaky test. We could
either backport the fix until it is included in a node release proper,
or disable the test for now.

- Jelle

[0]: https://github.com/nodejs/node/issues/16688




Information forwarded to guix-patches <at> gnu.org:
bug#29449; Package guix-patches. (Mon, 27 Nov 2017 05:09:01 GMT) Full text and rfc822 format available.

Message #20 received at 29449 <at> debbugs.gnu.org (full text, mbox):

From: Mike Gerwitz <mtg <at> gnu.org>
To: Leo Famulari <leo <at> famulari.name>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 29449 <at> debbugs.gnu.org
Subject: Re: [bug#29449] [PATCH] gnu: node: Update to 8.9.1.
Date: Sun, 26 Nov 2017 23:54:26 -0500
[Message part 1 (text/plain, inline)]
On Sun, Nov 26, 2017 at 14:24:05 -0500, Leo Famulari wrote:
> --check and --rounds are a bit confusing when the package in question is
> grafted.
>
> Basically, grafting is treated as its own derivation, so doing
> `./pre-inst-env guix build --check node` just re-does the grafting
> derivation, instead of rebuilding node.
>
> Currently every package is grafted because we used a graft to fix a bug
> in glibc.
>
> So, try `./pre-inst-env guix build --no-grafts --check node`.

Ah, that makes sense, thank you for the clarification.  I did start
--no-grafts, but that applied to dependencies as well it seemed, so I
stopped it.  I'll let that run tonight (node takes a while to build on
the X200) and report back / provide an updated patch tomorrow.

-- 
Mike Gerwitz
Free Software Hacker+Activist | GNU Maintainer & Volunteer
GPG: D6E9 B930 028A 6C38 F43B  2388 FEF6 3574 5E6F 6D05
https://mikegerwitz.com
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#29449; Package guix-patches. (Mon, 27 Nov 2017 05:09:02 GMT) Full text and rfc822 format available.

Message #23 received at 29449 <at> debbugs.gnu.org (full text, mbox):

From: Mike Gerwitz <mtg <at> gnu.org>
To: Jelle Licht <jlicht <at> fsfe.org>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 29449 <at> debbugs.gnu.org
Subject: Re: [bug#29449] [PATCH] gnu: node: Update to 8.9.1.
Date: Sun, 26 Nov 2017 23:57:06 -0500
[Message part 1 (text/plain, inline)]
On Sun, Nov 26, 2017 at 22:55:26 +0100, Jelle Licht wrote:
> I also found a GitHub issue[0], stating that several other people have
> similar problems with this specific test. It also seems that commit
> a41cc020fd in the node git repo addresses this flaky test. We could
> either backport the fix until it is included in a node release proper,
> or disable the test for now.
>
> - Jelle
>
> [0]: https://github.com/nodejs/node/issues/16688

Thanks for doing the research.  I'll do whatever everyone thinks is
best.

-- 
Mike Gerwitz
Free Software Hacker+Activist | GNU Maintainer & Volunteer
GPG: D6E9 B930 028A 6C38 F43B  2388 FEF6 3574 5E6F 6D05
https://mikegerwitz.com
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#29449; Package guix-patches. (Mon, 27 Nov 2017 08:45:01 GMT) Full text and rfc822 format available.

Message #26 received at 29449 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Mike Gerwitz <mtg <at> gnu.org>
Cc: Jelle Licht <jlicht <at> fsfe.org>, 29449 <at> debbugs.gnu.org
Subject: Re: [bug#29449] [PATCH] gnu: node: Update to 8.9.1.
Date: Mon, 27 Nov 2017 09:44:29 +0100
Mike Gerwitz <mtg <at> gnu.org> skribis:

> On Sun, Nov 26, 2017 at 22:55:26 +0100, Jelle Licht wrote:
>> I also found a GitHub issue[0], stating that several other people have
>> similar problems with this specific test. It also seems that commit
>> a41cc020fd in the node git repo addresses this flaky test. We could
>> either backport the fix until it is included in a node release proper,
>> or disable the test for now.
>>
>> - Jelle
>>
>> [0]: https://github.com/nodejs/node/issues/16688
>
> Thanks for doing the research.  I'll do whatever everyone thinks is
> best.

Unless the fix of that test is big, I’d be in favor of including the
patch for that test in our repo.

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#29449; Package guix-patches. (Tue, 28 Nov 2017 02:31:01 GMT) Full text and rfc822 format available.

Message #29 received at 29449 <at> debbugs.gnu.org (full text, mbox):

From: Mike Gerwitz <mtg <at> gnu.org>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: Jelle Licht <jlicht <at> fsfe.org>, 29449 <at> debbugs.gnu.org
Subject: Re: [bug#29449] [PATCH] gnu: node: Update to 8.9.1.
Date: Mon, 27 Nov 2017 21:29:04 -0500
[Message part 1 (text/plain, inline)]
On Mon, Nov 27, 2017 at 09:44:29 +0100, Ludovic Courtès wrote:
> Mike Gerwitz <mtg <at> gnu.org> skribis:
>> Thanks for doing the research.  I'll do whatever everyone thinks is
>> best.
>
> Unless the fix of that test is big, I’d 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.

[0001-gnu-node-Update-to-8.9.1.patch (text/x-diff, inline)]
From a07f3f92a0768661dbcb2a4b87fe08dd04149190 Mon Sep 17 00:00:00 2001
From: Mike Gerwitz <mtg <at> gnu.org>
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.
---
 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
--- a/gnu/packages/node.scm
+++ b/gnu/packages/node.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2015 Andreas Enge <andreas <at> enge.fr>
 ;;; Copyright © 2015, 2016 David Thompson <davet <at> gnu.org>
 ;;; Copyright © 2016 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2017 Mike Gerwitz <mtg <at> gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -40,14 +41,18 @@
 (define-public node
   (package
     (name "node")
-    (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
-                "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") "'")))
 
+
+             ;; test-make-doc needs doc-only target, which is inhibited below
+             (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"
-                         "test/parallel/test-dgram-multicast-set-interface-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
--- /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 <apapirovski <at> mac.com>
+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 <jasnell <at> gmail.com>
+Reviewed-By: Matteo Collina <matteo.collina <at> gmail.com>
+---
+ 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 = require('assert');
+ const http2 = require('http2');
++const Countdown = require('../common/countdown');
+ 
+ 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
+ } = http2.constants;
+ 
+-const errCheck = common.expectsError({ code: 'ERR_HTTP2_STREAM_ERROR' }, 6);
++const tests = [
++  ['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 = http2.createServer();
++server.on('stream', (stream, headers) => {
++  const method = headers['rstmethod'];
++  stream[method]();
++});
++
++server.listen(0, common.mustCall(() => {
++  const client = http2.connect(`http://localhost:${server.address().port}`);
++
++  const countdown = new Countdown(tests.length, common.mustCall(() => {
++    client.destroy();
++    server.close();
++  }));
+ 
+-function checkRstCode(rstMethod, expectRstCode) {
+-  const server = http2.createServer();
+-  server.on('stream', (stream, headers, flags) => {
+-    stream.respond({
+-      'content-type': 'text/html',
+-      ':status': 200
++  tests.forEach((test) => {
++    const req = client.request({
++      ':method': 'POST',
++      rstmethod: test[0]
+     });
+-    stream.write('test');
+-    if (rstMethod === 'rstStream')
+-      stream[rstMethod](expectRstCode);
+-    else
+-      stream[rstMethod]();
+-
+-    if (expectRstCode !== NGHTTP2_NO_ERROR &&
+-        expectRstCode !== NGHTTP2_CANCEL) {
+-      stream.on('error', common.mustCall(errCheck));
+-    } else {
+-      stream.on('error', common.mustNotCall());
+-    }
+-  });
+-
+-  server.listen(0, common.mustCall(() => {
+-    const port = server.address().port;
+-    const client = http2.connect(`http://localhost:${port}`);
+-
+-    const headers = {
+-      [HTTP2_HEADER_PATH]: '/',
+-      [HTTP2_HEADER_METHOD]: HTTP2_METHOD_POST
+-    };
+-    const req = client.request(headers);
+-
+-    req.setEncoding('utf8');
+-    req.on('streamClosed', common.mustCall((actualRstCode) => {
+-      assert.strictEqual(
+-        expectRstCode, actualRstCode, `${rstMethod} is not match rstCode`);
+-      server.close();
+-      client.destroy();
++    req.on('streamClosed', common.mustCall((code) => {
++      assert.strictEqual(code, test[1]);
++      countdown.dec();
+     }));
+-    req.on('data', common.mustCall());
+     req.on('aborted', common.mustCall());
+-    req.on('end', common.mustCall());
+-
+-    if (expectRstCode !== NGHTTP2_NO_ERROR &&
+-        expectRstCode !== 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);
++  });
++}));
+-- 
+2.15.0
+
-- 
2.15.0

[Message part 3 (text/plain, inline)]
-- 
Mike Gerwitz
Free Software Hacker+Activist | GNU Maintainer & Volunteer
GPG: D6E9 B930 028A 6C38 F43B  2388 FEF6 3574 5E6F 6D05
https://mikegerwitz.com
[signature.asc (application/pgp-signature, inline)]

Reply sent to ludo <at> gnu.org (Ludovic Courtès):
You have taken responsibility. (Tue, 28 Nov 2017 09:06:02 GMT) Full text and rfc822 format available.

Notification sent to Mike Gerwitz <mtg <at> gnu.org>:
bug acknowledged by developer. (Tue, 28 Nov 2017 09:06:02 GMT) Full text and rfc822 format available.

Message #34 received at 29449-done <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Mike Gerwitz <mtg <at> gnu.org>
Cc: Jelle Licht <jlicht <at> fsfe.org>, 29449-done <at> debbugs.gnu.org
Subject: Re: [bug#29449] [PATCH] gnu: node: Update to 8.9.1.
Date: Tue, 28 Nov 2017 10:05:16 +0100
Mike Gerwitz <mtg <at> gnu.org> skribis:

> From a07f3f92a0768661dbcb2a4b87fe08dd04149190 Mon Sep 17 00:00:00 2001
> From: Mike Gerwitz <mtg <at> gnu.org>
> 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.

Perfect.  Applied, thanks!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#29449; Package guix-patches. (Tue, 28 Nov 2017 18:29:01 GMT) Full text and rfc822 format available.

Message #37 received at 29449 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: 29449 <at> debbugs.gnu.org, ludo <at> gnu.org, mtg <at> gnu.org
Subject: Re: bug#29449: [PATCH] gnu: node: Update to 8.9.1.
Date: Tue, 28 Nov 2017 13:28:25 -0500
[Message part 1 (text/plain, inline)]
On Tue, Nov 28, 2017 at 10:05:16AM +0100, Ludovic Courtès wrote:
> Mike Gerwitz <mtg <at> gnu.org> skribis:
> 
> > From a07f3f92a0768661dbcb2a4b87fe08dd04149190 Mon Sep 17 00:00:00 2001
> > From: Mike Gerwitz <mtg <at> gnu.org>
> > 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.
> 
> Perfect.  Applied, thanks!

Don't we need to add 'node-test-http2-server-rst-stream.patch' to
'gnu/local.mk'?
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#29449; Package guix-patches. (Tue, 28 Nov 2017 22:47:02 GMT) Full text and rfc822 format available.

Message #40 received at 29449 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Leo Famulari <leo <at> famulari.name>
Cc: mtg <at> gnu.org, 29449 <at> debbugs.gnu.org
Subject: Re: bug#29449: [PATCH] gnu: node: Update to 8.9.1.
Date: Tue, 28 Nov 2017 23:46:30 +0100
Leo Famulari <leo <at> famulari.name> skribis:

> On Tue, Nov 28, 2017 at 10:05:16AM +0100, Ludovic Courtès wrote:
>> Mike Gerwitz <mtg <at> gnu.org> skribis:
>> 
>> > From a07f3f92a0768661dbcb2a4b87fe08dd04149190 Mon Sep 17 00:00:00 2001
>> > From: Mike Gerwitz <mtg <at> gnu.org>
>> > 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.
>> 
>> Perfect.  Applied, thanks!
>
> Don't we need to add 'node-test-http2-server-rst-stream.patch' to
> 'gnu/local.mk'?

Indeed, I’ve added it now.  Thanks for the heads-up!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 27 Dec 2017 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 177 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.