* [bug#75384] [PATCH 0/4] Bump node-lts to 22.12.0
@ 2025-01-05 17:48 jlicht
2025-01-05 17:57 ` [bug#75384] [PATCH 1/4] gnu: Add c-ares-for-node-lts jlicht
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: jlicht @ 2025-01-05 17:48 UTC (permalink / raw)
To: 75384; +Cc: Jelle Licht, dthompson2
From: Jelle Licht <jlicht@fsfe.org>
Hi all, this series bumps node-lts to version 22.12.0.
I had to reintroduce a c-ares package variant specific to node-lts, as well as
disable some tests that did not work in the build container for one reason or
another.
To keep the llhttp-bootstrap dance as short as possible, I've adapted a
so-called ponyfill[0] for Object.fromEntries so we can directly build llhttp
9.2.1 using our node-bootstrap package.
[0] https://github.com/feross/fromentries/tree/master#what-is-a-ponyfill
Jelle Licht (4):
gnu: Add c-ares-for-node-lts.
gnu: libuv-for-node-lts: Update to 1.49.1.
gnu: llhttp-bootstrap: Update to 9.2.1.
gnu: node-lts: Update to 22.12.0.
gnu/local.mk | 1 +
gnu/packages/adns.scm | 15 ++++++
gnu/packages/libevent.scm | 12 +----
gnu/packages/node.scm | 23 ++++++----
.../llhttp-ponyfill-object-fromentries.patch | 46 +++++++++++++++++++
5 files changed, 77 insertions(+), 20 deletions(-)
create mode 100644 gnu/packages/patches/llhttp-ponyfill-object-fromentries.patch
base-commit: 67a535351f8678969e412e8dba9197a883b524d0
--
2.47.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#75384] [PATCH 1/4] gnu: Add c-ares-for-node-lts.
2025-01-05 17:48 [bug#75384] [PATCH 0/4] Bump node-lts to 22.12.0 jlicht
@ 2025-01-05 17:57 ` jlicht
2025-01-05 17:57 ` [bug#75384] [PATCH 2/4] gnu: libuv-for-node-lts: Update to 1.49.1 jlicht
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jlicht @ 2025-01-05 17:57 UTC (permalink / raw)
To: 75384; +Cc: Jelle Licht, jlicht, Sharlatan Hellseher
From: Jelle Licht <jlicht@fsfe.org>
* gnu/packages/adns.scm (c-ares-for-node-lts): New variable.
Change-Id: I547272f3fa3419a7659bf5b2d91a3e917c20d434
---
gnu/packages/adns.scm | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/gnu/packages/adns.scm b/gnu/packages/adns.scm
index 1097b84062..8f37d970c3 100644
--- a/gnu/packages/adns.scm
+++ b/gnu/packages/adns.scm
@@ -148,6 +148,21 @@ (define-public c-ares
multiple clients and programs with graphical user interfaces.")
(license (x11-style "https://c-ares.haxx.se/license.html"))))
+(define-public c-ares-for-node-lts
+ (hidden-package
+ (package
+ (inherit c-ares)
+ (version "1.34.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/c-ares/c-ares/releases/download/v"
+ version "/c-ares-" version
+ ".tar.gz"))
+ (sha256
+ (base32
+ "0br2msk3bpl5myhjp9vr5j2scpspvbg2fpnz69dcrr4ycpnxnf7s")))))))
+
;; gRPC requires a c-ares built with CMake in order to get the .cmake modules.
;; We can not build c-ares itself with CMake because that would introduce a
;; circular dependency through nghttp2.
--
2.47.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#75384] [PATCH 2/4] gnu: libuv-for-node-lts: Update to 1.49.1.
2025-01-05 17:48 [bug#75384] [PATCH 0/4] Bump node-lts to 22.12.0 jlicht
2025-01-05 17:57 ` [bug#75384] [PATCH 1/4] gnu: Add c-ares-for-node-lts jlicht
@ 2025-01-05 17:57 ` jlicht
2025-01-05 17:57 ` [bug#75384] [PATCH 3/4] gnu: llhttp-bootstrap: Update to 9.2.1 jlicht
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jlicht @ 2025-01-05 17:57 UTC (permalink / raw)
To: 75384; +Cc: Jelle Licht, jlicht
From: Jelle Licht <jlicht@fsfe.org>
* gnu/packages/libevent.scm (libuv-for-node-lts): Update to 1.49.1.
Change-Id: I8acf2fb174fffa90f7c3271088d0476c682df904
---
gnu/packages/libevent.scm | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/gnu/packages/libevent.scm b/gnu/packages/libevent.scm
index 202deaea47..40de182ff8 100644
--- a/gnu/packages/libevent.scm
+++ b/gnu/packages/libevent.scm
@@ -164,22 +164,14 @@ (define-public libuv-for-node-lts
(package
(inherit libuv)
(name "libuv")
- (version "1.46.0")
+ (version "1.49.1")
(source (origin
(method url-fetch)
(uri (string-append "https://dist.libuv.org/dist/v" version
"/libuv-v" version ".tar.gz"))
(sha256
(base32
- "1knxvp6bl3y0c87cch1id0z7m7rb6igx55ci93qnbp4zifaq67qi"))
- (modules '((guix build utils)))
- (snippet
- '(begin
- ;; Disable io_uring by default due to CVE-2024-22017. Can be removed once
- ;; https://github.com/libuv/libuv/issues/4468 is released and compatible
- ;; with Node.js
- (substitute* "src/unix/linux.c"
- (("val == NULL \\|\\|") "val != NULL &&"))))))
+ "0rk73b373zb495jd0qsl2gpnc8fc60jbhn3aayqnglfgyhagg14d"))))
(properties '((hidden? . #t)))))
(define-public libuv-for-r-httpuv
--
2.47.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#75384] [PATCH 3/4] gnu: llhttp-bootstrap: Update to 9.2.1.
2025-01-05 17:48 [bug#75384] [PATCH 0/4] Bump node-lts to 22.12.0 jlicht
2025-01-05 17:57 ` [bug#75384] [PATCH 1/4] gnu: Add c-ares-for-node-lts jlicht
2025-01-05 17:57 ` [bug#75384] [PATCH 2/4] gnu: libuv-for-node-lts: Update to 1.49.1 jlicht
@ 2025-01-05 17:57 ` jlicht
2025-01-05 17:57 ` [bug#75384] [PATCH 4/4] gnu: node-lts: Update to 22.12.0 jlicht
2025-01-08 16:36 ` [bug#75384] [PATCH 0/4] Bump node-lts " Thompson, David
4 siblings, 0 replies; 6+ messages in thread
From: jlicht @ 2025-01-05 17:57 UTC (permalink / raw)
To: 75384; +Cc: Jelle Licht, jlicht
From: Jelle Licht <jlicht@fsfe.org>
* gnu/packages/patches/llhttp-ponyfill-object-fromentries.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Register patch.
* gnu/packages/node.scm (llhttp-bootstrap): Update to 9.2.1.
[source]: Use patch.
---
gnu/local.mk | 1 +
gnu/packages/node.scm | 5 +-
.../llhttp-ponyfill-object-fromentries.patch | 46 +++++++++++++++++++
3 files changed, 50 insertions(+), 2 deletions(-)
create mode 100644 gnu/packages/patches/llhttp-ponyfill-object-fromentries.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index f118fe4442..61f91d2e9f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1812,6 +1812,7 @@ dist_patch_DATA = \
%D%/packages/patches/mcrypt-CVE-2012-4527.patch \
%D%/packages/patches/libmemcached-build-with-gcc7.patch \
%D%/packages/patches/libmhash-hmac-fix-uaf.patch \
+ %D%/packages/patches/llhttp-ponyfill-object-fromentries.patch \
%D%/packages/patches/lvm2-no-systemd.patch \
%D%/packages/patches/maturin-no-cross-compile.patch \
%D%/packages/patches/mecab-variable-param.patch \
diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm
index 20acffb3df..6c0031aa5a 100644
--- a/gnu/packages/node.scm
+++ b/gnu/packages/node.scm
@@ -679,7 +679,7 @@ (define-public node-llparse-bootstrap
(define-public llhttp-bootstrap
(package
(name "llhttp")
- (version "8.1.2")
+ (version "9.2.1")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -688,7 +688,8 @@ (define-public llhttp-bootstrap
(file-name (git-file-name name version))
(sha256
(base32
- "1808y8mpdcmsi8rxndilngg4nn2fbqfgb29f47kk9mmdpqg5s17r"))
+ "0mzg19aqb1am498gms0z75cwd5kmfg9p78b1hhxw67019nsjcbac"))
+ (patches (search-patches "llhttp-ponyfill-object-fromentries.patch"))
(modules '((guix build utils)))
(snippet
'(begin
diff --git a/gnu/packages/patches/llhttp-ponyfill-object-fromentries.patch b/gnu/packages/patches/llhttp-ponyfill-object-fromentries.patch
new file mode 100644
index 0000000000..16ac6b45f6
--- /dev/null
+++ b/gnu/packages/patches/llhttp-ponyfill-object-fromentries.patch
@@ -0,0 +1,46 @@
+diff --git a/src/llhttp/constants.ts b/src/llhttp/constants.ts
+index 226342e..1a4c93a 100644
+--- a/src/llhttp/constants.ts
++++ b/src/llhttp/constants.ts
+@@ -1,4 +1,4 @@
+-import { enumToMap } from './utils';
++import { enumToMap, fromEntries } from './utils';
+
+ export type IntDict = Record<string, number>;
+
+@@ -328,7 +328,7 @@ export const METHODS_RTSP = [
+
+ export const METHOD_MAP = enumToMap(METHODS);
+
+-export const H_METHOD_MAP = Object.fromEntries(
++export const H_METHOD_MAP = fromEntries(
+ Object.entries(METHODS).filter(([ k ]) => k.startsWith('H'))
+ );
+
+diff --git a/src/llhttp/utils.ts b/src/llhttp/utils.ts
+index 2251125..5ac4aeb 100644
+--- a/src/llhttp/utils.ts
++++ b/src/llhttp/utils.ts
+@@ -1,5 +1,13 @@
+ import { IntDict } from './constants';
+
++/*! fromentries. MIT License. Copyright (c) 2018-2020 Feross Aboukhadijeh */
++export function fromEntries (iterable) {
++ return [...iterable].reduce((obj, [key, val]) => {
++ obj[key] = val
++ return obj
++ }, {})
++}
++
+ export function enumToMap(
+ obj: IntDict,
+ filter: ReadonlyArray<number> = [],
+@@ -8,7 +16,7 @@ export function enumToMap(
+ const emptyFilter = (filter?.length ?? 0) === 0;
+ const emptyExceptions = (exceptions?.length ?? 0) === 0;
+
+- return Object.fromEntries(Object.entries(obj).filter(([ , value ]) => {
++ return fromEntries(Object.entries(obj).filter(([ , value ]) => {
+ return (
+ typeof value === 'number' &&
+ (emptyFilter || filter.includes(value)) &&
\ No newline at end of file
--
2.47.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#75384] [PATCH 4/4] gnu: node-lts: Update to 22.12.0.
2025-01-05 17:48 [bug#75384] [PATCH 0/4] Bump node-lts to 22.12.0 jlicht
` (2 preceding siblings ...)
2025-01-05 17:57 ` [bug#75384] [PATCH 3/4] gnu: llhttp-bootstrap: Update to 9.2.1 jlicht
@ 2025-01-05 17:57 ` jlicht
2025-01-08 16:36 ` [bug#75384] [PATCH 0/4] Bump node-lts " Thompson, David
4 siblings, 0 replies; 6+ messages in thread
From: jlicht @ 2025-01-05 17:57 UTC (permalink / raw)
To: 75384; +Cc: Jelle Licht, jlicht
From: Jelle Licht <jlicht@fsfe.org>
* gnu/packages/node.scm (node-lts): Update to 22.12.0.
[#:phases]<delete-problematic-tests>: Delete tests that fail due to the build
container. Delete tests that require a DNS resolver.
[inputs]: Replace c-ares by c-ares-for-node-lts.
Replace icu4c by icu4c-73.
[native-inputs]: Replace c-ares by c-ares-for-node-lts.
Replace icu4c by icu4c-73.
Change-Id: I8cbc790bd82c55b48f8917e6405b37569b29dc1c
---
gnu/packages/node.scm | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm
index 6c0031aa5a..75a1a12c53 100644
--- a/gnu/packages/node.scm
+++ b/gnu/packages/node.scm
@@ -750,14 +750,14 @@ (define-public llhttp-bootstrap
(define-public node-lts
(package
(inherit node-bootstrap)
- (version "20.18.1")
+ (version "22.12.0")
(source (origin
(method url-fetch)
(uri (string-append "https://nodejs.org/dist/v" version
"/node-v" version ".tar.gz"))
(sha256
(base32
- "1f180vgr6lrg4gs48q5c414j5sdwaqqp1vnswwr3pvryhznqrbav"))
+ "1qrcn9hm85bmh81ircaa0vmxrqmiip1iwczvpsyn9sdn0b0ffmri"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -838,14 +838,16 @@ (define-public node-lts
;; seem to be indicative of real problems in practice.
(for-each delete-file
'("test/parallel/test-cluster-primary-error.js"
- "test/parallel/test-cluster-primary-kill.js"))
+ "test/parallel/test-cluster-primary-kill.js"
+ "test/parallel/test-node-run.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-net-socket-connect-without-cb.js"
- "test/parallel/test-tcp-wrap-listen.js"))
+ "test/parallel/test-tcp-wrap-listen.js"
+ "test/report/test-report-exclude-network.js"))
;; These tests require networking.
(for-each delete-file
@@ -956,9 +958,9 @@ (define-public node-lts
(chmod file #o555))))))))
(native-inputs
(list ;; Runtime dependencies for binaries used as a bootstrap.
- c-ares
+ c-ares-for-node-lts
brotli
- icu4c
+ icu4c-73
libuv-for-node-lts
`(,nghttp2 "lib")
openssl
@@ -973,8 +975,8 @@ (define-public node-lts
(inputs
(list bash-minimal
coreutils
- c-ares
- icu4c
+ c-ares-for-node-lts
+ icu4c-73
libuv-for-node-lts
llhttp-bootstrap
brotli
--
2.47.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#75384] [PATCH 0/4] Bump node-lts to 22.12.0
2025-01-05 17:48 [bug#75384] [PATCH 0/4] Bump node-lts to 22.12.0 jlicht
` (3 preceding siblings ...)
2025-01-05 17:57 ` [bug#75384] [PATCH 4/4] gnu: node-lts: Update to 22.12.0 jlicht
@ 2025-01-08 16:36 ` Thompson, David
4 siblings, 0 replies; 6+ messages in thread
From: Thompson, David @ 2025-01-08 16:36 UTC (permalink / raw)
To: Jelle Licht; +Cc: 75384
Hey Jelle,
On Sun, Jan 5, 2025 at 12:49 PM <jlicht@fsfe.org> wrote:
>
> From: Jelle Licht <jlicht@fsfe.org>
>
> Hi all, this series bumps node-lts to version 22.12.0.
I tested the patch series and everything compiled successfully. I
also tested it with WebAssembly binaries generated by Hoot, to see if
we could drop our custom, non-bootstrapped Node build in that project,
and indeed we can!
The code all looks good to me! Thank you for doing this important
work! I must admit I briefly looked into upgrading Node back when the
22 series was fresh and couldn't figure it out.
Now, there's a practical issue for getting this merged. `guix refresh
-l node` tells me this:
Building the following 162 packages would ensure 280 dependent
packages are rebuilt: ccwl@0.3.0
ungoogled-chromium-wayland@112.0.5615.165-1 emacs-nodejs-repl@0.2.5
emacs-dape@0.19.0 icedove@115.16.3 geierlein@0.9.13
icedove-minimal@115.16.3 icecat-l10n@115.18.0-guix2
icecat-minimal@115.18.0-guix2 icedove-l10n@115.16.3 js-mathjax@3.2.0
r-metap@1.11 r-mmuphin@1.18.1 r-spacexr@2.2.1-1.0a0861e r-altmeta@4.2
r-fmri@1.9.12.1 r-puniform@0.2.7 r-prospectr@0.2.7 r-untb@1.7-7-1
librewolf@133.0-1 node-path-key@4.0.0 node-sqlite3@5.0.2
node-once@1.4.0 node-mersenne@0.0.4 node-normalize-path@3.0.0
node-statsd-parser@0.0.4 node-safe-stable-stringify@2.4.3
node-stack-trace@0.0.10-1.4fd379e node-color-name@1.1.3
node-env-variable@0.0.4 node-crx3@1.1.3 node-segfault-handler@1.3.0
node-irc@0.5.2 node-global-gradle-clean@1.0.1 node-serialport@9.2.7
bap@2.6.0-alpha-0.f995d28 frama-c@29.0 ocaml-mirage-logs@1.2.0
fpm@1.15.1 komikku@1.46.0 python-bulkvis@2.0.0-2.00a82a9
python-ikarus@0.0.2 python-pyrodigal@3.3.0 kitsas@5.7 falkon@24.05.2
ktorrent@24.05.2 calligra@4.0.1 ghostwriter@24.05.2 knotes@24.05.2
kaccounts-providers@24.05.2 kdepim-runtime@24.05.2 korganizer@24.05.2
merkuro@24.05.2 kmail@24.05.2 plasma-pass@1.2.2 plasma@6.1.4
khelpcenter@24.05.2 akregator@24.05.2 python-apscheduler@3.10.4
syncplay@1.7.3 qutebrowser@3.3.1 stellarium@24.3
emacs-ob-sclang@0.1-1.cd3f3c8 ecl-cl-collider@2018.7.15-0.a469088
cl-collider@2018.7.15-0.a469088 zeal@0.7.1 qolibri@2.1.4
openboard@1.7.3 fcitx5-chinese-addons@5.1.3 qmapshack@1.17.1
luminance-hdr@2.6.0 kvirc@5.2.6 marble-qt@24.05.2 kdevelop@24.05.2
movim-desktop@0.14.0-3.83d583b hydrus-network@495 mygnuhealth@2.2.1
freecad@1.0.0 rfcat@1.9.6 onionshare@2.6 emacs-calibredb@2.13.0
anki@2.1.16 openmolar@1.1.6-g81838c85 orange@3.32.0 sdrangel@7.22.2
openfoam-com@2212 openfoam-org@10.20230119 nextcloud-client@3.8.2
openshot@3.2.1 openconnect-sso@0.8.0 kiwix-desktop@2.3.1
ruby-autoprefixer-rails@10.4.13.0 mullvadbrowser@14.0.3
torbrowser@14.0.3 tree-sitter-julia@0.19.0 tree-sitter-clojure@0.0.11
tree-sitter-rust@0.20.4 tree-sitter-ocaml@0.20.1
tree-sitter-java@0.20.1 tree-sitter-erlang@0.4.0-0.57e6951
tree-sitter-prisma@1.4.0 tree-sitter-bibtex@0.1.0-0.ccfd77d
tree-sitter-css@0.19.0 tree-sitter-dockerfile@0.1.2
tree-sitter-scala@0.20.2 tree-sitter-c-sharp@0.20.0
tree-sitter-scheme@0.2.0-0.67b90a3 tree-sitter-vhdl@0.1.1-0.a3b2d84
tree-sitter-markdown-gfm@0.7.1 tree-sitter-verilog@1.0.0-0.075ebfc
tree-sitter-go@0.20.0 tree-sitter-json@0.20.0 tree-sitter-html@0.19.0
tree-sitter-matlab@1.0.2-0.79d8b25 tree-sitter-cpp@0.20.3
tree-sitter-r@0.0.1-0.80efda5 tree-sitter-ungrammar@0.0.2-0.debd26f
tree-sitter-haskell@0.14.0-0.3bdba07
tree-sitter-plantuml@1.0.0-0.bea443e tree-sitter-elm@5.6.3
tree-sitter-nix@0.0.0 tree-sitter-racket@0.1.0-0.1a5df02
tree-sitter-ron@0.2.0 tree-sitter-bash@0.20.4 tree-sitter-gomod@1.0.0
tree-sitter-cmake@0.4.1 tree-sitter-elixir@0.19.0-0.b20eaa7
emacs-devicetree-ts-mode@0.3 tree-sitter-kotlin@0.3.6
tree-sitter-hcl@1.1.0 emacs-jsdoc@0.3 python-textual@0.50.1
tree-sitter-markdown@0.1.1 tree-sitter-latex@0.3.0
tree-sitter-awk@0.6.2 tree-sitter-org@1.3.1-0.081179c
emacs-combobulate@0.1-1.c7e4670 tree-sitter-kdl@1.1.0
tree-sitter-tlaplus@1.0.8 tree-sitter-meson@1.2-0.3d6dfbd
tree-sitter-lua@0.0.19 tree-sitter-heex@0.6.0
tree-sitter-ruby@0.19.0-0.206c707 tree-sitter-php@0.19.0-0.f860e59
pigx@0.0.3 laminar@1.3 r-zra@0.2 r-aasea@1.1.0 r-pcaexplorer@3.0.0
r-mlinterfaces@1.86.0 r-tidyposterior@1.0.1 markdeep@1.16 mate@1.28.2
gr-satellites@4.6.0 gqrx@2.17.6 urh@2.9.8 gnss-sdr@0.0.19
gr-dsd@1.0.0-0.f9b9936 vlang@0.2.4 r-shinydashboardplus@2.0.5
archivebox@0.6.2 node-openzwave-shared@1.7.2
This would be quite a disruptive change to push to the master branch.
Is there anyone who can help get these patches pre-baked in CI before
merging? That would be much appreciated!
- Dave
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-01-08 16:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-05 17:48 [bug#75384] [PATCH 0/4] Bump node-lts to 22.12.0 jlicht
2025-01-05 17:57 ` [bug#75384] [PATCH 1/4] gnu: Add c-ares-for-node-lts jlicht
2025-01-05 17:57 ` [bug#75384] [PATCH 2/4] gnu: libuv-for-node-lts: Update to 1.49.1 jlicht
2025-01-05 17:57 ` [bug#75384] [PATCH 3/4] gnu: llhttp-bootstrap: Update to 9.2.1 jlicht
2025-01-05 17:57 ` [bug#75384] [PATCH 4/4] gnu: node-lts: Update to 22.12.0 jlicht
2025-01-08 16:36 ` [bug#75384] [PATCH 0/4] Bump node-lts " Thompson, David
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).