From f1bab96069e3770b967c9ef6a241f725c59eb6230caf6ffc66c1951bf7e26e72 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Mon, 20 Nov 2023 10:20:05 +0000 Subject: [PATCH 1/4] OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs21?expand=0&rev=7 --- fix_ci_tests.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/fix_ci_tests.patch b/fix_ci_tests.patch index 24671f1..fea56d9 100644 --- a/fix_ci_tests.patch +++ b/fix_ci_tests.patch @@ -81,3 +81,16 @@ Index: node-v21.2.0/tools/test.py result.add_option("--arch", help='The architecture to run tests for', default='none') result.add_option("--snapshot", help="Run the tests with snapshot turned on", +Index: node-v21.2.0/test/parallel/test-crypto-dh.js +=================================================================== +--- node-v21.2.0.orig/test/parallel/test-crypto-dh.js ++++ node-v21.2.0/test/parallel/test-crypto-dh.js +@@ -92,7 +92,7 @@ const crypto = require('crypto'); + dh3.computeSecret(''); + }, { message: common.hasOpenSSL3 && !hasOpenSSL3WithNewErrorMessage ? + 'error:02800080:Diffie-Hellman routines::invalid secret' : +- 'Supplied key is too small' }); ++ /(Supplied key is too small|invalid public key)/ }); + } + } + From 6ad92ba65eb20ad26401787cc61cdc375c0d1cbc3f2d545c889f0ea5fdcb7d77 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Thu, 23 Nov 2023 10:50:30 +0000 Subject: [PATCH 2/4] - node-gyp-addon-gypi.patch: fix misapplied patch (bsc#1217424) OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs21?expand=0&rev=8 --- node-gyp-addon-gypi.patch | 52 +++++++++++++------------------ nodejs21.changes | 5 +++ nodejs21.spec | 64 ++++++++++++++++++++++++--------------- 3 files changed, 66 insertions(+), 55 deletions(-) diff --git a/node-gyp-addon-gypi.patch b/node-gyp-addon-gypi.patch index 145d10b..b50a35e 100644 --- a/node-gyp-addon-gypi.patch +++ b/node-gyp-addon-gypi.patch @@ -1,7 +1,7 @@ -Index: node-v21.2.0/addon-rpm.gypi +Index: node-v20.10.0/addon-rpm.gypi =================================================================== --- /dev/null -+++ node-v21.2.0/addon-rpm.gypi ++++ node-v20.10.0/addon-rpm.gypi @@ -0,0 +1,35 @@ +{ + 'target_defaults': { @@ -38,51 +38,41 @@ Index: node-v21.2.0/addon-rpm.gypi + ] + } +} -Index: node-v21.2.0/deps/npm/node_modules/node-gyp/lib/configure.js +Index: node-v20.10.0/deps/npm/node_modules/node-gyp/lib/configure.js =================================================================== ---- node-v21.2.0.orig/deps/npm/node_modules/node-gyp/lib/configure.js -+++ node-v21.2.0/deps/npm/node_modules/node-gyp/lib/configure.js -@@ -32,28 +32,11 @@ async function configure (gyp, argv) { - nodeDir = gyp.opts.nodedir.replace(/^~/, os.homedir()) - log.verbose('get node dir', 'compiling against specified --nodedir dev files: %s', nodeDir) - } else { -- // if no --nodedir specified, ensure node dependencies are installed -- if ('v' + release.version !== process.version) { -- // if --target was given, then determine a target version to compile for -- log.verbose('get node dir', 'compiling against --target node version: %s', release.version) +--- node-v20.10.0.orig/deps/npm/node_modules/node-gyp/lib/configure.js ++++ node-v20.10.0/deps/npm/node_modules/node-gyp/lib/configure.js +@@ -36,10 +36,6 @@ async function configure (gyp, argv) { + if ('v' + release.version !== process.version) { + // if --target was given, then determine a target version to compile for + log.verbose('get node dir', 'compiling against --target node version: %s', release.version) - } else { - // if no --target was specified then use the current host node version - log.verbose('get node dir', 'no --target version specified, falling back to host node version: %s', release.version) - } -- -- if (!release.semver) { -- // could not parse the version string with semver -- throw new Error('Invalid version number: ' + release.version) -- } -- -- // If the tarball option is set, always remove and reinstall the headers -- // into devdir. Otherwise only install if they're not already there. -- gyp.opts.ensure = !gyp.opts.tarball -- -- await gyp.commands.install([release.version]) -- -- log.verbose('get node dir', 'target node version installed:', release.versionDir) -- nodeDir = path.resolve(gyp.devDir, release.versionDir) + + if (!release.semver) { + // could not parse the version string with semver +@@ -54,6 +50,12 @@ async function configure (gyp, argv) { + + log.verbose('get node dir', 'target node version installed:', release.versionDir) + nodeDir = path.resolve(gyp.devDir, release.versionDir) ++ } else { + // if no --target was specified then use RPM-installed headers + log.verbose('get node dir', 'no --target version specified, falling back to RPM installed headers') + nodeDir = '/usr/include/node21' + createBuildDir() -+ ++ } } return createBuildDir() -@@ -201,7 +184,8 @@ async function configure (gyp, argv) { +@@ -201,7 +203,8 @@ async function configure (gyp, argv) { // this logic ported from the old `gyp_addon` python file const gypScript = path.resolve(__dirname, '..', 'gyp', 'gyp_main.py') - const addonGypi = path.resolve(__dirname, '..', 'addon.gypi') -+ const addon_gypi_file = gyp.opts.target || gyp.opts.nodedir ? 'addon.gypi' : 'addon-rpm.gypi' -+ let addonGypi = path.resolve(__dirname, '..', addon_gypi_file) ++ let addon_gypi_file = gyp.opts.target || gyp.opts.nodedir ? 'addon.gypi' : 'addon-rpm.gypi' ++ var addonGypi = path.resolve(__dirname, '..', addon_gypi_file) let commonGypi = path.resolve(nodeDir, 'include/node/common.gypi') try { await fs.stat(commonGypi) diff --git a/nodejs21.changes b/nodejs21.changes index d886df1..836c6a9 100644 --- a/nodejs21.changes +++ b/nodejs21.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Nov 23 10:44:16 UTC 2023 - Adam Majer + +- node-gyp-addon-gypi.patch: fix misapplied patch (bsc#1217424) + ------------------------------------------------------------------- Wed Nov 15 15:18:00 UTC 2023 - Adam Majer diff --git a/nodejs21.spec b/nodejs21.spec index 558c05f..59b0513 100644 --- a/nodejs21.spec +++ b/nodejs21.spec @@ -1,7 +1,7 @@ # # spec file for package nodejs21 # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,7 +15,17 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # +########################################################### +# +# WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! +# +# This spec file is generated from a template hosted at +# https://github.com/AdamMajer/nodejs-packaging +# +########################################################### +# Fedora doesn't have rpm-config-SUSE which provides +# ext_man in /usr/lib/rpm/macros.d/macros.obs %if 0%{?fedora_version} %define ext_man .gz %endif @@ -119,12 +129,12 @@ Source1: https://nodejs.org/dist/v%{version}/SHASUMS256.txt Source2: https://nodejs.org/dist/v%{version}/SHASUMS256.txt.sig Source3: nodejs.keyring -# Python 3.4 compatible node-gyp -### https://github.com/nodejs/node-gyp.git -### git archive v7.1.2 | xz > node-gyp_7.1.2.tar.xz -Source5: node-gyp_7.1.2.tar.xz -# Only required to run unit tests in NodeJS 10+ -Source10: update_npm_tarball.sh +# Python 3.4 compatible node-gyp +### https://github.com/nodejs/node-gyp.git +### git archive v7.1.2 | xz > node-gyp_7.1.2.tar.xz +Source5: node-gyp_7.1.2.tar.xz +# Only required to run unit tests in NodeJS 10+ +Source10: update_npm_tarball.sh Source11: node_modules.tar.xz Source20: bash_output_helper.bash @@ -135,6 +145,8 @@ Patch5: sle12_python3_compat.patch Patch7: manual_configure.patch Patch13: openssl_binary_detection.patch + + ## Patches specific to SUSE and openSUSE Patch100: linker_lto_jobs.patch # PATCH-FIX-OPENSUSE -- set correct path for dtrace if it is built @@ -161,8 +173,8 @@ Patch305: qemu_timeouts_arches.patch Patch308: node-gyp-config.patch Patch309: gcc13.patch -BuildRequires: fdupes BuildRequires: pkg-config +BuildRequires: fdupes BuildRequires: procps BuildRequires: xz BuildRequires: zlib-devel @@ -182,10 +194,10 @@ BuildRequires: config(netcfg) %if 0%{?suse_version} == 1110 # GCC 5 is only available in the SUSE:SLE-11:SP4:Update repository (SDK). %if %node_version_number >= 8 -BuildRequires: gcc5-c++ +BuildRequires: gcc5-c++ %define forced_gcc_version 5 %else -BuildRequires: gcc48-c++ +BuildRequires: gcc48-c++ %define forced_gcc_version 4.8 %endif %endif @@ -195,15 +207,15 @@ BuildRequires: gcc48-c++ # for SLE-12:Update targets %if 0%{?suse_version} == 1315 %if %node_version_number >= 17 -BuildRequires: gcc12-c++ +BuildRequires: gcc12-c++ %define forced_gcc_version 12 %else %if %node_version_number >= 14 -BuildRequires: gcc9-c++ +BuildRequires: gcc9-c++ %define forced_gcc_version 9 %else %if %node_version_number >= 8 -BuildRequires: gcc7-c++ +BuildRequires: gcc7-c++ %define forced_gcc_version 7 %endif %endif @@ -212,7 +224,7 @@ BuildRequires: gcc7-c++ %if 0%{?suse_version} == 1500 %if %node_version_number >= 17 -BuildRequires: gcc12-c++ +BuildRequires: gcc12-c++ %define forced_gcc_version 12 %endif %endif @@ -223,6 +235,7 @@ BuildRequires: gcc12-c++ BuildRequires: gcc-c++ %endif + # Python dependencies %if %node_version_number >= 14 @@ -248,8 +261,8 @@ BuildRequires: python %endif %if 0%{?suse_version} >= 1500 && %{node_version_number} >= 10 -BuildRequires: group(nobody) BuildRequires: user(nobody) +BuildRequires: group(nobody) %endif # shared openssl @@ -264,10 +277,11 @@ BuildRequires: openssl >= %{openssl_req_ver} BuildRequires: (libopenssl1_1-hmac if libopenssl-1_1-devel) BuildRequires: (libopenssl3-hmac if libopenssl-3-devel) %else -BuildRequires: libopenssl1_1-hmac BuildRequires: openssl-1_1 >= %{openssl_req_ver} +BuildRequires: libopenssl1_1-hmac %endif + # /suse_version %endif @@ -311,7 +325,7 @@ BuildRequires: valgrind %if %{with libalternatives} Suggests: alts %else -Requires(postun):%{_sbindir}/update-alternatives +Requires(postun): %{_sbindir}/update-alternatives %endif # either for update-alternatives, or their removal Requires(post): %{_sbindir}/update-alternatives @@ -350,8 +364,8 @@ ExclusiveArch: not_buildable %endif %endif -Provides: bundled(libuv) = 1.46.0 Provides: bundled(uvwasi) = 0.0.19 +Provides: bundled(libuv) = 1.46.0 Provides: bundled(v8) = 11.8.172.17 %if %{with intree_brotli} Provides: bundled(brotli) = 1.0.9 @@ -359,9 +373,10 @@ Provides: bundled(brotli) = 1.0.9 BuildRequires: pkgconfig(libbrotlidec) %endif -Provides: bundled(base64) = 0.5.1 + Provides: bundled(llhttp) = 9.1.3 Provides: bundled(ngtcp2) = 0.8.1 +Provides: bundled(base64) = 0.5.1 Provides: bundled(simdutf) = 3.2.18 # bundled url-ada parser, not ada Provides: bundled(ada) = 2.7.2 @@ -385,8 +400,8 @@ provided by npm. Summary: Development headers for NodeJS 21.x Group: Development/Languages/NodeJS Provides: nodejs-devel = %{version} -Requires: %{name} = %{version} Requires: npm21 = %{version} +Requires: %{name} = %{version} %description devel This package provides development headers for Node.js needed for creation @@ -403,12 +418,12 @@ Requires: nodejs-common Requires: nodejs21 = %{version} Provides: nodejs-npm = %{version} Obsoletes: nodejs-npm < 4.0.0 -Provides: npm = %{version} Provides: npm(npm) = 10.2.3 +Provides: npm = %{version} %if 0%{?suse_version} >= 1500 %if %{node_version_number} >= 10 -Requires: group(nobody) Requires: user(nobody) +Requires: group(nobody) %endif %endif Provides: bundled(node-abbrev) = 2.0.0 @@ -575,9 +590,9 @@ Provides: bundled(node-spdx-exceptions) = 2.3.0 Provides: bundled(node-spdx-expression-parse) = 3.0.1 Provides: bundled(node-spdx-license-ids) = 3.0.16 Provides: bundled(node-ssri) = 10.0.5 +Provides: bundled(node-string_decoder) = 1.3.0 Provides: bundled(node-string-width) = 4.2.3 Provides: bundled(node-string-width) = 5.1.2 -Provides: bundled(node-string_decoder) = 1.3.0 Provides: bundled(node-strip-ansi) = 6.0.1 Provides: bundled(node-strip-ansi) = 7.1.0 Provides: bundled(node-supports-color) = 9.4.0 @@ -701,6 +716,8 @@ find -name \*~ -print0 -delete # abnormalities from patching find \( -name \*.js.orig -or -name \*.md.orig -or -name \*.1.orig \) -delete + + %build # normalize shebang %if %{node_version_number} >= 12 @@ -1060,7 +1077,6 @@ update-alternatives --remove npm-default %{_bindir}/npm%{node_version_number} update-alternatives --remove npx-default %{_bindir}/npx%{node_version_number} %else - %pre # remove files that are no longer owned but provided by update-alternatives if ! [ -L %{_mandir}/man1/node.1%{ext_man} ]; then From 6502229e811a63f17b93f4df33f839ddae4e849b9e6397b6164f4d14ec149a24 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Wed, 13 Dec 2023 13:27:50 +0000 Subject: [PATCH 3/4] - Update to 21.4.0: * fs: introduce dirent.parentPath * fs: use default w flag for writeFileSync with utf8 encoding - Changes in 21.3.0: * New --disable-warning flag * Fast fs.writeFileSync with UTF-8 Strings For details, see https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V21.md#21.4.0 - fix_ci_tests.patch: added workaround for missing deps OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs21?expand=0&rev=9 --- SHASUMS256.txt | 82 ++++++++++++++++++++++---------------------- SHASUMS256.txt.sig | Bin 566 -> 566 bytes fix_ci_tests.patch | 62 +++++++++++++++++++++++---------- node-v21.2.0.tar.xz | 3 -- node-v21.4.0.tar.xz | 3 ++ nodejs21.changes | 16 +++++++++ nodejs21.spec | 36 +++++++++---------- 7 files changed, 121 insertions(+), 81 deletions(-) delete mode 100644 node-v21.2.0.tar.xz create mode 100644 node-v21.4.0.tar.xz diff --git a/SHASUMS256.txt b/SHASUMS256.txt index e75fd20..fb226ba 100644 --- a/SHASUMS256.txt +++ b/SHASUMS256.txt @@ -1,41 +1,41 @@ -fbe1a66068e0ca1900d9795e3b8da027c62073062f78040d453aed9d86189001 node-v21.2.0-aix-ppc64.tar.gz -787c0692ece8182e1da728bb740e05aae2c7240d8cb913c5755859a12ce49a5e node-v21.2.0-arm64.msi -e085e9e695a5fc715c24d0d2ee73a2cebfc2a2b456a28b58f31077609591f4a0 node-v21.2.0-darwin-arm64.tar.gz -9d63f505d2cbeadd55c8bb77a9d1b347d373fa524881fcce658fa0219f872588 node-v21.2.0-darwin-arm64.tar.xz -ff6483bdf4f9817d9915f5fdf1b9154c7689f47ef310eac5ab3c40f6a6e4b700 node-v21.2.0-darwin-x64.tar.gz -85bd145cbe462e9d5fd7a136deb03e8fcc4a008f05e81c70fd23dfcc932c5e2b node-v21.2.0-darwin-x64.tar.xz -14375ca00bff112be41d6f1d5c9f8e693f7f530b44dbeea2a61daea5a2dcefa3 node-v21.2.0-headers.tar.gz -92ea7cc1bac61b1375a6d4aeb94b6ed454f6ddb481af4efaf359cb6a09b3ccc4 node-v21.2.0-headers.tar.xz -d202d583e5cf3b0a8ba4f8e242467fd7bdea57c94a81c63cfa78aa224bdec7e1 node-v21.2.0-linux-arm64.tar.gz -14130fcfa4a34460627a192e116d0fa74017080e7b8e7222a36cbe4ecb78a9af node-v21.2.0-linux-arm64.tar.xz -ed8364dc4a43f9d5f4ab407d3ad5fa6469f89417b6d8a62ad3611677b2b0d7a0 node-v21.2.0-linux-armv7l.tar.gz -062bd75ac1334223417816ae1147aa89bda9f96101bdf4df0e2bc24d14893f6c node-v21.2.0-linux-armv7l.tar.xz -43b157d3d7ddf6cdc9097f1e3d2cb6e271ea749807d07465c3cc52abf24e0252 node-v21.2.0-linux-ppc64le.tar.gz -f9e0059cf70b3245baa316fa49068bcfefbbabd4ed46da482540658729ce2ce0 node-v21.2.0-linux-ppc64le.tar.xz -e27b04945661a8319ad5ce2ee6b1bad1188a6f70f10029d1a9ae4d8a74d55ea7 node-v21.2.0-linux-s390x.tar.gz -01ba9ea65acec0fa7b42303839a62da71438ea6326e27e3207c32941d79c294f node-v21.2.0-linux-s390x.tar.xz -2600d1103d9963ca194aa52b5610ea28f1e4c2df81e525799fba9b7b530c6e54 node-v21.2.0-linux-x64.tar.gz -828da17da3278ff7a0c89b176f1945259808939ce6b713254dc9e9a67a51e307 node-v21.2.0-linux-x64.tar.xz -0eaf9b337339b78a25dc3671b802684a267c58c081f8bec14e13b34aa50d614b node-v21.2.0.pkg -ce5e44838a18d96a8e5d2e835e38785c885acbcfc661d59ff0454298c716e8d6 node-v21.2.0.tar.gz -d57c9cea394764fa1d9af51e52c7449f71193e9d44c4a81fbedec653ec827707 node-v21.2.0.tar.xz -e94a6a0d041be5b4e5ea1a8b529ec180bec012fe7ff34d5e2bd2c8db99026926 node-v21.2.0-win-arm64.7z -fe94b0afe65795f43f136884b785b386364e5987006c848bd8126d72c16f5517 node-v21.2.0-win-arm64.zip -1e3a43166133c752a0fd0b2bc3709145cfc004f7f7c31e1877326e93ceaeeb4c node-v21.2.0-win-x64.7z -718cf5e6264026b40b26fd6aa7cb54ca95866a202b9555f643556aea9ce73adb node-v21.2.0-win-x64.zip -dc31d74348d73bb3013827bf8f1848029bbc05036f4f5907d31a574502b60d3b node-v21.2.0-win-x86.7z -0eb9ee7c2df90a3d4db54ed16f2c96b85dc86eddb24ee0aade7e635078f0cb32 node-v21.2.0-win-x86.zip -4d91b9e830054d447418ea3d2bce5dc445f593d4c8a66694fb34191a4cea1e57 node-v21.2.0-x64.msi -f3ac006fa46ee4c64e42a607c7f6ba5b66a48f4d78b306e27c8e31dc6a394417 node-v21.2.0-x86.msi -91667a7578ad7c30ab5218c98dba4f4e814ea806775b9be2a1ecd7af9e87eaf5 win-arm64/node.exe -aa149ab68ccab472beea201d39283390547c8e0a12b099797a0cfb6d9ffefb7b win-arm64/node.lib -1d56ecf7649df7e4846fc013c0e0c00d5f16ef82c20d004ab3044249dad7580f win-arm64/node_pdb.7z -e995543912c081c14403c082b6d95975bb7f259be75a0248f2bcb03bcea4021c win-arm64/node_pdb.zip -74a391b0a9429bf0f5f0afb80d21dbcd93ccd8da2841644b4b253fb1d2b242a2 win-x64/node.exe -2f88106acb54a105e7beda077ab9eda04d98c202db9c1477ea48d7dd9e58151a win-x64/node.lib -65896cfbaa4ea12534a15ba35d96f06a5e10786eb8b2714005d691a99acb10d4 win-x64/node_pdb.7z -f22a5c10cdc45cb37cf191a607a6829a7fb22dd2dece54101f67ac8b658d4563 win-x64/node_pdb.zip -41ec18166b1ef9dc6bc488d10829052d0861ba440e38ba906c741df983855230 win-x86/node.exe -6825637ae988424a72f049ba92264be2956881875ee264cb71441bfbff5bcd85 win-x86/node.lib -862b9cb0e86cfcb2438eeb45134c2def8bb8a4980392d2470d56434e3e6345a3 win-x86/node_pdb.7z -664b62eaf1f34c4a482f5e1de26a52a98fe0bf05390d1b2a3ab58a943bcb6b15 win-x86/node_pdb.zip +91f69ef2501efe9908b5adddc740c1b614054551abe1087a475b3f8e8bcd4f51 node-v21.4.0-aix-ppc64.tar.gz +4b4e57ff8f70fbdf49e4917bed65a4c7c896af2b3af5932d1069e9c637bea581 node-v21.4.0-arm64.msi +459a23a6044003c6cb5d24867da0c473bd8c2e4cb5689517051be182eed46c2b node-v21.4.0-darwin-arm64.tar.gz +6b64cfd77fe1c09b96e6f57643d73a0bba22f270d58ab17eb23ffb62037f55b8 node-v21.4.0-darwin-arm64.tar.xz +438cf09d2b48116170f1b2bf351f19a77e62c85b939524d4cf3c0a5b7bd0dba9 node-v21.4.0-darwin-x64.tar.gz +3c789c5907a417f4e51c95b282af5b2d89442a51a60fe7144cc2e98e00353ccd node-v21.4.0-darwin-x64.tar.xz +f16010627115873b53ec90bb3b896672602443c450dd390bbe59c64d619f2f40 node-v21.4.0-headers.tar.gz +3da216a3129be17a21f7f6e4f488cd350b45acc2025eb65d078f88fd1071884e node-v21.4.0-headers.tar.xz +071b90b14c2e74f8400c48683c21250491951faf9ae54756a2b53340c1574a27 node-v21.4.0-linux-arm64.tar.gz +a3ae9aa0ce883cb6296f83e77602f39291ff2cc6136be9e6647330df748374be node-v21.4.0-linux-arm64.tar.xz +48b0d4f52f421a6baa5fbb54339fb03a86cce976fd3b647271309d0a1844563d node-v21.4.0-linux-armv7l.tar.gz +fe55e583f52c1685403d2834a079869e7a3c7484278b9ab181985a25936e61cf node-v21.4.0-linux-armv7l.tar.xz +26e9de097745eb150739cf9f7664bfe6c61ebafac1954b5dd97f52c673212283 node-v21.4.0-linux-ppc64le.tar.gz +ed1f88de3fc995060571821684ae1029081c525f693e8cb02fb65b27d73a2c47 node-v21.4.0-linux-ppc64le.tar.xz +902a00cd9c2d15d2780704a553c70eaa64ee59443417f527f0da76e494d38179 node-v21.4.0-linux-s390x.tar.gz +8e3e7eb7a29144ed8f7adea41687929570e3b0113b773b00f350b8799cdedcbf node-v21.4.0-linux-s390x.tar.xz +d8cd0ec0b78bcbc591e7a4655a92c1c667e64bc434e7a895904dc1fe9442af1d node-v21.4.0-linux-x64.tar.gz +9f3b4447a689c1c0f6c08f61967f2a8e50d2c8187805e85ad67701ef84c0095c node-v21.4.0-linux-x64.tar.xz +4ae54c36a6891b20e1de4596d8991bccc32eb418a8b98448057762941a9efe5e node-v21.4.0.pkg +e7b79431a3ec8c8193d30dbac92ed08777739417a9c2820acbde1eae2314eb96 node-v21.4.0.tar.gz +7a80f6527654602d7358c5be2eefc4f80a64c8901630a83977b073c34f25479c node-v21.4.0.tar.xz +be3646b1ed2d202cae5558d374856b32384f3cc7169c709ec88992e6d7c58a54 node-v21.4.0-win-arm64.7z +519e98ce05cc395ce0292a34e0a225bae39d0b06652a133626be1723a5571588 node-v21.4.0-win-arm64.zip +54d94594b012c9a5d0cb9ee752831494d1d97b62a7b4e9e228f358e892ff4172 node-v21.4.0-win-x64.7z +8e7a1c04ff9d1b2680887a31b9eea1392913b91af29f928233ef832d879847de node-v21.4.0-win-x64.zip +3eda30ea8831f2e39dffec848913de14b38a828d254b40a8a7a4969a878f7eba node-v21.4.0-win-x86.7z +c1b94300c54c22ceb30086a8b50f0df7511ed456c3be54fc03a04b5d4c18820c node-v21.4.0-win-x86.zip +2f040b8180f01d97d03d8b4e44601de22956947651f6724b38fdb7c4618e251e node-v21.4.0-x64.msi +6c86dad32eed707f7aedfc7f986ac5a7dfa32b5d4474095dba8b3fb01f38037e node-v21.4.0-x86.msi +57f326d3aa8fd777e75850e5df4a0b0931b7e154e349d8b5915772f4ae6b1f65 win-arm64/node.exe +fe2dae50bdfba3f151248d0f8b87d621263a627099df6aa1611ccd94387464fe win-arm64/node.lib +b72f06e1a57298661271f4d87cc841c9212c4123f159a356d6f9970edd0585d7 win-arm64/node_pdb.7z +c8f034ab54a80af486083c858b1d538f2deeab5d3318f04b0843f1b60a53d28d win-arm64/node_pdb.zip +84487781d837df4005223011a8528d8a74f6728027dd2d99038a5f8f02959b0d win-x64/node.exe +d0310658ca8dfdfaab078ef2a017cc7347a30ce51f123e38ac4fcac74706f136 win-x64/node.lib +1918a98f41c5dfa812b6e85f3b3502fcbbb09cf6be45ae481792e3c63184c8c9 win-x64/node_pdb.7z +26412a3159a005efdbb1f899ce97ad090918d7a42708cb481d6a568f1a39b12b win-x64/node_pdb.zip +36f6cd67be2b41b05bbcb5440e63d10ce2804edf7c4873a8fee8492123b667f7 win-x86/node.exe +9395c4286ec710c0410fd4e7346f1b4a5ff0ad4f5c8501f716c0a8a20f79398e win-x86/node.lib +b82c6cd16d8929b8f10a26916fd4ef821f1b9f71e21a192a50c4195c8eaf184b win-x86/node_pdb.7z +ba7fbaa18c713206f4a129fd4a7e87ae5cd214d094d7758f12b833258376bd6d win-x86/node_pdb.zip diff --git a/SHASUMS256.txt.sig b/SHASUMS256.txt.sig index 19a74e323903cee9604e46469ad4dc8f06bffc769eda535c743a73e1247c1ed1..8075cab45b5e0df31a32b75a2ae77d7674c17a9403f87eefca22454a96f6f8ce 100644 GIT binary patch delta 542 zcmV+(0^$9(1hxc_BY$q}od6065O)uHnp)vj0G^`|0D1?q_1V@V0c^vars zKGur?cHHK)0X2ILG!1>{D!E>~4~)9-h9~V#wXeaOi zDq{6d0zR2QGJ(mQL_=qHWXjw*O{77g2n~45Z%}w1t0=`zBh?RNxmQs8_s>Q}%{uu? z0afCfsr;xQMMgQy7UzU+HZmL`r8_ceJpPlBI!kS*Q}bPo-SfNvjCRycqO3Z-!#&Nz zu=yH$N&6o`d4FZWmKi%F5u3DP3WpKIU>rMpg9*0YWh^bH#m|m9Ip5Kgh*112JdLVbHdC(9-fWA4CGWu zVtq>1cob6*30oc&nV2y+#ZqwUk{cuK4wUFrk77+5Z-2jb>be?Q>d7o;VeNmA_OrHL z9FWQi?&9YIO|5HBo_rcn-*zo|Ornt}7m5M8BaO!aUrVc0sb2XRS g%z$J*kQW6py?UnmxsoAci~bUtZ1uH)fli9p_WDT$+)I`kmt*DB5qlgp{{^Lqo9WT@i?6v?3|rdHGh{&dKU~yJ06(p7hvn( zR2IDO8x}O~@LiC_C9cnSdW?V)T}gtMh{o?#u)v{vz5aS*iadWtmD(^!8N^=Hn>lrT zte!3EdZi+qP=s-R`N+g%$m;f&K=sZxn(snEgs7_#^{og?JK4 zy{yI-94E&=LefzYqJQxguZSfS@~_gaukm)OE_pJZAtpJ`ke;5@rUfPT^L{&;GR}ERj=6IN0U(=3w?9+wNjlprV7x1N} gCsaGY!xyi$ES&6fv$1kO?YU~nJ%A9yEuS2#py1gHq5uE@ diff --git a/fix_ci_tests.patch b/fix_ci_tests.patch index fea56d9..c443145 100644 --- a/fix_ci_tests.patch +++ b/fix_ci_tests.patch @@ -2,10 +2,23 @@ Author: Adam Majer Date: Dec 20 09:18:49 UTC 2017 Summary: Fix CI unit tests framework for OBS building -Index: node-v21.2.0/test/parallel/test-module-loading-globalpaths.js +Index: node-v21.4.0/test/parallel/test-node-output-v8-warning.mjs =================================================================== ---- node-v21.2.0.orig/test/parallel/test-module-loading-globalpaths.js -+++ node-v21.2.0/test/parallel/test-module-loading-globalpaths.js +--- node-v21.4.0.orig/test/parallel/test-node-output-v8-warning.mjs ++++ node-v21.4.0/test/parallel/test-node-output-v8-warning.mjs +@@ -15,7 +15,7 @@ describe('v8 output', { concurrency: tru + .replaceAll('*test*', '*') + .replaceAll(/.*?\*fixtures\*v8\*/g, '(node:*) V8: *') // Replace entire path before fixtures/v8 + .replaceAll('*fixtures*v8*', '*') +- .replaceAll('node --', '* --'); ++ .replace(/node\d+ --/, '* --'); + } + const common = snapshot + .transform(snapshot.replaceWindowsLineEndings, snapshot.replaceWindowsPaths, replaceNodeVersion); +Index: node-v21.4.0/test/parallel/test-module-loading-globalpaths.js +=================================================================== +--- node-v21.4.0.orig/test/parallel/test-module-loading-globalpaths.js ++++ node-v21.4.0/test/parallel/test-module-loading-globalpaths.js @@ -11,6 +11,9 @@ const { addLibraryPath } = require('../c addLibraryPath(process.env); @@ -16,10 +29,10 @@ Index: node-v21.2.0/test/parallel/test-module-loading-globalpaths.js if (process.argv[2] === 'child') { console.log(require(pkgName).string); } else { -Index: node-v21.2.0/test/parallel/test-tls-passphrase.js +Index: node-v21.4.0/test/parallel/test-tls-passphrase.js =================================================================== ---- node-v21.2.0.orig/test/parallel/test-tls-passphrase.js -+++ node-v21.2.0/test/parallel/test-tls-passphrase.js +--- node-v21.4.0.orig/test/parallel/test-tls-passphrase.js ++++ node-v21.4.0/test/parallel/test-tls-passphrase.js @@ -223,7 +223,7 @@ server.listen(0, common.mustCall(functio }, onSecureConnect()); })).unref(); @@ -29,10 +42,10 @@ Index: node-v21.2.0/test/parallel/test-tls-passphrase.js // Missing passphrase assert.throws(function() { -Index: node-v21.2.0/test/parallel/test-repl-envvars.js +Index: node-v21.4.0/test/parallel/test-repl-envvars.js =================================================================== ---- node-v21.2.0.orig/test/parallel/test-repl-envvars.js -+++ node-v21.2.0/test/parallel/test-repl-envvars.js +--- node-v21.4.0.orig/test/parallel/test-repl-envvars.js ++++ node-v21.4.0/test/parallel/test-repl-envvars.js @@ -2,7 +2,9 @@ // Flags: --expose-internals @@ -44,10 +57,10 @@ Index: node-v21.2.0/test/parallel/test-repl-envvars.js const stream = require('stream'); const { describe, test } = require('node:test'); const REPL = require('internal/repl'); -Index: node-v21.2.0/Makefile +Index: node-v21.4.0/Makefile =================================================================== ---- node-v21.2.0.orig/Makefile -+++ node-v21.2.0/Makefile +--- node-v21.4.0.orig/Makefile ++++ node-v21.4.0/Makefile @@ -545,7 +545,8 @@ test-ci-js: | clear-stalled .PHONY: test-ci # Related CI jobs: most CI tests, excluding node-test-commit-arm-fanned @@ -68,10 +81,10 @@ Index: node-v21.2.0/Makefile echo "Skipping tools/doc/node_modules (no crypto)"; \ else \ cd tools/doc && $(call available-node,$(run-npm-ci)) \ -Index: node-v21.2.0/tools/test.py +Index: node-v21.4.0/tools/test.py =================================================================== ---- node-v21.2.0.orig/tools/test.py -+++ node-v21.2.0/tools/test.py +--- node-v21.4.0.orig/tools/test.py ++++ node-v21.4.0/tools/test.py @@ -1362,7 +1362,7 @@ def BuildOptions(): result.add_option("-s", "--suite", help="A test suite", default=[], action="append") @@ -81,10 +94,10 @@ Index: node-v21.2.0/tools/test.py result.add_option("--arch", help='The architecture to run tests for', default='none') result.add_option("--snapshot", help="Run the tests with snapshot turned on", -Index: node-v21.2.0/test/parallel/test-crypto-dh.js +Index: node-v21.4.0/test/parallel/test-crypto-dh.js =================================================================== ---- node-v21.2.0.orig/test/parallel/test-crypto-dh.js -+++ node-v21.2.0/test/parallel/test-crypto-dh.js +--- node-v21.4.0.orig/test/parallel/test-crypto-dh.js ++++ node-v21.4.0/test/parallel/test-crypto-dh.js @@ -92,7 +92,7 @@ const crypto = require('crypto'); dh3.computeSecret(''); }, { message: common.hasOpenSSL3 && !hasOpenSSL3WithNewErrorMessage ? @@ -94,3 +107,16 @@ Index: node-v21.2.0/test/parallel/test-crypto-dh.js } } +Index: node-v21.4.0/benchmark/misc/startup-cli-version.js +=================================================================== +--- node-v21.4.0.orig/benchmark/misc/startup-cli-version.js ++++ node-v21.4.0/benchmark/misc/startup-cli-version.js +@@ -10,7 +10,7 @@ const path = require('path'); + // indispensible part of the CLI. + const bench = common.createBenchmark(main, { + cli: [ +- 'tools/node_modules/eslint/bin/eslint.js', ++ 'deps/npm/bin/npx-cli.js', + 'deps/npm/bin/npm-cli.js', + 'deps/corepack/dist/corepack.js', + ], diff --git a/node-v21.2.0.tar.xz b/node-v21.2.0.tar.xz deleted file mode 100644 index b6a1d19..0000000 --- a/node-v21.2.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d57c9cea394764fa1d9af51e52c7449f71193e9d44c4a81fbedec653ec827707 -size 42642416 diff --git a/node-v21.4.0.tar.xz b/node-v21.4.0.tar.xz new file mode 100644 index 0000000..814ef43 --- /dev/null +++ b/node-v21.4.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a80f6527654602d7358c5be2eefc4f80a64c8901630a83977b073c34f25479c +size 42514444 diff --git a/nodejs21.changes b/nodejs21.changes index 836c6a9..6f7c45c 100644 --- a/nodejs21.changes +++ b/nodejs21.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Mon Dec 11 07:31:07 UTC 2023 - Adam Majer + +- Update to 21.4.0: + * fs: introduce dirent.parentPath + * fs: use default w flag for writeFileSync with utf8 encoding + +- Changes in 21.3.0: + * New --disable-warning flag + * Fast fs.writeFileSync with UTF-8 Strings + +For details, see +https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V21.md#21.4.0 + +- fix_ci_tests.patch: added workaround for missing deps + ------------------------------------------------------------------- Thu Nov 23 10:44:16 UTC 2023 - Adam Majer diff --git a/nodejs21.spec b/nodejs21.spec index 59b0513..1200ef4 100644 --- a/nodejs21.spec +++ b/nodejs21.spec @@ -31,7 +31,7 @@ %endif Name: nodejs21 -Version: 21.2.0 +Version: 21.4.0 Release: 0 # Double DWZ memory limits @@ -309,7 +309,7 @@ Provides: bundled(libcares2) = 1.20.1 %if ! 0%{with intree_icu} BuildRequires: pkgconfig(icu-i18n) >= 71 %else -Provides: bundled(icu) = 73.2 +Provides: bundled(icu) = 74.1 %endif %if ! 0%{with intree_nghttp2} @@ -379,17 +379,15 @@ Provides: bundled(ngtcp2) = 0.8.1 Provides: bundled(base64) = 0.5.1 Provides: bundled(simdutf) = 3.2.18 # bundled url-ada parser, not ada -Provides: bundled(ada) = 2.7.2 +Provides: bundled(ada) = 2.7.4 -Provides: bundled(node-@fastify/busboy) = 2.0.0 +Provides: bundled(node-@fastify/busboy) = 2.1.0 Provides: bundled(node-acorn) = 8.11.2 Provides: bundled(node-acorn-walk) = 8.2.0 -Provides: bundled(node-balanced-match) = 1.0.2 -Provides: bundled(node-brace-expansion) = 2.0.1 Provides: bundled(node-cjs-module-lexer) = 1.2.2 Provides: bundled(node-corepack) = 0.23.0 Provides: bundled(node-minimatch) = 9.0.3 -Provides: bundled(node-undici) = 5.27.0 +Provides: bundled(node-undici) = 5.28.1 %description Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js @@ -418,7 +416,7 @@ Requires: nodejs-common Requires: nodejs21 = %{version} Provides: nodejs-npm = %{version} Obsoletes: nodejs-npm < 4.0.0 -Provides: npm(npm) = 10.2.3 +Provides: npm(npm) = 10.2.4 Provides: npm = %{version} %if 0%{?suse_version} >= 1500 %if %{node_version_number} >= 10 @@ -447,8 +445,8 @@ Provides: bundled(node-builtins) = 5.0.1 Provides: bundled(node-cacache) = 18.0.0 Provides: bundled(node-chalk) = 5.3.0 Provides: bundled(node-chownr) = 2.0.0 -Provides: bundled(node-ci-info) = 3.9.0 -Provides: bundled(node-cidr-regex) = 3.1.1 +Provides: bundled(node-ci-info) = 4.0.0 +Provides: bundled(node-cidr-regex) = 4.0.3 Provides: bundled(node-clean-stack) = 2.2.0 Provides: bundled(node-cli-columns) = 4.0.0 Provides: bundled(node-cli-table3) = 0.6.3 @@ -479,12 +477,12 @@ Provides: bundled(node-fastest-levenshtein) = 1.0.16 Provides: bundled(node-foreground-child) = 3.1.1 Provides: bundled(node-fs-minipass) = 2.1.0 Provides: bundled(node-fs-minipass) = 3.0.3 -Provides: bundled(node-function-bind) = 1.1.1 +Provides: bundled(node-function-bind) = 1.1.2 Provides: bundled(node-gauge) = 5.0.1 Provides: bundled(node-glob) = 10.3.10 Provides: bundled(node-graceful-fs) = 4.2.11 -Provides: bundled(node-has) = 1.0.3 Provides: bundled(node-has-unicode) = 2.0.1 +Provides: bundled(node-hasown) = 2.0.0 Provides: bundled(node-hosted-git-info) = 7.0.1 Provides: bundled(node-http-cache-semantics) = 4.1.1 Provides: bundled(node-http-proxy-agent) = 7.0.0 @@ -497,9 +495,9 @@ Provides: bundled(node-indent-string) = 4.0.0 Provides: bundled(node-ini) = 4.1.1 Provides: bundled(node-init-package-json) = 6.0.0 Provides: bundled(node-ip) = 2.0.0 -Provides: bundled(node-ip-regex) = 4.3.0 -Provides: bundled(node-is-cidr) = 4.0.2 -Provides: bundled(node-is-core-module) = 2.13.0 +Provides: bundled(node-ip-regex) = 5.0.0 +Provides: bundled(node-is-cidr) = 5.0.3 +Provides: bundled(node-is-core-module) = 2.13.1 Provides: bundled(node-is-fullwidth-code-point) = 3.0.0 Provides: bundled(node-is-lambda) = 1.0.1 Provides: bundled(node-isexe) = 2.0.0 @@ -512,16 +510,16 @@ Provides: bundled(node-just-diff) = 6.0.2 Provides: bundled(node-just-diff-apply) = 5.5.0 Provides: bundled(node-libnpmaccess) = 8.0.1 Provides: bundled(node-libnpmdiff) = 6.0.3 -Provides: bundled(node-libnpmexec) = 7.0.3 +Provides: bundled(node-libnpmexec) = 7.0.4 Provides: bundled(node-libnpmfund) = 5.0.1 Provides: bundled(node-libnpmhook) = 10.0.0 Provides: bundled(node-libnpmorg) = 6.0.1 Provides: bundled(node-libnpmpack) = 6.0.3 -Provides: bundled(node-libnpmpublish) = 9.0.1 +Provides: bundled(node-libnpmpublish) = 9.0.2 Provides: bundled(node-libnpmsearch) = 7.0.0 Provides: bundled(node-libnpmteam) = 6.0.0 Provides: bundled(node-libnpmversion) = 5.0.1 -Provides: bundled(node-lru-cache) = 10.0.1 +Provides: bundled(node-lru-cache) = 10.0.2 Provides: bundled(node-lru-cache) = 6.0.0 Provides: bundled(node-make-fetch-happen) = 13.0.0 Provides: bundled(node-minimatch) = 9.0.3 @@ -580,7 +578,7 @@ Provides: bundled(node-semver) = 7.5.4 Provides: bundled(node-set-blocking) = 2.0.0 Provides: bundled(node-shebang-command) = 2.0.0 Provides: bundled(node-shebang-regex) = 3.0.0 -Provides: bundled(node-signal-exit) = 4.0.2 +Provides: bundled(node-signal-exit) = 4.1.0 Provides: bundled(node-sigstore) = 2.1.0 Provides: bundled(node-smart-buffer) = 4.2.0 Provides: bundled(node-socks) = 2.7.1 From abbeb2783e24941422c007f48e51b56bb574418c01864a2e9b397222c5fe0375 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Fri, 15 Dec 2023 14:11:41 +0000 Subject: [PATCH 4/4] OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs21?expand=0&rev=10 --- fix_ci_tests.patch | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/fix_ci_tests.patch b/fix_ci_tests.patch index c443145..1dca194 100644 --- a/fix_ci_tests.patch +++ b/fix_ci_tests.patch @@ -111,12 +111,32 @@ Index: node-v21.4.0/benchmark/misc/startup-cli-version.js =================================================================== --- node-v21.4.0.orig/benchmark/misc/startup-cli-version.js +++ node-v21.4.0/benchmark/misc/startup-cli-version.js -@@ -10,7 +10,7 @@ const path = require('path'); +@@ -1,6 +1,7 @@ + 'use strict'; + const common = require('../common.js'); + const { spawnSync } = require('child_process'); ++const { existsSync } = require('fs'); + const path = require('path'); + + // This benchmarks the startup of various CLI tools that are already +@@ -10,7 +11,8 @@ const path = require('path'); // indispensible part of the CLI. const bench = common.createBenchmark(main, { cli: [ - 'tools/node_modules/eslint/bin/eslint.js', ++ 'deps/npm/bin/npx-cli.js', + 'deps/npm/bin/npx-cli.js', 'deps/npm/bin/npm-cli.js', 'deps/corepack/dist/corepack.js', ], +@@ -45,6 +47,10 @@ function spawnProcess(cli, bench, state) + + function main({ count, cli }) { + cli = path.resolve(__dirname, '../../', cli); ++ if (!existsSync(cli)) { ++ return; ++ } ++ + const warmup = 3; + const state = { count, finished: -warmup }; + spawnProcess(cli, bench, state);