commit b3457b04358ffa20787ab4fea44e00f23a1476ba Author: Adrian Schröter Date: Wed Jun 7 09:12:45 2023 +0200 Sync from SUSE:ALP:Source:Standard:1.0 nodejs18 revision 4da017ae2ec3ff2f14abf19673a44563 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fecc750 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/SHASUMS256.txt b/SHASUMS256.txt new file mode 100644 index 0000000..00e5174 --- /dev/null +++ b/SHASUMS256.txt @@ -0,0 +1,34 @@ +a65bd3fe91ffeb31d12a208e811943e3ebba4706553a4845a03d857beaeec51e node-v18.16.0-aix-ppc64.tar.gz +82c7bb4869419ce7338669e6739a786dfc7e72f276ffbed663f85ffc905dcdb4 node-v18.16.0-darwin-arm64.tar.gz +b23cdf4fa0e9f77273720ab18eabdd7691edbb69e08ec3b65afd69bef23fe209 node-v18.16.0-darwin-arm64.tar.xz +cd520da6e2e89fab881c66a3e9aff02cb0d61d68104b1d6a571dd71bef920870 node-v18.16.0-darwin-x64.tar.gz +2c8aa0333111c2411564bfb85be44186aeb581392f73c4be5912cbb125d99043 node-v18.16.0-darwin-x64.tar.xz +effeb73616e5297922ed89a1b94d2664390040a83184504c1cc1305b0c0c853f node-v18.16.0-headers.tar.gz +0eb9823c2cc72792c2d4413f57b5a36232e173d7edefb1909c37e364a823f9c7 node-v18.16.0-headers.tar.xz +dc3dfaee899ed21682e47eaf15525f85aff29013c392490e9b25219cd95b1c35 node-v18.16.0-linux-arm64.tar.gz +c81dfa0bada232cb4583c44d171ea207934f7356f85f9184b32d0dde69e2e0ea node-v18.16.0-linux-arm64.tar.xz +a3968db44e5ae17243d126ff79b1756016b198f7cc94c6fad8522aac481b4ff3 node-v18.16.0-linux-armv7l.tar.gz +57ba6b71eb039fa896c329e68669b21f6717622c560c6f61a0c97d18ca866b2d node-v18.16.0-linux-armv7l.tar.xz +b4e66dcda5ba4a3697be3fded122dabb6a677deee3d7f4d3c7c13ebb5a13844c node-v18.16.0-linux-ppc64le.tar.gz +c43142fb9ef30658620ed095f8203beca92f469c1121eeb724df9a48bf0e59a5 node-v18.16.0-linux-ppc64le.tar.xz +a8b607c3c06f585c4fe9ba45be6dc76ce9459238c91b3f43533aa30344caed87 node-v18.16.0-linux-s390x.tar.gz +39b15c16347000b0be97133437bde0317dd2307d3fdfce15ddd8680b07a963ef node-v18.16.0-linux-s390x.tar.xz +fc83046a93d2189d919005a348db3b2372b598a145d84eb9781a3a4b0f032e95 node-v18.16.0-linux-x64.tar.gz +44d93d9b4627fe5ae343012d855491d62c7381b236c347f7666a7ad070f26548 node-v18.16.0-linux-x64.tar.xz +156aa5b9580288fb0b3c6134eb8fac64e50745d78d33eebe9e29eb7ff87b8e1e node-v18.16.0.pkg +6a4f5c5d76e5c50cef673099e56f19bc3266ae363f56ca0ab77dd2f3c5088c6d node-v18.16.0.tar.gz +33d81a233e235a509adda4a4f2209008d04591979de6b3f0f67c1c906093f118 node-v18.16.0.tar.xz +007848640ba414f32d968d303e75d9841ecd2cd95d6fdd81f80bc3dcbd74ae44 node-v18.16.0-win-x64.7z +4b3bd4cb5570cc217490639e93a7e1b7a7a341981366661e514ce61941824a85 node-v18.16.0-win-x64.zip +681be28e0acd057b4798f357d21eec5f49e21bc803bbbefeb1072bb4f166025a node-v18.16.0-win-x86.7z +2a7e0fb22e1a36144ee8183c80ef2705cd9754c1d894f94bb6c94a681de47924 node-v18.16.0-win-x86.zip +5bfb6f3ab89e198539408f7e0e8ec0b0bd5efe8898573ec05b381228efb45a5d node-v18.16.0-x64.msi +09534d1949c795c3e49d257fb72a9fd865ee28955673b87d569d4aec541333e7 node-v18.16.0-x86.msi +b548a55c2b5ef5de34f4636610bab27077fb9313d34f52280b9ec11dd25e9dd1 win-x64/node.exe +72b7fab9381af8f4958c8212f3d4cdfff8c7c5b1e33eaad0e7d5888293568cd5 win-x64/node.lib +3b9474e18a1bbb38b05b1876b4b37056063c2af82212d356a8a5cf91c1a3acf3 win-x64/node_pdb.7z +6b506b1fe654ca7161373916c7ba7e38f62545236698342fa97fd2faf39ebc4e win-x64/node_pdb.zip +36bf0f0a364ca8edc176776764831f9e88bef6d1e8056f6edc474a37b652a794 win-x86/node.exe +6a85c15a69238f0902b9a734d262bf36d211b273a46d5e3249857d4bb7f6d9b7 win-x86/node.lib +9256bdefae4491acfd523ca06d4f4344ddc4f1a28aac868b5efb6a72d8023e2a win-x86/node_pdb.7z +53c6b29afd58904e5143d9f3298b55695b8ecb2b6c08a9612ed30e9b0ed9589a win-x86/node_pdb.zip diff --git a/SHASUMS256.txt.sig b/SHASUMS256.txt.sig new file mode 100644 index 0000000..ee2c2e7 Binary files /dev/null and b/SHASUMS256.txt.sig differ diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..16f8e04 --- /dev/null +++ b/_constraints @@ -0,0 +1,32 @@ + + + + + 8 + + + 10000 + + + + + aarch64 + + + + asimdrdm + + + + + + armv6l + armv7l + + + + 5 + + + + diff --git a/bash_output_helper.bash b/bash_output_helper.bash new file mode 100644 index 0000000..d5a74bd --- /dev/null +++ b/bash_output_helper.bash @@ -0,0 +1,16 @@ +# +# Node can break stdin/stdout/stderr by setting them O_NONBLOCK +# and then not resetting it back to blocking mode on exit +# This function redirects stdio descriptors via new logging pipe +# + + +function decoupled_cmd +{ + mkfifo _log + ($@) < /dev/null > _log 2>_log & + cat _log + rm _log + wait $! +} + diff --git a/cares_public_headers.patch b/cares_public_headers.patch new file mode 100644 index 0000000..bd004ca --- /dev/null +++ b/cares_public_headers.patch @@ -0,0 +1,13 @@ +Index: node-v14.17.5/src/cares_wrap.h +=================================================================== +--- node-v14.17.5.orig/src/cares_wrap.h ++++ node-v14.17.5/src/cares_wrap.h +@@ -22,7 +22,7 @@ + # include + #endif // __POSIX__ + +-# include ++#include + + namespace node { + namespace cares_wrap { diff --git a/fix_ci_tests.patch b/fix_ci_tests.patch new file mode 100644 index 0000000..c04e52f --- /dev/null +++ b/fix_ci_tests.patch @@ -0,0 +1,103 @@ +Author: Adam Majer +Date: Dec 20 09:18:49 UTC 2017 +Summary: Fix CI unit tests framework for OBS building + +Index: node-v18.9.0/test/parallel/test-module-loading-globalpaths.js +=================================================================== +--- node-v18.9.0.orig/test/parallel/test-module-loading-globalpaths.js ++++ node-v18.9.0/test/parallel/test-module-loading-globalpaths.js +@@ -11,6 +11,9 @@ const { addLibraryPath } = require('../c + + addLibraryPath(process.env); + ++common.skip('hardcoded global paths'); ++return; ++ + if (process.argv[2] === 'child') { + console.log(require(pkgName).string); + } else { +Index: node-v18.9.0/test/parallel/test-tls-passphrase.js +=================================================================== +--- node-v18.9.0.orig/test/parallel/test-tls-passphrase.js ++++ node-v18.9.0/test/parallel/test-tls-passphrase.js +@@ -223,7 +223,7 @@ server.listen(0, common.mustCall(functio + }, onSecureConnect()); + })).unref(); + +-const errMessageDecrypt = /bad decrypt/; ++const errMessageDecrypt = /bad (decrypt|password read)/; + + // Missing passphrase + assert.throws(function() { +Index: node-v18.9.0/test/parallel/test-repl-envvars.js +=================================================================== +--- node-v18.9.0.orig/test/parallel/test-repl-envvars.js ++++ node-v18.9.0/test/parallel/test-repl-envvars.js +@@ -2,7 +2,9 @@ + + // Flags: --expose-internals + +-require('../common'); ++const common = require('../common'); ++common.skip('Not running test in OBS'); ++ + const stream = require('stream'); + const REPL = require('internal/repl'); + const assert = require('assert'); +Index: node-v18.9.0/test/common/index.mjs +=================================================================== +--- node-v18.9.0.orig/test/common/index.mjs ++++ node-v18.9.0/test/common/index.mjs +@@ -45,6 +45,7 @@ const { + expectsError, + skipIfInspectorDisabled, + skipIf32Bits, ++ skipIfWorker, + getArrayBufferViews, + getBufferSources, + getTTYfd, +@@ -94,6 +95,7 @@ export { + expectsError, + skipIfInspectorDisabled, + skipIf32Bits, ++ skipIfWorker, + getArrayBufferViews, + getBufferSources, + getTTYfd, +Index: node-v18.9.0/Makefile +=================================================================== +--- node-v18.9.0.orig/Makefile ++++ node-v18.9.0/Makefile +@@ -524,7 +524,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 +-test-ci: | clear-stalled bench-addons-build build-addons build-js-native-api-tests build-node-api-tests doc-only ++test-ci: | clear-stalled bench-addons-build build-addons build-js-native-api-tests build-node-api-tests ++ strip $(NODE_EXE) + 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) \ +@@ -717,7 +718,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 +- @if [ "$(shell $(node_use_openssl))" != "true" ]; then \ ++ echo "Skipping tools/doc/node_modules" ++# @if [ "$(shell $(node_use_openssl))" != "true" ]; then \ + echo "Skipping tools/doc/node_modules (no crypto)"; \ + else \ + cd tools/doc && $(call available-node,$(run-npm-ci)) \ +Index: node-v18.9.0/test/parallel/test-crypto-dh.js +=================================================================== +--- node-v18.9.0.orig/test/parallel/test-crypto-dh.js ++++ node-v18.9.0/test/parallel/test-crypto-dh.js +@@ -167,7 +167,7 @@ assert.throws(() => { + dh3.computeSecret(''); + }, { message: common.hasOpenSSL3 ? + 'error:02800080:Diffie-Hellman routines::invalid secret' : +- 'Supplied key is too small' }); ++ /Supplied key is too small|error:05066066:Diffie-Hellman routines:compute_key:invalid public key/ }); + + // Invalid test: curve argument is undefined + assert.throws( diff --git a/flaky_test_rerun.patch b/flaky_test_rerun.patch new file mode 100644 index 0000000..b1bccad --- /dev/null +++ b/flaky_test_rerun.patch @@ -0,0 +1,21 @@ +Index: node-v16.13.0/tools/test.py +=================================================================== +--- node-v16.13.0.orig/tools/test.py ++++ node-v16.13.0/tools/test.py +@@ -586,6 +586,16 @@ class TestCase(object): + self.context.store_unexpected_output) + + def Run(self): ++ reruns = 0 ++ while (reruns < 5): ++ reruns += 1 ++ result = self.OriginalRun() ++ if (not result.HasFailed()): ++ break ++ print("FLAKY TEST rerun: ", self.GetCommand()) ++ return result ++ ++ def OriginalRun(self): + try: + result = self.RunCommand(self.GetCommand(), { + "TEST_SERIAL_ID": "%d" % self.serial_id, diff --git a/legacy_python.patch b/legacy_python.patch new file mode 100644 index 0000000..00fef03 --- /dev/null +++ b/legacy_python.patch @@ -0,0 +1,26 @@ +Index: node-v18.11.0/tools/utils.py +=================================================================== +--- node-v18.11.0.orig/tools/utils.py ++++ node-v18.11.0/tools/utils.py +@@ -26,10 +26,10 @@ + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +-import glob + import platform + import re + import sys ++from pathlib import Path + + + # Reads a .list file into an array of strings +@@ -109,7 +109,8 @@ def IsWindows(): + + + def SearchFiles(dir, ext): +- list = glob.glob(dir+ '/**/*.' + ext, recursive=True) ++ list = Path(dir).glob('**/*.' + ext) ++ list = [ str(x) for x in list ] + if sys.platform == 'win32': + list = [ x.replace('\\', '/')for x in list] + return sorted(list) diff --git a/linker_lto_jobs.patch b/linker_lto_jobs.patch new file mode 100644 index 0000000..74f73ef --- /dev/null +++ b/linker_lto_jobs.patch @@ -0,0 +1,25 @@ +Purpose of these dependencies is to make sure that the linker +is run serially over these binaries instead of in parallel. +OBS workers run out of memory as each executable seems to require +upward of 5G RAM + +Index: node-v18.16.0/node.gyp +=================================================================== +--- node-v18.16.0.orig/node.gyp ++++ node-v18.16.0/node.gyp +@@ -1220,6 +1220,7 @@ + 'node_dtrace_provider', + 'deps/simdutf/simdutf.gyp:simdutf', + 'deps/ada/ada.gyp:ada', ++ 'fuzz_env' + ], + + 'includes': [ +@@ -1389,6 +1390,7 @@ + 'deps/histogram/histogram.gyp:histogram', + 'deps/uvwasi/uvwasi.gyp:uvwasi', + 'deps/ada/ada.gyp:ada', ++ 'cctest' + ], + + 'includes': [ diff --git a/manual_configure.patch b/manual_configure.patch new file mode 100644 index 0000000..7a40b92 --- /dev/null +++ b/manual_configure.patch @@ -0,0 +1,20 @@ +Author: Adam Majer +Date: Wed May 23 14:13:33 CEST 2018 +Summary: This config.h is defined by hand + +Gyp doesn't run autotools, so this config is not quite correct. +Update to prevent implicit defines to be used. + +Index: node-git.8dae89b396/deps/nghttp2/lib/includes/config.h +=================================================================== +--- node-git.8dae89b396.orig/deps/nghttp2/lib/includes/config.h ++++ node-git.8dae89b396/deps/nghttp2/lib/includes/config.h +@@ -71,7 +71,7 @@ typedef intptr_t ssize_t; + /* #undef HAVE_NETDB_H */ + + /* Define to 1 if you have the header file. */ +-/* #undef HAVE_NETINET_IN_H */ ++#define HAVE_NETINET_IN_H 1 + + /* Define to 1 if you have the header file. */ + /* #undef HAVE_PWD_H */ diff --git a/node-gyp-addon-gypi.patch b/node-gyp-addon-gypi.patch new file mode 100644 index 0000000..301420c --- /dev/null +++ b/node-gyp-addon-gypi.patch @@ -0,0 +1,79 @@ +Index: node-git.b4f0a18b5a/addon-rpm.gypi +=================================================================== +--- /dev/null ++++ node-git.b4f0a18b5a/addon-rpm.gypi +@@ -0,0 +1,35 @@ ++{ ++ 'target_defaults': { ++ 'type': 'loadable_module', ++ 'product_prefix': '', ++ 'include_dirs': [ ++ '/usr/include/node18/', ++ '/usr/include/' ++ ], ++ ++ 'target_conditions': [ ++ ['_type=="loadable_module"', { ++ 'product_extension': 'node', ++ 'defines': [ 'BUILDING_NODE_EXTENSION' ], ++ }] ++ ], ++ ++ 'conditions': [ ++ [ 'OS=="mac"', { ++ 'libraries': [ '-undefined dynamic_lookup' ], ++ 'xcode_settings': { ++ 'DYLIB_INSTALL_NAME_BASE': '@rpath' ++ }, ++ }], ++ [ 'OS=="win"', { ++ 'libraries': [ '-l<(node_root_dir)/$(Configuration)/node.lib' ], ++ # warning C4251: 'node::ObjectWrap::handle_' : class 'v8::Persistent' ++ # needs to have dll-interface to be used by clients of class 'node::ObjectWrap' ++ 'msvs_disabled_warnings': [ 4251 ], ++ }], ++ [ 'OS=="freebsd" or OS=="openbsd" or OS=="solaris" or (OS=="linux" and target_arch!="ia32")', { ++ 'cflags': [ '-fPIC' ], ++ }] ++ ] ++ } ++} +Index: node-git.b4f0a18b5a/deps/npm/node_modules/node-gyp/lib/configure.js +=================================================================== +--- node-git.b4f0a18b5a.orig/deps/npm/node_modules/node-gyp/lib/configure.js ++++ node-git.b4f0a18b5a/deps/npm/node_modules/node-gyp/lib/configure.js +@@ -46,10 +46,6 @@ function configure (gyp, argv, callback) + if ('v' + release.version !== process.version) { + // if --target was given, then determine a target version to compile for + log.verbose('get node dir', 'compiling against --target node version: %s', release.version) +- } else { +- // if no --target was specified then use the current host node version +- log.verbose('get node dir', 'no --target version specified, falling back to host node version: %s', release.version) +- } + + if (!release.semver) { + // could not parse the version string with semver +@@ -68,6 +64,12 @@ function configure (gyp, argv, callback) + nodeDir = path.resolve(gyp.devDir, release.versionDir) + createBuildDir() + }) ++ } else { ++ // if no --target was specified then use RPM-installed headers ++ log.verbose('get node dir', 'no --target version specified, falling back to RPM installed headers') ++ nodeDir = '/usr/include/node18' ++ createBuildDir() ++ } + } + } + +@@ -282,7 +284,9 @@ function configure (gyp, argv, callback) + + // this logic ported from the old `gyp_addon` python file + var gypScript = path.resolve(__dirname, '..', 'gyp', 'gyp_main.py') +- var addonGypi = path.resolve(__dirname, '..', 'addon.gypi') ++ var addon_gypi_file = gyp.opts.target || gyp.opts.nodedir ? 'addon.gypi' : 'addon-rpm.gypi' ++ ++ var addonGypi = path.resolve(__dirname, '..', addon_gypi_file) + var commonGypi = path.resolve(nodeDir, 'include/node/common.gypi') + fs.stat(commonGypi, function (err) { + if (err) { diff --git a/node-gyp_7.1.2.tar.xz b/node-gyp_7.1.2.tar.xz new file mode 100644 index 0000000..12dc4bc --- /dev/null +++ b/node-gyp_7.1.2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:172cd1f46b5b20cb4f443a83b24995ad35477c3ccdffe228b8e96ca4199d6103 +size 1245896 diff --git a/node-v18.16.0.tar.xz b/node-v18.16.0.tar.xz new file mode 100644 index 0000000..9421075 --- /dev/null +++ b/node-v18.16.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:33d81a233e235a509adda4a4f2209008d04591979de6b3f0f67c1c906093f118 +size 40467860 diff --git a/node_modules.tar.xz b/node_modules.tar.xz new file mode 100644 index 0000000..782bc34 --- /dev/null +++ b/node_modules.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6082cd5e67683f11f49ae144922d0dee412054ec2e9e2c1d715864986e44ee52 +size 1059176 diff --git a/nodejs-libpath.patch b/nodejs-libpath.patch new file mode 100644 index 0000000..2152360 --- /dev/null +++ b/nodejs-libpath.patch @@ -0,0 +1,54 @@ +Index: node-v18.9.0/tools/install.py +=================================================================== +--- node-v18.9.0.orig/tools/install.py ++++ node-v18.9.0/tools/install.py +@@ -7,6 +7,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): + try_unlink(target_path) # prevent ETXTBSY errors + return shutil.copy2(source_path, target_path) + ++def libdir(): ++ 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 package_files(action, name, bins): +- target_path = 'lib/node_modules/' + name + '/' ++ target_path = 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): + if action == uninstall: + action([link_path], '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) + else: + assert 0 # unhandled action type + +Index: node-v18.9.0/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() { + path.resolve(process.execPath, '..') : + path.resolve(process.execPath, '..', '..'); + +- const paths = [path.resolve(prefixDir, 'lib', 'node')]; ++ const paths = ['/usr/lib/node']; + + if (homeDir) { + ArrayPrototypeUnshift(paths, path.resolve(homeDir, '.node_libraries')); diff --git a/nodejs.keyring b/nodejs.keyring new file mode 100644 index 0000000..a9b1ea5 Binary files /dev/null and b/nodejs.keyring differ diff --git a/nodejs18.changes b/nodejs18.changes new file mode 100644 index 0000000..f6b5b98 --- /dev/null +++ b/nodejs18.changes @@ -0,0 +1,299 @@ +------------------------------------------------------------------- +Thu Apr 13 13:49:59 UTC 2023 - Adam Majer + +- Update to NodeJS 18.16.0 LTS version + * Add initial support for single executable applications + * Replace url parser with Ada + * buffer: add Buffer.copyBytesFrom + +- refreshed patches: versioned.patch linker_lto_jobs.patch + +------------------------------------------------------------------- +Mon Mar 13 16:43:33 UTC 2023 - Adam Majer + +- relax Requires to Suggests for alts on TW + +------------------------------------------------------------------- +Wed Mar 8 13:01:06 UTC 2023 - Adam Majer - 18.15.0 + +- Update to NodeJS 18.15.0 LTS version: + * test_runner: + + add initial code coverate support + + add reporters + * fs: add statfs() + * buffer: add isAscii() + +- s390.patch, sysctl.patch: upstreamed and removed + +------------------------------------------------------------------- +Thu Feb 23 10:41:38 UTC 2023 - Adam Majer + +- node-gyp_7.1.2.tar.xz: added dependencies so they don't conflict with + npm dependencies. + +------------------------------------------------------------------- +Wed Feb 22 13:59:45 UTC 2023 - Adam Majer + +- Update to NodeJS 18.14.2 LTS: + * deps: upgrade npm to 9.5.0 (bsc#1208744, CVE-2022-25881) + * deps: update undici to 5.20.0 + +- Changes in version 18.14.1: + * fixes permissions policies can be bypassed via process.mainModule + (bsc#1208481, CVE-2023-23918) + * fixes insecure loading of ICU data through ICU_DATA environment + variable (bsc#1208487, CVE-2023-23920) + * fixes OpenSSL error handling issues in nodejs crypto library + (bsc#1208483, CVE-2023-23919) + * updates undici to v5.19.1 + + Fetch API in Node.js did not protect against CRLF injection in host headers + + Regular Expression Denial of Service in Headers in Node.js fetch API + (bsc#1208413, bsc#1208485, CVE-2023-24807, CVE-2023-23936) + +- versioned.patch: refreshed +- sysctl.patch: unit test fixes + +------------------------------------------------------------------- +Fri Feb 3 11:43:02 UTC 2023 - Adam Majer + +- Update to NodeJS 18.14.0 LTS: + * deps: + + update npm to 9.2.0 + * http: + + join authorization headers + + improved timeout defaults handling + * stream: + + implement finished() for ReadableStream and WritableStream + +- refreshed patches: linker_lto_jobs.patch, npm_search_paths.patch, + versioned.patch + +------------------------------------------------------------------- +Wed Feb 1 07:58:26 UTC 2023 - Dominique Leuenberger + +- Do not use pkg_vcmp to decide BuildDependencies: this works based + on 'installed packages' which is not interpreted correctly by the + scheduler. Rather switch to boolean dependencies. + +------------------------------------------------------------------ +Wed Jan 25 12:01:18 UTC 2023 - Adam Majer + +- Again use openssl-3, if available. +- _constraints: reset aarch64 memory requirements back to original + otherwise some unit tests can fail +- s390.patch: fix unit test on s390 with patched zlib + +------------------------------------------------------------------- +Mon Jan 16 14:57:58 UTC 2023 - Adam Majer + +- Update to NodejJS 18.13.0 LTS: + * build: disable v8 snapshot compression by default + * crypto: update root certificates + * deps: update ICU to 72.1 + * doc: + + add doc-only deprecation for headers/trailers setters + + add Rafael to the tsc + + deprecate use of invalid ports in url.parse + + deprecate url.parse() + * lib: drop fetch experimental warning + * net: add autoSelectFamily and autoSelectFamilyAttemptTimeout options + * src: + + add uvwasi version + + add initial shadow realm support + * test_runner: + + add t.after() hook + + don't use a symbol for runHook() + * tls: + + add "ca" property to certificate object + * util: + + add fast path for utf8 encoding + + improve textdecoder decode performance + + add MIME utilities + +- new_python3.patch, icu721_fixes.patch: upstreamed, removed + +------------------------------------------------------------------- +Fri Dec 23 11:31:12 UTC 2022 - Guillaume GARDET + +- Update _constraints: + * Less RAM for aarch64 and 32-bit arm + * Use 'asimdrdm' cpu flag to use aarch64 workers where tests + are more stable + +------------------------------------------------------------------- +Thu Nov 10 08:18:42 UTC 2022 - Adam Majer + +- icu721_fixes.patch: fixes compatibility with ICU 72.1 (bsc#1205236) + +------------------------------------------------------------------- +Mon Nov 7 14:00:54 UTC 2022 - Adam Majer + +- Fix migration to openssl-3 (bsc#1205042) + +------------------------------------------------------------------- +Mon Nov 7 09:05:07 UTC 2022 - Adam Majer + +- Update to NodeJS 18.12.1 LTS: + * inspector: DNS rebinding in --inspect via invalid octal IP + (bsc#1205119, CVE-2022-43548) + +------------------------------------------------------------------- +Fri Oct 28 10:31:50 UTC 2022 - Adam Majer + +- Update to NodeJS 18.12.0 LTS: + * Running in 'watch' mode using node --watch restarts the process + when an imported file is changed. + * fs: add FileHandle.prototype.readLines + * http: add writeEarlyHints function to ServerResponse + * http2: make early hints generic + * util: add default value option to parsearg + +------------------------------------------------------------------- +Mon Oct 17 13:02:52 UTC 2022 - Adam Majer + +- Update to NodeJS 18.11.0: + * added experimental watch mode -- running in 'watch' mode using + node --watch restarts the process when an imported file is changed + * fs: add FileHandle.prototype.readLines + * http: add writeEarlyHints function to ServerResponse + * http2: make early hints generic + * lib: refactor transferable AbortSignal + * src: add detailed embedder process initialization API + * util: add default value option to parsearg + +- legacy_python.patch, versioned.patch: updated + +------------------------------------------------------------------- +Wed Oct 12 08:14:29 UTC 2022 - Adam Majer + +- qemu_timeouts_arches.patch: set timeouts on riscv5 to 7x normal + +------------------------------------------------------------------- +Fri Oct 7 08:05:59 UTC 2022 - Dirk Müller + +- skip more tests for riscv64/qemu emulation + +------------------------------------------------------------------- +Thu Sep 29 13:58:09 UTC 2022 - Adam Majer + +- Update to NodeJS 18.10.0: + * deps: upgrade npm to 8.19.2 + * http: throw error on content-length mismatch + * stream: add ReadableByteStream.tee() + +- openssl3_fixups.patch: upstreamed and removed + +------------------------------------------------------------------- +Mon Sep 26 13:13:39 UTC 2022 - Adam Majer + +- Update to Nodejs 18.9.1: + * deps: llhttp updated to 6.0.10 + + CVE-2022-32213 bypass via obs-fold mechanic (bsc#1201325) + + Incorrect Parsing of Multi-line Transfer-Encoding + (CVE-2022-32215, bsc#1201327) + + Incorrect Parsing of Header Fields (CVE-2022-35256, bsc#1203832) + * crypto: fix weak randomness in WebCrypto keygen + (CVE-2022-35255, bsc#1203831) + +------------------------------------------------------------------- +Sat Sep 17 10:35:31 UTC 2022 - Bruno Pitrus + +- Skip test-fs-utimes-y2K38.js on armv6hl as well as armv7hl. + +------------------------------------------------------------------- +Thu Sep 15 15:00:25 UTC 2022 - Adam Majer + +- Update to Nodejs 18.9.0: + * lib - add diagnostics channel for process and worker + * os - add machine method + * report - expose report public native apis + * src - expose environment RequestInterrupt api + * vm - include vm context in the embedded snapshot + +- Changes in 18.8.0: + * bootstrap: implement run-time user-land snapshots via + --build-snapshot and --snapshot-blob. See + * crypto: + + allow zero-length IKM in HKDF and in webcrypto PBKDF2 + + allow zero-length secret KeyObject + * deps: upgrade npm to 8.18.0 + * http: make idle http parser count configurable + * net: add local family + * src: print source map error source on demand + * tls: pass a valid socket on tlsClientError + +- dns.patch: upstreamed, removed +- nodejs-libpath.patch, versioned.patch: refreshed +- fix_ci_tests.patch: partially upstreamed +- openssl3_fixups.patch: fix unit tests with openssl 1.1.1 +- new_python3.patch: enable python 3.11 as valid interpreter + +------------------------------------------------------------------- +Thu Aug 18 10:41:57 UTC 2022 - Adam Majer + +- Update to Nodejs 18.7.0: + * events: add CustomEvent + * http: add drop request event for http server + * lib: improved diagnostics_channel subscribe/unsubscribe + * util: add tokens to parseArgs + +- enable crypto policy ciphers for TW and SLE15 SP4+ (bsc#1200303) + +------------------------------------------------------------------- +Sun Jul 31 15:37:05 UTC 2022 - Adam Majer + +- dns.patch: fix regression + https://github.com/nodejs/node/issues/44003 + +------------------------------------------------------------------- +Sun Jul 24 09:47:19 UTC 2022 - Adam Majer + +- Update to Nodejs 18.6.0: + * Experimental ESM Loader Hooks API. For details see, + https://nodejs.org/api/esm.html + * dns: export error code constants from dns/promises + * esm: add chaining to loaders + * http: add diagnostics channel for http client + * http: add perf_hooks detail for http request and client + * module: add isBuiltIn method + * net: add drop event for net server + * test_runner: expose describe and it + * v8: add v8.startupSnapshot utils + + For details, see + https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V18.md#18.6.0 + +------------------------------------------------------------------- +Mon Jul 11 12:00:48 UTC 2022 - Adam Majer + +- Update to Nodejs 18.5.0: + * http: stricter Transfer-Encoding and header separator parsing + (bsc#1201325, bsc#1201326, bsc#1201327, + CVE-2022-32213, CVE-2022-32214, CVE-2022-32215) + * src: fix IPv4 validation in inspector_socket + (bsc#1201328, CVE-2022-32212) + For details, see + https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V18.md#18.5.0 + +------------------------------------------------------------------- +Tue Jun 28 13:06:23 UTC 2022 - Adam Majer + +- Update to Nodejs 18.4.0. For detailed changes see, + https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V18.md#18.4.0 +- refreshed: versioned.patch, linker_lto_jobs.patch, nodejs-libpath.patch + +------------------------------------------------------------------- +Thu May 19 15:01:09 UTC 2022 - Adam Majer + +- Initial packaging of Nodejs 18.2.0. For detailed changes + since previous versions, see + + https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V18.md#18.2.0 + + Patches carried over from nodejs17: + legacy_python.patch node-gyp-addon-gypi.patch openssl_binary_detection.patch +test-skip-y2038-on-32bit-time_t.patch cares_public_headers.patch +rsa-pss-revert.patch linker_lto_jobs.patch versioned.patch fix_ci_tests.patch +manual_configure.patch npm_search_paths.patch skip_no_console.patch +flaky_test_rerun.patch nodejs-libpath.patch sle12_python3_compat.patch + diff --git a/nodejs18.spec b/nodejs18.spec new file mode 100644 index 0000000..8d61556 --- /dev/null +++ b/nodejs18.spec @@ -0,0 +1,1118 @@ +# +# spec file for package nodejs18 +# +# Copyright (c) 2022 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# 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 + +Name: nodejs18 +Version: 18.16.0 +Release: 0 + +# Double DWZ memory limits +%define _dwz_low_mem_die_limit 20000000 +%define _dwz_max_die_limit 100000000 + +%define node_version_number 18 + +# openssl bsc#1192489 - fix released +%bcond_without openssl_RSA_get0_pss_params + +%if 0%{?suse_version} > 1500 || 0%{?fedora_version} +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif + +%if %node_version_number >= 12 +%define openssl_req_ver 1.1.1 +%else +%if %node_version_number >= 10 +%define openssl_req_ver 1.1.0 +%else +%define openssl_req_ver 1.0.2 +%endif +%endif + +%bcond_with valgrind_tests + +%if %{node_version_number} >= 12 + +# turn on LTO only on non-32bit arches +%ifarch %{ix86} %{arm} +%bcond_with nodejs_lto +%else +%bcond_without nodejs_lto +%endif + +%else +%bcond_with nodejs_lto +%endif + +%if !0%{?with nodejs_lto} +%define _lto_cflags %{nil} +%endif + +%if 0%{?suse_version} == 1110 +%define _libexecdir %{_exec_prefix}/lib +%endif + +%if 0%{?suse_version} >= 1500 || 0%{?sle_version} >= 120400 || 0%{?fedora_version} >= 35 +%bcond_with intree_openssl +%else +%bcond_without intree_openssl +%endif + +%if 0%{?suse_version} >= 1330 || 0%{?fedora_version} >= 35 +%bcond_with intree_cares +%else +%bcond_without intree_cares +%endif + +%if 0%{?suse_version} >= 1330 || 0%{?fedora_version} >= 35 +%bcond_with intree_icu +%else +%bcond_without intree_icu +%endif + +%if 0%{?suse_version} >= 1550 +%bcond_with intree_nghttp2 +%else +%bcond_without intree_nghttp2 +%endif + +%if 0%{?suse_version} >= 1550 +%bcond_with intree_brotli +%else +%bcond_without intree_brotli +%endif + +%ifnarch x86_64 %{ix86} +%bcond_with gdb +%else +%bcond_without gdb +%endif + +%define git_node 0 + +Summary: Evented I/O for V8 JavaScript +License: MIT +Group: Development/Languages/NodeJS +URL: https://nodejs.org +Source: https://nodejs.org/dist/v%{version}/node-v%{version}.tar.xz +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 +Source11: node_modules.tar.xz +Source20: bash_output_helper.bash + +## Patches not distribution specific +Patch1: cares_public_headers.patch +Patch3: fix_ci_tests.patch +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 +Patch101: nodejs-libpath.patch +# PATCH-FIX-UPSTREAM -- use custom addon.gypi by default instead of +# downloading node source +Patch102: node-gyp-addon-gypi.patch +# PATCH-FIX-SLE -- configure script uses Python check_output method +# which isn't included in Python 2.6 (used in SLE 11). +# PATCH-FIX-OPENSUSE -- install user global npm packages to /usr/local +# instead of /usr +Patch104: npm_search_paths.patch +Patch106: skip_no_console.patch +Patch110: legacy_python.patch + +Patch120: flaky_test_rerun.patch + +Patch132: test-skip-y2038-on-32bit-time_t.patch +Patch133: rsa-pss-revert.patch + +# Use versioned binaries and paths +Patch200: versioned.patch + +Patch305: qemu_timeouts_arches.patch + +BuildRequires: pkg-config +BuildRequires: fdupes +BuildRequires: procps +BuildRequires: xz +BuildRequires: zlib-devel + +%if 0%{?suse_version} +BuildRequires: config(netcfg) +%endif + +# SLE-11 target only +# Node.js 6 requires GCC 4.8.5+. +# +# For Node.js 8.x, upstream requires GCC 4.9.4+, as GCC 4.8 may have +# slightly buggy C++11 support: https://github.com/nodejs/node/pull/13466 +# +# If the default compiler is not supported, use the most recent compiler +# version available. +%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++ +%define forced_gcc_version 5 +%else +BuildRequires: gcc48-c++ +%define forced_gcc_version 4.8 +%endif +%endif +# sles == 11 block + +# Pick and stick with "latest" compiler at time of LTS release +# for SLE-12:Update targets +%if 0%{?suse_version} == 1315 +%if %node_version_number >= 17 +BuildRequires: gcc12-c++ +%define forced_gcc_version 12 +%else +%if %node_version_number >= 14 +BuildRequires: gcc9-c++ +%define forced_gcc_version 9 +%else +%if %node_version_number >= 8 +BuildRequires: gcc7-c++ +%define forced_gcc_version 7 +%endif +%endif +%endif +%endif + +%if 0%{?suse_version} == 1500 +%if %node_version_number >= 17 +BuildRequires: gcc12-c++ +%define forced_gcc_version 12 +%endif +%endif +# compiler selection + +# No special version defined, use default. +%if ! 0%{?forced_gcc_version:1} +BuildRequires: gcc-c++ +%endif + + +# Python dependencies +%if %node_version_number >= 14 + +%if 0%{?suse_version} && 0%{?suse_version} < 1500 +BuildRequires: python36 +%define forced_python_version 3.6m +%else +BuildRequires: python3 +%endif + +%else +%if %node_version_number >= 12 +BuildRequires: python3 + +%else +%if 0%{?suse_version} >= 1500 +BuildRequires: python2 +%else +BuildRequires: python +%endif + +%endif +%endif + +%if 0%{?suse_version} >= 1500 && %{node_version_number} >= 10 +BuildRequires: user(nobody) +BuildRequires: group(nobody) +%endif + +# shared openssl +%if ! 0%{with intree_openssl} + +BuildRequires: pkgconfig(openssl) >= %{openssl_req_ver} + +%if 0%{?suse_version} + +%if 0%{?suse_version} >= 1500 +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 +%endif + + +# /suse_version +%endif + +%if 0%{?fedora_version} +BuildRequires: openssl >= %{openssl_req_ver} +%endif + +%else +# bundled openssl +%if %node_version_number <= 12 && 0%{?suse_version} == 1315 && 0%{?sle_version} < 120400 +Provides: bundled(openssl) = 3.0.8 +%else +BuildRequires: bundled_openssl_should_not_be_required +%endif + +# /bundled openssl +%endif + +%if ! 0%{with intree_cares} +BuildRequires: pkgconfig(libcares) >= 1.17.0 +%else +Provides: bundled(libcares2) = 1.19.0 +%endif + +%if ! 0%{with intree_icu} +BuildRequires: pkgconfig(icu-i18n) >= 69 +%else +Provides: bundled(icu) = 72.1 +%endif + +%if ! 0%{with intree_nghttp2} +BuildRequires: libnghttp2-devel >= 1.41.0 +%else +Provides: bundled(nghttp2) = 1.52.0 +%endif + +%if 0%{with valgrind_tests} +BuildRequires: valgrind +%endif + +%if %{with libalternatives} +Suggests: alts +%else +Requires(postun): %{_sbindir}/update-alternatives +%endif +# either for update-alternatives, or their removal +Requires(post): %{_sbindir}/update-alternatives + +Recommends: npm18 + +#we need ABI virtual provides where SONAMEs aren't enough/not present so deps +#break when binary compatibility is broken +%global nodejs_abi 18.0 +Provides: nodejs(abi) = %{nodejs_abi} + +#this corresponds to the "engine" requirement in package.json +Provides: nodejs(engine) = %{version} + +# Multiple versions of NodeJS can be installed at a time, but +# to properly allow correct version execution from 3rd party +# npm software, `env node` requires further help than only +# update-alternatives can provide. +Provides: nodejs = %{version} +%if %{with libalternatives} +Requires: nodejs-common >= 5.0 +%else +Requires: nodejs-common +%endif + +# For SLE11, to be able to use the certificate store we need to have properly +# symlinked certificates. The compatability symlinks are provided by the +# openssl1 library in the Security Module +%if 0%{?suse_version} == 1110 +Requires: openssl1 +%endif + +%if %node_version_number >= 12 +%ifarch s390 +ExclusiveArch: not_buildable +%endif +%endif + +Provides: bundled(uvwasi) = 0.0.15 +Provides: bundled(libuv) = 1.44.2 +Provides: bundled(v8) = 10.2.154.26 +%if %{with intree_brotli} +Provides: bundled(brotli) = 1.0.9 +%else +BuildRequires: pkgconfig(libbrotlidec) +%endif + + +Provides: bundled(llhttp) = 6.0.10 +Provides: bundled(ngtcp2) = 0.8.1 +Provides: bundled(base64) = 0.5.0 +Provides: bundled(simdutf) = 3.2.2 +# bundled url-ada parser, not ada +Provides: bundled(ada) = 1.0.4 + +Provides: bundled(node-acorn) = 8.8.2 +Provides: bundled(node-acorn-walk) = 8.2.0 +Provides: bundled(node-busboy) = 1.6.0 +Provides: bundled(node-cjs-module-lexer) = 1.2.2 +Provides: bundled(node-corepack) = 0.17.0 +Provides: bundled(node-streamsearch) = 1.1.0 +Provides: bundled(node-undici) = 5.21.0 + +%description +Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js +uses an event-driven, non-blocking I/O model. Node.js has a package ecosystem +provided by npm. + +%package devel +Summary: Development headers for NodeJS 18.x +Group: Development/Languages/NodeJS +Provides: nodejs-devel = %{version} +Requires: npm18 = %{version} +Requires: %{name} = %{version} + +%description devel +This package provides development headers for Node.js needed for creation +of binary modules. + +%package -n npm18 +Summary: Package manager for Node.js +Group: Development/Languages/NodeJS +%if %{with libalternatives} +Requires: nodejs-common >= 5.0 +%else +Requires: nodejs-common +%endif +Requires: nodejs18 = %{version} +Provides: nodejs-npm = %{version} +Obsoletes: nodejs-npm < 4.0.0 +Provides: npm(npm) = 9.5.1 +Provides: npm = %{version} +%if 0%{?suse_version} >= 1500 +%if %{node_version_number} >= 10 +Requires: user(nobody) +Requires: group(nobody) +%endif +%endif +Provides: bundled(node-abbrev) = 1.1.1 +Provides: bundled(node-abbrev) = 2.0.0 +Provides: bundled(node-abort-controller) = 3.0.0 +Provides: bundled(node-agent-base) = 6.0.2 +Provides: bundled(node-agentkeepalive) = 4.2.1 +Provides: bundled(node-aggregate-error) = 3.1.0 +Provides: bundled(node-ansi-regex) = 5.0.1 +Provides: bundled(node-ansi-styles) = 4.3.0 +Provides: bundled(node-aproba) = 2.0.0 +Provides: bundled(node-archy) = 1.0.0 +Provides: bundled(node-are-we-there-yet) = 3.0.1 +Provides: bundled(node-are-we-there-yet) = 4.0.0 +Provides: bundled(node-balanced-match) = 1.0.2 +Provides: bundled(node-base64-js) = 1.5.1 +Provides: bundled(node-bin-links) = 4.0.1 +Provides: bundled(node-binary-extensions) = 2.2.0 +Provides: bundled(node-brace-expansion) = 1.1.11 +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) = 16.1.3 +Provides: bundled(node-cacache) = 17.0.4 +Provides: bundled(node-chalk) = 4.1.2 +Provides: bundled(node-chownr) = 2.0.0 +Provides: bundled(node-ci-info) = 3.8.0 +Provides: bundled(node-cidr-regex) = 3.1.1 +Provides: bundled(node-clean-stack) = 2.2.0 +Provides: bundled(node-cli-columns) = 4.0.0 +Provides: bundled(node-cli-table3) = 0.6.3 +Provides: bundled(node-clone) = 1.0.4 +Provides: bundled(node-cmd-shim) = 6.0.1 +Provides: bundled(node-color-convert) = 2.0.1 +Provides: bundled(node-color-name) = 1.1.4 +Provides: bundled(node-color-support) = 1.1.3 +Provides: bundled(node-columnify) = 1.6.0 +Provides: bundled(node-common-ancestor-path) = 1.0.1 +Provides: bundled(node-concat-map) = 0.0.1 +Provides: bundled(node-console-control-strings) = 1.1.0 +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-depd) = 1.1.2 +Provides: bundled(node-diff) = 5.1.0 +Provides: bundled(node-emoji-regex) = 8.0.0 +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-fastest-levenshtein) = 1.0.16 +Provides: bundled(node-fs-minipass) = 2.1.0 +Provides: bundled(node-fs-minipass) = 3.0.1 +Provides: bundled(node-fs.realpath) = 1.0.0 +Provides: bundled(node-function-bind) = 1.1.1 +Provides: bundled(node-gauge) = 4.0.4 +Provides: bundled(node-gauge) = 5.0.0 +Provides: bundled(node-glob) = 7.2.3 +Provides: bundled(node-glob) = 8.1.0 +Provides: bundled(node-graceful-fs) = 4.2.10 +Provides: bundled(node-has) = 1.0.3 +Provides: bundled(node-has-flag) = 4.0.0 +Provides: bundled(node-has-unicode) = 2.0.1 +Provides: bundled(node-hosted-git-info) = 6.1.1 +Provides: bundled(node-http-cache-semantics) = 4.1.1 +Provides: bundled(node-http-proxy-agent) = 5.0.0 +Provides: bundled(node-https-proxy-agent) = 5.0.1 +Provides: bundled(node-humanize-ms) = 1.2.1 +Provides: bundled(node-iconv-lite) = 0.6.3 +Provides: bundled(node-ieee754) = 1.2.1 +Provides: bundled(node-ignore-walk) = 6.0.1 +Provides: bundled(node-imurmurhash) = 0.1.4 +Provides: bundled(node-indent-string) = 4.0.0 +Provides: bundled(node-infer-owner) = 1.0.4 +Provides: bundled(node-inflight) = 1.0.6 +Provides: bundled(node-inherits) = 2.0.4 +Provides: bundled(node-ini) = 3.0.1 +Provides: bundled(node-init-package-json) = 5.0.0 +Provides: bundled(node-ip) = 2.0.0 +Provides: bundled(node-ip-regex) = 4.3.0 +Provides: bundled(node-is-cidr) = 4.0.2 +Provides: bundled(node-is-core-module) = 2.11.0 +Provides: bundled(node-is-fullwidth-code-point) = 3.0.0 +Provides: bundled(node-is-lambda) = 1.0.1 +Provides: bundled(node-isexe) = 2.0.0 +Provides: bundled(node-json-parse-even-better-errors) = 3.0.0 +Provides: bundled(node-json-stringify-nice) = 1.1.4 +Provides: bundled(node-jsonparse) = 1.3.1 +Provides: bundled(node-just-diff) = 5.2.0 +Provides: bundled(node-just-diff-apply) = 5.5.0 +Provides: bundled(node-libnpmaccess) = 7.0.2 +Provides: bundled(node-libnpmdiff) = 5.0.11 +Provides: bundled(node-libnpmexec) = 5.0.11 +Provides: bundled(node-libnpmfund) = 4.0.11 +Provides: bundled(node-libnpmhook) = 9.0.3 +Provides: bundled(node-libnpmorg) = 5.0.3 +Provides: bundled(node-libnpmpack) = 5.0.11 +Provides: bundled(node-libnpmpublish) = 7.1.0 +Provides: bundled(node-libnpmsearch) = 6.0.2 +Provides: bundled(node-libnpmteam) = 5.0.3 +Provides: bundled(node-libnpmversion) = 4.0.2 +Provides: bundled(node-lru-cache) = 6.0.0 +Provides: bundled(node-lru-cache) = 7.16.2 +Provides: bundled(node-make-fetch-happen) = 10.2.1 +Provides: bundled(node-make-fetch-happen) = 11.0.3 +Provides: bundled(node-minimatch) = 3.1.2 +Provides: bundled(node-minimatch) = 5.1.6 +Provides: bundled(node-minimatch) = 6.2.0 +Provides: bundled(node-minipass) = 3.3.6 +Provides: bundled(node-minipass) = 4.0.3 +Provides: bundled(node-minipass-collect) = 1.0.2 +Provides: bundled(node-minipass-fetch) = 2.1.2 +Provides: bundled(node-minipass-fetch) = 3.0.1 +Provides: bundled(node-minipass-flush) = 1.0.5 +Provides: bundled(node-minipass-json-stream) = 1.0.1 +Provides: bundled(node-minipass-pipeline) = 1.2.4 +Provides: bundled(node-minipass-sized) = 1.0.3 +Provides: bundled(node-minizlib) = 2.1.2 +Provides: bundled(node-mkdirp) = 1.0.4 +Provides: bundled(node-ms) = 2.1.2 +Provides: bundled(node-ms) = 2.1.3 +Provides: bundled(node-mute-stream) = 1.0.0 +Provides: bundled(node-negotiator) = 0.6.3 +Provides: bundled(node-node-gyp) = 9.3.1 +Provides: bundled(node-nopt) = 6.0.0 +Provides: bundled(node-nopt) = 7.0.0 +Provides: bundled(node-normalize-package-data) = 5.0.0 +Provides: bundled(node-npm-audit-report) = 4.0.0 +Provides: bundled(node-npm-bundled) = 3.0.0 +Provides: bundled(node-npm-install-checks) = 6.0.0 +Provides: bundled(node-npm-normalize-package-bin) = 3.0.0 +Provides: bundled(node-npm-package-arg) = 10.1.0 +Provides: bundled(node-npm-packlist) = 7.0.4 +Provides: bundled(node-npm-pick-manifest) = 8.0.1 +Provides: bundled(node-npm-profile) = 7.0.1 +Provides: bundled(node-npm-registry-fetch) = 14.0.3 +Provides: bundled(node-npm-user-validate) = 2.0.0 +Provides: bundled(node-npmlog) = 6.0.2 +Provides: bundled(node-npmlog) = 7.0.1 +Provides: bundled(node-once) = 1.4.0 +Provides: bundled(node-p-map) = 4.0.0 +Provides: bundled(node-pacote) = 15.1.1 +Provides: bundled(node-parse-conflict-json) = 3.0.0 +Provides: bundled(node-path-is-absolute) = 1.0.1 +Provides: bundled(node-postcss-selector-parser) = 6.0.11 +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.1 +Provides: bundled(node-promise-inflight) = 1.0.1 +Provides: bundled(node-promise-retry) = 2.0.1 +Provides: bundled(node-promzard) = 1.0.0 +Provides: bundled(node-qrcode-terminal) = 0.12.0 +Provides: bundled(node-read) = 2.0.0 +Provides: bundled(node-read-cmd-shim) = 4.0.0 +Provides: bundled(node-read-package-json) = 6.0.0 +Provides: bundled(node-read-package-json-fast) = 3.0.2 +Provides: bundled(node-readable-stream) = 3.6.0 +Provides: bundled(node-readable-stream) = 4.3.0 +Provides: bundled(node-retry) = 0.12.0 +Provides: bundled(node-rimraf) = 3.0.2 +Provides: bundled(node-safe-buffer) = 5.1.2 +Provides: bundled(node-safer-buffer) = 2.1.2 +Provides: bundled(node-semver) = 7.3.8 +Provides: bundled(node-set-blocking) = 2.0.0 +Provides: bundled(node-signal-exit) = 3.0.7 +Provides: bundled(node-sigstore) = 1.0.0 +Provides: bundled(node-smart-buffer) = 4.2.0 +Provides: bundled(node-socks) = 2.7.1 +Provides: bundled(node-socks-proxy-agent) = 7.0.0 +Provides: bundled(node-spdx-correct) = 3.1.1 +Provides: bundled(node-spdx-exceptions) = 2.3.0 +Provides: bundled(node-spdx-expression-parse) = 3.0.1 +Provides: bundled(node-spdx-license-ids) = 3.0.12 +Provides: bundled(node-ssri) = 10.0.1 +Provides: bundled(node-ssri) = 9.0.1 +Provides: bundled(node-string_decoder) = 1.1.1 +Provides: bundled(node-string-width) = 4.2.3 +Provides: bundled(node-strip-ansi) = 6.0.1 +Provides: bundled(node-supports-color) = 7.2.0 +Provides: bundled(node-tar) = 6.1.13 +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) = 1.0.0 +Provides: bundled(node-unique-filename) = 2.0.1 +Provides: bundled(node-unique-filename) = 3.0.0 +Provides: bundled(node-unique-slug) = 3.0.0 +Provides: bundled(node-unique-slug) = 4.0.0 +Provides: bundled(node-util-deprecate) = 1.0.2 +Provides: bundled(node-validate-npm-package-license) = 3.0.4 +Provides: bundled(node-validate-npm-package-name) = 5.0.0 +Provides: bundled(node-walk-up-path) = 1.0.0 +Provides: bundled(node-wcwidth) = 1.0.1 +Provides: bundled(node-which) = 2.0.2 +Provides: bundled(node-which) = 3.0.0 +Provides: bundled(node-wide-align) = 1.1.5 +Provides: bundled(node-wrappy) = 1.0.2 +Provides: bundled(node-write-file-atomic) = 5.0.0 +Provides: bundled(node-yallist) = 4.0.0 + +%description -n npm18 +A package manager for Node.js that allows developers to install and +publish packages to a package registry. + +%package -n corepack18 +Summary: Helper bridge between NodeJS projects and their dependencies +Group: Development/Languages/NodeJS +Requires: nodejs-common >= 5.0 + +%description -n corepack18 +Zero-runtime-dependency package acting as bridge between Node projects +and their package managers. + +%package docs +Summary: Node.js API documentation +Group: Documentation/Other +%if 0%{?suse_version} >= 1200 +# using noarch subpackage seems to break debuginfo on older releases +BuildArch: noarch +%endif + +%description docs +The API documentation for the Node.js JavaScript runtime. + +%prep +%if ! %{git_node} +echo "`grep node-v%{version}.tar.xz %{S:1} | head -n1 | cut -c1-64` %{S:0}" | sha256sum -c +%setup -q -n node-v%{version} +%else +%setup -q -n node-%{version} +%endif + +%if %{node_version_number} <= 10 +rm -r deps/npm/* +pushd deps/npm +tar zxf %{SOURCE9} --strip-components=1 +tar Jxf %{SOURCE90} +popd +%endif + +%if %{node_version_number} >= 10 +tar Jxf %{SOURCE11} +%endif + +# downgrade node-gyp to last version that supports python 3.4 for SLE12 +%if 0%{?suse_version} && 0%{?suse_version} < 1500 && %{node_version_number} >= 16 +rm -r deps/npm/node_modules/node-gyp +mkdir deps/npm/node_modules/node-gyp +pushd deps/npm/node_modules/node-gyp +tar Jxf %{SOURCE5} +popd + +%if %{node_version_number} >= 19 +%endif +%endif + +%patch1 -p1 +%patch3 -p1 +%if %{node_version_number} <= 12 && 0%{?suse_version} < 1500 +%patch5 -p1 +%endif +%patch7 -p1 +%if 0%{with valgrind_tests} +%endif +%patch13 -p1 +%patch100 -p1 +%patch101 -p1 +%patch102 -p1 +# 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 +%if ! 0%{with openssl_RSA_get0_pss_params} +%patch133 -p1 +%endif +%patch200 -p1 + +%patch305 -p1 + +%if %{node_version_number} == 12 +# minimist security update - patch50 +rm -r deps/npm/node_modules/mkdirp/node_modules/minimist +rmdir ./deps/npm/node_modules/mkdirp/node_modules +%endif + +# remove backup files, if any +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 +find -type f -exec sed -i -e '1 s,^#!\s\?/usr/bin/env python\d*$,#!/usr/bin/python3,' -e '1 s,^#!\s\?/usr/bin/python$,#!/usr/bin/python3,' {} + +%else +find -type f -exec sed -i '1 s,^#!\s\?/usr/bin/env python$,#!/usr/bin/python,' {} + +%endif +find deps/npm -type f -exec sed -i '1 s,^#!\s\?/usr/bin/env node$,#!/usr/bin/node%{node_version_number},' {} + +find deps/npm -type f -exec sed -i '1 s,^#!\s\?/usr/bin/env \(bash\|sh\)\?$,#!/bin/bash,' {} + + +. %{SOURCE20} +# Make sure nothing gets included from bundled deps: +# We only delete the source and header files, because +# the remaining build scripts are still used. +%if ! 0%{with intree_openssl} +find deps/openssl -name *.[ch] -delete +%endif + +%if ! 0%{with intree_icu} +rm -rf deps/icu-small +%endif + +%if ! 0%{with intree_cares} +find deps/cares -name *.[ch] -delete +%endif + +find deps/zlib -name *.[ch] -delete + +cat > spec.build.config <= 8 || 0%{?suse_version} > 1500 || 0%{?fedora_version} >= 35 +export CXXFLAGS="\${CXXFLAGS} -Wno-class-memaccess" +%endif +export LDFLAGS="%{?build_ldflags}" + +%if !0%{?with nodejs_lto} +export LDFLAGS="\${LDFLAGS} -fno-lto" +%endif + +# reduce disk space pressure +export CFLAGS="\${CFLAGS} -g1" +export CXXFLAGS="\${CXXFLAGS} -g1" +export LDFLAGS="\${LDFLAGS} -Wl,--reduce-memory-overhead" + +%if 0%{?forced_gcc_version:1} +export CC=gcc-%{forced_gcc_version} +export CXX=g++-%{forced_gcc_version} +%endif + +EOF + +. ./spec.build.config + +# Node.js 4.x does not include the ICU database in the source tarball. +%define has_small_icu %(test -d "deps/icu-small" && echo 1 || echo 0) + +./configure \ + --prefix=%{_prefix} \ +%if 0%{?with nodejs_lto} + --enable-lto \ +%endif +%if ! 0%{with intree_openssl} + --shared-openssl \ +%endif + --shared-zlib \ +%if ! 0%{with intree_cares} + --shared-cares \ +%endif +%if ! 0%{with intree_icu} + --with-intl=system-icu \ +%else +%if %{has_small_icu} + --with-intl=small-icu \ + --with-icu-source=deps/icu-small \ +%endif +%endif +%if ! 0%{with intree_nghttp2} + --shared-nghttp2 \ +%endif +%if ! 0%{with intree_brotli} + --shared-brotli \ +%endif +%if 0%{with gdb} + --gdb \ +%endif +%if %{node_version_number} < 19 + --without-dtrace \ +%endif +%if %{node_version_number} >= 16 && (0%{?suse_version} > 1550 || 0%{?sle_version} >= 150400) + --openssl-default-cipher-list=PROFILE=SYSTEM \ +%endif + --openssl-use-def-ca-store + +decoupled_cmd make %{?_smp_mflags} + +# Fix documentation permissions +find doc/api -type f -exec chmod 0644 {} + + +%install +. %{SOURCE20} +. ./spec.build.config + +decoupled_cmd %make_install %{?_smp_mflags} +rm %{buildroot}%{_datadir}/doc/node/gdbinit +rm -f %{buildroot}%{_datadir}/doc/node/lldbinit +rm -f %{buildroot}%{_datadir}/doc/node/lldb_commands.py + +# remove .bak files, if any +find %{buildroot} -name \*.bak -print -delete + +# npm/npx man page +install -D -m 644 deps/npm/man/man1/npm.1 %{buildroot}%{_mandir}/man1/npm%{node_version_number}.1 +install -D -m 644 deps/npm/man/man1/npx.1 %{buildroot}%{_mandir}/man1/npx%{node_version_number}.1 + +#node-gyp needs common.gypi too +install -D -m 644 common.gypi \ + %{buildroot}%{_libdir}/node_modules/npm%{node_version_number}/node_modules/node-gyp/common.gypi +# %%{buildroot}%%{_datadir}/node/common.gypi +# install addon-rpm.gypi +install -D -m 644 addon-rpm.gypi \ + %{buildroot}%{_libdir}/node_modules/npm%{node_version_number}/node_modules/node-gyp/addon-rpm.gypi + +# clean +# hidden files and directories +find %{buildroot}%{_libdir}/node_modules/npm%{node_version_number} -name ".*" -exec rm -Rf -- {} + +# windows stuff +find %{buildroot}%{_libdir}/node_modules/npm%{node_version_number} -name "*.bat" -delete +find %{buildroot}%{_libdir}/node_modules/npm%{node_version_number} -name "*.cmd" -delete +# build stuff +find %{buildroot}%{_libdir}/node_modules/npm%{node_version_number} -name "Makefile" -delete +rm -rf %{buildroot}%{_libdir}/node_modules/npm%{node_version_number}/{test,scripts} +find %{buildroot}%{_libdir}/node_modules/npm%{node_version_number}/node_modules -name "*.sh" -delete +rm -rf %{buildroot}%{_libdir}/node_modules/npm%{node_version_number}/node_modules/node-gyp/src +# remove examples/tests/benchmark stuff +find %{buildroot}%{_libdir}/node_modules/npm%{node_version_number}/node_modules -name "example*" -exec rm -Rf -- {} + +find %{buildroot}%{_libdir}/node_modules/npm%{node_version_number}/node_modules -name "*_test.*" -delete +find %{buildroot}%{_libdir}/node_modules/npm%{node_version_number}/node_modules -type d -name "benchmark" -exec rm -Rf -- {} + + +# fix permissions +chmod 0755 %{buildroot}%{_libdir}/node_modules/npm%{node_version_number}/bin/np*-cli.js +! test -f %{buildroot}%{_libdir}/node_modules/npm%{node_version_number}/bin/node-gyp-bin/node-gyp || \ + chmod 0755 %{buildroot}%{_libdir}/node_modules/npm%{node_version_number}/bin/node-gyp-bin/node-gyp +chmod 0755 %{buildroot}%{_libdir}/node_modules/npm%{node_version_number}/node_modules/node-gyp/bin/node-gyp.js +! test -f %{buildroot}%{_libdir}/node_modules/npm%{node_version_number}/node_modules/npm-lifecycle/node-gyp-bin/node-gyp || \ + chmod 0755 %{buildroot}%{_libdir}/node_modules/npm%{node_version_number}/node_modules/npm-lifecycle/node-gyp-bin/node-gyp + +# browser.js is useless for npm cli +find %{buildroot}%{_libdir}/node_modules/npm%{node_version_number} -name "browser.js" -delete + +# file duplicates +%fdupes %{buildroot}%{_libdir}/node_modules/npm%{node_version_number} +%fdupes %{buildroot}%{_includedir}/node%{node_version_number} + +# Update alternatives +%if ! %{with libalternatives} +mkdir -p %{buildroot}%{_sysconfdir}/alternatives +ln -s -f node-default %{buildroot}%{_sysconfdir}/alternatives/node-default +ln -s -f node.1%{ext_man} %{buildroot}%{_sysconfdir}/alternatives/node.1%{ext_man} +ln -s -f npm-default %{buildroot}%{_sysconfdir}/alternatives/npm-default +ln -s -f npm.1%{ext_man} %{buildroot}%{_sysconfdir}/alternatives/npm.1%{ext_man} +ln -s %{_sysconfdir}/alternatives/node-default %{buildroot}%{_bindir}/node-default +ln -s %{_sysconfdir}/alternatives/node.1%{ext_man} %{buildroot}%{_mandir}/man1/node.1%{ext_man} +ln -s %{_sysconfdir}/alternatives/npm-default %{buildroot}%{_bindir}/npm-default +ln -s %{_sysconfdir}/alternatives/npm.1%{ext_man} %{buildroot}%{_mandir}/man1/npm.1%{ext_man} +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} +%endif + +# libalternatives - can always ship +mkdir -p %{buildroot}%{_datadir}/libalternatives/{node,npm,npx}; +cat > %{buildroot}%{_datadir}/libalternatives/node/%{node_version_number}.conf < %{buildroot}%{_datadir}/libalternatives/npm/%{node_version_number}.conf < %{buildroot}%{_datadir}/libalternatives/npx/%{node_version_number}.conf <= 12 +find test \( -name \*.out -or -name \*.js \) -exec sed -i 's,Use `node ,Use `node%{node_version_number} ,' {} \; +%endif + +# Update the python3 executable name to point at forced python version +# needed to fix build on SLE12 SP5 +%if 0%{?forced_python_version:1} +sed -i -e "s,'python3','python%{forced_python_version}'," test/parallel/test-child-process-set-blocking.js +%endif + +ln addon-rpm.gypi deps/npm/node_modules/node-gyp/addon-rpm.gypi +# Tarball doesn't have eslint package distributed, so disable some tests +find test -name \*-eslint-\* -print -delete +# No documentation is generated, don't bother checking it, and check broken on older nodejs +%if %{node_version_number} <= 10 +rm test/doctool/test-make-doc.js +%endif +# DNS lookup doesn't work in build root +rm test/parallel/test-dns-cancel-reverse-lookup.js \ + test/parallel/test-dns-resolveany.js +# multicast test fail since no socket? +rm test/parallel/test-dgram-membership.js + +%if %{node_version_number} >= 18 +# OBS broken /etc/hosts -- https://github.com/openSUSE/open-build-service/issues/13104 +rm test/parallel/test-net-socket-connect-without-cb.js test/parallel/test-tcp-wrap-listen.js +%endif + +%if 0%{?fedora_version} +# test/parallel/test-crypto-certificate.js requires OPENSSL_ENABLE_MD5_VERIFY=1 +# as SPKAC required MD5 for verification +# https://src.fedoraproject.org/rpms/openssl/blob/rawhide/f/0006-Disable-signature-verification-with-totally-unsafe-h.patch +export OPENSSL_ENABLE_MD5_VERIFY=1 + +# test failures +# error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake +# failure:ssl/record/rec_layer_s3.c:1543:SSL alert number 40 +rm test/parallel/test-tls-no-sslv3.js +%if %{node_version_number} >= 18 +rm -r test/addons/openssl-providers +rm test/parallel/test-crypto-fips.js +%endif + +%endif +# fedora + +# qemu test failures +%if %{node_version_number} >= 18 && 0%{?qemu_user_space_build} +# sequential/test-debugger-*: timeout hit? +rm -v test/*/test-debugger-*.js +# parallel tests are not parallel under qemu +rm -v test/parallel/test-*.js test/parallel/test-*.mjs +# RuntimeError: memory access out of bounds +rm -v test/wasi/test-*.js +# ESM import hits assertion, timeout error? +rm -v test/es-module/test-esm-*.js +# AssertionError [ERR_ASSERTION]: Missing expected exception +rm -v test/js-native-api/test_constructor/test*.js +# Too slow for performance tests +rm -v test/sequential/test-perf-*.js test/sequential/test-diagnostic-*.js +%endif + +# Run CI tests +%if 0%{with valgrind_tests} +# valgrind may have false positives, so do not fail on these by default +make test-valgrind ||: +%endif +make test-ci + +%files +%defattr(-, root, root) +%license LICENSE +%doc doc/changelogs/CHANGELOG_V%{node_version_number}.md +%doc *.md +%doc deps/v8/tools/gdbinit +%dir %{_libdir}/node_modules +%dir %{_datadir}/libalternatives +%dir %{_datadir}/libalternatives/node +%{_datadir}/libalternatives/node/%{node_version_number}.conf +%{_bindir}/node%{node_version_number} +%{_mandir}/man1/node%{node_version_number}.1%{ext_man} +%if ! 0%{with libalternatives} +%ghost %{_bindir}/node-default +%ghost %{_mandir}/man1/node.1%{ext_man} +%ghost %{_sysconfdir}/alternatives/node-default +%ghost %{_sysconfdir}/alternatives/node.1%{ext_man} +%endif +%exclude %{_libdir}/node_modules/npm%{node_version_number} +# We need to own directory on old versions of SLE +%if 0%{?suse_version} < 1500 +%dir %{_defaultlicensedir} +%endif + +%files -n npm%{node_version_number} +%defattr(-, root, root) +%dir %{_datadir}/libalternatives +%dir %{_datadir}/libalternatives/npm +%dir %{_datadir}/libalternatives/npx +%{_datadir}/libalternatives/npm/%{node_version_number}.conf +%{_datadir}/libalternatives/npx/%{node_version_number}.conf +%{_bindir}/npm%{node_version_number} +%{_libdir}/node_modules/npm%{node_version_number} +%{_mandir}/man1/npm%{node_version_number}.1%{ext_man} +%if ! 0%{with libalternatives} +%ghost %{_bindir}/npm-default +%ghost %{_mandir}/man1/npm.1%{ext_man} +%ghost %{_sysconfdir}/alternatives/npm-default +%ghost %{_sysconfdir}/alternatives/npm.1%{ext_man} +%endif + +%{_bindir}/npx%{node_version_number} +%{_mandir}/man1/npx%{node_version_number}.1%{ext_man} +%if ! %{with libalternatives} +%ghost %{_bindir}/npx-default +%ghost %{_mandir}/man1/npx.1%{ext_man} +%ghost %{_sysconfdir}/alternatives/npx-default +%ghost %{_sysconfdir}/alternatives/npx.1%{ext_man} +%endif + +%if %{node_version_number} >= 14 +%files -n corepack%{node_version_number} +%defattr(-, root, root) +%{_bindir}/corepack%{node_version_number} +%{_libdir}/node_modules/corepack%{node_version_number} +%endif + +%files devel +%defattr(-, root, root) +%{_includedir}/node%{node_version_number} +%if %{node_version_number} < 19 +%dir %{_datadir}/systemtap +%dir %{_datadir}/systemtap/tapset +%{_datadir}/systemtap/tapset/node%{node_version_number}.stp +%endif + +%files docs +%defattr(-,root,root) +%doc doc/api + +%if %{with libalternatives} + +%post +update-alternatives --remove node-default %{_bindir}/node%{node_version_number} + +%post -n npm%{node_version_number} +update-alternatives --remove npm-default %{_bindir}/npm%{node_version_number} +update-alternatives --remove npx-default %{_bindir}/npx%{node_version_number} + +%else +%pre +# remove files that are no longer owned but provided by update-alternatives +if ! [ -L %{_mandir}/man1/node.1%{ext_man} ]; then + rm -f %{_mandir}/man1/node.1%{ext_man} +fi + +%post +update-alternatives \ + --install %{_bindir}/node-default node-default %{_bindir}/node%{node_version_number} %{node_version_number} \ + --slave %{_mandir}/man1/node.1%{ext_man} node.1%{ext_man} %{_mandir}/man1/node%{node_version_number}.1%{ext_man} + +%postun +if [ ! -f %{_bindir}/node%{node_version_number} ] ; then + update-alternatives --remove node-default %{_bindir}/node%{node_version_number} +fi + +%pre -n npm%{node_version_number} +# remove files that are no longer owned but provided by update-alternatives +if ! [ -L %{_mandir}/man1/npm.1%{ext_man} ]; then + rm -f %{_mandir}/man1/npm.1%{ext_man} +fi + +%post -n npm%{node_version_number} +update-alternatives \ + --install %{_bindir}/npm-default npm-default %{_bindir}/npm%{node_version_number} %{node_version_number} \ + --slave %{_mandir}/man1/npm.1%{ext_man} npm.1%{ext_man} %{_mandir}/man1/npm%{node_version_number}.1%{ext_man} +update-alternatives \ + --install %{_bindir}/npx-default npx-default %{_bindir}/npx%{node_version_number} %{node_version_number} \ + --slave %{_mandir}/man1/npx.1%{ext_man} npx.1%{ext_man} %{_mandir}/man1/npx%{node_version_number}.1%{ext_man} + +%postun -n npm%{node_version_number} +if [ ! -f %{_bindir}/npm%{node_version_number} ] ; then + update-alternatives --remove npm-default %{_bindir}/npm%{node_version_number} +fi +if [ ! -f %{_bindir}/npx%{node_version_number} ] ; then + update-alternatives --remove npx-default %{_bindir}/npx%{node_version_number} +fi + +%endif + +%changelog diff --git a/npm_search_paths.patch b/npm_search_paths.patch new file mode 100644 index 0000000..bad598f --- /dev/null +++ b/npm_search_paths.patch @@ -0,0 +1,32 @@ +Index: node-v19.5.0/deps/npm/lib/commands/help-search.js +=================================================================== +--- node-v19.5.0.orig/deps/npm/lib/commands/help-search.js ++++ node-v19.5.0/deps/npm/lib/commands/help-search.js +@@ -19,7 +19,7 @@ class HelpSearch extends BaseCommand { + throw this.usageError() + } + +- const docPath = path.resolve(this.npm.npmRoot, 'docs/content') ++ const docPath = '/usr/share/doc/packages/nodejs' + const files = await glob(`${globify(docPath)}/*/*.md`) + const data = await this.readFiles(files) + const results = await this.searchFiles(args, data, files) +Index: node-v19.5.0/deps/npm/lib/npm.js +=================================================================== +--- node-v19.5.0.orig/deps/npm/lib/npm.js ++++ node-v19.5.0/deps/npm/lib/npm.js +@@ -381,7 +381,13 @@ class Npm extends EventEmitter { + } + + get globalPrefix () { +- return this.config.globalPrefix ++ let prefix = this.config.globalPrefix ++ ++ // don't poop all over distro territory - use /usr/local instead ++ if (prefix === '/usr') ++ return '/usr/local' ++ ++ return prefix; + } + + set globalPrefix (r) { diff --git a/openssl_binary_detection.patch b/openssl_binary_detection.patch new file mode 100644 index 0000000..c13bb13 --- /dev/null +++ b/openssl_binary_detection.patch @@ -0,0 +1,42 @@ +Allow non-standard openssl binary names + +Index: node-v14.15.1/test/common/index.js +=================================================================== +--- node-v14.15.1.orig/test/common/index.js ++++ node-v14.15.1/test/common/index.js +@@ -797,20 +797,28 @@ const common = { + get opensslCli() { + if (opensslCli !== null) return opensslCli; + ++ let cli_candidates = []; ++ + if (process.config.variables.node_shared_openssl) { + // Use external command +- opensslCli = 'openssl'; ++ cli_candidates = cli_candidates.concat(['openssl-1_1', 'openssl']); + } else { + // Use command built from sources included in Node.js repository +- opensslCli = path.join(path.dirname(process.execPath), 'openssl-cli'); ++ cli_candidates.push(path.join(path.dirname(process.execPath), 'openssl-cli')); + } + +- if (exports.isWindows) opensslCli += '.exe'; ++ let checkOpensslCli = function(opensslCli) { ++ if (exports.isWindows) opensslCli += '.exe'; ++ const opensslCmd = spawnSync(opensslCli, ['version']); ++ if (opensslCmd.status !== 0 || opensslCmd.error !== undefined) { ++ // OpenSSL command cannot be executed ++ opensslCli = false; ++ } ++ return opensslCli; ++ }; + +- const opensslCmd = spawnSync(opensslCli, ['version']); +- if (opensslCmd.status !== 0 || opensslCmd.error !== undefined) { +- // OpenSSL command cannot be executed +- opensslCli = false; ++ for (let i=0; i + + * {Object} + * `modulusLength`: {number} Key size in bits (RSA, DSA). + * `publicExponent`: {bigint} Public exponent (RSA). +- * `hashAlgorithm`: {string} Name of the message digest (RSA-PSS). +- * `mgf1HashAlgorithm`: {string} Name of the message digest used by +- MGF1 (RSA-PSS). +- * `saltLength`: {number} Minimal salt length in bytes (RSA-PSS). + * `divisorLength`: {number} Size of `q` in bits (DSA). + * `namedCurve`: {string} Name of the curve (EC). + +@@ -1981,11 +1972,8 @@ this object contains information about t + through this property can be used to uniquely identify a key or to compromise + the security of the key. + +-For RSA-PSS keys, if the key material contains a `RSASSA-PSS-params` sequence, +-the `hashAlgorithm`, `mgf1HashAlgorithm`, and `saltLength` properties will be +-set. +- +-Other key details might be exposed via this API using additional attributes. ++RSA-PSS parameters, DH, or any future key type details might be exposed via this ++API using additional attributes. + + ### `keyObject.asymmetricKeyType` + +Index: node-v17.3.0/src/crypto/crypto_rsa.cc +=================================================================== +--- node-v17.3.0.orig/src/crypto/crypto_rsa.cc ++++ node-v17.3.0/src/crypto/crypto_rsa.cc +@@ -561,84 +561,10 @@ Maybe GetRsaKeyDetail( + reinterpret_cast(public_exponent.data()); + CHECK_EQ(BN_bn2binpad(e, data, len), len); + +- if (target +- ->Set( +- env->context(), +- env->public_exponent_string(), +- public_exponent.ToArrayBuffer()) +- .IsNothing()) { +- return Nothing(); +- } +- +- if (type == EVP_PKEY_RSA_PSS) { +- // Due to the way ASN.1 encoding works, default values are omitted when +- // encoding the data structure. However, there are also RSA-PSS keys for +- // which no parameters are set. In that case, the ASN.1 RSASSA-PSS-params +- // sequence will be missing entirely and RSA_get0_pss_params will return +- // nullptr. If parameters are present but all parameters are set to their +- // default values, an empty sequence will be stored in the ASN.1 structure. +- // In that case, RSA_get0_pss_params does not return nullptr but all fields +- // of the returned RSA_PSS_PARAMS will be set to nullptr. +- +- const RSA_PSS_PARAMS* params = RSA_get0_pss_params(rsa); +- if (params != nullptr) { +- int hash_nid = NID_sha1; +- int mgf_nid = NID_mgf1; +- int mgf1_hash_nid = NID_sha1; +- int64_t salt_length = 20; +- +- if (params->hashAlgorithm != nullptr) { +- hash_nid = OBJ_obj2nid(params->hashAlgorithm->algorithm); +- } +- +- if (target +- ->Set( +- env->context(), +- env->hash_algorithm_string(), +- OneByteString(env->isolate(), OBJ_nid2ln(hash_nid))) +- .IsNothing()) { +- return Nothing(); +- } +- +- if (params->maskGenAlgorithm != nullptr) { +- mgf_nid = OBJ_obj2nid(params->maskGenAlgorithm->algorithm); +- if (mgf_nid == NID_mgf1) { +- mgf1_hash_nid = OBJ_obj2nid(params->maskHash->algorithm); +- } +- } +- +- // If, for some reason, the MGF is not MGF1, then the MGF1 hash function +- // is intentionally not added to the object. +- if (mgf_nid == NID_mgf1) { +- if (target +- ->Set( +- env->context(), +- env->mgf1_hash_algorithm_string(), +- OneByteString(env->isolate(), OBJ_nid2ln(mgf1_hash_nid))) +- .IsNothing()) { +- return Nothing(); +- } +- } +- +- if (params->saltLength != nullptr) { +- if (ASN1_INTEGER_get_int64(&salt_length, params->saltLength) != 1) { +- ThrowCryptoError(env, ERR_get_error(), "ASN1_INTEGER_get_in64 error"); +- return Nothing(); +- } +- } +- +- if (target +- ->Set( +- env->context(), +- env->salt_length_string(), +- Number::New(env->isolate(), static_cast(salt_length))) +- .IsNothing()) { +- return Nothing(); +- } +- } +- } +- +- return Just(true); ++ return target->Set( ++ env->context(), ++ env->public_exponent_string(), ++ public_exponent.ToArrayBuffer()); + } + + namespace RSAAlg { +Index: node-v17.3.0/src/env.h +=================================================================== +--- node-v17.3.0.orig/src/env.h ++++ node-v17.3.0/src/env.h +@@ -271,7 +271,6 @@ constexpr size_t kFsStatsBufferLength = + V(gid_string, "gid") \ + V(h2_string, "h2") \ + V(handle_string, "handle") \ +- V(hash_algorithm_string, "hashAlgorithm") \ + V(help_text_string, "helpText") \ + V(homedir_string, "homedir") \ + V(host_string, "host") \ +@@ -320,7 +319,6 @@ constexpr size_t kFsStatsBufferLength = + V(message_port_string, "messagePort") \ + V(message_string, "message") \ + V(messageerror_string, "messageerror") \ +- V(mgf1_hash_algorithm_string, "mgf1HashAlgorithm") \ + V(minttl_string, "minttl") \ + V(module_string, "module") \ + V(modulus_string, "modulus") \ +@@ -390,7 +388,6 @@ constexpr size_t kFsStatsBufferLength = + V(replacement_string, "replacement") \ + V(require_string, "require") \ + V(retry_string, "retry") \ +- V(salt_length_string, "saltLength") \ + V(scheme_string, "scheme") \ + V(scopeid_string, "scopeid") \ + V(serial_number_string, "serialNumber") \ +Index: node-v17.3.0/test/fixtures/keys/Makefile +=================================================================== +--- node-v17.3.0.orig/test/fixtures/keys/Makefile ++++ node-v17.3.0/test/fixtures/keys/Makefile +@@ -64,11 +64,9 @@ all: \ + rsa_pss_private_2048.pem \ + rsa_pss_private_2048_sha256_sha256_16.pem \ + rsa_pss_private_2048_sha512_sha256_20.pem \ +- rsa_pss_private_2048_sha1_sha1_20.pem \ + rsa_pss_public_2048.pem \ + rsa_pss_public_2048_sha256_sha256_16.pem \ + rsa_pss_public_2048_sha512_sha256_20.pem \ +- rsa_pss_public_2048_sha1_sha1_20.pem \ + ed25519_private.pem \ + ed25519_public.pem \ + x25519_private.pem \ +@@ -710,9 +708,6 @@ rsa_pss_private_2048_sha256_sha256_16.pe + rsa_pss_private_2048_sha512_sha256_20.pem: + openssl genpkey -algorithm RSA-PSS -pkeyopt rsa_keygen_bits:2048 -pkeyopt rsa_keygen_pubexp:65537 -pkeyopt rsa_pss_keygen_md:sha512 -pkeyopt rsa_pss_keygen_mgf1_md:sha256 -pkeyopt rsa_pss_keygen_saltlen:20 -out rsa_pss_private_2048_sha512_sha256_20.pem + +-rsa_pss_private_2048_sha1_sha1_20.pem: +- openssl genpkey -algorithm RSA-PSS -pkeyopt rsa_keygen_bits:2048 -pkeyopt rsa_keygen_pubexp:65537 -pkeyopt rsa_pss_keygen_md:sha1 -pkeyopt rsa_pss_keygen_mgf1_md:sha1 -pkeyopt rsa_pss_keygen_saltlen:20 -out rsa_pss_private_2048_sha1_sha1_20.pem +- + rsa_pss_public_2048.pem: rsa_pss_private_2048.pem + openssl pkey -in rsa_pss_private_2048.pem -pubout -out rsa_pss_public_2048.pem + +@@ -722,9 +717,6 @@ rsa_pss_public_2048_sha256_sha256_16.pem + rsa_pss_public_2048_sha512_sha256_20.pem: rsa_pss_private_2048_sha512_sha256_20.pem + openssl pkey -in rsa_pss_private_2048_sha512_sha256_20.pem -pubout -out rsa_pss_public_2048_sha512_sha256_20.pem + +-rsa_pss_public_2048_sha1_sha1_20.pem: rsa_pss_private_2048_sha1_sha1_20.pem +- openssl pkey -in rsa_pss_private_2048_sha1_sha1_20.pem -pubout -out rsa_pss_public_2048_sha1_sha1_20.pem +- + ed25519_private.pem: + openssl genpkey -algorithm ED25519 -out ed25519_private.pem + +Index: node-v17.3.0/test/fixtures/keys/rsa_pss_private_2048_sha1_sha1_20.pem +=================================================================== +--- node-v17.3.0.orig/test/fixtures/keys/rsa_pss_private_2048_sha1_sha1_20.pem ++++ /dev/null +@@ -1,28 +0,0 @@ +------BEGIN PRIVATE KEY----- +-MIIEvQIBADANBgkqhkiG9w0BAQowAASCBKcwggSjAgEAAoIBAQCpdutzsPFQ1100 +-ouR5aAwYry8aAtG0c+zX9UqNXGCpRDWzPPpXHUZSB1BmTTL4EhK2tkAfblYNqzRu +-CAYlKHbFpFLs2zLEorfp0WsFNPaBHE9JHpLIM4oXxPCUypZ7JAn56ZYonYCZ8Il5 +-8SzD9aoF41RTEmpcx3XkL2RQa022RiSccYZKx/yzskUUAdTvTvYyujH1MkvsfVP+ +-Ns5bRL6IVqowFd3xv6ctvfQMxz0rltgTC+wOm3CFtn+G63y6P/Z0U2DRdacsNkN6 +-PFGXAIB0kSvKzs8gVocEBiSwMkcT/KD3R68PY18b2auqaGcm8gA+gaVJ36KAW4dO +-AjbY+YitAgMBAAECggEAfPvfFXln0Ra1gE+vMDdjzITPuWBg57Uj9fbMIEwEYnKT +-JHmRrNRDe9Y3HuxK7hjuQmFSE5xdzUD6rzgtyBP63TOfkV7tJ4dXGxS/2JxCPeDy +-PNxWp18Ttwoh4as0pudikDYN8DCRm3eC/TO5r2EtH6CVHZuUZI8bTMsDMiihrQ8F +-B8+KucBG5DDy/OlDeieAZxZA4Y0/c+W0DNZ/LIPGwaqMzYCSZJXyV0t33HytUwM2 +-QZ+RbWqcUcrCI3lFAO8IyEULCi+RnSByZeJ0xwUkdQTI5jT6+G8BrO70Oiab8g+Q +-Rx2s7PxWpIMVS7/JD1PsL4hLrVh3uqh8PZl3/FG9IQKBgQDZWkOR2LA+ixmD6XJb +-Q+7zW2guHnK6wDrQFKmBGLaDdAER64WL1Unt6Umu7FPxth2niYMEgRexBgnj5hQN +-LfPYTiIeXs5ErrU96fVQABsV0Hra1M2Rhve5nynjFFpbHjDXtizzLpE30MsC7YkN +-EqD4YYzjWHrbk/UlQ7tx3eAvtQKBgQDHmNM4TRuyH2yaYxDqnho6fgJv7Z4KgbM0 +-1wcUxi5kPDQsFtaVOzFhNserzsWvotQjLkC2+CK5qlCdm59ZlpUqszF6+YyUs5Gq +-WmHdqryduT1VxSV/pd6wGEQo27fxFV7LsT1JhVMh9Iri8MK0b1BD6+kVUf5NcKDB +-Od2o8A1gGQKBgA5Y3Pj1mrymJesFL91CYLWDpR7WN7CIG9m8Y2v4G6QVtjRenZQb +-YiPoMErxoqDj6pUyiIl1lADFa0W13ED6dYwjrDDhBTCXb7NEjELZnvATsOhc/6zJ +-gfSowvUQVN6K4aJ7jgAHZOKQT7ZDw7YvMpzyo4AmSQXRgG8TR34+rRu5AoGACApP +-9+SjSPmbFl0HQWw9Aj4xOvEHfMTcwzQmRN/23nLOZzhETJ6lzpS2VmVt8TVN9lzW +-nohAXdpOhQrP0HwQZjfxtlJ3J0ZUh9g8OQG3t2LO5bWbXRkBb3aKyFqRflSuDOaG +-4X9NagC/14R7U2loglPuf71d0SDIWQBLvZJt94ECgYEAnY7aKHnWdLszcB8uyEkJ +-EJkUEaa+K/nTqOzqffZ01cTWJmUG7a2KuvQ+UQM2BHk2+wBmUo45Iz/dyePOJY0B +-Fu2agiV4+R4z2XVQnIvXgY5HaPxvLz0THksY/pD58gBmFaLMx4ADEwQ+s4Y2g12H +-ABsKNRHfSnKTwOm/dYvcVqs= +------END PRIVATE KEY----- +Index: node-v17.3.0/test/fixtures/keys/rsa_pss_public_2048_sha1_sha1_20.pem +=================================================================== +--- node-v17.3.0.orig/test/fixtures/keys/rsa_pss_public_2048_sha1_sha1_20.pem ++++ /dev/null +@@ -1,9 +0,0 @@ +------BEGIN PUBLIC KEY----- +-MIIBIjANBgkqhkiG9w0BAQowAAOCAQ8AMIIBCgKCAQEAqXbrc7DxUNddNKLkeWgM +-GK8vGgLRtHPs1/VKjVxgqUQ1szz6Vx1GUgdQZk0y+BIStrZAH25WDas0bggGJSh2 +-xaRS7NsyxKK36dFrBTT2gRxPSR6SyDOKF8TwlMqWeyQJ+emWKJ2AmfCJefEsw/Wq +-BeNUUxJqXMd15C9kUGtNtkYknHGGSsf8s7JFFAHU7072Mrox9TJL7H1T/jbOW0S+ +-iFaqMBXd8b+nLb30DMc9K5bYEwvsDptwhbZ/hut8uj/2dFNg0XWnLDZDejxRlwCA +-dJErys7PIFaHBAYksDJHE/yg90evD2NfG9mrqmhnJvIAPoGlSd+igFuHTgI22PmI +-rQIDAQAB +------END PUBLIC KEY----- +Index: node-v17.3.0/test/parallel/test-crypto-key-objects.js +=================================================================== +--- node-v17.3.0.orig/test/parallel/test-crypto-key-objects.js ++++ node-v17.3.0/test/parallel/test-crypto-key-objects.js +@@ -582,21 +582,11 @@ const privateDsa = fixtures.readKey('dsa + const publicKey = createPublicKey(publicPem); + const privateKey = createPrivateKey(privatePem); + +- // Because no RSASSA-PSS-params appears in the PEM, no defaults should be +- // added for the PSS parameters. This is different from an empty +- // RSASSA-PSS-params sequence (see test below). +- const expectedKeyDetails = { +- modulusLength: 2048, +- publicExponent: 65537n +- }; +- + assert.strictEqual(publicKey.type, 'public'); + assert.strictEqual(publicKey.asymmetricKeyType, 'rsa-pss'); +- assert.deepStrictEqual(publicKey.asymmetricKeyDetails, expectedKeyDetails); + + assert.strictEqual(privateKey.type, 'private'); + assert.strictEqual(privateKey.asymmetricKeyType, 'rsa-pss'); +- assert.deepStrictEqual(privateKey.asymmetricKeyDetails, expectedKeyDetails); + + assert.throws( + () => publicKey.export({ format: 'jwk' }), +@@ -635,38 +625,6 @@ const privateDsa = fixtures.readKey('dsa + } + + { +- // This key pair enforces sha1 as the message digest and the MGF1 +- // message digest and a salt length of 20 bytes. +- +- const publicPem = fixtures.readKey('rsa_pss_public_2048_sha1_sha1_20.pem'); +- const privatePem = +- fixtures.readKey('rsa_pss_private_2048_sha1_sha1_20.pem'); +- +- const publicKey = createPublicKey(publicPem); +- const privateKey = createPrivateKey(privatePem); +- +- // Unlike the previous key pair, this key pair contains an RSASSA-PSS-params +- // sequence. However, because all values in the RSASSA-PSS-params are set to +- // their defaults (see RFC 3447), the ASN.1 structure contains an empty +- // sequence. Node.js should add the default values to the key details. +- const expectedKeyDetails = { +- modulusLength: 2048, +- publicExponent: 65537n, +- hashAlgorithm: 'sha1', +- mgf1HashAlgorithm: 'sha1', +- saltLength: 20 +- }; +- +- assert.strictEqual(publicKey.type, 'public'); +- assert.strictEqual(publicKey.asymmetricKeyType, 'rsa-pss'); +- assert.deepStrictEqual(publicKey.asymmetricKeyDetails, expectedKeyDetails); +- +- assert.strictEqual(privateKey.type, 'private'); +- assert.strictEqual(privateKey.asymmetricKeyType, 'rsa-pss'); +- assert.deepStrictEqual(privateKey.asymmetricKeyDetails, expectedKeyDetails); +- } +- +- { + // This key pair enforces sha256 as the message digest and the MGF1 + // message digest and a salt length of at least 16 bytes. + const publicPem = +@@ -724,21 +682,11 @@ const privateDsa = fixtures.readKey('dsa + const publicKey = createPublicKey(publicPem); + const privateKey = createPrivateKey(privatePem); + +- const expectedKeyDetails = { +- modulusLength: 2048, +- publicExponent: 65537n, +- hashAlgorithm: 'sha512', +- mgf1HashAlgorithm: 'sha256', +- saltLength: 20 +- }; +- + assert.strictEqual(publicKey.type, 'public'); + assert.strictEqual(publicKey.asymmetricKeyType, 'rsa-pss'); +- assert.deepStrictEqual(publicKey.asymmetricKeyDetails, expectedKeyDetails); + + assert.strictEqual(privateKey.type, 'private'); + assert.strictEqual(privateKey.asymmetricKeyType, 'rsa-pss'); +- assert.deepStrictEqual(privateKey.asymmetricKeyDetails, expectedKeyDetails); + + // Node.js usually uses the same hash function for the message and for MGF1. + // However, when a different MGF1 message digest algorithm has been +Index: node-v17.3.0/test/parallel/test-crypto-keygen.js +=================================================================== +--- node-v17.3.0.orig/test/parallel/test-crypto-keygen.js ++++ node-v17.3.0/test/parallel/test-crypto-keygen.js +@@ -309,20 +309,14 @@ const sec1EncExp = (cipher) => getRegExp + assert.strictEqual(publicKey.asymmetricKeyType, 'rsa-pss'); + assert.deepStrictEqual(publicKey.asymmetricKeyDetails, { + modulusLength: 512, +- publicExponent: 65537n, +- hashAlgorithm: 'sha256', +- mgf1HashAlgorithm: 'sha256', +- saltLength: 16 ++ publicExponent: 65537n + }); + + assert.strictEqual(privateKey.type, 'private'); + assert.strictEqual(privateKey.asymmetricKeyType, 'rsa-pss'); + assert.deepStrictEqual(privateKey.asymmetricKeyDetails, { + modulusLength: 512, +- publicExponent: 65537n, +- hashAlgorithm: 'sha256', +- mgf1HashAlgorithm: 'sha256', +- saltLength: 16 ++ publicExponent: 65537n + }); + + // Unlike RSA, RSA-PSS does not allow encryption. +@@ -381,10 +375,7 @@ const sec1EncExp = (cipher) => getRegExp + }, common.mustSucceed((publicKey, privateKey) => { + const expectedKeyDetails = { + modulusLength: 512, +- publicExponent: 65537n, +- hashAlgorithm: 'sha256', +- mgf1HashAlgorithm: 'sha256', +- saltLength: 16 ++ publicExponent: 65537n + }; + assert.deepStrictEqual(publicKey.asymmetricKeyDetails, expectedKeyDetails); + assert.deepStrictEqual(privateKey.asymmetricKeyDetails, expectedKeyDetails); +@@ -401,10 +392,7 @@ const sec1EncExp = (cipher) => getRegExp + }, common.mustSucceed((publicKey, privateKey) => { + const expectedKeyDetails = { + modulusLength: 512, +- publicExponent: 65537n, +- hashAlgorithm: 'sha512', +- mgf1HashAlgorithm: 'sha512', +- saltLength: 64 ++ publicExponent: 65537n + }; + assert.deepStrictEqual(publicKey.asymmetricKeyDetails, expectedKeyDetails); + assert.deepStrictEqual(privateKey.asymmetricKeyDetails, expectedKeyDetails); +@@ -418,10 +406,7 @@ const sec1EncExp = (cipher) => getRegExp + }, common.mustSucceed((publicKey, privateKey) => { + const expectedKeyDetails = { + modulusLength: 512, +- publicExponent: 65537n, +- hashAlgorithm: 'sha512', +- mgf1HashAlgorithm: 'sha512', +- saltLength: 0 ++ publicExponent: 65537n + }; + assert.deepStrictEqual(publicKey.asymmetricKeyDetails, expectedKeyDetails); + assert.deepStrictEqual(privateKey.asymmetricKeyDetails, expectedKeyDetails); +@@ -1646,20 +1631,14 @@ if (!common.hasOpenSSL3) { + assert.strictEqual(publicKey.asymmetricKeyType, 'rsa-pss'); + assert.deepStrictEqual(publicKey.asymmetricKeyDetails, { + modulusLength: 512, +- publicExponent: 65537n, +- hashAlgorithm: 'sha256', +- mgf1HashAlgorithm: 'sha256', +- saltLength: 16 ++ publicExponent: 65537n + }); + + assert.strictEqual(privateKey.type, 'private'); + assert.strictEqual(privateKey.asymmetricKeyType, 'rsa-pss'); + assert.deepStrictEqual(privateKey.asymmetricKeyDetails, { + modulusLength: 512, +- publicExponent: 65537n, +- hashAlgorithm: 'sha256', +- mgf1HashAlgorithm: 'sha256', +- saltLength: 16 ++ publicExponent: 65537n + }); + })); + } +Index: node-v17.3.0/test/parallel/test-crypto-keygen-deprecation.js +=================================================================== +--- node-v17.3.0.orig/test/parallel/test-crypto-keygen-deprecation.js ++++ node-v17.3.0/test/parallel/test-crypto-keygen-deprecation.js +@@ -32,20 +32,14 @@ const { generateKeyPair } = require('cry + assert.strictEqual(publicKey.asymmetricKeyType, 'rsa-pss'); + assert.deepStrictEqual(publicKey.asymmetricKeyDetails, { + modulusLength: 512, +- publicExponent: 65537n, +- hashAlgorithm: 'sha256', +- mgf1HashAlgorithm: 'sha256', +- saltLength: 16 ++ publicExponent: 65537n + }); + + assert.strictEqual(privateKey.type, 'private'); + assert.strictEqual(privateKey.asymmetricKeyType, 'rsa-pss'); + assert.deepStrictEqual(privateKey.asymmetricKeyDetails, { + modulusLength: 512, +- publicExponent: 65537n, +- hashAlgorithm: 'sha256', +- mgf1HashAlgorithm: 'sha256', +- saltLength: 16 ++ publicExponent: 65537n + }); + })); + } diff --git a/skip_no_console.patch b/skip_no_console.patch new file mode 100644 index 0000000..5d562f6 --- /dev/null +++ b/skip_no_console.patch @@ -0,0 +1,29 @@ +Index: node-v14.3.0/test/parallel/test-repl-mode.js +=================================================================== +--- node-v14.3.0.orig/test/parallel/test-repl-mode.js ++++ node-v14.3.0/test/parallel/test-repl-mode.js +@@ -1,9 +1,11 @@ + 'use strict'; +-require('../common'); ++const common = require('../common'); + const assert = require('assert'); + const Stream = require('stream'); + const repl = require('repl'); + ++common.skipIfDumbTerminal(); ++ + const tests = [ + testSloppyMode, + testStrictMode, +Index: node-v14.3.0/test/parallel/test-repl-strict-mode-previews.js +=================================================================== +--- node-v14.3.0.orig/test/parallel/test-repl-strict-mode-previews.js ++++ node-v14.3.0/test/parallel/test-repl-strict-mode-previews.js +@@ -5,6 +5,7 @@ + const common = require('../common'); + + common.skipIfInspectorDisabled(); ++common.skipIfDumbTerminal(); + + if (process.argv[2] === 'child') { + const stream = require('stream'); diff --git a/sle12_python3_compat.patch b/sle12_python3_compat.patch new file mode 100644 index 0000000..1e0632d --- /dev/null +++ b/sle12_python3_compat.patch @@ -0,0 +1,35 @@ +Index: node-v16.13.0/configure +=================================================================== +--- node-v16.13.0.orig/configure ++++ node-v16.13.0/configure +@@ -22,7 +22,7 @@ except ImportError: + from distutils.spawn import find_executable as which + + print('Node.js configure: Found Python {}.{}.{}...'.format(*sys.version_info)) +-acceptable_pythons = ((3, 10), (3, 9), (3, 8), (3, 7), (3, 6)) ++acceptable_pythons = ((3, 10), (3, 9), (3, 8), (3, 7), (3, 6), (3, 4)) + if sys.version_info[:2] in acceptable_pythons: + import configure + else: +Index: node-v16.13.0/deps/npm/node_modules/node-gyp/lib/find-python.js +=================================================================== +--- node-v16.13.0.orig/deps/npm/node_modules/node-gyp/lib/find-python.js ++++ node-v16.13.0/deps/npm/node_modules/node-gyp/lib/find-python.js +@@ -15,7 +15,7 @@ const programFiles = process.env.Program + const programFilesX86 = process.env['ProgramFiles(x86)'] || `${programFiles} (x86)` + + const winDefaultLocationsArray = [] +-for (const majorMinor of ['39', '38', '37', '36']) { ++for (const majorMinor of ['39', '38', '37', '36', '34']) { + if (foundLocalAppData) { + winDefaultLocationsArray.push( + `${localAppData}\\Programs\\Python\\Python${majorMinor}\\python.exe`, +@@ -49,7 +49,7 @@ PythonFinder.prototype = { + log: logWithPrefix(log, 'find Python'), + argsExecutable: ['-c', 'import sys; print(sys.executable);'], + argsVersion: ['-c', 'import sys; print("%s.%s.%s" % sys.version_info[:3]);'], +- semverRange: '>=3.6.0', ++ semverRange: '>=3.4.0', + + // These can be overridden for testing: + execFile: cp.execFile, diff --git a/test-skip-y2038-on-32bit-time_t.patch b/test-skip-y2038-on-32bit-time_t.patch new file mode 100644 index 0000000..1e3b16b --- /dev/null +++ b/test-skip-y2038-on-32bit-time_t.patch @@ -0,0 +1,45 @@ +Skip 'test/parallel/test-fs-utimes-y2K38.js' on some platforms. + +This test fails if coreutils' touch was built with 64-bit time_t, +while nodejs was built with 32-bit time_t. This is currently the case +on i586, ppc and arm. Skip the failing last command on those +platforms. + +The failure was seen since coreutils-9.0. + +Remove this patch once nodejs(1) also builds with 64-bit time_t. +--- + test/parallel/test-fs-utimes-y2K38.js | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +Index: node-v16.6.2/test/parallel/test-fs-utimes-y2K38.js +=================================================================== +--- node-v16.6.2.orig/test/parallel/test-fs-utimes-y2K38.js ++++ node-v16.6.2/test/parallel/test-fs-utimes-y2K38.js +@@ -20,6 +20,26 @@ if (!common.isWindows) { + common.skip('File system appears to lack Y2K38 support (touch failed)'); + } + ++ // SUSE: touch-9.0 may succeed on platforms with 32-bit time_t, ++ // but the test would fail. Skip on those platforms for now. ++ const unameResult = spawnSync('uname', ++ ['-m'], ++ { encoding: 'utf8' }); ++ if (unameResult.status === 0) { ++ if (unameResult.stdout.trim() === 'i686') { ++ common.skip('SUSE: test skipped on platforms with 32-bit time_t'); ++ } ++ if (unameResult.stdout.trim() === 'ppc') { ++ common.skip('SUSE: test skipped on platforms with 32-bit time_t'); ++ } ++ if (unameResult.stdout.trim() === 'armv6l') { ++ common.skip('SUSE: test skipped on platforms with 32-bit time_t'); ++ } ++ if (unameResult.stdout.trim() === 'armv7l') { ++ common.skip('SUSE: test skipped on platforms with 32-bit time_t'); ++ } ++ } ++ + // On some file systems that lack Y2K38 support, `touch` will succeed but + // the time will be incorrect. + const dateResult = spawnSync('date', diff --git a/update_npm_tarball.sh b/update_npm_tarball.sh new file mode 100644 index 0000000..342bcc3 --- /dev/null +++ b/update_npm_tarball.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# +# Fetch npm module tarball that is required to run unit tests +# which are not provided by upstream tarball +# +set -e + +tar Jxf node-v*.tar.xz +cd node-v.*/tools/doc +npm ci +cd ../.. +exec tar Jcf ../node_modules.tar.xz tools/doc/node_modules diff --git a/versioned.patch b/versioned.patch new file mode 100644 index 0000000..75aadb8 --- /dev/null +++ b/versioned.patch @@ -0,0 +1,348 @@ +Author: Adam Majer +Date: Fri May 11 16:10:16 CEST 2018 +Summary: Generate versioned binaries + +Generate versioned binaries and install paths +so we can allow concurrent installations and +management via update_alternatives. + +This is also important for generation of binary +modules for multiple versions of NodeJS +Index: node-v18.16.0/Makefile +=================================================================== +--- node-v18.16.0.orig/Makefile ++++ node-v18.16.0/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 = node18$(EXEEXT) + NODE ?= ./$(NODE_EXE) + NODE_G_EXE = node_g$(EXEEXT) + NPM ?= ./deps/npm/bin/npm-cli.js +Index: node-v18.16.0/tools/install.py +=================================================================== +--- node-v18.16.0.orig/tools/install.py ++++ node-v18.16.0/tools/install.py +@@ -86,7 +86,7 @@ def uninstall(paths, dst): + try_remove(path, dst) + + def package_files(action, name, bins): +- target_path = libdir() + '/node_modules/' + name + '/' ++ target_path = libdir() + '/node_modules/' + name + '18/' + + # 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): + if action == uninstall: + action([link_path], 'bin/' + bin_name) + elif action == install: +- try_symlink('../' + libdir() + '/node_modules/' + name + '/' + bin_target, link_path) ++ try_symlink('../' + libdir() + '/node_modules/' + name + '18/' + bin_target, link_path) + else: + assert 0 # unhandled action type + + def npm_files(action): + package_files(action, 'npm', { +- 'npm': 'bin/npm-cli.js', +- 'npx': 'bin/npx-cli.js', ++ 'npm18': 'bin/npm-cli.js', ++ 'npx18': 'bin/npx-cli.js', + }) + + def corepack_files(action): + package_files(action, 'corepack', { +- 'corepack': 'dist/corepack.js', ++ 'corepack18': '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): + + def files(action): + is_windows = sys.platform == 'win32' +- output_file = 'node' ++ output_file = 'node18' + output_prefix = 'out/Release/' + + if is_windows: +@@ -186,7 +186,7 @@ def files(action): + action(['out/Release/node.d'], 'lib/dtrace/node.d') + + # behave similarly for systemtap +- action(['src/node.stp'], 'share/systemtap/tapset/') ++ action(['src/node.stp'], 'share/systemtap/tapset/node18.stp') + + action(['deps/v8/tools/gdbinit'], 'share/doc/node/') + action(['deps/v8/tools/lldb_commands.py'], 'share/doc/node/') +@@ -194,7 +194,7 @@ def files(action): + if 'freebsd' in sys.platform or 'openbsd' in sys.platform: + action(['doc/node.1'], 'man/man1/') + else: +- action(['doc/node.1'], 'share/man/man1/') ++ action(['doc/node.1'], 'share/man/man1/node18.1') + + if 'true' == variables.get('node_install_npm'): + npm_files(action) +@@ -281,28 +281,28 @@ def headers(action): + 'src/node_buffer.h', + 'src/node_object_wrap.h', + 'src/node_version.h', +- ], 'include/node/') ++ ], 'include/node18/') + + # 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/node18/') + +- subdir_files('deps/v8/include', 'include/node/', wanted_v8_headers) ++ subdir_files('deps/v8/include', 'include/node18/', wanted_v8_headers) + + if 'false' == variables.get('node_shared_libuv'): +- subdir_files('deps/uv/include', 'include/node/', action) ++ subdir_files('deps/uv/include', 'include/node18/', 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/node18/openssl/', action) ++ subdir_files('deps/openssl/config/archs', 'include/node18/openssl/archs', action) ++ subdir_files('deps/openssl/config', 'include/node18/openssl', action) + + if 'false' == variables.get('node_shared_zlib'): + action([ + 'deps/zlib/zconf.h', + 'deps/zlib/zlib.h', +- ], 'include/node/') ++ ], 'include/node18/') + + if sys.platform == 'zos': + zoslibinc = os.environ.get('ZOSLIB_INCLUDES') +Index: node-v18.16.0/doc/node.1 +=================================================================== +--- node-v18.16.0.orig/doc/node.1 ++++ node-v18.16.0/doc/node.1 +@@ -31,24 +31,24 @@ + .Dt NODE 1 + . + .Sh NAME +-.Nm node ++.Nm node18 + .Nd server-side JavaScript runtime + . + .\"====================================================================== + .Sh SYNOPSIS +-.Nm node ++.Nm node18 + .Op Ar options + .Op Ar v8-options + .Op Fl e Ar string | Ar script.js | Fl + .Op Fl - + .Op Ar arguments ... + . +-.Nm node ++.Nm node18 + .Cm inspect + .Op Fl e Ar string | Ar script.js | Fl | Ar : + .Ar ... + . +-.Nm node ++.Nm node18 + .Op Fl -v8-options + . + .\"====================================================================== +Index: node-v18.16.0/src/node.stp +=================================================================== +--- node-v18.16.0.orig/src/node.stp ++++ node-v18.16.0/src/node.stp +@@ -19,7 +19,7 @@ + // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + // USE OR OTHER DEALINGS IN THE SOFTWARE. + +-probe node_net_server_connection = process("node").mark("net__server__connection") ++probe node_net_server_connection = process("node18").mark("net__server__connection") + { + remote = user_string($arg2); + port = $arg3; +@@ -32,7 +32,7 @@ probe node_net_server_connection = proce + fd); + } + +-probe node_net_stream_end = process("node").mark("net__stream__end") ++probe node_net_stream_end = process("node18").mark("net__stream__end") + { + remote = user_string($arg2); + port = $arg3; +@@ -45,7 +45,7 @@ probe node_net_stream_end = process("nod + fd); + } + +-probe node_http_server_request = process("node").mark("http__server__request") ++probe node_http_server_request = process("node18").mark("http__server__request") + { + remote = user_string($arg3); + port = $arg4; +@@ -62,7 +62,7 @@ probe node_http_server_request = process + fd); + } + +-probe node_http_server_response = process("node").mark("http__server__response") ++probe node_http_server_response = process("node18").mark("http__server__response") + { + remote = user_string($arg2); + port = $arg3; +@@ -75,7 +75,7 @@ probe node_http_server_response = proces + fd); + } + +-probe node_http_client_request = process("node").mark("http__client__request") ++probe node_http_client_request = process("node18").mark("http__client__request") + { + remote = user_string($arg3); + port = $arg4; +@@ -92,7 +92,7 @@ probe node_http_client_request = process + fd); + } + +-probe node_http_client_response = process("node").mark("http__client__response") ++probe node_http_client_response = process("node18").mark("http__client__response") + { + remote = user_string($arg2); + port = $arg3; +@@ -105,7 +105,7 @@ probe node_http_client_response = proces + fd); + } + +-probe node_gc_start = process("node").mark("gc__start") ++probe node_gc_start = process("node18").mark("gc__start") + { + scavenge = 1 << 0; + compact = 1 << 1; +@@ -125,7 +125,7 @@ probe node_gc_start = process("node").ma + flags); + } + +-probe node_gc_stop = process("node").mark("gc__done") ++probe node_gc_stop = process("node18").mark("gc__done") + { + scavenge = 1 << 0; + compact = 1 << 1; +Index: node-v18.16.0/deps/npm/man/man1/npm.1 +=================================================================== +--- node-v18.16.0.orig/deps/npm/man/man1/npm.1 ++++ node-v18.16.0/deps/npm/man/man1/npm.1 +@@ -1,11 +1,11 @@ + .TH "NPM" "1" "February 2023" "" "" + .SH "NAME" +-\fBnpm\fR - javascript package manager ++\fBnpm18\fR - javascript package manager + .SS "Synopsis" + .P + .RS 2 + .nf +-npm ++npm18 + .fi + .RE + .P +@@ -19,7 +19,7 @@ npm is the package manager for the Node + .P + It is extremely configurable to support a variety of use cases. Most commonly, you use it to publish, discover, install, and develop node programs. + .P +-Run \fBnpm help\fR to get a list of available commands. ++Run \fBnpm18 help\fR to get a list of available commands. + .SS "Important" + .P + npm comes preconfigured to use npm's public registry at https://registry.npmjs.org by default. Use of the npm public registry is subject to terms of use available at https://docs.npmjs.com/policies/terms. +@@ -115,17 +115,17 @@ Or suggest formal RFC proposals: + .SS "See Also" + .RS 0 + .IP \(bu 4 +-npm help help ++npm18 help help + .IP \(bu 4 + \fBpackage.json\fR \fI\(la/configuring-npm/package-json\(ra\fR + .IP \(bu 4 +-npm help npmrc ++npm18 help npmrc + .IP \(bu 4 +-npm help config ++npm18 help config + .IP \(bu 4 +-npm help install ++npm18 help install + .IP \(bu 4 +-npm help prefix ++npm18 help prefix + .IP \(bu 4 +-npm help publish ++npm18 help publish + .RE 0 +Index: node-v18.16.0/src/node_main.cc +=================================================================== +--- node-v18.16.0.orig/src/node_main.cc ++++ node-v18.16.0/src/node_main.cc +@@ -90,6 +90,7 @@ int wmain(int argc, wchar_t* wargv[]) { + // UNIX + + int main(int argc, char* argv[]) { ++ setenv("NODE_VERSION", "18", 0); + return node::Start(argc, argv); + } + #endif +Index: node-v18.16.0/tools/test.py +=================================================================== +--- node-v18.16.0.orig/tools/test.py ++++ node-v18.16.0/tools/test.py +@@ -954,7 +954,7 @@ class Context(object): + if self.vm is not None: + return self.vm + if arch == 'none': +- name = 'out/Debug/node' if mode == 'debug' else 'out/Release/node' ++ name = 'out/Debug/node' if mode == 'debug' else 'out/Release/node18' + else: + name = 'out/%s.%s/node' % (arch, mode) + +Index: node-v18.16.0/node.gyp +=================================================================== +--- node-v18.16.0.orig/node.gyp ++++ node-v18.16.0/node.gyp +@@ -25,8 +25,8 @@ + 'node_shared_openssl%': 'false', + 'node_v8_options%': '', + 'node_enable_v8_vtunejit%': 'false', +- 'node_core_target_name%': 'node', +- 'node_lib_target_name%': 'libnode', ++ 'node_core_target_name%': 'node18', ++ 'node_lib_target_name%': 'libnode18', + 'node_intermediate_lib_type%': 'static_library', + 'node_builtin_modules_path%': '', + # We list the deps/ files out instead of globbing them in js2c.py since we +Index: node-v18.16.0/deps/npm/man/man1/npx.1 +=================================================================== +--- node-v18.16.0.orig/deps/npm/man/man1/npx.1 ++++ node-v18.16.0/deps/npm/man/man1/npx.1 +@@ -1,14 +1,14 @@ + .TH "NPX" "1" "February 2023" "" "" + .SH "NAME" +-\fBnpx\fR - Run a command from a local or remote npm package ++\fBnpx18\fR - Run a command from a local or remote npm package + .SS "Synopsis" + .P + .RS 2 + .nf +-npx -- \[lB]@\[rB] \[lB]args...\[rB] +-npx --package=\[lB]@\[rB] -- \[lB]args...\[rB] +-npx -c ' \[lB]args...\[rB]' +-npx --package=foo -c ' \[lB]args...\[rB]' ++npx18 -- \[lB]@\[rB] \[lB]args...\[rB] ++npx18 --package=\[lB]@\[rB] -- \[lB]args...\[rB] ++npx18 -c ' \[lB]args...\[rB]' ++npx18 --package=foo -c ' \[lB]args...\[rB]' + .fi + .RE + .SS "Description"