summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelle Licht <jlicht@fsfe.org>2024-11-03 13:03:54 +0100
committerJelle Licht <jlicht@fsfe.org>2024-12-18 22:02:19 +0100
commit7b3b9331ae8bd2c3f7923879e4cfdb41644b249e (patch)
tree056f92d1c1c15765efcafc19bb8b78cb5892500d
parentb0e5c1d038a201fd1233d182cdb9cc01ab5dd161 (diff)
gnu: node-lts: Update to 20.18.1 [security fixes].
* gnu/packages/node.scm (node-lts): Update to 20.18.1. [origin]: Delete bundled brotli, ngtcp2 and uv. [:configure-flags]: Add shared-nghtcp2 flag. Add shared-nghttp3 flag. [#:phases]<delete-problematic-tests>: Remove tests that fail due to linking to unbundled libuv. Delete tests that depend on 64-bit time_t for 32-bit builds. [native-inputs]: Replace libuv by libuv-for-node-lts. [inputs]: Replace libuv by libuv-for-node-lts. Add ngtpc2, nghttp3. Change-Id: I932e64f212283b34f0affad65c3d9f92fdea3d79
-rw-r--r--gnu/packages/node.scm34
1 files changed, 28 insertions, 6 deletions
diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm
index 36ed22e0520..13d2575333d 100644
--- a/gnu/packages/node.scm
+++ b/gnu/packages/node.scm
@@ -750,14 +750,14 @@ source files.")
750(define-public node-lts 750(define-public node-lts
751 (package 751 (package
752 (inherit node) 752 (inherit node)
753 (version "18.19.0") 753 (version "20.18.1")
754 (source (origin 754 (source (origin
755 (method url-fetch) 755 (method url-fetch)
756 (uri (string-append "https://nodejs.org/dist/v" version 756 (uri (string-append "https://nodejs.org/dist/v" version
757 "/node-v" version ".tar.gz")) 757 "/node-v" version ".tar.gz"))
758 (sha256 758 (sha256
759 (base32 759 (base32
760 "05qc1dgmrms73073n4l36jrcxf6ygqj959d3cngy5qclrg0isk6x")) 760 "1f180vgr6lrg4gs48q5c414j5sdwaqqp1vnswwr3pvryhznqrbav"))
761 (modules '((guix build utils))) 761 (modules '((guix build utils)))
762 (snippet 762 (snippet
763 '(begin 763 '(begin
@@ -768,9 +768,12 @@ source files.")
768 (not (string-contains file "nodejs-openssl.cnf"))))) 768 (not (string-contains file "nodejs-openssl.cnf")))))
769 ;; Remove bundled software, where possible 769 ;; Remove bundled software, where possible
770 (for-each delete-file-recursively 770 (for-each delete-file-recursively
771 '("deps/cares" 771 '("deps/brotli"
772 "deps/cares"
772 "deps/icu-small" 773 "deps/icu-small"
773 "deps/nghttp2" 774 "deps/nghttp2"
775 "deps/ngtcp2"
776 "deps/uv"
774 "deps/zlib")) 777 "deps/zlib"))
775 (substitute* "Makefile" 778 (substitute* "Makefile"
776 ;; Remove references to bundled software. 779 ;; Remove references to bundled software.
@@ -786,6 +789,8 @@ source files.")
786 "--shared-zlib" 789 "--shared-zlib"
787 "--shared-brotli" 790 "--shared-brotli"
788 "--with-intl=system-icu" 791 "--with-intl=system-icu"
792 "--shared-ngtcp2"
793 "--shared-nghttp3"
789 ;;Needed for correct snapshot checksums 794 ;;Needed for correct snapshot checksums
790 "--v8-enable-snapshot-compression")) 795 "--v8-enable-snapshot-compression"))
791 ((#:phases phases) 796 ((#:phases phases)
@@ -868,13 +873,27 @@ source files.")
868 "test/parallel/test-zlib-write-after-flush.js"))) 873 "test/parallel/test-zlib-write-after-flush.js")))
869 '()) 874 '())
870 875
876 ;; https://github.com/nodejs/node/issues/45906
877 ;; This test depends on 64-bit time_t so skipping on 32-bit systems.
878 ,@(if (not (target-64bit?))
879 '((delete-file "test/parallel/test-fs-utimes-y2K38.js"))
880 '())
881
871 ;; These tests have an expiry date: they depend on the validity of 882 ;; These tests have an expiry date: they depend on the validity of
872 ;; TLS certificates that are bundled with the source. We want this 883 ;; TLS certificates that are bundled with the source. We want this
873 ;; package to be reproducible forever, so remove those. 884 ;; package to be reproducible forever, so remove those.
874 ;; TODO: Regenerate certs instead. 885 ;; TODO: Regenerate certs instead.
875 (for-each delete-file 886 (for-each delete-file
876 '("test/parallel/test-tls-passphrase.js" 887 '("test/parallel/test-tls-passphrase.js"
877 "test/parallel/test-tls-server-verify.js")))) 888 "test/parallel/test-tls-server-verify.js"))
889
890 ;; These tests fail when linking to upstream libuv.
891 ;; https://github.com/nodejs/node/commit/3f6addd590
892 (for-each delete-file
893 '("test/parallel/test-process-euid-egid.js"
894 "test/parallel/test-process-initgroups.js"
895 "test/parallel/test-process-setgroups.js"
896 "test/parallel/test-process-uid-gid.js"))))
878 (add-after 'delete-problematic-tests 'replace-llhttp-sources 897 (add-after 'delete-problematic-tests 'replace-llhttp-sources
879 (lambda* (#:key inputs #:allow-other-keys) 898 (lambda* (#:key inputs #:allow-other-keys)
880 ;; Replace pre-generated llhttp sources 899 ;; Replace pre-generated llhttp sources
@@ -940,10 +959,11 @@ fi"
940 c-ares 959 c-ares
941 brotli 960 brotli
942 icu4c 961 icu4c
943 libuv 962 libuv-for-node-lts
944 `(,nghttp2 "lib") 963 `(,nghttp2 "lib")
945 openssl 964 openssl
946 zlib 965 zlib
966 ; ngtcp2? nghttp3?
947 ;; Regular build-time dependencies. 967 ;; Regular build-time dependencies.
948 perl 968 perl
949 pkg-config 969 pkg-config
@@ -955,9 +975,11 @@ fi"
955 coreutils 975 coreutils
956 c-ares 976 c-ares
957 icu4c 977 icu4c
958 libuv 978 libuv-for-node-lts
959 llhttp-bootstrap 979 llhttp-bootstrap
960 brotli 980 brotli
981 ngtcp2
982 nghttp3
961 `(,nghttp2 "lib") 983 `(,nghttp2 "lib")
962 openssl 984 openssl
963 zlib)))) 985 zlib))))