guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#59188] [PATCH v2 3/4] gnu: node-lts: Update to 18.12.1.


From: Mekeor Melire
Subject: [bug#59188] [PATCH v2 3/4] gnu: node-lts: Update to 18.12.1.
Date: Wed, 16 Nov 2022 23:31:24 +0000

2022-11-11 / 14:23 / hako@ultrarare.space:

> * gnu/packages/node.scm (node-lts): Update to 18.12.1.
> [snippet]: Keep file deps/openssl/nodejs-openssl.cnf.
> [arguments]<#:phases>: Adjust problematic tests to delete accordingly.
> Patch additional file with hardcoded references to /bin/sh.
> [native-inputs,inputs]: Replace openssl-1.1 with openssl.

Thank you for this submission.

As I said in the other thread, I'd suggest to decline the 53414 (which
updates node to version 16.x) in favor of this patch-series (which
updates to 18.x). That is because it'll save us work since there'll only
be a single package-breaking upgrade (instead of two).

For this submission to be merged, I'd guess we should:

1. Check if we want to adapt some patches from Debian, listed here:
   https://sources.debian.org/patches/nodejs/18.12.1+dfsg-2/
   E.g. the "dfsg/privacy_breach.patch" looks good.

2. Make sure that packages, which depend on node, still build (and run)
   fine. I'm not sure how to do this. Do we need a branch for this?


Kindly,
Mekeor


> --- gnu/packages/node.scm | 35 ++++++++++++++++++++++++----------- 1
> file changed, 24 insertions(+), 11 deletions(-)
>
> diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm
> index 0af0158f45..cae7d3b0ca 100644
> --- a/gnu/packages/node.scm
> +++ b/gnu/packages/node.scm
> @@ -735,23 +735,28 @@ (define-public llhttp-bootstrap
>  (define-public node-lts
>    (package
>      (inherit node)
> -    (version "14.19.3")
> +    (version "18.12.1")
>      (source (origin
>                (method url-fetch)
>                (uri (string-append "https://nodejs.org/dist/v"; version
> -                                  "/node-v" version ".tar.xz"))
> +                                  "/node-v" version ".tar.gz"))
>                (sha256
>                 (base32
> -                "15691j5zhiikyamiwwd7f282g6d9acfhq91nrwx54xya38gmpx2w"))
> +                "11n1h54wgh61inrlqjp0j4fqcz6kl60a3iip7ya90nqdl3fp90ds"))
>                (modules '((guix build utils)))
>                (snippet
>                 `(begin
> +                  ;; openssl.cnf is required for build.
> +                  (for-each delete-file-recursively
> +                            (find-files "deps/openssl"
> +                                        (lambda (file stat)
> +                                          (if (string-contains file 
> "nodejs-openssl.cnf")
> +                                              #f #t))))
>                    ;; Remove bundled software, where possible
>                    (for-each delete-file-recursively
>                              '("deps/cares"
>                                "deps/icu-small"
>                                "deps/nghttp2"
> -                              "deps/openssl"
>                                "deps/zlib"))
>                    (substitute* "Makefile"
>                      ;; Remove references to bundled software.
> @@ -800,23 +805,31 @@ (define-public node-lts
>                                     libuv "/lib:"
>                                     zlib "/lib"
>                                     "'],"))))))
> +           (add-after 'patch-hardcoded-program-references
> +                      'patch-additional-hardcoded-program-references
> +             (lambda* (#:key inputs #:allow-other-keys)
> +               (substitute* "test/parallel/test-stdin-from-file-spawn.js"
> +                 (("'/bin/sh'") (string-append
> +                                 "'" (search-input-file inputs "/bin/sh")
> +                                 "'")))))
>             (replace 'delete-problematic-tests
>               (lambda* (#:key inputs #:allow-other-keys)
>                 ;; FIXME: These tests fail in the build container, but they 
> don't
>                 ;; seem to be indicative of real problems in practice.
>                 (for-each delete-file
> -                         '("test/parallel/test-cluster-master-error.js"
> -                           "test/parallel/test-cluster-master-kill.js"))
> +                         '("test/parallel/test-cluster-primary-error.js"
> +                           "test/parallel/test-cluster-primary-kill.js"))
>
>                 ;; These require a DNS resolver.
>                 (for-each delete-file
>                           '("test/parallel/test-dns.js"
> -                           
> "test/parallel/test-dns-lookupService-promises.js"))
> +                           "test/parallel/test-dns-lookupService-promises.js"
> +                           
> "test/parallel/test-net-socket-connect-without-cb.js"
> +                           "test/parallel/test-tcp-wrap-listen.js"))
>
>                 ;; These tests require networking.
>                 (for-each delete-file
> -                         '("test/parallel/test-https-agent-unref-socket.js"
> -                           "test/parallel/test-corepack-yarn-install.js"))
> +                         '("test/parallel/test-https-agent-unref-socket.js"))
>
>                 ;; This test is timing-sensitive, and fails sporadically on
>                 ;; slow, busy, or even very fast machines.
> @@ -866,7 +879,7 @@ (define-public node-lts
>             icu4c-71
>             libuv-for-node
>             `(,nghttp2 "lib")
> -           openssl-1.1
> +           openssl
>             zlib
>             ;; Regular build-time dependencies.
>             perl
> @@ -883,7 +896,7 @@ (define-public node-lts
>             llhttp-bootstrap
>             brotli
>             `(,nghttp2 "lib")
> -           openssl-1.1
> +           openssl
>             python-wrapper ;; for node-gyp (supports python3)
>             zlib))))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]