Commit Graph

70 Commits

Author SHA1 Message Date
Jason Schonberg
219cc7775f
nodejs: upgrade 22.16.0 -> 22.18.0
0001-build-remove-redundant-mXX-flags-for-V8.patch - fix offset and fuzz.
  0001-deps-disable-io_uring-support-in-libuv.patch - update for new libuv version 1.51.0
    https://github.com/nodejs/node/commit/e397980a1a

  License-Update: zlib version change from 1.3.0.1 to 1.3.1
    efebf46131

  Changelog: https://github.com/nodejs/node/releases/tag/v22.18.0
  Changelog: https://github.com/nodejs/node/releases/tag/v22.17.1
  Changelog: https://github.com/nodejs/node/releases/tag/v22.17.0

Signed-off-by: Jason Schonberg <schonm@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-08-02 17:45:35 -07:00
Khem Raj
d4c2a95d4f
nodejs: Fix build on arm64 hosts
When clang is used as cross compiler, it confuses gyp
system to enable -m64 option for host pieces of build
and the reason is that it assumes clang to be biarch
by default for all architectures but that maybe true for
x86/x86_64 combo but not true for arm/aarch64 systems

This is a backport from node 24

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-07-20 21:21:32 -07:00
Jason Schonberg
58ba5cbab3
nodejs: upgrade 22.15.1 -> 22.16.0
Drop the backported zlib-fix-pointer-alignment patch.  It is included in this release.
  https://github.com/nodejs/node/commit/f2159f2a44

Changelog: https://github.com/nodejs/node/releases/tag/v22.16.0

Signed-off-by: Jason Schonberg <schonm@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-05-22 17:39:09 -07:00
Jeroen Hofstee
64760af3c3
nodejs: backport a patch to prevent brotli crashing nodejs
Brotli can crash nodejs (on ARM), because the memory allocated for
brotli wasn't properly aligned.

https://github.com/google/brotli/issues/1159
dc035bbc9b

Signed-off-by: Jeroen Hofstee <jhofstee@victronenergy.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-04-28 10:15:23 -07:00
Jason Schonberg
1216d76bec
nodejs: upgrade 22.12.0 -> 22.13.1
Changelog for 22.13.0 : https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V22.md#22.13.0
Changelog for 22.13.1 : https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V22.md#22.13.1

The 22.13.1 release is a security fix addressing four CVEs.

    CVE-2025-23083 - src,loader,permission: throw on InternalWorker use when permission model is enabled (High)
    CVE-2025-23085 - src: fix HTTP2 mem leak on premature close and ERR_PROTO (Medium)
    CVE-2025-23084 - path: fix path traversal in normalize() on Windows (Medium)
    CVE-2025-22150 - Use of Insufficiently Random Values in undici fetch() (Medium)

I introduce a new patch with this recipe 0001-Do-not-use-glob-in-deps.patch to revert https://github.com/nodejs/node/commit/77e2869ca6

I restored 0001-deps-disable-io_uring-support-in-libuv.patch as suggested here : https://lore.kernel.org/all/20241207140642.181134-1-martin.jansa@gmail.com/

Signed-off-by: Jason Schonberg <schonm@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-01-24 18:20:07 -08:00
Jason Schonberg
d6fe4dc9ae
nodejs: upgrade 22.11.0 -> 22.12.0
License-Update: Add JSON parsing library under MIT license.
  27bcd103e7

Drop backported patch fix-build-with-icu-76.patch.  It is already
integrated in this version c3ca978d9c

Changelog: https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V22.md#22.12.0

Signed-off-by: Jason Schonberg <schonm@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-12-03 22:06:53 -08:00
Martin Jansa
5dcb1a2473
nodejs: backport a patch to fix build with icu-76
* icu was upgraded in oe-core in:
  https://git.openembedded.org/openembedded-core/commit/?id=ef2bd18dd1db7e5f01db76889933bfdbb5415aaf
  nodejs is now failing to link:

TOPDIR/BUILD/hosttools/ld: nodejs/22.11.0/node-v22.11.0/out/Release/obj.host/gen-regexp-special-case/deps/v8/src/regexp/gen-regexp-special-case.o: in function `v8::internal::PrintSet(std::basic_ofstream<char, std::char_traits<char> >&, char const*, icu_76::UnicodeSet const&)':
gen-regexp-special-case.cc:(.text._ZN2v88internal8PrintSetERSt14basic_ofstreamIcSt11char_traitsIcEEPKcRKN6icu_7610UnicodeSetE+0x8b): undefined reference to `icu_76::UnicodeSet::getRangeStart(int) const'
TOPDIR/BUILD/hosttools/ld: gen-regexp-special-case.cc:(.text._ZN2v88internal8PrintSetERSt14basic_ofstreamIcSt11char_traitsIcEEPKcRKN6icu_7610UnicodeSetE+0xb6): undefined reference to `icu_76::UnicodeSet::getRangeEnd(int) const'
TOPDIR/BUILD/hosttools/ld: gen-regexp-special-case.cc:(.text._ZN2v88internal8PrintSetERSt14basic_ofstreamIcSt11char_traitsIcEEPKcRKN6icu_7610UnicodeSetE+0xdf): undefined reference to `icu_76::UnicodeSet::getRangeCount() const'
TOPDIR/BUILD/hosttools/ld: gen-regexp-special-case.cc:(.text._ZN2v88internal8PrintSetERSt14basic_ofstreamIcSt11char_traitsIcEEPKcRKN6icu_7610UnicodeSetE+0xed): undefined reference to `icu_76::UnicodeSet::getRangeStart(int) const'
TOPDIR/BUILD/hosttools/ld: gen-regexp-special-case.cc:(.text._ZN2v88internal8PrintSetERSt14basic_ofstreamIcSt11char_traitsIcEEPKcRKN6icu_7610UnicodeSetE+0xfa): undefined reference to `icu_76::UnicodeSet::getRangeEnd(int) const'
TOPDIR/BUILD/hosttools/ld: gen-regexp-special-case.cc:(.text._ZN2v88internal8PrintSetERSt14basic_ofstreamIcSt11char_traitsIcEEPKcRKN6icu_7610UnicodeSetE+0x121): undefined reference to `icu_76::UnicodeSet::getRangeStart(int) const'
TOPDIR/BUILD/hosttools/ld: nodejs/22.11.0/node-v22.11.0/out/Release/obj.host/gen-regexp-special-case/deps/v8/src/regexp/gen-regexp-special-case.o: in function `v8::internal::PrintSpecial(std::basic_ofstream<char, std::char_traits<char> >&)':
gen-regexp-special-case.cc:(.text._ZN2v88internal12PrintSpecialERSt14basic_ofstreamIcSt11char_traitsIcEE+0x43): undefined reference to `icu_76::UnicodeSet::UnicodeSet()'
TOPDIR/BUILD/hosttools/ld: gen-regexp-special-case.cc:(.text._ZN2v88internal12PrintSpecialERSt14basic_ofstreamIcSt11char_traitsIcEE+0x59): undefined reference to `icu_76::UnicodeSet::UnicodeSet()'
...

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-11-23 18:36:29 -08:00
J. S.
6652b031d7
nodejs: upgrade 20.18.0 -> 22.11.0
This moves us from the previous Long Term Support version codenamed 'Iron' to the newly
released Long Term Support version 22.11.0  Codename 'Jod'

Changelog: https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V22.md#22.11.0

License-Update:

    Add amaro dependency under MIT License.
    Add swc dependency under Aapche License Version 2.0.
    Add simdjson dependency under Apache License Version 2.0.
    Add on-exit-leak-free under MIT License.
    Remove ESLint.
    Remove base64 dependency.

Removed patchs:

    182d9c05e78.patch - This was a backport to 20.x it is now integrated in 22.x

Added patches:

  Two small patches here to use Bourne Shell instad of BASH.
    0001-custom-env.patch
    0001-positional-args.patch

  This patch from https://github.com/nodejs/node/commit/686da19abb that addressed CVE-2024-22017
    0001-deps-disable-io_uring-support-in-libuv.patch

  Other patches were refreshed.

Signed-off-by: Jason Schonberg <schonm@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-11-01 15:53:46 -07:00
J. S.
2698039ac4
nodejs: cleanup
Drop two patches which haven't been referenced by the nodejs recipe since the
20.11.0 version checkin.
  0001-build-fix-build-with-Python-3.12.patch
  0001-gyp-resolve-python-3.12-issues.patch

Signed-off-by: Jason Schonberg <schonm@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-10-16 14:07:28 -07:00
J. S.
410a442f89
nodejs: upgrade 20.17.0 -> 20.18.0
License checksum change due to whitespace changes.
https://github.com/nodejs/node/commit/1dfd238781

libatomic.patch change due to changes in node.gyp
25c788009f

Changelog :
https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V20.md#20.18.0

Signed-off-by: Jason Schonberg <schonm@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-10-03 17:18:25 -07:00
Khem Raj
8937be5718
nodejs: Fix build with libc++ 19
As noted in the libc++ 19 release notes [1], std::char_traits<> is now
only provided for char, char8_t, char16_t, char32_t and wchar_t, and any
instantiation for other types will fail.

This causes nodejs-20 to fail to compile with clang 19 and libc++ 19,
resulting in errors similar to:

    /usr/include/c++/v1/string:820:42: error: implicit instantiation of undefined template 'std::char_traits<unsigned short>'
      820 |   static_assert(is_same<_CharT, typename traits_type::char_type>::value,
          |                                          ^
    ../deps/v8/src/inspector/string-16.h:114:28: note: in instantiation of template class 'std::basic_string<unsigned short>' requested here
      114 |   std::basic_string<UChar> m_impl;
          |                            ^
    /usr/include/c++/v1/__fwd/string.h:23:29: note: template is declared here
       23 | struct _LIBCPP_TEMPLATE_VIS char_traits;
          |                             ^

Upstream v8 has fixed this in commit 182d9c05e78 [2], so add it as a
backported patch, until the next version of node is released.

[1] https://libcxx.llvm.org/ReleaseNotes/19.html#deprecations-and-removals
[2] https://chromium.googlesource.com/v8/v8.git/+/182d9c05e78

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-09-05 21:56:45 -07:00
Hongxu Jia
32da6bfb0e
nodejs: support cross compile without qemu user conditionally
Due to the scope of supported BSPs by qemu-user is limited, such
as a segment fault on armv9 after qemu apply commit [target/arm:
Convert LDAPR/STLR (imm) to decodetree][1]
```
|tmp-glibc/work/neoversen2-crypto-wrs-linux/nodejs/20.5.1/node-v20.5.1/out/
Release/v8-qemu-wrapper.sh: line 7: 3179613 Segmentation fault      (core dumped)
PSEUDO_UNLOAD=1 qemu-aarch64 -r 5.15 -L tmp-glibc/work/neoversen2-crypto-wrs-linux/
nodejs/20.5.1/recipe-sysroot -E LD_LIBRARY_PATH=tmp-glibc/work/neoversen2-crypto-wrs-linux/
nodejs/20.5.1/recipe-sysroot/usr/lib64:tmp-glibc/work/neoversen2-crypto-wrs-linux/
nodejs/20.5.1/recipe-sysroot/usr/lib64 "$@"
```

Upstream nodejs have cross compile support, but it needs host and target
have same bit width (e.g. a x86_64 host targeting arrch64 to produce a
64-bit binary). So:
1. If host and target have different bit width, build with QEMU user as usual;

2. If host and target have same bit width, enable notejs cross compile support:
- The build tools of nodejs is GYP[2], set CC_host, CFLAGS_host,
  CXX_host, CXXFLAGS_host, LDFLAGS_host, AR_host for host build
  which is separated with target build [3]
- Satisfy layer compatibility, set GYP variables in prefuncs of do_configure,
  do_compile and do_install other than in recipe parsing
- Add missing native packages to fix library missing on host build
- Rework libatomic.patch, explicitly link to libatomic for clang
  conditionally

[1] 2521b6073b
[2] https://github.com/nodejs/node-gyp
[3] https://github.com/nodejs/node-gyp/blob/main/gyp/docs/UserDocumentation.md#cross-compiling

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-08-22 08:02:27 -07:00
Changqing Li
7bb2862899
nodejs: don't always disable io_uring
The original idea was always disable io_uring to avoid follwing failure
even when UV_USE_IO_URING is set to true, refer [1][2]:
     0608:                    try:
 *** 0609:                        update_hash(" %10s" % pwd.getpwuid(s.st_uid).pw_name)
     0610:                        update_hash(" %10s" % grp.getgrgid(s.st_gid).gr_name)
     0611:                    except KeyError as e:
     0612:                        msg = ("KeyError: %s\nPath %s is owned by uid %d, gid %d, which doesn't match "
     0613:                            "any user/group on target. This may be due to host contamination." %
Exception: Exception: KeyError: 'getpwuid(): uid not found: 20561'

But since 20.11.1, for fix CVE-2024-22017, io_uring is disabled by
default, refer [3]. So maybe patch
0001-deps-disable-io_uring-support-in-libuv.patch is not needed.

For case UV_USE_IO_URING is set to true, user can fix above failure
by "chown root:root -R ${D}" in do_install.

[1] https://lists.openembedded.org/g/openembedded-devel/message/105583
[2] https://bugzilla.yoctoproject.org/show_bug.cgi?id=15244
[3] 686da19abb
[4] https://nvd.nist.gov/vuln/detail/CVE-2024-22017

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-04-11 23:32:35 -07:00
Changqing Li
0d9351e929
nodejs: upgrade 20.11.0 -> 20.11.1
Drop patches for revert io_uring support in libuv:
0001-Revert-io_uring-changes-from-libuv-1.46.0.patch
0002-Revert-io_uring-changes-from-libuv-1.45.0.patch

Change to just always disable io_uring in libuv, in this way, we don't have to
pick out io_uring related changes and revert them when internal libuv
upgraded.

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-03-04 19:44:34 -08:00
Alexander Kanavin
6ce73e925d
nodejs: backport (partially) python 3.12 support
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-12-21 08:00:42 -08:00
Khem Raj
bb291f5370
Revert "nodejs: backport (partially) python 3.12 support"
This reverts commit f4bf27dbdb.
2023-12-20 11:12:59 -08:00
Alexander Kanavin
f4bf27dbdb
nodejs: backport (partially) python 3.12 support
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-12-18 22:17:22 -08:00
Martin Jansa
d08453978c nodejs: Revert io_uring support from bundled libuv-1.46.0
* Pseudo fails to intercept some of the syscalls used by the
  new version as documented in:
  https://github.com/shr-project/com.webos.app.minimal/tree/recipes

Now we have 3 options:

1) every use of nodejs-native where io_uring might be used (like in webpack)
   needs to export UV_USE_IO_URING=0 before using node, but be aware that
   the PR says it's only temporary and this variable might be removed in future.
   Unfortunately many people are lucky enough not to know what pseudo even is,
   so they might not realize that host-user-contamination QA issues or
   "KeyError: 'getpwuid(): uid not found" might be related to this (and they
   probably won't find this e-mail as well:
   https://lists.openembedded.org/g/openembedded-devel/message/105583

2) revert the io_uring changes from bundled libuv, to make sure it stays disabled.
   The changes are massive and it will be PIA to update them for every nodejs release
   I've already separated them for nodejs-20.3.0 where I've initialy tested this
   on top of libuv-1.45.0 and for 20.4.0 this need another patch for changes
   from libuv-1.46.0.
   Patch for keeping UV_USE_IO_URING support after it's removed from upstream libuv
   will be much smaller, but PIA to use UV_USE_IO_URING whenever using nodejs-native
   during build.

3) fix pseudo to correctly work with io_uring calls, definitely best long-term solution
   as more and more tools will now switch to io_uring, but without active maintainer
   of pseudo it might be _very_ difficult to implement this and there aren't many
   people willing to touch this beast.

Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-10-19 07:58:51 -07:00
Khem Raj
cd629b722d nodejs: Fix ptest result reporting
This fixes
  AssertionError:-
  ptests which had no test results:
  ['nodejs']

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-10-02 10:03:23 -07:00
Archana Polampalli
13e83bd009 nodejs: upgrade 18.17.1 -> 20.5.1
Update to latest release of latest LTS 20 release

    * node v20 introduces several new features and fixes many bugs and CVEs as shown in [1]

    * Refresh 0001-liftoff-Correct-function-signatures.patch against 20.5.1

    * License-Update:
       - Change zlib version 1.2.13, October 13th, 2022 to version 1.2.13.1, October xxth, 2022 [2]
       - Change Copyright 2023 from Ada authors to Yagiz Nizipli and Daniel Lemire [4]

    * Remove big-endian.patch as it is merged in v20.x [5] [6]

    * Remove below list of patches since mips32 is deleted from v8 as part of update V8 to 10.7.193.13 [7] [8]
       - mips-less-memory.patch
       - 0001-mips-Use-32bit-cast-for-operand-on-mips32.patch

    * Update Using-native-binaries.patch for node_js2c, it resolved below do_compile error [9]
       Error:
       /bin/sh: line 1: build/tmp/work/core2-64-poky-linux/nodejs/20.5.1/node-v20.5.1/out/Release/node_js2c: No such file or directory

    * Remove obsolete dtrace & etw configure options (we had: --without-<feature>) from the recipe [10]

https://github.com/nodejs/node/releases/tag/v20.5.1

[1] https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V20.md
[2] f100732575
[3] 900ae1bda7
[4] d246536924
[5] 3cea5d5425
[6] f226350fcb
[7] a26ca5ed14
[8] 6bd756d7c6
[9] 4da7bc915c
[10] aa3a572e6b

Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-09-28 07:56:06 -07:00
Martin Jansa
be8c765c7c *.patch: add Upstream-Status to all patches
There is new patch-status QA check in oe-core:
https://git.openembedded.org/openembedded-core/commit/?id=76a685bfcf927593eac67157762a53259089ea8a

This is temporary work around just to hide _many_ warnings from
optional patch-status (if you add it to WARN_QA).

This just added
Upstream-Status: Pending
everywhere without actually investigating what's the proper status.

This is just to hide current QA warnings and to catch new .patch files being
added without Upstream-Status, but the number of Pending patches is now terrible:

5 (26%) 	meta-xfce
6 (50%) 	meta-perl
15 (42%)        meta-webserver
21 (36%)        meta-gnome
25 (57%)        meta-filesystems
26 (43%)        meta-initramfs
45 (45%)        meta-python
47 (55%)        meta-multimedia
312 (63%)       meta-networking
756 (61%)       meta-oe

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-06-21 09:15:20 -07:00
Khem Raj
5c3518c2a5 nodejs: Upgrade to 18.16.0
License-Update: Add missing licenses for Ada [1] BSD, Simduf [2] BSD, posteject
[3] MIT

[1] 0bc4c17e57
[2] c9845fc334
[3] 4aaec07266

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-05-10 11:06:33 -07:00
Archana Polampalli
2144e93beb Nodejs: add missing run_ptest script
ptest-runner is not available for Nodejs on target hence added run-ptest script

Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-03-25 08:54:59 -07:00
Khem Raj
a4491a3e3e nodejs: Upgrade to 18.14.2
License-Update: Add base64 license information [1] and postject [2]

[1] 2ec8092e2c
[2] 4aaec07266

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-03-04 13:41:13 -08:00
Martin Jansa
c64ebfa6d8 nodejs: add Upstream-Status
* unfortunately all 3 have very long unclear history, I've tried to at least partially
  document in commit message

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-02-18 13:19:36 -08:00
Khem Raj
df4f8a675f nodejs: Fix build with gcc13
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-02-01 09:11:46 -08:00
Archana Polampalli
75a836190a Nodejs: Upgrade to 18.12.1
Node-18 is the current LTS release, node-19 is a development release and
node-20 is scheduled to be released until 2023-04-18 which is too late for YP-4.2
https://github.com/nodejs/release

* Refresh below two patches
   - 0001-Using-native-binaries.patch
   - 0001-liftoff-Correct-function-signatures.patch

* Copy openssl.cnf from sysroot_native to nodejs-openssl.cnf
  otherwise do_compile failed:
     make[1]: *** No rule to make target '../deps/openssl/nodejs-openssl.cnf',
     needed by 'Release/obj.target/deps/openssl/openssl.cnf'.  Stop.

* Add initial ptest support using ctest only, it covered 20% of the nodejs tests.
  There are some more tests exist to add but will require additional work.

Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2023-01-25 08:57:42 -08:00
Archana Polampalli
c4829fa338 Nodejs - Upgrade to 16.18.1
* Drop Openssl legacy provider patch and install both binaries patch
  which are already available in 16.x
* Refresh native binaries patch against 16.x base

Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-11-18 11:10:25 -08:00
Khem Raj
5a52bffde1 nodejs: Upgrade to 16.14.2
Fix build with mips32, found with gcc12

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-04-20 10:58:01 -07:00
Andrej Valek
93ec055d83 nodejs: add option to use openssl legacy providers again
Current nodejs version v16 does not fully support new OpenSSL, so add option
to use legacy provider.

|   opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
|   library: 'digital envelope routines',
|   reason: 'unsupported',
|   code: 'ERR_OSSL_EVP_UNSUPPORTED'

It was blindly removed by upgrade to 16.14.0 version

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-03-09 07:37:42 -08:00
Zoltán Böszörményi
f8a274732f nodejs: Upgrade to 16.14.0
Remove two upstreamed patches.

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-03-03 08:50:19 -08:00
Andrej Valek
6c258bd830 nodejs: add option to use openssl legacy providers
Current nodejs version does not fully support new OpenSSL, so add option
to use legacy provider.

|   opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
|   library: 'digital envelope routines',
|   reason: 'unsupported',
|   code: 'ERR_OSSL_EVP_UNSUPPORTED'

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-02-20 17:14:10 -08:00
Martin Jansa
dc01472dd9 nodejs: fix build without scrypt
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-11-01 05:45:17 -07:00
Khem Raj
354eca1043 nodejs: Upgrade to 16.11.1
* This is new LTS release
* Add patch to fix build on mips/mips64
* Add patch to build with new c-ares 2.17+
* Enhance native binaries patch to include additional native torque use
* Drop mips-warnings.patch and python 3.10 support patch which is
  already available in 16.x
* Refresh rest of patches against 16.x base

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-10-20 15:48:54 -07:00
Alexander Kanavin
e8214b76e4 nodejs: add a python 3.10 compatibility patch
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-10-14 07:16:58 -07:00
Khem Raj
94e54c209d nodejs: Update to 14.17.1
Drop upstreamed v8-call-new-ListFormatter-createInstance.patch patch
Add a patch for ppc64/clang to drop -mminimal-toc since clang does not
have this option

License-Update: URLs updated [1] and copyright owners too [2]

[1] 2d7e0b6912 (diff-c693279643b8cd5d248172d9c22cb7cf4ed163a3c98c8a3f69c2717edd3eacb7)
[2] b57785d89b (diff-c693279643b8cd5d248172d9c22cb7cf4ed163a3c98c8a3f69c2717edd3eacb7)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-06-18 08:33:07 -07:00
Khem Raj
37e0b6152c nodejs: Fix build with clang for x86 target
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-04-21 08:27:01 -07:00
Khem Raj
2f365001e2 nodejs: Fix build on mips
2G is too much for qemu-mips and perhaps also for real mips devices
as we use qemu-usermode during build to run host pieces like mksnapshot
they fail,  reducing the allocation range helps

Fixes
|   LD_LIBRARY_PATH=/mnt/b/yoe/master/build/tmp/work/mips32r2-yoe-linux/nodejs/14.16.1-r0/node-v14.16.1/out/Release/lib.host:/mnt/b/yoe/master/build/tmp/work/mips32r2-yoe-linux/nodejs/14.16.1-r0/node-v14.16.1
/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../tools/v8_gypfiles; mkdir -p /mnt/b/yoe/master/build/tmp/work/mips32r2-yoe-linux/nodejs/14.16.1-r0/node-v14.16.1/out/Release/obj.target/v
8_snapshot/geni; "/mnt/b/yoe/master/build/tmp/work/mips32r2-yoe-linux/nodejs/14.16.1-r0/node-v14.16.1/out/Release/v8-qemu-wrapper.sh" "/mnt/b/yoe/master/build/tmp/work/mips32r2-yoe-linux/nodejs/14.16.1-r0/nod
e-v14.16.1/out/Release/mksnapshot" --turbo_instruction_scheduling "--target_os=linux" "--target_arch=mips" --startup_src "/mnt/b/yoe/master/build/tmp/work/mips32r2-yoe-linux/nodejs/14.16.1-r0/node-v14.16.1/ou
t/Release/obj.target/v8_snapshot/geni/snapshot.cc" --embedded_variant Default --embedded_src "/mnt/b/yoe/master/build/tmp/work/mips32r2-yoe-linux/nodejs/14.16.1-r0/node-v14.16.1/out/Release/obj.target/v8_snap
shot/geni/embedded.S" --no-native-code-counters
|
| #
| # Fatal process OOM in CodeRange setup: allocate virtual memory
| #
|
| /mnt/b/yoe/master/build/tmp/work/mips32r2-yoe-linux/nodejs/14.16.1-r0/node-v14.16.1/out/Release/v8-qemu-wrapper.sh: line 7: 2292880 Trace/breakpoint trap   (core dumped) PSEUDO_UNLOAD=1 qemu-mips -r 3.2.0 -

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-04-21 08:27:01 -07:00
Khem Raj
f52863f02c nodejs: Use qemu usermode to run target binaries during build
So far, we have been trying to build nodejs-native and use the native
host binaries from there, which has worked out ok but always changes
when major upgrade is done, since more binaries or places are required
to be captured. This patch changes this approach to use qemu-user to run
these binaries under during cross build. This lets them run closer to
upstream build process and also removes dependency on nodejs-native

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-04-21 08:27:01 -07:00
Khem Raj
3f61a4c881 nodejs: Fix build with icu-69
backport relevant v8 patch to fix the build issue

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-04-21 08:27:01 -07:00
Khem Raj
3cb00800f5 nodejs: Update to 14.16.1
This is latest maintained LTS release
Forward patches and drop backported patch

License-Update: Update  copyright year and drop license of
deps/http_parser as this component is  removed in this version

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-04-21 08:27:01 -07:00
Khem Raj
45a2dfdd0f nodejs: Fix arm32/thumb builds with clang
Backport a patch from upstream to take care of build failure e.g.

| ../deps/v8/src/codegen/arm/cpu-arm.cc:38:16: error: write to reserved register 'R7'
|   asm volatile("svc 0\n"
|                ^
| 1 error generated.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-11-02 09:00:52 -08:00
Khem Raj
bda3ee6276 nodejs: Upgrade to 12.18.3
Drop already upstreamed patches
use builtin uv, it does not build without it

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-08-13 22:37:48 -07:00
Khem Raj
7910f2b645 nodejs: Fix build with icu 67.1
Remove soon-to-be removed getAllFieldPositions

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Andrej Valek <andrej.valek@siemens.com>
2020-05-06 23:20:29 -07:00
Khem Raj
db0075f503 nodejs: Fix -Wc++11-narrowing on mips
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-04-15 23:10:02 -07:00
André Draszik
b3b81507b7 nodejs: allow use of system brotli (and make default)
Use system brotli via PACKAGECONFIG by default. So far,
nodejs had been built using its embedded copy of brotli,
which we generally try to avoid, for the known reasons
(independent updates, cve & license checks, etc).

The nodejs patches to enable this have been submitted.
brotli is in meta-oe, so enabling this by default should
not be a problem.

Signed-off-by: André Draszik <andre.draszik@jci.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-03-03 11:40:40 -08:00
Khem Raj
354bedc9ab nodejs: Fix build on big-endian targets
Fixes
../deps/v8/src/runtime/runtime-utils.h:129:11: error: base operand of '->' has non-pointer type 'v8::internal::Object'
  129 |   return y->ptr() | (static_cast<ObjectPair>(x->ptr()) << 32);
      |           ^~

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Martin Jansa <Martin.Jansa@gmail.com>
Cc: Guillaume Burel <guillaume.burel@stormshield.eu>
2020-01-23 14:16:25 -08:00
Guillaume Burel
feeb172d1a nodejs: 10.17.0 -> 12.14.0
- update Node.js to active 12.x LTS release 12.14.0.
- remove compatibility with gcc 4.8 (has been removed upstream)

Signed-off-by: Guillaume Burel <guillaume.burel@stormshield.eu>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-01-23 14:16:25 -08:00
Andreas Müller
f0f6c0174d nodejs: Add PACKAGECONFIG share to allow other projects to use node as library
There are so many useful modules written for node.js I would like to use in
C++/Qt projects.

Run-tested both variants by installing node-red with npm and running it.

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-12-01 22:29:59 -08:00
André Draszik
c174217540 nodejs: use OE-provided compiler flags (arm)
This overrides yocto-provided build flags with its own, e.g we get
    arm-poky-linux-musleabi-g++  -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a7 \
                                 ... \
                                  -march=armv7-a -mfpu=neon -mfloat-abi=hard -marm

Causing the latter to override the former, and compiler warnings:
    cc1plus: warning: switch '-mcpu=cortex-a7' conflicts with '-march=armv7-a' switch

Patch this out, so that yocto-provided flags take precedence.
Note that in reality the same should probably be done for all the other
supported architectures, too.

Note that this also switches to Thumb(2) mode (in my case). No obvious
problems have been noted during compilation or runtime.

Upstream-Status: Inappropriate [oe-specific]
Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-11-13 07:17:03 -08:00