From b1b1d9718bd397e9e8a3c5918f1ca097ea54e3743f77627ccbf159f43954ab89 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Tue, 2 Apr 2024 14:32:44 +0000 Subject: [PATCH 1/7] - Update to 21.7.1 * revert "test_runner: do not invoke after hook when test is empty" * lib: return directly if udp socket close before lookup - Changes in 21.7.0 * util.styleText(format, text): This function returns a formatted text considering the format passed. * support for multi-line values for .env file * sea: support embedding assets * vm: support using the default loader to handle dynamic import() * crypto: implement crypto.hash() * http2: add h2 compat support for appendHeader - versioned.patch, nodejs-libpath.patch: refreshed - c-ares-fixes.patch: upstreamed, removed - Add libalternative config for corepack OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs21?expand=0&rev=21 --- SHASUMS256.txt | 82 +++++++++++----------- SHASUMS256.txt.sig | Bin 438 -> 566 bytes c-ares-fixes.patch | 46 ------------ node-v21.6.2.tar.xz | 3 - node-v21.7.1.tar.xz | 3 + nodejs-libpath.patch | 44 ++++++------ nodejs21.changes | 23 ++++++ nodejs21.spec | 147 +++++++++++++++++++++++---------------- versioned.patch | 162 +++++++++++++++++++++---------------------- 9 files changed, 259 insertions(+), 251 deletions(-) delete mode 100644 c-ares-fixes.patch delete mode 100644 node-v21.6.2.tar.xz create mode 100644 node-v21.7.1.tar.xz diff --git a/SHASUMS256.txt b/SHASUMS256.txt index 08e6a86..20822ea 100644 --- a/SHASUMS256.txt +++ b/SHASUMS256.txt @@ -1,41 +1,41 @@ -e06dff53a5e2a88caff9735c076165a6a53f4c45960a8887410684e1fea6c7cb node-v21.6.2-aix-ppc64.tar.gz -c7fa8788001eaac4bb250a84f6b3a918ebaa8016111ece95d59b513cf4a394dc node-v21.6.2-arm64.msi -120c8205654c640865864dc464389b3ffe6d7ebe310dffdbe3fd8718a512e14f node-v21.6.2-darwin-arm64.tar.gz -f8aa996b4e7700069892bc9ff28ddef3b3b3c8c952b929d1b148c943995970e3 node-v21.6.2-darwin-arm64.tar.xz -0f75d9b46b986100c6faeec040ee46adf4981eb6abb5dd63e7a6ca4868d280f4 node-v21.6.2-darwin-x64.tar.gz -5944de39bc7b8af229b0024d583ced7c76cee194ee9068a07d67372a606c5105 node-v21.6.2-darwin-x64.tar.xz -55d9a03dcfce682583eb5e7eec15f32ae95b28b6e805f31688b22a7bd71581b1 node-v21.6.2-headers.tar.gz -976500ffa659108fa2eb30daae2f1b96a34a97b2caa1db30802ac56edc2b237a node-v21.6.2-headers.tar.xz -b8431985c53cc14e02cddf4c128d043c62af19023f908ebcdc1c6a683ee995f3 node-v21.6.2-linux-arm64.tar.gz -2606765f95262bcebb323e56a39b3be8db89863fbd83e06d2b5a08e41dc78f29 node-v21.6.2-linux-arm64.tar.xz -d6127be538ae57447fd40bac6ea124ad71cfd5a50b9343b781830cc92bc1a0c2 node-v21.6.2-linux-armv7l.tar.gz -ae33085c3d635f9488f47c56ee90fdf0dc9c1d0a520cfbe281c5b08d69e64da0 node-v21.6.2-linux-armv7l.tar.xz -2e265d86f9d20ba223d65ceadc0589b156439a5521cd9da6e34de5460a0d2195 node-v21.6.2-linux-ppc64le.tar.gz -b951f52db17b75a7bff0a2da2cefca3ba1e4dd7368b2b1280f39fcbecde0555c node-v21.6.2-linux-ppc64le.tar.xz -7cba8c2b2338aaa05f5dec5d953d61cdf5219881a7c8d420f215e920a33c06fa node-v21.6.2-linux-s390x.tar.gz -167bb0595478bae4c46b2248cae16890d24c2a9c92de7d0e27f9d1cafcad21ba node-v21.6.2-linux-s390x.tar.xz -d4504dcbcd1a9ded42d86bc20a7e72d6d631e49dcf3f9c849c3b51b12f3f4544 node-v21.6.2-linux-x64.tar.gz -593dd28f5c78d797e76b730937b95fcdfc594f053a8756b1d0860a4555bed58e node-v21.6.2-linux-x64.tar.xz -a0cdada31786f6ff1f82e8fd91bda23cd4f615a56acd3c9605cd468b60b8437a node-v21.6.2-win-arm64.7z -a201948e5f0df6de6c4b42dbcb42d7a10d3cb5b6dbb7a40e3f4244644d3b3d1a node-v21.6.2-win-arm64.zip -d450d170009d272c98765af3abf2bbc2903c1c08856f9e3730be03cc9d9b2bc5 node-v21.6.2-win-x64.7z -99bac3a930bd487e53c5a35b3e2f5ec102053316d7eb89f93273d916d57353a2 node-v21.6.2-win-x64.zip -44dee171378d7ac9967e772a8f114be5fdf59a163f65ec5faa7411c8be3bc961 node-v21.6.2-win-x86.7z -1701b32ba5315c794c2a64ef4a71e93ad2a6c109acf5b577d628413a7dc5cd04 node-v21.6.2-win-x86.zip -e081647df79c833e9d62e7edff5e9e01dbd5b78417dff6ef149e6384e8327bcf node-v21.6.2-x64.msi -12960661f83a1618adf57e84eddcd1886edec452d74f27318efde8b92a25c91a node-v21.6.2-x86.msi -6b5d7153dffec20487cbcb81d5ebaf97e6678eb463337e8429ba4e7b60754505 node-v21.6.2.pkg -9020fb36ec7e04f5032944c8422c2004350e9bfcd5e835ac3c90b74981c1f3e0 node-v21.6.2.tar.gz -191294d445d1e6800359acc8174529b1e18e102147dc5f596030d3dce96931e5 node-v21.6.2.tar.xz -ae7ccd1298e8871e61c1223a929ff482fa43d29aa284118798f01a73e40b2b29 win-arm64/node.exe -cf6082f3ffb45335d41566805c7b844082f36042fa7dc2dc6aecdc3ce0e7c79a win-arm64/node.lib -8cb47e9ebda0efb8578382db82001308bcb2de95e0275e0bca3ff4f03de140b1 win-arm64/node_pdb.7z -cdb3d760f9aca9578135c25f299b382e074bfcb56b2d321acf278a0a76ec2eb4 win-arm64/node_pdb.zip -3f06d98986b4ddf7e9d258936bb7b8907c44c6e9a29c645a5aca04e5a26c0b53 win-x64/node.exe -cacf06da3d7f04d0a0a5a901bfbdbaf0950cc5f73febf7b2f451b27c7f6265b1 win-x64/node.lib -077739fded97d02d026db839aca840622c34b7e584efe294d40fc8d1bd9dc19a win-x64/node_pdb.7z -54c3a6fea6f832716bfe5d918a56ca1767ae89163729c34d866c2623c0a90edf win-x64/node_pdb.zip -0aaa0f4635253afe9660f64a862786db555961ecc7217b68fa120817c0c56a00 win-x86/node.exe -ca6545afa230d2abdbf8ba19065f77b727bde72dfa253c466d876d0b3a7ea4ee win-x86/node.lib -cf24de1e7157ac4bac77fccb255fe295e8639a349d5c9f8726fe3e6b5ccf8afc win-x86/node_pdb.7z -99f2345e0e737fbd7f8d94b4118d9dc820ebc198823de29324e1f1754f84c9e0 win-x86/node_pdb.zip +cba4d1d6c05684edeb88f06351c61c3acdb3d8d6df46b9dcd8ca89af847268e5 node-v21.7.1-aix-ppc64.tar.gz +d21f34e3864d93a8491591002e67a704a8a8ac5f9035d9da890327f884edd1c6 node-v21.7.1-arm64.msi +0a4dde483479dcf272f3d4d7afb509c3d45cf7a1ea451ce108f434dad4fa43e4 node-v21.7.1-darwin-arm64.tar.gz +20b26630c1c6d2c3db9815fca135931bdbe2b5c1c228a3f1f6a9ed6dde91ef76 node-v21.7.1-darwin-arm64.tar.xz +a406f4fbe68ff33319d513fa645aa7b9508c2cb65299f0a2de1757c2a6333c85 node-v21.7.1-darwin-x64.tar.gz +9212f90b3aaaadaf38fe32639e12ceee3c82380b50cc67402f660a9daecb7e87 node-v21.7.1-darwin-x64.tar.xz +deb71c9d4698eb835ff748671d5f04b2e0c7f53e0de457d4ee9f926ab9d285d9 node-v21.7.1-headers.tar.gz +c33217484a2f8a3aa556a4c46144757031d1a8955867e004a3db6996b67c3415 node-v21.7.1-headers.tar.xz +466647785722c5b9b9f2e430e11645e16f1d112b303b0ffdf2d5fa0eb95e647c node-v21.7.1-linux-arm64.tar.gz +d384c843621ccb80f1367fdff85d4e3870bc934ffe37ed48eb320ebebba8ddbb node-v21.7.1-linux-arm64.tar.xz +75a2787505079e972fe91d9507be0a13be2a7cf009db7a520a725bc280225704 node-v21.7.1-linux-armv7l.tar.gz +e375b24d57c8126d58ae31b807c91df6532c52e3441e22d2b3cde5116553c8fb node-v21.7.1-linux-armv7l.tar.xz +5c70f1b4d960130751334c064e5b164c3366900baf8d3ee2a11d8c444ba9c84f node-v21.7.1-linux-ppc64le.tar.gz +28b98d0ec62937bd0769327272615683caabef5c0a5112bd19b9b02d9332e732 node-v21.7.1-linux-ppc64le.tar.xz +6bf591654202c04037ee24de8c3940aff0b54d7449b9c13850f204a9bee11bce node-v21.7.1-linux-s390x.tar.gz +30d5f6eeb3b94ff150d0fc2c07527cd70c8a1ff0384b3ef191663ffe66cb4934 node-v21.7.1-linux-s390x.tar.xz +c7b15146aed968b781c235b6a8f67608be559c4615de9526a9851ae28660cc09 node-v21.7.1-linux-x64.tar.gz +cb25d7a4aa57d15f280ce45cd72f95e9d2020702b7ca75c7fe632444f7c0452c node-v21.7.1-linux-x64.tar.xz +3a8ecf4f887cbe37a1c7a1b720ed259c9e5cdb3648986a148a02211b4a77c6fa node-v21.7.1.pkg +0ba90deb3e4de7c4665cdaabafe2c50d48c6b47e44863bb557ae1b7f01112f40 node-v21.7.1.tar.gz +1272b6e129d564dbde17527b844210b971c20a70ae729268186b7cb9d990a64b node-v21.7.1.tar.xz +6ae0f60b24443708b4673b856c66827c2361957c01ee0c9628281486f0191615 node-v21.7.1-win-arm64.7z +c8931f7130c38e175aa55dfbe4235b20af033ec59d174f4dabf8809b79abe0d5 node-v21.7.1-win-arm64.zip +7c55e73c25e491a22e302e3919dd58145030a2f14bc6e9b2fed0a45c7dd6f867 node-v21.7.1-win-x64.7z +debff16a17e92d084dc19b98b21be35b15d9627befab1c8311b4ff946bf51773 node-v21.7.1-win-x64.zip +a64136c1aeafb096e8461c304c18eaa910d81f75e1ead5155a5548f4e3733a9b node-v21.7.1-win-x86.7z +5db22af240445b0afadadedac497c8b57960f6d27828bb03040be90dfe7561f6 node-v21.7.1-win-x86.zip +e6354ee73967ce6b2ae401edb1d54adaedb321123308e2af1dec71a497e73eaa node-v21.7.1-x64.msi +8673470064c13f491e594b4f4522eba504fc9082db728eed9ba43987b88de69b node-v21.7.1-x86.msi +00d60e58adb4884085675d48064426c0745799169c79e553e1523ffe88f26fd4 win-arm64/node.exe +b068c2ffb9fa47420d55d44bb24ae42211007bbc34426cf68a663b34f8187a41 win-arm64/node.lib +600be209fe1a2a4693eef98393cea9ab3bbc3f08b974ad004cf0aaa944ed2488 win-arm64/node_pdb.7z +53273a368d2079975617d3a5566c5006ee25af68e58408b7cd0842e342acac17 win-arm64/node_pdb.zip +39908c8a16f867e5a2e9666ba8089dd497c4fa48a8008bed9d52cd78181944b2 win-x64/node.exe +96d09c2055c2f252122c86b65d2aabd5f90b1a075844f24bf8bcdbab05baf53e win-x64/node.lib +1f4ece18dbfb3ea96f242f1ca94b309c1e56a50bc6138c33c842d45b198abc7f win-x64/node_pdb.7z +73f6d43a1678df35720662d9052a0a80321c9e92e9c87ef7dc9d70da31197fe9 win-x64/node_pdb.zip +1f8c02748de3c6aefe7f40939db330ec03afe95fff23bbe12ba93fa9f0c180bc win-x86/node.exe +19f86a492bf3b2a2854ebf0d05734afd9866348fc6474ed5b8c53c62ec9b7aa2 win-x86/node.lib +316254a7e269bcdcc37bb831b280c59f565745be01294b4024b8aef19507fe0b win-x86/node_pdb.7z +36186f7fa5b9eb53ed12945b9506d91c487e0fc78b27267c949f609f0e36803e win-x86/node_pdb.zip diff --git a/SHASUMS256.txt.sig b/SHASUMS256.txt.sig index e3025f863dc2aa2ffafa602f9ae3954a04e07b358d112d46d13acf83101b6c48..a1b35e49fdab678a23123c0784818c1d4a938fc997a7d69d4b4a07fabac30c4d 100644 GIT binary patch literal 566 zcmV-60?GY}0y6{v0SEvc79j+W%%MN;9Skm!0FDWF4|+hY>l3nhQ z!|*XmgESNA$dYD(Mx7c0{8oz#U)Vd?9*-kYTlJWVs=(n>s$z9lyHR7I&)yp!Hw@BR zjpyF7bseZwAyd6sd89aY!fQJ$AmX!~&b4y(+31k(-#Q!|>KfFFir=f8dh5cl;y%@PrPA@oL-UB*z>% literal 438 zcmV;n0ZIOe0kZ@E0SEvc79j+Q3<%qWc@{734f)%P>a^d_RbKQ30%gqkcK`|r5R2-x z-_KQE^qe>g{T(O;*j;f6rM8mUk+SH3++Om?kyWtP1%Z_uG~4;UGR(>fFY4c|d{cYg z+R)+=8*)La2RhDM$$8pc_B19OOFXduk$ZWij8Y4*A8JRP>{7^#tURbl^bi~oLNH9L@yZ~;Yg gn+_hZHB`RbmT=K7ClmPSb-TaTHBEJbX{62^3- { - const parsed = dnstools.parseDNSPacket(msg); -@@ -18,16 +20,20 @@ server.on('message', common.mustCall((ms - questions: parsed.questions, - answers: { type: 'A', address: '1.2.3.4', ttl: 123, domain }, - }); -- // Overwrite the # of answers with 2, which is incorrect. -+ // Overwrite the # of answers with 2, which is incorrect. The response is -+ // discarded in c-ares >= 1.21.0. This is the reason why a small timeout is -+ // used in the `Resolver` constructor. See -+ // https://github.com/nodejs/node/pull/50743#issue-1994909204 - buf.writeUInt16LE(2, 6); - server.send(buf, port, address); - }, 2)); - - server.bind(0, common.mustCall(async () => { - const address = server.address(); -- dns.setServers([`127.0.0.1:${address.port}`]); -+ resolver.setServers([`127.0.0.1:${address.port}`]); -+ resolverPromises.setServers([`127.0.0.1:${address.port}`]); - -- dnsPromises.resolveAny('example.org') -+ resolverPromises.resolveAny('example.org') - .then(common.mustNotCall()) - .catch(common.expectsError({ - // May return EBADRESP or ETIMEOUT -@@ -36,7 +42,7 @@ server.bind(0, common.mustCall(async () - hostname: 'example.org' - })); - -- dns.resolveAny('example.org', common.mustCall((err) => { -+ resolver.resolveAny('example.org', common.mustCall((err) => { - assert.notStrictEqual(err.code, 'SUCCESS'); - assert.strictEqual(err.syscall, 'queryAny'); - assert.strictEqual(err.hostname, 'example.org'); diff --git a/node-v21.6.2.tar.xz b/node-v21.6.2.tar.xz deleted file mode 100644 index a871111..0000000 --- a/node-v21.6.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:191294d445d1e6800359acc8174529b1e18e102147dc5f596030d3dce96931e5 -size 42668368 diff --git a/node-v21.7.1.tar.xz b/node-v21.7.1.tar.xz new file mode 100644 index 0000000..c1892cc --- /dev/null +++ b/node-v21.7.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1272b6e129d564dbde17527b844210b971c20a70ae729268186b7cb9d990a64b +size 42519836 diff --git a/nodejs-libpath.patch b/nodejs-libpath.patch index ed46a24..ceb8732 100644 --- a/nodejs-libpath.patch +++ b/nodejs-libpath.patch @@ -1,16 +1,16 @@ -Index: node-v18.9.0/tools/install.py +Index: node-v21.7.1/tools/install.py =================================================================== ---- node-v18.9.0.orig/tools/install.py -+++ node-v18.9.0/tools/install.py -@@ -7,6 +7,7 @@ import errno +--- node-v21.7.1.orig/tools/install.py ++++ node-v21.7.1/tools/install.py +@@ -6,6 +6,7 @@ import errno import os import shutil import sys +from distutils import sysconfig import re - # set at init time -@@ -66,6 +67,10 @@ def try_copy(path, dst): + def abspath(*args): +@@ -66,6 +67,10 @@ def try_copy(options, path, dest): try_unlink(target_path) # prevent ETXTBSY errors return shutil.copy2(source_path, target_path) @@ -18,32 +18,32 @@ Index: node-v18.9.0/tools/install.py + libdir_fq = sysconfig.get_config_var("LIBDIR") + return re.sub("^" + re.escape(node_prefix + "/"), "", libdir_fq) + - def try_remove(path, dst): - source_path, target_path = mkpaths(path, dst) - print('removing %s' % target_path) -@@ -81,7 +86,7 @@ def uninstall(paths, dst): - try_remove(path, dst) + def try_remove(options, path, dest): + source_path, target_path = mkpaths(options, path, dest) + if not options.silent: +@@ -82,7 +87,7 @@ def uninstall(options, paths, dest): + try_remove(options, path, dest) - def package_files(action, name, bins): -- target_path = 'lib/node_modules/' + name + '/' -+ target_path = libdir() + '/node_modules/' + name + '/' + def package_files(options, action, name, bins): +- target_path = os.path.join('lib/node_modules', name) ++ target_path = os.path.join(libdir(), 'node_modules', name) # don't install npm if the target path is a symlink, it probably means # that a dev version of npm is installed there -@@ -101,7 +106,7 @@ def package_files(action, name, bins): +@@ -103,7 +108,7 @@ def package_files(options, action, name, if action == uninstall: - action([link_path], 'bin/' + bin_name) + action(options, [link_path], os.path.join('bin', bin_name)) elif action == install: -- try_symlink('../lib/node_modules/' + name + '/' + bin_target, link_path) -+ try_symlink('../' + libdir() + '/node_modules/' + name + '/' + bin_target, link_path) +- try_symlink(options, os.path.join('../lib/node_modules', name, bin_target), link_path) ++ try_symlink(options, os.path.join('..', libdir(), 'node_modules', name, bin_target), link_path) else: assert 0 # unhandled action type -Index: node-v18.9.0/lib/internal/modules/cjs/loader.js +Index: node-v21.7.1/lib/internal/modules/cjs/loader.js =================================================================== ---- node-v18.9.0.orig/lib/internal/modules/cjs/loader.js -+++ node-v18.9.0/lib/internal/modules/cjs/loader.js -@@ -1254,7 +1254,7 @@ Module._initPaths = function() { +--- node-v21.7.1.orig/lib/internal/modules/cjs/loader.js ++++ node-v21.7.1/lib/internal/modules/cjs/loader.js +@@ -1528,7 +1528,7 @@ Module._initPaths = function() { path.resolve(process.execPath, '..') : path.resolve(process.execPath, '..', '..'); diff --git a/nodejs21.changes b/nodejs21.changes index 5cdd49e..46fc18e 100644 --- a/nodejs21.changes +++ b/nodejs21.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Tue Apr 2 13:54:32 UTC 2024 - Adam Majer + +- Update to 21.7.1 + * revert "test_runner: do not invoke after hook when test is empty" + * lib: return directly if udp socket close before lookup + +- Changes in 21.7.0 + * util.styleText(format, text): This function returns a + formatted text considering the format passed. + * support for multi-line values for .env file + * sea: support embedding assets + * vm: support using the default loader to handle dynamic import() + * crypto: implement crypto.hash() + * http2: add h2 compat support for appendHeader + +- versioned.patch, nodejs-libpath.patch: refreshed +- c-ares-fixes.patch: upstreamed, removed + ------------------------------------------------------------------- Fri Feb 16 15:37:23 UTC 2024 - Adam Majer @@ -25,6 +44,10 @@ Mon Feb 12 14:51:32 UTC 2024 - Adam Majer * Support configurable snapshot through --build-snapshot-config flag - fix_ci_tests.patch: refreshed +------------------------------------------------------------------- +Sat Jan 27 10:09:34 UTC 2024 - xtex + +- Add libalternative config for corepack ------------------------------------------------------------------- Mon Jan 8 15:02:53 UTC 2024 - Adam Majer diff --git a/nodejs21.spec b/nodejs21.spec index 34869a7..169718d 100644 --- a/nodejs21.spec +++ b/nodejs21.spec @@ -31,7 +31,7 @@ %endif Name: nodejs21 -Version: 21.6.2 +Version: 21.7.1 Release: 0 # Double DWZ memory limits @@ -177,7 +177,6 @@ Patch200: versioned.patch Patch305: qemu_timeouts_arches.patch Patch308: node-gyp-config.patch Patch309: gcc13.patch -Patch311: c-ares-fixes.patch BuildRequires: pkg-config BuildRequires: fdupes @@ -309,19 +308,19 @@ BuildRequires: bundled_openssl_should_not_be_required %if ! 0%{with intree_cares} BuildRequires: pkgconfig(libcares) >= 1.17.0 %else -Provides: bundled(libcares2) = 1.20.1 +Provides: bundled(libcares2) = 1.27.0 %endif %if ! 0%{with intree_icu} BuildRequires: pkgconfig(icu-i18n) >= 71 %else -Provides: bundled(icu) = 74.1 +Provides: bundled(icu) = 74.2 %endif %if ! 0%{with intree_nghttp2} BuildRequires: libnghttp2-devel >= 1.41.0 %else -Provides: bundled(nghttp2) = 1.58.0 +Provides: bundled(nghttp2) = 1.60.0 %endif %if 0%{with valgrind_tests} @@ -370,7 +369,7 @@ ExclusiveArch: not_buildable %endif %endif -Provides: bundled(uvwasi) = 0.0.19 +Provides: bundled(uvwasi) = 0.0.20 Provides: bundled(libuv) = 1.48.0 Provides: bundled(v8) = 11.8.172.17 %if %{with intree_brotli} @@ -381,20 +380,20 @@ BuildRequires: pkgconfig(libbrotlidec) Provides: bundled(llhttp) = 9.1.3 -Provides: bundled(ngtcp2) = 0.8.1 -Provides: bundled(base64) = 0.5.1 +Provides: bundled(ngtcp2) = 1.3.0 +Provides: bundled(base64) = 0.5.2 Provides: bundled(simdutf) = 4.0.8 -Provides: bundled(simdjson) = 3.6.3 +Provides: bundled(simdjson) = 3.7.0 # bundled url-ada parser, not ada -Provides: bundled(ada) = 2.7.4 +Provides: bundled(ada) = 2.7.6 Provides: bundled(node-@fastify/busboy) = 2.1.0 Provides: bundled(node-acorn) = 8.11.3 -Provides: bundled(node-acorn-walk) = 8.3.1 +Provides: bundled(node-acorn-walk) = 8.3.2 Provides: bundled(node-cjs-module-lexer) = 1.2.2 -Provides: bundled(node-corepack) = 0.24.0 +Provides: bundled(node-corepack) = 0.25.2 Provides: bundled(node-minimatch) = 9.0.3 -Provides: bundled(node-undici) = 5.28.3 +Provides: bundled(node-undici) = 6.6.2 %description Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js @@ -423,7 +422,7 @@ Requires: nodejs-common Requires: nodejs21 = %{version} Provides: nodejs-npm = %{version} Obsoletes: nodejs-npm < 4.0.0 -Provides: npm(npm) = 10.2.4 +Provides: npm(npm) = 10.5.0 Provides: npm = %{version} %if 0%{?suse_version} >= 1500 %if %{node_version_number} >= 10 @@ -432,7 +431,6 @@ Requires: group(nobody) %endif %endif Provides: bundled(node-abbrev) = 2.0.0 -Provides: bundled(node-abort-controller) = 3.0.0 Provides: bundled(node-agent-base) = 7.1.0 Provides: bundled(node-aggregate-error) = 3.1.0 Provides: bundled(node-ansi-regex) = 5.0.1 @@ -441,15 +439,13 @@ Provides: bundled(node-ansi-styles) = 4.3.0 Provides: bundled(node-ansi-styles) = 6.2.1 Provides: bundled(node-aproba) = 2.0.0 Provides: bundled(node-archy) = 1.0.0 -Provides: bundled(node-are-we-there-yet) = 4.0.1 +Provides: bundled(node-are-we-there-yet) = 4.0.2 Provides: bundled(node-balanced-match) = 1.0.2 -Provides: bundled(node-base64-js) = 1.5.1 Provides: bundled(node-bin-links) = 4.0.3 Provides: bundled(node-binary-extensions) = 2.2.0 Provides: bundled(node-brace-expansion) = 2.0.1 -Provides: bundled(node-buffer) = 6.0.3 Provides: bundled(node-builtins) = 5.0.1 -Provides: bundled(node-cacache) = 18.0.0 +Provides: bundled(node-cacache) = 18.0.2 Provides: bundled(node-chalk) = 5.3.0 Provides: bundled(node-chownr) = 2.0.0 Provides: bundled(node-ci-info) = 4.0.0 @@ -469,16 +465,13 @@ Provides: bundled(node-cross-spawn) = 7.0.3 Provides: bundled(node-cssesc) = 3.0.0 Provides: bundled(node-debug) = 4.3.4 Provides: bundled(node-defaults) = 1.0.4 -Provides: bundled(node-delegates) = 1.0.0 -Provides: bundled(node-diff) = 5.1.0 +Provides: bundled(node-diff) = 5.2.0 Provides: bundled(node-eastasianwidth) = 0.2.0 Provides: bundled(node-emoji-regex) = 8.0.0 Provides: bundled(node-emoji-regex) = 9.2.2 Provides: bundled(node-encoding) = 0.1.13 Provides: bundled(node-env-paths) = 2.2.1 Provides: bundled(node-err-code) = 2.0.3 -Provides: bundled(node-event-target-shim) = 5.0.1 -Provides: bundled(node-events) = 3.3.0 Provides: bundled(node-exponential-backoff) = 3.1.1 Provides: bundled(node-fastest-levenshtein) = 1.0.16 Provides: bundled(node-foreground-child) = 3.1.1 @@ -489,19 +482,18 @@ 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-unicode) = 2.0.1 -Provides: bundled(node-hasown) = 2.0.0 +Provides: bundled(node-hasown) = 2.0.1 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 -Provides: bundled(node-https-proxy-agent) = 7.0.2 +Provides: bundled(node-http-proxy-agent) = 7.0.2 +Provides: bundled(node-https-proxy-agent) = 7.0.4 Provides: bundled(node-iconv-lite) = 0.6.3 -Provides: bundled(node-ieee754) = 1.2.1 -Provides: bundled(node-ignore-walk) = 6.0.3 +Provides: bundled(node-ignore-walk) = 6.0.4 Provides: bundled(node-imurmurhash) = 0.1.4 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-address) = 9.0.5 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 @@ -510,30 +502,31 @@ Provides: bundled(node-is-lambda) = 1.0.1 Provides: bundled(node-isexe) = 2.0.0 Provides: bundled(node-isexe) = 3.1.1 Provides: bundled(node-jackspeak) = 2.3.6 -Provides: bundled(node-json-parse-even-better-errors) = 3.0.0 +Provides: bundled(node-jsbn) = 1.1.0 +Provides: bundled(node-json-parse-even-better-errors) = 3.0.1 Provides: bundled(node-json-stringify-nice) = 1.1.4 Provides: bundled(node-jsonparse) = 1.3.1 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.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.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.2 +Provides: bundled(node-libnpmaccess) = 8.0.2 +Provides: bundled(node-libnpmdiff) = 6.0.7 +Provides: bundled(node-libnpmexec) = 7.0.8 +Provides: bundled(node-libnpmfund) = 5.0.5 +Provides: bundled(node-libnpmhook) = 10.0.1 +Provides: bundled(node-libnpmorg) = 6.0.2 +Provides: bundled(node-libnpmpack) = 6.0.7 +Provides: bundled(node-libnpmpublish) = 9.0.4 +Provides: bundled(node-libnpmsearch) = 7.0.1 +Provides: bundled(node-libnpmteam) = 6.0.1 +Provides: bundled(node-libnpmversion) = 5.0.2 +Provides: bundled(node-lru-cache) = 10.2.0 Provides: bundled(node-lru-cache) = 6.0.0 Provides: bundled(node-make-fetch-happen) = 13.0.0 Provides: bundled(node-minimatch) = 9.0.3 Provides: bundled(node-minipass) = 3.3.6 Provides: bundled(node-minipass) = 5.0.0 Provides: bundled(node-minipass) = 7.0.4 -Provides: bundled(node-minipass-collect) = 1.0.2 +Provides: bundled(node-minipass-collect) = 2.0.1 Provides: bundled(node-minipass-fetch) = 3.0.4 Provides: bundled(node-minipass-flush) = 1.0.5 Provides: bundled(node-minipass-json-stream) = 1.0.1 @@ -553,22 +546,21 @@ Provides: bundled(node-npm-bundled) = 3.0.0 Provides: bundled(node-npm-install-checks) = 6.3.0 Provides: bundled(node-npm-normalize-package-bin) = 3.0.1 Provides: bundled(node-npm-package-arg) = 11.0.1 -Provides: bundled(node-npm-packlist) = 8.0.0 +Provides: bundled(node-npm-packlist) = 8.0.2 Provides: bundled(node-npm-pick-manifest) = 9.0.0 Provides: bundled(node-npm-profile) = 9.0.0 Provides: bundled(node-npm-registry-fetch) = 16.1.0 Provides: bundled(node-npm-user-validate) = 2.0.0 Provides: bundled(node-npmlog) = 7.0.1 Provides: bundled(node-p-map) = 4.0.0 -Provides: bundled(node-pacote) = 17.0.4 +Provides: bundled(node-pacote) = 17.0.6 Provides: bundled(node-parse-conflict-json) = 3.0.1 Provides: bundled(node-path-key) = 3.1.1 Provides: bundled(node-path-scurry) = 1.10.1 -Provides: bundled(node-postcss-selector-parser) = 6.0.13 +Provides: bundled(node-postcss-selector-parser) = 6.0.15 Provides: bundled(node-proc-log) = 3.0.0 -Provides: bundled(node-process) = 0.11.10 Provides: bundled(node-promise-all-reject-late) = 1.0.1 -Provides: bundled(node-promise-call-limit) = 1.0.2 +Provides: bundled(node-promise-call-limit) = 3.0.1 Provides: bundled(node-promise-inflight) = 1.0.1 Provides: bundled(node-promise-retry) = 2.0.1 Provides: bundled(node-promzard) = 1.0.0 @@ -577,25 +569,23 @@ Provides: bundled(node-read) = 2.1.0 Provides: bundled(node-read-cmd-shim) = 4.0.0 Provides: bundled(node-read-package-json) = 7.0.0 Provides: bundled(node-read-package-json-fast) = 3.0.2 -Provides: bundled(node-readable-stream) = 4.4.2 Provides: bundled(node-retry) = 0.12.0 -Provides: bundled(node-safe-buffer) = 5.2.1 Provides: bundled(node-safer-buffer) = 2.1.2 -Provides: bundled(node-semver) = 7.5.4 +Provides: bundled(node-semver) = 7.6.0 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.1.0 -Provides: bundled(node-sigstore) = 2.1.0 +Provides: bundled(node-sigstore) = 2.2.2 Provides: bundled(node-smart-buffer) = 4.2.0 -Provides: bundled(node-socks) = 2.7.1 +Provides: bundled(node-socks) = 2.8.0 Provides: bundled(node-socks-proxy-agent) = 8.0.2 Provides: bundled(node-spdx-correct) = 3.2.0 -Provides: bundled(node-spdx-exceptions) = 2.3.0 +Provides: bundled(node-spdx-exceptions) = 2.5.0 Provides: bundled(node-spdx-expression-parse) = 3.0.1 -Provides: bundled(node-spdx-license-ids) = 3.0.16 +Provides: bundled(node-spdx-license-ids) = 3.0.17 +Provides: bundled(node-sprintf-js) = 1.1.3 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-strip-ansi) = 6.0.1 @@ -605,7 +595,7 @@ Provides: bundled(node-tar) = 6.2.0 Provides: bundled(node-text-table) = 0.2.0 Provides: bundled(node-tiny-relative-date) = 1.3.0 Provides: bundled(node-treeverse) = 3.0.0 -Provides: bundled(node-tuf-js) = 2.1.0 +Provides: bundled(node-tuf-js) = 2.2.0 Provides: bundled(node-unique-filename) = 3.0.0 Provides: bundled(node-unique-slug) = 4.0.0 Provides: bundled(node-util-deprecate) = 1.0.2 @@ -711,7 +701,6 @@ popd %patch305 -p1 %patch309 -p1 -%patch311 -p1 %if %{node_version_number} == 12 # minimist security update - patch50 @@ -898,6 +887,12 @@ ln -s -f npx-default %{buildroot}%{_sysconfdir}/alternatives/npx-default ln -s -f npx.1%{ext_man} %{buildroot}%{_sysconfdir}/alternatives/npx.1%{ext_man} ln -s %{_sysconfdir}/alternatives/npx-default %{buildroot}%{_bindir}/npx-default ln -s %{_sysconfdir}/alternatives/npx.1%{ext_man} %{buildroot}%{_mandir}/man1/npx.1%{ext_man} +%if %{node_version_number} >= 14 +ln -s -f corepack-default %{buildroot}%{_sysconfdir}/alternatives/corepack-default +ln -s -f corepack.1%{ext_man} %{buildroot}%{_sysconfdir}/alternatives/corepack.1%{ext_man} +ln -s %{_sysconfdir}/alternatives/corepack-default %{buildroot}%{_bindir}/corepack-default +ln -s %{_sysconfdir}/alternatives/corepack.1%{ext_man} %{buildroot}%{_mandir}/man1/corepack.1%{ext_man} +%endif %endif # libalternatives - can always ship @@ -916,6 +911,13 @@ binary=%{_bindir}/npx%{node_version_number} man=npx%{node_version_number}.1 group=npm,npx EOF +%if %{node_version_number} >= 14 +mkdir -p %{buildroot}%{_datadir}/libalternatives/corepack; +cat > %{buildroot}%{_datadir}/libalternatives/corepack/%{node_version_number}.conf <= 14 +%post -n corepack%{node_version_number} +update-alternatives --remove corepack-default %{_bindir}/corepack%{node_version_number} +%endif + %else %pre # remove files that are no longer owned but provided by update-alternatives @@ -1124,6 +1137,24 @@ if [ ! -f %{_bindir}/npx%{node_version_number} ] ; then update-alternatives --remove npx-default %{_bindir}/npx%{node_version_number} fi +%if %{node_version_number} >= 14 +%pre -n corepack%{node_version_number} +# remove files that are no longer owned but provided by update-alternatives +if ! [ -L %{_mandir}/man1/corepack.1%{ext_man} ]; then + rm -f %{_mandir}/man1/corepack.1%{ext_man} +fi + +%post -n corepack%{node_version_number} +update-alternatives \ + --install %{_bindir}/corepack-default corepack-default %{_bindir}/corepack%{node_version_number} %{node_version_number} \ + --slave %{_mandir}/man1/corepack.1%{ext_man} corepack.1%{ext_man} %{_mandir}/man1/corepack%{node_version_number}.1%{ext_man} + +%postun -n corepack%{node_version_number} +if [ ! -f %{_bindir}/corepack%{node_version_number} ] ; then + update-alternatives --remove corepack-default %{_bindir}/corepack%{node_version_number} +fi +%endif + %endif %changelog diff --git a/versioned.patch b/versioned.patch index f0d500e..7e91aad 100644 --- a/versioned.patch +++ b/versioned.patch @@ -8,75 +8,75 @@ management via update_alternatives. This is also important for generation of binary modules for multiple versions of NodeJS -Index: node-v21.1.0/Makefile +Index: node-v21.7.1/Makefile =================================================================== ---- node-v21.1.0.orig/Makefile -+++ node-v21.1.0/Makefile +--- node-v21.7.1.orig/Makefile ++++ node-v21.7.1/Makefile @@ -76,7 +76,7 @@ BUILDTYPE_LOWER := $(shell echo $(BUILDT EXEEXT := $(shell $(PYTHON) -c \ "import sys; print('.exe' if sys.platform == 'win32' else '')") -NODE_EXE = node$(EXEEXT) +NODE_EXE = node21$(EXEEXT) - NODE ?= ./$(NODE_EXE) + # Use $(PWD) so we can cd to anywhere before calling this + NODE ?= "$(PWD)/$(NODE_EXE)" NODE_G_EXE = node_g$(EXEEXT) - NPM ?= ./deps/npm/bin/npm-cli.js -Index: node-v21.1.0/tools/install.py +Index: node-v21.7.1/tools/install.py =================================================================== ---- node-v21.1.0.orig/tools/install.py -+++ node-v21.1.0/tools/install.py -@@ -86,7 +86,7 @@ def uninstall(paths, dst): - try_remove(path, dst) +--- node-v21.7.1.orig/tools/install.py ++++ node-v21.7.1/tools/install.py +@@ -87,7 +87,7 @@ def uninstall(options, paths, dest): + try_remove(options, path, dest) - def package_files(action, name, bins): -- target_path = libdir() + '/node_modules/' + name + '/' -+ target_path = libdir() + '/node_modules/' + name + '21/' + def package_files(options, action, name, bins): +- target_path = os.path.join(libdir(), 'node_modules', name) ++ target_path = os.path.join(libdir(), 'node_modules', name + '21') # don't install npm if the target path is a symlink, it probably means # that a dev version of npm is installed there -@@ -106,19 +106,19 @@ def package_files(action, name, bins): +@@ -108,19 +108,19 @@ def package_files(options, action, name, if action == uninstall: - action([link_path], 'bin/' + bin_name) + action(options, [link_path], os.path.join('bin', bin_name)) elif action == install: -- try_symlink('../' + libdir() + '/node_modules/' + name + '/' + bin_target, link_path) -+ try_symlink('../' + libdir() + '/node_modules/' + name + '21/' + bin_target, link_path) +- try_symlink(options, os.path.join('..', libdir(), 'node_modules', name, bin_target), link_path) ++ try_symlink(options, os.path.join('..', libdir(), 'node_modules', name + 21, bin_target), link_path) else: assert 0 # unhandled action type - def npm_files(action): - package_files(action, 'npm', { + def npm_files(options, action): + package_files(options, action, 'npm', { - 'npm': 'bin/npm-cli.js', - 'npx': 'bin/npx-cli.js', + 'npm21': 'bin/npm-cli.js', + 'npx21': 'bin/npx-cli.js', }) - def corepack_files(action): - package_files(action, 'corepack', { + def corepack_files(options, action): + package_files(options, action, 'corepack', { - 'corepack': 'dist/corepack.js', + 'corepack21': 'dist/corepack.js', # Not the default just yet: # 'yarn': 'dist/yarn.js', # 'yarnpkg': 'dist/yarn.js', -@@ -147,7 +147,7 @@ def subdir_files(path, dest, action): +@@ -149,7 +149,7 @@ def subdir_files(options, path, dest, ac + action(options, files_in_path, subdir + os.path.sep) - def files(action): - is_windows = sys.platform == 'win32' -- output_file = 'node' -+ output_file = 'node21' - output_prefix = 'out/Release/' - - if is_windows: -@@ -189,7 +189,7 @@ def files(action): + def files(options, action): +- node_bin = 'node' ++ node_bin = 'node21' + if options.is_win: + node_bin += '.exe' + action(options, [os.path.join(options.build_dir, node_bin)], os.path.join('bin', node_bin)) +@@ -190,7 +190,7 @@ def files(options, action): if 'freebsd' in sys.platform or 'openbsd' in sys.platform: - action(['doc/node.1'], 'man/man1/') + action(options, ['doc/node.1'], 'man/man1/') else: -- action(['doc/node.1'], 'share/man/man1/') -+ action(['doc/node.1'], 'share/man/man1/node21.1') +- action(options, ['doc/node.1'], 'share/man/man1/') ++ action(options, ['doc/node.1'], 'share/man/man1/node21.1') - if 'true' == variables.get('node_install_npm'): - npm_files(action) -@@ -325,28 +325,28 @@ def headers(action): + if 'true' == options.variables.get('node_install_npm'): + npm_files(options, action) +@@ -333,28 +333,28 @@ def headers(options, action): 'src/node_buffer.h', 'src/node_object_wrap.h', 'src/node_version.h', @@ -85,27 +85,27 @@ Index: node-v21.1.0/tools/install.py # Add the expfile that is created on AIX if sys.platform.startswith('aix') or sys.platform == "os400": -- action(['out/Release/node.exp'], 'include/node/') -+ action(['out/Release/node.exp'], 'include/node21/') +- action(options, ['out/Release/node.exp'], 'include/node/') ++ action(options, ['out/Release/node.exp'], 'include/node21/') -- subdir_files('deps/v8/include', 'include/node/', wanted_v8_headers) -+ subdir_files('deps/v8/include', 'include/node21/', wanted_v8_headers) +- subdir_files(options, os.path.join(options.v8_dir, 'include'), 'include/node/', wanted_v8_headers) ++ subdir_files(options, os.path.join(options.v8_dir, 'include'), 'include/node21/', wanted_v8_headers) - if 'false' == variables.get('node_shared_libuv'): -- subdir_files('deps/uv/include', 'include/node/', action) -+ subdir_files('deps/uv/include', 'include/node21/', action) + if 'false' == options.variables.get('node_shared_libuv'): +- subdir_files(options, 'deps/uv/include', 'include/node/', action) ++ subdir_files(options, 'deps/uv/include', 'include/node21/', action) - if 'true' == variables.get('node_use_openssl') and \ - 'false' == variables.get('node_shared_openssl'): -- subdir_files('deps/openssl/openssl/include/openssl', 'include/node/openssl/', action) -- subdir_files('deps/openssl/config/archs', 'include/node/openssl/archs', action) -- subdir_files('deps/openssl/config', 'include/node/openssl', action) -+ subdir_files('deps/openssl/openssl/include/openssl', 'include/node21/openssl/', action) -+ subdir_files('deps/openssl/config/archs', 'include/node21/openssl/archs', action) -+ subdir_files('deps/openssl/config', 'include/node21/openssl', action) + if 'true' == options.variables.get('node_use_openssl') and \ + 'false' == options.variables.get('node_shared_openssl'): +- subdir_files(options, 'deps/openssl/openssl/include/openssl', 'include/node/openssl/', action) +- subdir_files(options, 'deps/openssl/config/archs', 'include/node/openssl/archs', action) +- subdir_files(options, 'deps/openssl/config', 'include/node/openssl', action) ++ subdir_files(options, 'deps/openssl/openssl/include/openssl', 'include/node21/openssl/', action) ++ subdir_files(options, 'deps/openssl/config/archs', 'include/node21/openssl/archs', action) ++ subdir_files(options, 'deps/openssl/config', 'include/node21/openssl', action) - if 'false' == variables.get('node_shared_zlib'): - action([ + if 'false' == options.variables.get('node_shared_zlib'): + action(options, [ 'deps/zlib/zconf.h', 'deps/zlib/zlib.h', - ], 'include/node/') @@ -113,10 +113,10 @@ Index: node-v21.1.0/tools/install.py if sys.platform == 'zos': zoslibinc = os.environ.get('ZOSLIB_INCLUDES') -Index: node-v21.1.0/doc/node.1 +Index: node-v21.7.1/doc/node.1 =================================================================== ---- node-v21.1.0.orig/doc/node.1 -+++ node-v21.1.0/doc/node.1 +--- node-v21.7.1.orig/doc/node.1 ++++ node-v21.7.1/doc/node.1 @@ -31,24 +31,24 @@ .Dt NODE 1 . @@ -146,10 +146,10 @@ Index: node-v21.1.0/doc/node.1 .Op Fl -v8-options . .\"====================================================================== -Index: node-v21.1.0/src/node_main.cc +Index: node-v21.7.1/src/node_main.cc =================================================================== ---- node-v21.1.0.orig/src/node_main.cc -+++ node-v21.1.0/src/node_main.cc +--- node-v21.7.1.orig/src/node_main.cc ++++ node-v21.7.1/src/node_main.cc @@ -94,6 +94,7 @@ int wmain(int argc, wchar_t* wargv[]) { // UNIX @@ -158,11 +158,11 @@ Index: node-v21.1.0/src/node_main.cc return node::Start(argc, argv); } #endif -Index: node-v21.1.0/tools/test.py +Index: node-v21.7.1/tools/test.py =================================================================== ---- node-v21.1.0.orig/tools/test.py -+++ node-v21.1.0/tools/test.py -@@ -953,7 +953,7 @@ class Context(object): +--- node-v21.7.1.orig/tools/test.py ++++ node-v21.7.1/tools/test.py +@@ -954,7 +954,7 @@ class Context(object): if self.vm is not None: return self.vm if arch == 'none': @@ -171,10 +171,10 @@ Index: node-v21.1.0/tools/test.py else: name = 'out/%s.%s/node' % (arch, mode) -Index: node-v21.1.0/node.gyp +Index: node-v21.7.1/node.gyp =================================================================== ---- node-v21.1.0.orig/node.gyp -+++ node-v21.1.0/node.gyp +--- node-v21.7.1.orig/node.gyp ++++ node-v21.7.1/node.gyp @@ -24,8 +24,8 @@ 'node_shared_openssl%': 'false', 'node_v8_options%': '', @@ -186,10 +186,10 @@ Index: node-v21.1.0/node.gyp 'node_intermediate_lib_type%': 'static_library', 'node_builtin_modules_path%': '', 'linked_module_files': [ -Index: node-v21.1.0/test/fixtures/errors/promise_unhandled_warn_with_error.snapshot +Index: node-v21.7.1/test/fixtures/errors/promise_unhandled_warn_with_error.snapshot =================================================================== ---- node-v21.1.0.orig/test/fixtures/errors/promise_unhandled_warn_with_error.snapshot -+++ node-v21.1.0/test/fixtures/errors/promise_unhandled_warn_with_error.snapshot +--- node-v21.7.1.orig/test/fixtures/errors/promise_unhandled_warn_with_error.snapshot ++++ node-v21.7.1/test/fixtures/errors/promise_unhandled_warn_with_error.snapshot @@ -6,5 +6,5 @@ at * at * @@ -197,10 +197,10 @@ Index: node-v21.1.0/test/fixtures/errors/promise_unhandled_warn_with_error.snaps -(Use `node --trace-warnings ...` to show where the warning was created) +(Use `node21 --trace-warnings ...` to show where the warning was created) (node:*) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https:*nodejs.org*api*cli.html#cli_unhandled_rejections_mode). (rejection id: 1) -Index: node-v21.1.0/test/parallel/test-snapshot-warning.js +Index: node-v21.7.1/test/parallel/test-snapshot-warning.js =================================================================== ---- node-v21.1.0.orig/test/parallel/test-snapshot-warning.js -+++ node-v21.1.0/test/parallel/test-snapshot-warning.js +--- node-v21.7.1.orig/test/parallel/test-snapshot-warning.js ++++ node-v21.7.1/test/parallel/test-snapshot-warning.js @@ -60,7 +60,7 @@ tmpdir.refresh(); stderr(output) { let match = output.match(/Warning: test warning/g); @@ -236,10 +236,10 @@ Index: node-v21.1.0/test/parallel/test-snapshot-warning.js + match = warnings2.match(/Use `node21 --trace-warnings/g); assert.strictEqual(match.length, 1); } -Index: node-v21.1.0/test/fixtures/errors/throw_error_with_getter_throw.snapshot +Index: node-v21.7.1/test/fixtures/errors/throw_error_with_getter_throw.snapshot =================================================================== ---- node-v21.1.0.orig/test/fixtures/errors/throw_error_with_getter_throw.snapshot -+++ node-v21.1.0/test/fixtures/errors/throw_error_with_getter_throw.snapshot +--- node-v21.7.1.orig/test/fixtures/errors/throw_error_with_getter_throw.snapshot ++++ node-v21.7.1/test/fixtures/errors/throw_error_with_getter_throw.snapshot @@ -3,6 +3,6 @@ throw { * eslint-disable-line no-throw-literal ^ @@ -248,10 +248,10 @@ Index: node-v21.1.0/test/fixtures/errors/throw_error_with_getter_throw.snapshot +(Use `node21 --trace-uncaught ...` to show where the exception was thrown) Node.js * -Index: node-v21.1.0/test/fixtures/errors/throw_undefined.snapshot +Index: node-v21.7.1/test/fixtures/errors/throw_undefined.snapshot =================================================================== ---- node-v21.1.0.orig/test/fixtures/errors/throw_undefined.snapshot -+++ node-v21.1.0/test/fixtures/errors/throw_undefined.snapshot +--- node-v21.7.1.orig/test/fixtures/errors/throw_undefined.snapshot ++++ node-v21.7.1/test/fixtures/errors/throw_undefined.snapshot @@ -3,6 +3,6 @@ throw undefined; ^ @@ -260,10 +260,10 @@ Index: node-v21.1.0/test/fixtures/errors/throw_undefined.snapshot +(Use `node21 --trace-uncaught ...` to show where the exception was thrown) Node.js * -Index: node-v21.1.0/test/fixtures/errors/throw_null.snapshot +Index: node-v21.7.1/test/fixtures/errors/throw_null.snapshot =================================================================== ---- node-v21.1.0.orig/test/fixtures/errors/throw_null.snapshot -+++ node-v21.1.0/test/fixtures/errors/throw_null.snapshot +--- node-v21.7.1.orig/test/fixtures/errors/throw_null.snapshot ++++ node-v21.7.1/test/fixtures/errors/throw_null.snapshot @@ -3,6 +3,6 @@ throw null; ^ From 460cb873eb6b2760468c250f3dd3da3f7c67e27aea6407ef45be0206b5205af4 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Wed, 3 Apr 2024 14:44:33 +0000 Subject: [PATCH 2/7] OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs21?expand=0&rev=22 --- fix_ci_tests.patch | 60 +++++++++++++++++++++++++------------------- nodejs-libpath.patch | 22 ++++++++-------- nodejs21.spec | 60 ++++++++++++++++---------------------------- versioned.patch | 8 +++--- 4 files changed, 71 insertions(+), 79 deletions(-) diff --git a/fix_ci_tests.patch b/fix_ci_tests.patch index 60fad66..c3755e0 100644 --- a/fix_ci_tests.patch +++ b/fix_ci_tests.patch @@ -2,10 +2,10 @@ Author: Adam Majer Date: Dec 20 09:18:49 UTC 2017 Summary: Fix CI unit tests framework for OBS building -Index: node-v21.6.1/test/parallel/test-node-output-v8-warning.mjs +Index: node-v21.7.1/test/parallel/test-node-output-v8-warning.mjs =================================================================== ---- node-v21.6.1.orig/test/parallel/test-node-output-v8-warning.mjs -+++ node-v21.6.1/test/parallel/test-node-output-v8-warning.mjs +--- node-v21.7.1.orig/test/parallel/test-node-output-v8-warning.mjs ++++ node-v21.7.1/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 @@ -15,10 +15,10 @@ Index: node-v21.6.1/test/parallel/test-node-output-v8-warning.mjs } const common = snapshot .transform(snapshot.replaceWindowsLineEndings, snapshot.replaceWindowsPaths, replaceNodeVersion); -Index: node-v21.6.1/test/parallel/test-module-loading-globalpaths.js +Index: node-v21.7.1/test/parallel/test-module-loading-globalpaths.js =================================================================== ---- node-v21.6.1.orig/test/parallel/test-module-loading-globalpaths.js -+++ node-v21.6.1/test/parallel/test-module-loading-globalpaths.js +--- node-v21.7.1.orig/test/parallel/test-module-loading-globalpaths.js ++++ node-v21.7.1/test/parallel/test-module-loading-globalpaths.js @@ -11,6 +11,9 @@ const { addLibraryPath } = require('../c addLibraryPath(process.env); @@ -29,10 +29,10 @@ Index: node-v21.6.1/test/parallel/test-module-loading-globalpaths.js if (process.argv[2] === 'child') { console.log(require(pkgName).string); } else { -Index: node-v21.6.1/test/parallel/test-tls-passphrase.js +Index: node-v21.7.1/test/parallel/test-tls-passphrase.js =================================================================== ---- node-v21.6.1.orig/test/parallel/test-tls-passphrase.js -+++ node-v21.6.1/test/parallel/test-tls-passphrase.js +--- node-v21.7.1.orig/test/parallel/test-tls-passphrase.js ++++ node-v21.7.1/test/parallel/test-tls-passphrase.js @@ -223,7 +223,7 @@ server.listen(0, common.mustCall(functio }, onSecureConnect()); })).unref(); @@ -42,10 +42,10 @@ Index: node-v21.6.1/test/parallel/test-tls-passphrase.js // Missing passphrase assert.throws(function() { -Index: node-v21.6.1/test/parallel/test-repl-envvars.js +Index: node-v21.7.1/test/parallel/test-repl-envvars.js =================================================================== ---- node-v21.6.1.orig/test/parallel/test-repl-envvars.js -+++ node-v21.6.1/test/parallel/test-repl-envvars.js +--- node-v21.7.1.orig/test/parallel/test-repl-envvars.js ++++ node-v21.7.1/test/parallel/test-repl-envvars.js @@ -2,7 +2,9 @@ // Flags: --expose-internals @@ -57,11 +57,19 @@ Index: node-v21.6.1/test/parallel/test-repl-envvars.js const stream = require('stream'); const { describe, test } = require('node:test'); const REPL = require('internal/repl'); -Index: node-v21.6.1/Makefile +Index: node-v21.7.1/Makefile =================================================================== ---- node-v21.6.1.orig/Makefile -+++ node-v21.6.1/Makefile -@@ -545,7 +545,8 @@ test-ci-js: | clear-stalled +--- node-v21.7.1.orig/Makefile ++++ node-v21.7.1/Makefile +@@ -389,7 +389,6 @@ ADDONS_HEADERS_PREREQS := tools/install. + $(wildcard deps/uv/include/*/*.h) \ + $(wildcard deps/v8/include/*.h) \ + $(wildcard deps/v8/include/*/*.h) \ +- deps/zlib/zconf.h deps/zlib/zlib.h \ + src/node.h src/node_api.h src/js_native_api.h src/js_native_api_types.h \ + src/node_api_types.h src/node_buffer.h src/node_object_wrap.h \ + src/node_version.h +@@ -560,7 +559,8 @@ test-ci-js: | clear-stalled .PHONY: test-ci # Related CI jobs: most CI tests, excluding node-test-commit-arm-fanned test-ci: LOGLEVEL := info @@ -71,7 +79,7 @@ Index: node-v21.6.1/Makefile out/Release/cctest --gtest_output=xml:out/junit/cctest.xml $(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \ --mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \ -@@ -726,7 +727,8 @@ apidocs_json = $(addprefix out/,$(apidoc +@@ -742,7 +742,8 @@ apidocs_json = $(addprefix out/,$(apidoc apiassets = $(subst api_assets,api/assets,$(addprefix out/,$(wildcard doc/api_assets/*))) tools/doc/node_modules: tools/doc/package.json @@ -81,10 +89,10 @@ Index: node-v21.6.1/Makefile echo "Skipping tools/doc/node_modules (no crypto)"; \ else \ cd tools/doc && $(call available-node,$(run-npm-ci)) \ -Index: node-v21.6.1/tools/test.py +Index: node-v21.7.1/tools/test.py =================================================================== ---- node-v21.6.1.orig/tools/test.py -+++ node-v21.6.1/tools/test.py +--- node-v21.7.1.orig/tools/test.py ++++ node-v21.7.1/tools/test.py @@ -1362,7 +1362,7 @@ def BuildOptions(): result.add_option("-s", "--suite", help="A test suite", default=[], action="append") @@ -94,10 +102,10 @@ Index: node-v21.6.1/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.6.1/test/parallel/test-crypto-dh.js +Index: node-v21.7.1/test/parallel/test-crypto-dh.js =================================================================== ---- node-v21.6.1.orig/test/parallel/test-crypto-dh.js -+++ node-v21.6.1/test/parallel/test-crypto-dh.js +--- node-v21.7.1.orig/test/parallel/test-crypto-dh.js ++++ node-v21.7.1/test/parallel/test-crypto-dh.js @@ -92,7 +92,7 @@ const crypto = require('crypto'); dh3.computeSecret(''); }, { message: common.hasOpenSSL3 && !hasOpenSSL3WithNewErrorMessage ? @@ -107,10 +115,10 @@ Index: node-v21.6.1/test/parallel/test-crypto-dh.js } } -Index: node-v21.6.1/benchmark/misc/startup-cli-version.js +Index: node-v21.7.1/benchmark/misc/startup-cli-version.js =================================================================== ---- node-v21.6.1.orig/benchmark/misc/startup-cli-version.js -+++ node-v21.6.1/benchmark/misc/startup-cli-version.js +--- node-v21.7.1.orig/benchmark/misc/startup-cli-version.js ++++ node-v21.7.1/benchmark/misc/startup-cli-version.js @@ -11,10 +11,10 @@ const path = require('path'); // indispensible part of the CLI. const bench = common.createBenchmark(main, { diff --git a/nodejs-libpath.patch b/nodejs-libpath.patch index ceb8732..7416139 100644 --- a/nodejs-libpath.patch +++ b/nodejs-libpath.patch @@ -1,7 +1,7 @@ -Index: node-v21.7.1/tools/install.py +Index: node-v20.12.0/tools/install.py =================================================================== ---- node-v21.7.1.orig/tools/install.py -+++ node-v21.7.1/tools/install.py +--- node-v20.12.0.orig/tools/install.py ++++ node-v20.12.0/tools/install.py @@ -6,6 +6,7 @@ import errno import os import shutil @@ -14,9 +14,9 @@ Index: node-v21.7.1/tools/install.py try_unlink(target_path) # prevent ETXTBSY errors return shutil.copy2(source_path, target_path) -+def libdir(): ++def libdir(options): + libdir_fq = sysconfig.get_config_var("LIBDIR") -+ return re.sub("^" + re.escape(node_prefix + "/"), "", libdir_fq) ++ return re.sub("^" + re.escape(options.prefix + "/"), "", libdir_fq) + def try_remove(options, path, dest): source_path, target_path = mkpaths(options, path, dest) @@ -26,7 +26,7 @@ Index: node-v21.7.1/tools/install.py def package_files(options, action, name, bins): - target_path = os.path.join('lib/node_modules', name) -+ target_path = os.path.join(libdir(), 'node_modules', name) ++ target_path = os.path.join(libdir(options), 'node_modules', name) # don't install npm if the target path is a symlink, it probably means # that a dev version of npm is installed there @@ -35,15 +35,15 @@ Index: node-v21.7.1/tools/install.py action(options, [link_path], os.path.join('bin', bin_name)) elif action == install: - try_symlink(options, os.path.join('../lib/node_modules', name, bin_target), link_path) -+ try_symlink(options, os.path.join('..', libdir(), 'node_modules', name, bin_target), link_path) ++ try_symlink(options, os.path.join('..', libdir(options), 'node_modules', name, bin_target), link_path) else: assert 0 # unhandled action type -Index: node-v21.7.1/lib/internal/modules/cjs/loader.js +Index: node-v20.12.0/lib/internal/modules/cjs/loader.js =================================================================== ---- node-v21.7.1.orig/lib/internal/modules/cjs/loader.js -+++ node-v21.7.1/lib/internal/modules/cjs/loader.js -@@ -1528,7 +1528,7 @@ Module._initPaths = function() { +--- node-v20.12.0.orig/lib/internal/modules/cjs/loader.js ++++ node-v20.12.0/lib/internal/modules/cjs/loader.js +@@ -1529,7 +1529,7 @@ Module._initPaths = function() { path.resolve(process.execPath, '..') : path.resolve(process.execPath, '..', '..'); diff --git a/nodejs21.spec b/nodejs21.spec index 169718d..8dca3bb 100644 --- a/nodejs21.spec +++ b/nodejs21.spec @@ -15,17 +15,7 @@ # 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 @@ -134,12 +124,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 @@ -150,8 +140,6 @@ 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 @@ -178,8 +166,8 @@ Patch305: qemu_timeouts_arches.patch Patch308: node-gyp-config.patch Patch309: gcc13.patch -BuildRequires: pkg-config BuildRequires: fdupes +BuildRequires: pkg-config BuildRequires: procps BuildRequires: xz BuildRequires: zlib-devel @@ -199,10 +187,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 @@ -212,15 +200,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 @@ -229,7 +217,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 @@ -240,7 +228,6 @@ BuildRequires: gcc12-c++ BuildRequires: gcc-c++ %endif - # Python dependencies %if %node_version_number >= 14 @@ -266,8 +253,8 @@ BuildRequires: python %endif %if 0%{?suse_version} >= 1500 && %{node_version_number} >= 10 -BuildRequires: user(nobody) BuildRequires: group(nobody) +BuildRequires: user(nobody) %endif # shared openssl @@ -282,11 +269,10 @@ BuildRequires: openssl >= %{openssl_req_ver} BuildRequires: (libopenssl1_1-hmac if libopenssl-1_1-devel) BuildRequires: (libopenssl3-hmac if libopenssl-3-devel) %else -BuildRequires: openssl-1_1 >= %{openssl_req_ver} BuildRequires: libopenssl1_1-hmac +BuildRequires: openssl-1_1 >= %{openssl_req_ver} %endif - # /suse_version %endif @@ -369,8 +355,8 @@ ExclusiveArch: not_buildable %endif %endif -Provides: bundled(uvwasi) = 0.0.20 Provides: bundled(libuv) = 1.48.0 +Provides: bundled(uvwasi) = 0.0.20 Provides: bundled(v8) = 11.8.172.17 %if %{with intree_brotli} Provides: bundled(brotli) = 1.1.0 @@ -378,12 +364,11 @@ Provides: bundled(brotli) = 1.1.0 BuildRequires: pkgconfig(libbrotlidec) %endif - +Provides: bundled(base64) = 0.5.2 Provides: bundled(llhttp) = 9.1.3 Provides: bundled(ngtcp2) = 1.3.0 -Provides: bundled(base64) = 0.5.2 -Provides: bundled(simdutf) = 4.0.8 Provides: bundled(simdjson) = 3.7.0 +Provides: bundled(simdutf) = 4.0.8 # bundled url-ada parser, not ada Provides: bundled(ada) = 2.7.6 @@ -404,8 +389,8 @@ provided by npm. Summary: Development headers for NodeJS 21.x Group: Development/Languages/NodeJS Provides: nodejs-devel = %{version} -Requires: npm21 = %{version} Requires: %{name} = %{version} +Requires: npm21 = %{version} %description devel This package provides development headers for Node.js needed for creation @@ -422,12 +407,12 @@ Requires: nodejs-common Requires: nodejs21 = %{version} Provides: nodejs-npm = %{version} Obsoletes: nodejs-npm < 4.0.0 -Provides: npm(npm) = 10.5.0 Provides: npm = %{version} +Provides: npm(npm) = 10.5.0 %if 0%{?suse_version} >= 1500 %if %{node_version_number} >= 10 -Requires: user(nobody) Requires: group(nobody) +Requires: user(nobody) %endif %endif Provides: bundled(node-abbrev) = 2.0.0 @@ -714,8 +699,6 @@ 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 @@ -1099,6 +1082,7 @@ update-alternatives --remove corepack-default %{_bindir}/corepack%{node_version_ %endif %else + %pre # remove files that are no longer owned but provided by update-alternatives if ! [ -L %{_mandir}/man1/node.1%{ext_man} ]; then diff --git a/versioned.patch b/versioned.patch index 7e91aad..231a156 100644 --- a/versioned.patch +++ b/versioned.patch @@ -29,8 +29,8 @@ Index: node-v21.7.1/tools/install.py try_remove(options, path, dest) def package_files(options, action, name, bins): -- target_path = os.path.join(libdir(), 'node_modules', name) -+ target_path = os.path.join(libdir(), 'node_modules', name + '21') +- target_path = os.path.join(libdir(options), 'node_modules', name) ++ target_path = os.path.join(libdir(options), 'node_modules', name + '21') # don't install npm if the target path is a symlink, it probably means # that a dev version of npm is installed there @@ -38,8 +38,8 @@ Index: node-v21.7.1/tools/install.py if action == uninstall: action(options, [link_path], os.path.join('bin', bin_name)) elif action == install: -- try_symlink(options, os.path.join('..', libdir(), 'node_modules', name, bin_target), link_path) -+ try_symlink(options, os.path.join('..', libdir(), 'node_modules', name + 21, bin_target), link_path) +- try_symlink(options, os.path.join('..', libdir(options), 'node_modules', name, bin_target), link_path) ++ try_symlink(options, os.path.join('..', libdir(options), 'node_modules', name + 21, bin_target), link_path) else: assert 0 # unhandled action type From 17690a8448e9f01cacb12d93eea114f68762a6aa91044c3fbda6ead2cd17a049 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Wed, 3 Apr 2024 14:50:56 +0000 Subject: [PATCH 3/7] OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs21?expand=0&rev=23 --- nodejs21.spec | 62 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 22 deletions(-) diff --git a/nodejs21.spec b/nodejs21.spec index 8dca3bb..573c8a6 100644 --- a/nodejs21.spec +++ b/nodejs21.spec @@ -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 @@ -124,12 +134,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 @@ -140,6 +150,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 @@ -166,8 +178,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 @@ -187,10 +199,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 @@ -200,15 +212,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 @@ -217,7 +229,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 @@ -228,6 +240,7 @@ BuildRequires: gcc12-c++ BuildRequires: gcc-c++ %endif + # Python dependencies %if %node_version_number >= 14 @@ -253,8 +266,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 @@ -269,10 +282,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 @@ -355,8 +369,8 @@ ExclusiveArch: not_buildable %endif %endif -Provides: bundled(libuv) = 1.48.0 Provides: bundled(uvwasi) = 0.0.20 +Provides: bundled(libuv) = 1.48.0 Provides: bundled(v8) = 11.8.172.17 %if %{with intree_brotli} Provides: bundled(brotli) = 1.1.0 @@ -364,11 +378,12 @@ Provides: bundled(brotli) = 1.1.0 BuildRequires: pkgconfig(libbrotlidec) %endif -Provides: bundled(base64) = 0.5.2 + Provides: bundled(llhttp) = 9.1.3 Provides: bundled(ngtcp2) = 1.3.0 -Provides: bundled(simdjson) = 3.7.0 +Provides: bundled(base64) = 0.5.2 Provides: bundled(simdutf) = 4.0.8 +Provides: bundled(simdjson) = 3.7.0 # bundled url-ada parser, not ada Provides: bundled(ada) = 2.7.6 @@ -389,8 +404,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 @@ -407,12 +422,12 @@ Requires: nodejs-common Requires: nodejs21 = %{version} Provides: nodejs-npm = %{version} Obsoletes: nodejs-npm < 4.0.0 -Provides: npm = %{version} Provides: npm(npm) = 10.5.0 +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 @@ -699,6 +714,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 @@ -1046,6 +1063,8 @@ make test-ci %defattr(-, root, root) %{_bindir}/corepack%{node_version_number} %{_libdir}/node_modules/corepack%{node_version_number} +%dir %{_datadir}/libalternatives/corepack +%{_datadir}/libalternatives/corepack/18.conf %if ! %{with libalternatives} %ghost %{_bindir}/corepack-default %ghost %{_mandir}/man1/corepack.1%{ext_man} @@ -1082,7 +1101,6 @@ update-alternatives --remove corepack-default %{_bindir}/corepack%{node_version_ %endif %else - %pre # remove files that are no longer owned but provided by update-alternatives if ! [ -L %{_mandir}/man1/node.1%{ext_man} ]; then From c2da7b7524b45c613c74968bfdf2e530f8532c9ccc6080da0530a9be4f0c2f99 Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Thu, 4 Apr 2024 08:06:04 +0000 Subject: [PATCH 4/7] OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs21?expand=0&rev=24 --- nodejs21.spec | 60 ++++++++++++++++++------------------------------- versioned.patch | 2 +- 2 files changed, 23 insertions(+), 39 deletions(-) diff --git a/nodejs21.spec b/nodejs21.spec index 573c8a6..a706fcb 100644 --- a/nodejs21.spec +++ b/nodejs21.spec @@ -15,17 +15,7 @@ # 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 @@ -134,12 +124,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 @@ -150,8 +140,6 @@ 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 @@ -178,8 +166,8 @@ Patch305: qemu_timeouts_arches.patch Patch308: node-gyp-config.patch Patch309: gcc13.patch -BuildRequires: pkg-config BuildRequires: fdupes +BuildRequires: pkg-config BuildRequires: procps BuildRequires: xz BuildRequires: zlib-devel @@ -199,10 +187,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 @@ -212,15 +200,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 @@ -229,7 +217,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 @@ -240,7 +228,6 @@ BuildRequires: gcc12-c++ BuildRequires: gcc-c++ %endif - # Python dependencies %if %node_version_number >= 14 @@ -266,8 +253,8 @@ BuildRequires: python %endif %if 0%{?suse_version} >= 1500 && %{node_version_number} >= 10 -BuildRequires: user(nobody) BuildRequires: group(nobody) +BuildRequires: user(nobody) %endif # shared openssl @@ -282,11 +269,10 @@ BuildRequires: openssl >= %{openssl_req_ver} BuildRequires: (libopenssl1_1-hmac if libopenssl-1_1-devel) BuildRequires: (libopenssl3-hmac if libopenssl-3-devel) %else -BuildRequires: openssl-1_1 >= %{openssl_req_ver} BuildRequires: libopenssl1_1-hmac +BuildRequires: openssl-1_1 >= %{openssl_req_ver} %endif - # /suse_version %endif @@ -369,8 +355,8 @@ ExclusiveArch: not_buildable %endif %endif -Provides: bundled(uvwasi) = 0.0.20 Provides: bundled(libuv) = 1.48.0 +Provides: bundled(uvwasi) = 0.0.20 Provides: bundled(v8) = 11.8.172.17 %if %{with intree_brotli} Provides: bundled(brotli) = 1.1.0 @@ -378,12 +364,11 @@ Provides: bundled(brotli) = 1.1.0 BuildRequires: pkgconfig(libbrotlidec) %endif - +Provides: bundled(base64) = 0.5.2 Provides: bundled(llhttp) = 9.1.3 Provides: bundled(ngtcp2) = 1.3.0 -Provides: bundled(base64) = 0.5.2 -Provides: bundled(simdutf) = 4.0.8 Provides: bundled(simdjson) = 3.7.0 +Provides: bundled(simdutf) = 4.0.8 # bundled url-ada parser, not ada Provides: bundled(ada) = 2.7.6 @@ -404,8 +389,8 @@ provided by npm. Summary: Development headers for NodeJS 21.x Group: Development/Languages/NodeJS Provides: nodejs-devel = %{version} -Requires: npm21 = %{version} Requires: %{name} = %{version} +Requires: npm21 = %{version} %description devel This package provides development headers for Node.js needed for creation @@ -422,12 +407,12 @@ Requires: nodejs-common Requires: nodejs21 = %{version} Provides: nodejs-npm = %{version} Obsoletes: nodejs-npm < 4.0.0 -Provides: npm(npm) = 10.5.0 Provides: npm = %{version} +Provides: npm(npm) = 10.5.0 %if 0%{?suse_version} >= 1500 %if %{node_version_number} >= 10 -Requires: user(nobody) Requires: group(nobody) +Requires: user(nobody) %endif %endif Provides: bundled(node-abbrev) = 2.0.0 @@ -714,8 +699,6 @@ 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 @@ -1101,6 +1084,7 @@ update-alternatives --remove corepack-default %{_bindir}/corepack%{node_version_ %endif %else + %pre # remove files that are no longer owned but provided by update-alternatives if ! [ -L %{_mandir}/man1/node.1%{ext_man} ]; then diff --git a/versioned.patch b/versioned.patch index 231a156..4ab0e2b 100644 --- a/versioned.patch +++ b/versioned.patch @@ -39,7 +39,7 @@ Index: node-v21.7.1/tools/install.py action(options, [link_path], os.path.join('bin', bin_name)) elif action == install: - try_symlink(options, os.path.join('..', libdir(options), 'node_modules', name, bin_target), link_path) -+ try_symlink(options, os.path.join('..', libdir(options), 'node_modules', name + 21, bin_target), link_path) ++ try_symlink(options, os.path.join('..', libdir(options), 'node_modules', name + '21', bin_target), link_path) else: assert 0 # unhandled action type From b2d354a373d59d54fcdda1632620e55bfaf274a3f0f1c5613d55d7747fd7cc1a Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Tue, 9 Apr 2024 12:50:48 +0000 Subject: [PATCH 5/7] - node-gyp-addon-gypi.patch: refreshed OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs21?expand=0&rev=25 --- node-gyp-addon-gypi.patch | 50 ++++++++++++++++++++++++++----- nodejs21.changes | 5 ++++ nodejs21.spec | 62 ++++++++++++++++++++++++--------------- 3 files changed, 86 insertions(+), 31 deletions(-) diff --git a/node-gyp-addon-gypi.patch b/node-gyp-addon-gypi.patch index b50a35e..05c120e 100644 --- a/node-gyp-addon-gypi.patch +++ b/node-gyp-addon-gypi.patch @@ -1,7 +1,7 @@ -Index: node-v20.10.0/addon-rpm.gypi +Index: node-v21.7.1/addon-rpm.gypi =================================================================== --- /dev/null -+++ node-v20.10.0/addon-rpm.gypi ++++ node-v21.7.1/addon-rpm.gypi @@ -0,0 +1,35 @@ +{ + 'target_defaults': { @@ -38,10 +38,10 @@ Index: node-v20.10.0/addon-rpm.gypi + ] + } +} -Index: node-v20.10.0/deps/npm/node_modules/node-gyp/lib/configure.js +Index: node-v21.7.1/deps/npm/node_modules/node-gyp/lib/configure.js =================================================================== ---- 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 +--- node-v21.7.1.orig/deps/npm/node_modules/node-gyp/lib/configure.js ++++ node-v21.7.1/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 @@ -66,13 +66,47 @@ Index: node-v20.10.0/deps/npm/node_modules/node-gyp/lib/configure.js } return createBuildDir() -@@ -201,7 +203,8 @@ async function configure (gyp, argv) { +@@ -201,8 +203,16 @@ 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') +- let commonGypi = path.resolve(nodeDir, 'include/node/common.gypi') + 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') ++ let addonGypi = path.resolve(__dirname, '..', addon_gypi_file) ++ let commonGypi = path.resolve(nodeDir, 'include/node21/common.gypi') ++ ++ try { ++ await fs.stat(commonGypi) ++ } catch (err) { ++ commonGypi = path.resolve(nodeDir, 'include/node/common.gypi') ++ } ++ try { await fs.stat(commonGypi) + } catch (err) { +Index: node-v21.7.1/deps/npm/node_modules/node-gyp/addon.gypi +=================================================================== +--- node-v21.7.1.orig/deps/npm/node_modules/node-gyp/addon.gypi ++++ node-v21.7.1/deps/npm/node_modules/node-gyp/addon.gypi +@@ -18,6 +18,7 @@ + ], + + 'include_dirs': [ ++ '<(node_root_dir)/include/node21', + '<(node_root_dir)/include/node', + '<(node_root_dir)/src', + '<(node_root_dir)/deps/openssl/config', +Index: node-v21.7.1/tools/build_addons.py +=================================================================== +--- node-v21.7.1.orig/tools/build_addons.py ++++ node-v21.7.1/tools/build_addons.py +@@ -27,7 +27,7 @@ def generate_headers(headers_dir, instal + def rebuild_addons(args): + headers_dir = os.path.abspath(args.headers_dir) + out_dir = os.path.abspath(args.out_dir) +- node_bin = os.path.join(out_dir, 'node') ++ node_bin = os.path.join(out_dir, 'node21') + if args.is_win: + node_bin += '.exe' + diff --git a/nodejs21.changes b/nodejs21.changes index 46fc18e..6beb10f 100644 --- a/nodejs21.changes +++ b/nodejs21.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Apr 9 12:30:22 UTC 2024 - Adam Majer + +- node-gyp-addon-gypi.patch: refreshed + ------------------------------------------------------------------- Tue Apr 2 13:54:32 UTC 2024 - Adam Majer diff --git a/nodejs21.spec b/nodejs21.spec index a706fcb..1ee62ad 100644 --- a/nodejs21.spec +++ b/nodejs21.spec @@ -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 @@ -124,12 +134,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 @@ -140,6 +150,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 @@ -166,8 +178,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 @@ -187,10 +199,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 @@ -200,15 +212,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 @@ -217,7 +229,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 @@ -228,6 +240,7 @@ BuildRequires: gcc12-c++ BuildRequires: gcc-c++ %endif + # Python dependencies %if %node_version_number >= 14 @@ -253,8 +266,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 @@ -269,10 +282,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 @@ -355,8 +369,8 @@ ExclusiveArch: not_buildable %endif %endif -Provides: bundled(libuv) = 1.48.0 Provides: bundled(uvwasi) = 0.0.20 +Provides: bundled(libuv) = 1.48.0 Provides: bundled(v8) = 11.8.172.17 %if %{with intree_brotli} Provides: bundled(brotli) = 1.1.0 @@ -364,11 +378,12 @@ Provides: bundled(brotli) = 1.1.0 BuildRequires: pkgconfig(libbrotlidec) %endif -Provides: bundled(base64) = 0.5.2 + Provides: bundled(llhttp) = 9.1.3 Provides: bundled(ngtcp2) = 1.3.0 -Provides: bundled(simdjson) = 3.7.0 +Provides: bundled(base64) = 0.5.2 Provides: bundled(simdutf) = 4.0.8 +Provides: bundled(simdjson) = 3.7.0 # bundled url-ada parser, not ada Provides: bundled(ada) = 2.7.6 @@ -389,8 +404,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 @@ -407,12 +422,12 @@ Requires: nodejs-common Requires: nodejs21 = %{version} Provides: nodejs-npm = %{version} Obsoletes: nodejs-npm < 4.0.0 -Provides: npm = %{version} Provides: npm(npm) = 10.5.0 +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 @@ -699,6 +714,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 @@ -1047,7 +1064,7 @@ make test-ci %{_bindir}/corepack%{node_version_number} %{_libdir}/node_modules/corepack%{node_version_number} %dir %{_datadir}/libalternatives/corepack -%{_datadir}/libalternatives/corepack/18.conf +%{_datadir}/libalternatives/corepack/%{node_version_number}.conf %if ! %{with libalternatives} %ghost %{_bindir}/corepack-default %ghost %{_mandir}/man1/corepack.1%{ext_man} @@ -1084,7 +1101,6 @@ update-alternatives --remove corepack-default %{_bindir}/corepack%{node_version_ %endif %else - %pre # remove files that are no longer owned but provided by update-alternatives if ! [ -L %{_mandir}/man1/node.1%{ext_man} ]; then From df3c9dd6fbbb407d3366413336951972f102924d583a7fc256ae13106a62af9c Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Tue, 9 Apr 2024 14:39:25 +0000 Subject: [PATCH 6/7] - Update to 21.7.2: * CVE-2024-27983 - Assertion failed in node::http2::Http2Session::~Http2Session() leads to HTTP/2 server crash- (High) (bsc#1222244) * CVE-2024-27982 - HTTP Request Smuggling via Content Length Obfuscation- (Medium) (bsc#1222384) * updated dependencies: + llhttp version 9.2.1 + undici version 6.11.1 (bsc#1222530, CVE-2024-30260) - node-gyp-addon-gypi.patch: adapted for new unit test layouts OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs21?expand=0&rev=26 --- SHASUMS256.txt | 82 ++++++++++++++++++++++---------------------- SHASUMS256.txt.sig | Bin 566 -> 437 bytes node-v21.7.1.tar.xz | 3 -- node-v21.7.2.tar.xz | 3 ++ nodejs21.changes | 13 +++++-- nodejs21.spec | 41 +++++++++++----------- 6 files changed, 75 insertions(+), 67 deletions(-) delete mode 100644 node-v21.7.1.tar.xz create mode 100644 node-v21.7.2.tar.xz diff --git a/SHASUMS256.txt b/SHASUMS256.txt index 20822ea..adb6ba7 100644 --- a/SHASUMS256.txt +++ b/SHASUMS256.txt @@ -1,41 +1,41 @@ -cba4d1d6c05684edeb88f06351c61c3acdb3d8d6df46b9dcd8ca89af847268e5 node-v21.7.1-aix-ppc64.tar.gz -d21f34e3864d93a8491591002e67a704a8a8ac5f9035d9da890327f884edd1c6 node-v21.7.1-arm64.msi -0a4dde483479dcf272f3d4d7afb509c3d45cf7a1ea451ce108f434dad4fa43e4 node-v21.7.1-darwin-arm64.tar.gz -20b26630c1c6d2c3db9815fca135931bdbe2b5c1c228a3f1f6a9ed6dde91ef76 node-v21.7.1-darwin-arm64.tar.xz -a406f4fbe68ff33319d513fa645aa7b9508c2cb65299f0a2de1757c2a6333c85 node-v21.7.1-darwin-x64.tar.gz -9212f90b3aaaadaf38fe32639e12ceee3c82380b50cc67402f660a9daecb7e87 node-v21.7.1-darwin-x64.tar.xz -deb71c9d4698eb835ff748671d5f04b2e0c7f53e0de457d4ee9f926ab9d285d9 node-v21.7.1-headers.tar.gz -c33217484a2f8a3aa556a4c46144757031d1a8955867e004a3db6996b67c3415 node-v21.7.1-headers.tar.xz -466647785722c5b9b9f2e430e11645e16f1d112b303b0ffdf2d5fa0eb95e647c node-v21.7.1-linux-arm64.tar.gz -d384c843621ccb80f1367fdff85d4e3870bc934ffe37ed48eb320ebebba8ddbb node-v21.7.1-linux-arm64.tar.xz -75a2787505079e972fe91d9507be0a13be2a7cf009db7a520a725bc280225704 node-v21.7.1-linux-armv7l.tar.gz -e375b24d57c8126d58ae31b807c91df6532c52e3441e22d2b3cde5116553c8fb node-v21.7.1-linux-armv7l.tar.xz -5c70f1b4d960130751334c064e5b164c3366900baf8d3ee2a11d8c444ba9c84f node-v21.7.1-linux-ppc64le.tar.gz -28b98d0ec62937bd0769327272615683caabef5c0a5112bd19b9b02d9332e732 node-v21.7.1-linux-ppc64le.tar.xz -6bf591654202c04037ee24de8c3940aff0b54d7449b9c13850f204a9bee11bce node-v21.7.1-linux-s390x.tar.gz -30d5f6eeb3b94ff150d0fc2c07527cd70c8a1ff0384b3ef191663ffe66cb4934 node-v21.7.1-linux-s390x.tar.xz -c7b15146aed968b781c235b6a8f67608be559c4615de9526a9851ae28660cc09 node-v21.7.1-linux-x64.tar.gz -cb25d7a4aa57d15f280ce45cd72f95e9d2020702b7ca75c7fe632444f7c0452c node-v21.7.1-linux-x64.tar.xz -3a8ecf4f887cbe37a1c7a1b720ed259c9e5cdb3648986a148a02211b4a77c6fa node-v21.7.1.pkg -0ba90deb3e4de7c4665cdaabafe2c50d48c6b47e44863bb557ae1b7f01112f40 node-v21.7.1.tar.gz -1272b6e129d564dbde17527b844210b971c20a70ae729268186b7cb9d990a64b node-v21.7.1.tar.xz -6ae0f60b24443708b4673b856c66827c2361957c01ee0c9628281486f0191615 node-v21.7.1-win-arm64.7z -c8931f7130c38e175aa55dfbe4235b20af033ec59d174f4dabf8809b79abe0d5 node-v21.7.1-win-arm64.zip -7c55e73c25e491a22e302e3919dd58145030a2f14bc6e9b2fed0a45c7dd6f867 node-v21.7.1-win-x64.7z -debff16a17e92d084dc19b98b21be35b15d9627befab1c8311b4ff946bf51773 node-v21.7.1-win-x64.zip -a64136c1aeafb096e8461c304c18eaa910d81f75e1ead5155a5548f4e3733a9b node-v21.7.1-win-x86.7z -5db22af240445b0afadadedac497c8b57960f6d27828bb03040be90dfe7561f6 node-v21.7.1-win-x86.zip -e6354ee73967ce6b2ae401edb1d54adaedb321123308e2af1dec71a497e73eaa node-v21.7.1-x64.msi -8673470064c13f491e594b4f4522eba504fc9082db728eed9ba43987b88de69b node-v21.7.1-x86.msi -00d60e58adb4884085675d48064426c0745799169c79e553e1523ffe88f26fd4 win-arm64/node.exe -b068c2ffb9fa47420d55d44bb24ae42211007bbc34426cf68a663b34f8187a41 win-arm64/node.lib -600be209fe1a2a4693eef98393cea9ab3bbc3f08b974ad004cf0aaa944ed2488 win-arm64/node_pdb.7z -53273a368d2079975617d3a5566c5006ee25af68e58408b7cd0842e342acac17 win-arm64/node_pdb.zip -39908c8a16f867e5a2e9666ba8089dd497c4fa48a8008bed9d52cd78181944b2 win-x64/node.exe -96d09c2055c2f252122c86b65d2aabd5f90b1a075844f24bf8bcdbab05baf53e win-x64/node.lib -1f4ece18dbfb3ea96f242f1ca94b309c1e56a50bc6138c33c842d45b198abc7f win-x64/node_pdb.7z -73f6d43a1678df35720662d9052a0a80321c9e92e9c87ef7dc9d70da31197fe9 win-x64/node_pdb.zip -1f8c02748de3c6aefe7f40939db330ec03afe95fff23bbe12ba93fa9f0c180bc win-x86/node.exe -19f86a492bf3b2a2854ebf0d05734afd9866348fc6474ed5b8c53c62ec9b7aa2 win-x86/node.lib -316254a7e269bcdcc37bb831b280c59f565745be01294b4024b8aef19507fe0b win-x86/node_pdb.7z -36186f7fa5b9eb53ed12945b9506d91c487e0fc78b27267c949f609f0e36803e win-x86/node_pdb.zip +6290bc006ee81332da8345b2d254ecf75674de0898a6dd5e348c7685ca0df325 node-v21.7.2-aix-ppc64.tar.gz +92b1d9ecd1e4520a1ac82963719dd7fd80b3f250751e34d67a8a7553fd149720 node-v21.7.2-arm64.msi +d00a2b5002db121d798f1c9556342abb6ec6a4fac9d6197bc86c922a796812ae node-v21.7.2-darwin-arm64.tar.gz +47784735ff348e9ca6eed5a1482d58582949f0ace7d74ba5d510ab763d5e1327 node-v21.7.2-darwin-arm64.tar.xz +6211829236013582fb654b4b9f8c6528dcb07620f6f82878ef514fae1b30685e node-v21.7.2-darwin-x64.tar.gz +309457de4a2e87db456b5656383be8590d8a69aacd1e161015d98a88697a206f node-v21.7.2-darwin-x64.tar.xz +32bc006ce485d8726e72c666feb08de567098d881b8e79ee37fc9aa9854329c6 node-v21.7.2-headers.tar.gz +66fa0952f5b207c1e1771492d04285a2199bf0dc756e392fe03d3be54ca3733d node-v21.7.2-headers.tar.xz +5cf1cb89feb40404adad999307659754dd17fc9afa6c086aaff690ecbf8af66c node-v21.7.2-linux-arm64.tar.gz +0a07d44da8324ad0514ccd4d588d5aa8d749d76b01b69d55343c2132d1efbe3b node-v21.7.2-linux-arm64.tar.xz +73df605f0aaa18c4a8e9789206d18045b277f4233f50837b1563f9b3dd50f696 node-v21.7.2-linux-armv7l.tar.gz +8c23b9f1d6a9022b04cda94c85bbfd329a178d7710c1bbd25587a668078d9915 node-v21.7.2-linux-armv7l.tar.xz +4ece271c97fc434c34328081245e406e23a23fed32868f90fe901f1a232a27bd node-v21.7.2-linux-ppc64le.tar.gz +11750d12cec45b7f7451b18dcd98ddcdce07afbb68db57bb0dc89e883b78ab6b node-v21.7.2-linux-ppc64le.tar.xz +9df7a1c8c9be7a7f4a62b822c3cbbc0f4c66ad185b7383c6bfb021e99a9441b0 node-v21.7.2-linux-s390x.tar.gz +ba8e598921c29e2ff5efd6f42a3e11c765a77339ac7ef7e1b55c6aba95f3bf8b node-v21.7.2-linux-s390x.tar.xz +06b891c82c9b19b8d8553222de5de8afd43a38c1b898f9ca323e1d2e22da9075 node-v21.7.2-linux-x64.tar.gz +9d55843dd4b2400fe4034de3281003de718dbd0c6f61ce6b53e94e987b16c9dc node-v21.7.2-linux-x64.tar.xz +f9e642aa9e729842b289c0314be8c7d468aca2994b1b8d8a8c2143382f1c4136 node-v21.7.2-win-arm64.7z +a9a62973ac69adb98d62f5aa6d3a7ca668fb7b1a5c84833e93ff330eef1d972b node-v21.7.2-win-arm64.zip +a532dd8dae519c78100497f398621574431757afa933ab32d39b1ba3fcf44d9b node-v21.7.2-win-x64.7z +99102e5964c6cd3c3ba5562243dbfda8e1f265e7fff2489aa1d806074893d88a node-v21.7.2-win-x64.zip +9987f8a12d2cb0439a9def11b449793b372d4ff96acceb9321a736f5c57e5f41 node-v21.7.2-win-x86.7z +ce346bb8e5d2722d653d8f6cee81fdcc80fb88c51ca945763ff12c7e4f659bbb node-v21.7.2-win-x86.zip +b936d30bbd0927157165fb09d2eaff2d939d1f13136bbddc50e64c31aa86b4ac node-v21.7.2-x64.msi +83b30683316bb2f8115d58af23b8bb154de9615632cf491fec6c365aff3b74f5 node-v21.7.2-x86.msi +f75990a446cd3512c80598d815243592776a99ac7f4e5f2cbccc5cf1369b7cfe node-v21.7.2.pkg +dc1b18771e7ed3da051fc2242806bfde5ae02b63fe7205e80156e92de8f8fa3d node-v21.7.2.tar.gz +b4b1e2a07e96f85f6ce34a2fbfea348691aefe5cb219aa6951e23ccc991f9e2f node-v21.7.2.tar.xz +80541446e8ef8a2d26d73e4517afbb560717d47e4ed0d122fdddd90f8662da53 win-arm64/node.exe +298d58a6fed36728a8d1b07f6fe3678c5a6faf4c77bdcd7288e155c117404eea win-arm64/node.lib +1881ceeab304bc003ed87c03a1206f9f9e7deb861a44af68361e493a23a5aec1 win-arm64/node_pdb.7z +c7824ff2aea7a565d81d3ba0e2992497fd7a0f776f39179681f326d9b6eab75b win-arm64/node_pdb.zip +64b5a1e9101e6281f072b385691affbe45b2cb93ba84a592f1a9941d994e621f win-x64/node.exe +473d2b087bfa76b2746542c6c4bd019b0527545849e04cbc3d0872ebd9335f0a win-x64/node.lib +93d79e521d9f3513eee1cb9ad98f38c7b62b3845be285333ad3731cd50c983ab win-x64/node_pdb.7z +e8f7a31dae7239154e53f57e3b1545102b6905419c1545ffeed721509f95426c win-x64/node_pdb.zip +f16257e0cdae9de68cc3bff533ddac2bbfe42f3b7cba16a2a8fc1b40a98e3d3c win-x86/node.exe +8ecea23973c4e82d13c18f78f4e23beebac5b70f1d54c100d08d41f52ade421e win-x86/node.lib +6ddf27e2fcc6528a95fd5db9046a5629698714aeae43ff4e21d6b99904bb8cde win-x86/node_pdb.7z +91af5f3e3bb0e838a2c2e5c6a2d96331309fe52bb0897072774954eddc1976c4 win-x86/node_pdb.zip diff --git a/SHASUMS256.txt.sig b/SHASUMS256.txt.sig index a1b35e49fdab678a23123c0784818c1d4a938fc997a7d69d4b4a07fabac30c4d..ecbebd5d9a683ec06769746396519623a24d1259ae0885fb6b6512cecf5e7773 100644 GIT binary patch literal 437 zcmV;m0ZRUf0kQ-D0SEvc79j+Q3<%qWc@{734f)%P>a^d_RbKQ30%i?kEC31#5R2-x z-_KQE^jCNb_^)+s#eA~MKEeGZ$AbaKZbBnT{jj50u=4eB4{}QO7A3z(VqAaV=cTCB z^?mWUqIsBdxFwfS&V2RwDqdTlIrZHV;1@95QfblLkx;mzy6VM(Cqx2+5bz8OUXw( ztvl*x#zeWF+4yeEAB+4JnIUR&(C^%KgyULJ@7tDb_iB37C;O90kq9~>gD@IN9%N4e zU356Mqlx+U3WkVqtmO+hY>l3nhQ z!|*XmgESNA$dYD(Mx7c0{8oz#U)Vd?9*-kYTlJWVs=(n>s$z9lyHR7I&)yp!Hw@BR zjpyF7bseZwAyd6sd89aY!fQJ$AmX!~&b4y(+31k(-#Q!|>KfFFir=f8dh5cl;y%@PrPA@oL-UB*z>% diff --git a/node-v21.7.1.tar.xz b/node-v21.7.1.tar.xz deleted file mode 100644 index c1892cc..0000000 --- a/node-v21.7.1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1272b6e129d564dbde17527b844210b971c20a70ae729268186b7cb9d990a64b -size 42519836 diff --git a/node-v21.7.2.tar.xz b/node-v21.7.2.tar.xz new file mode 100644 index 0000000..085c215 --- /dev/null +++ b/node-v21.7.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4b1e2a07e96f85f6ce34a2fbfea348691aefe5cb219aa6951e23ccc991f9e2f +size 42378944 diff --git a/nodejs21.changes b/nodejs21.changes index 6beb10f..f2dd57c 100644 --- a/nodejs21.changes +++ b/nodejs21.changes @@ -1,7 +1,16 @@ ------------------------------------------------------------------- -Tue Apr 9 12:30:22 UTC 2024 - Adam Majer +Tue Apr 9 14:13:21 UTC 2024 - Adam Majer -- node-gyp-addon-gypi.patch: refreshed +- Update to 21.7.2: + * CVE-2024-27983 - Assertion failed in node::http2::Http2Session::~Http2Session() + leads to HTTP/2 server crash- (High) (bsc#1222244) + * CVE-2024-27982 - HTTP Request Smuggling via Content Length + Obfuscation- (Medium) (bsc#1222384) + * updated dependencies: + + llhttp version 9.2.1 + + undici version 6.11.1 (bsc#1222530, CVE-2024-30260) + +- node-gyp-addon-gypi.patch: adapted for new unit test layouts ------------------------------------------------------------------- Tue Apr 2 13:54:32 UTC 2024 - Adam Majer diff --git a/nodejs21.spec b/nodejs21.spec index 1ee62ad..96238a7 100644 --- a/nodejs21.spec +++ b/nodejs21.spec @@ -31,7 +31,7 @@ %endif Name: nodejs21 -Version: 21.7.1 +Version: 21.7.2 Release: 0 # Double DWZ memory limits @@ -379,7 +379,7 @@ BuildRequires: pkgconfig(libbrotlidec) %endif -Provides: bundled(llhttp) = 9.1.3 +Provides: bundled(llhttp) = 9.2.1 Provides: bundled(ngtcp2) = 1.3.0 Provides: bundled(base64) = 0.5.2 Provides: bundled(simdutf) = 4.0.8 @@ -387,13 +387,12 @@ Provides: bundled(simdjson) = 3.7.0 # bundled url-ada parser, not ada Provides: bundled(ada) = 2.7.6 -Provides: bundled(node-@fastify/busboy) = 2.1.0 Provides: bundled(node-acorn) = 8.11.3 Provides: bundled(node-acorn-walk) = 8.3.2 Provides: bundled(node-cjs-module-lexer) = 1.2.2 Provides: bundled(node-corepack) = 0.25.2 Provides: bundled(node-minimatch) = 9.0.3 -Provides: bundled(node-undici) = 6.6.2 +Provides: bundled(node-undici) = 6.11.1 %description Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js @@ -668,39 +667,39 @@ tar Jxf %{SOURCE5} popd %if %{node_version_number} >= 19 -%patch308 -p1 +%patch -P 308 -p1 %else %endif %endif -%patch1 -p1 -%patch3 -p1 +%patch -P 1 -p1 +%patch -P 3 -p1 %if %{node_version_number} <= 12 && 0%{?suse_version} < 1500 -%patch5 -p1 +%patch -P 5 -p1 %endif -%patch7 -p1 +%patch -P 7 -p1 %if 0%{with valgrind_tests} %endif -%patch13 -p1 -%patch100 -p1 -%patch101 -p1 +%patch -P 13 -p1 +%patch -P 100 -p1 +%patch -P 101 -p1 %if 0%{?suse_version} >= 1500 || 0%{?suse_version} == 0 -%patch102 -p1 +%patch -P 102 -p1 %endif # Add check_output to configure script (not part of Python 2.6 in SLE11). %if 0%{?suse_version} == 1110 %endif -%patch104 -p1 -%patch106 -p1 -%patch110 -p1 -%patch120 -p1 -%patch132 -p1 +%patch -P 104 -p1 +%patch -P 106 -p1 +%patch -P 110 -p1 +%patch -P 120 -p1 +%patch -P 132 -p1 %if ! 0%{with openssl_RSA_get0_pss_params} %endif -%patch200 -p1 +%patch -P 200 -p1 -%patch305 -p1 -%patch309 -p1 +%patch -P 305 -p1 +%patch -P 309 -p1 %if %{node_version_number} == 12 # minimist security update - patch50 From b5a83435e699af3b9a245f076b8ba7251e95a3e0fb76c1df8bd8d6d59662dc4c Mon Sep 17 00:00:00 2001 From: Adam Majer Date: Wed, 10 Apr 2024 09:02:14 +0000 Subject: [PATCH 7/7] * Assertion failed in node::http2::Http2Session::~Http2Session() leads to HTTP/2 server crash (High) (bsc#1222244, CVE-2024-27983) * HTTP Request Smuggling via Content Length Obfuscation (Medium) (bsc#1222384, CVE-2024-27982) + undici version 6.11.1 (bsc#1222530, bsc#1222603, CVE-2024-30260, CVE-2024-30261) OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs21?expand=0&rev=27 --- nodejs21.changes | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/nodejs21.changes b/nodejs21.changes index f2dd57c..01cddc2 100644 --- a/nodejs21.changes +++ b/nodejs21.changes @@ -2,13 +2,14 @@ Tue Apr 9 14:13:21 UTC 2024 - Adam Majer - Update to 21.7.2: - * CVE-2024-27983 - Assertion failed in node::http2::Http2Session::~Http2Session() - leads to HTTP/2 server crash- (High) (bsc#1222244) - * CVE-2024-27982 - HTTP Request Smuggling via Content Length - Obfuscation- (Medium) (bsc#1222384) + * Assertion failed in node::http2::Http2Session::~Http2Session() + leads to HTTP/2 server crash (High) (bsc#1222244, CVE-2024-27983) + * HTTP Request Smuggling via Content Length Obfuscation + (Medium) (bsc#1222384, CVE-2024-27982) * updated dependencies: + llhttp version 9.2.1 - + undici version 6.11.1 (bsc#1222530, CVE-2024-30260) + + undici version 6.11.1 (bsc#1222530, bsc#1222603, + CVE-2024-30260, CVE-2024-30261) - node-gyp-addon-gypi.patch: adapted for new unit test layouts