SHA256
1
0
2024-02-13 13:11:48 +00:00
committed by Git OBS Bridge
parent e23d5ebf4b
commit 363f60fdf8
2 changed files with 91 additions and 47 deletions

View File

@@ -2,10 +2,10 @@ Author: Adam Majer <amajer@suse.de>
Date: Dec 20 09:18:49 UTC 2017
Summary: Fix CI unit tests framework for OBS building
Index: node-v20.10.0/test/parallel/test-module-loading-globalpaths.js
Index: node-v20.11.0/test/parallel/test-module-loading-globalpaths.js
===================================================================
--- node-v20.10.0.orig/test/parallel/test-module-loading-globalpaths.js
+++ node-v20.10.0/test/parallel/test-module-loading-globalpaths.js
--- node-v20.11.0.orig/test/parallel/test-module-loading-globalpaths.js
+++ node-v20.11.0/test/parallel/test-module-loading-globalpaths.js
@@ -11,6 +11,9 @@ const { addLibraryPath } = require('../c
addLibraryPath(process.env);
@@ -16,10 +16,10 @@ Index: node-v20.10.0/test/parallel/test-module-loading-globalpaths.js
if (process.argv[2] === 'child') {
console.log(require(pkgName).string);
} else {
Index: node-v20.10.0/test/parallel/test-tls-passphrase.js
Index: node-v20.11.0/test/parallel/test-tls-passphrase.js
===================================================================
--- node-v20.10.0.orig/test/parallel/test-tls-passphrase.js
+++ node-v20.10.0/test/parallel/test-tls-passphrase.js
--- node-v20.11.0.orig/test/parallel/test-tls-passphrase.js
+++ node-v20.11.0/test/parallel/test-tls-passphrase.js
@@ -223,7 +223,7 @@ server.listen(0, common.mustCall(functio
}, onSecureConnect());
})).unref();
@@ -29,10 +29,10 @@ Index: node-v20.10.0/test/parallel/test-tls-passphrase.js
// Missing passphrase
assert.throws(function() {
Index: node-v20.10.0/test/parallel/test-repl-envvars.js
Index: node-v20.11.0/test/parallel/test-repl-envvars.js
===================================================================
--- node-v20.10.0.orig/test/parallel/test-repl-envvars.js
+++ node-v20.10.0/test/parallel/test-repl-envvars.js
--- node-v20.11.0.orig/test/parallel/test-repl-envvars.js
+++ node-v20.11.0/test/parallel/test-repl-envvars.js
@@ -2,7 +2,9 @@
// Flags: --expose-internals
@@ -44,10 +44,10 @@ Index: node-v20.10.0/test/parallel/test-repl-envvars.js
const stream = require('stream');
const { describe, test } = require('node:test');
const REPL = require('internal/repl');
Index: node-v20.10.0/Makefile
Index: node-v20.11.0/Makefile
===================================================================
--- node-v20.10.0.orig/Makefile
+++ node-v20.10.0/Makefile
--- node-v20.11.0.orig/Makefile
+++ node-v20.11.0/Makefile
@@ -545,7 +545,8 @@ test-ci-js: | clear-stalled
.PHONY: test-ci
# Related CI jobs: most CI tests, excluding node-test-commit-arm-fanned
@@ -68,11 +68,11 @@ Index: node-v20.10.0/Makefile
echo "Skipping tools/doc/node_modules (no crypto)"; \
else \
cd tools/doc && $(call available-node,$(run-npm-ci)) \
Index: node-v20.10.0/tools/test.py
Index: node-v20.11.0/tools/test.py
===================================================================
--- node-v20.10.0.orig/tools/test.py
+++ node-v20.10.0/tools/test.py
@@ -1361,7 +1361,7 @@ def BuildOptions():
--- node-v20.11.0.orig/tools/test.py
+++ node-v20.11.0/tools/test.py
@@ -1362,7 +1362,7 @@ def BuildOptions():
result.add_option("-s", "--suite", help="A test suite",
default=[], action="append")
result.add_option("-t", "--timeout", help="Timeout in seconds",
@@ -81,10 +81,10 @@ Index: node-v20.10.0/tools/test.py
result.add_option("--arch", help='The architecture to run tests for',
default='none')
result.add_option("--snapshot", help="Run the tests with snapshot turned on",
Index: node-v20.10.0/test/parallel/test-crypto-dh.js
Index: node-v20.11.0/test/parallel/test-crypto-dh.js
===================================================================
--- node-v20.10.0.orig/test/parallel/test-crypto-dh.js
+++ node-v20.10.0/test/parallel/test-crypto-dh.js
--- node-v20.11.0.orig/test/parallel/test-crypto-dh.js
+++ node-v20.11.0/test/parallel/test-crypto-dh.js
@@ -90,9 +90,7 @@ const crypto = require('crypto');
const hasOpenSSL3WithNewErrorMessage = (v >= 0x300000c0 && v <= 0x30100000) || (v >= 0x30100040 && v <= 0x30200000);
assert.throws(() => {
@@ -96,10 +96,10 @@ Index: node-v20.10.0/test/parallel/test-crypto-dh.js
}
}
Index: node-v20.10.0/test/parallel/test-node-output-errors.mjs
Index: node-v20.11.0/test/parallel/test-node-output-errors.mjs
===================================================================
--- node-v20.10.0.orig/test/parallel/test-node-output-errors.mjs
+++ node-v20.10.0/test/parallel/test-node-output-errors.mjs
--- node-v20.11.0.orig/test/parallel/test-node-output-errors.mjs
+++ node-v20.11.0/test/parallel/test-node-output-errors.mjs
@@ -28,6 +28,7 @@ describe('errors output', { concurrency:
.replaceAll(/\/(\w)/g, '*$1')
.replaceAll('*test*', '*')
@@ -108,10 +108,10 @@ Index: node-v20.10.0/test/parallel/test-node-output-errors.mjs
.replaceAll('file:**', 'file:*/');
}
Index: node-v20.10.0/test/parallel/test-crypto-fips.js
Index: node-v20.11.0/test/parallel/test-crypto-fips.js
===================================================================
--- node-v20.10.0.orig/test/parallel/test-crypto-fips.js
+++ node-v20.10.0/test/parallel/test-crypto-fips.js
--- node-v20.11.0.orig/test/parallel/test-crypto-fips.js
+++ node-v20.11.0/test/parallel/test-crypto-fips.js
@@ -3,6 +3,8 @@
const common = require('../common');
if (!common.hasCrypto)
@@ -121,3 +121,31 @@ Index: node-v20.10.0/test/parallel/test-crypto-fips.js
const assert = require('assert');
const spawnSync = require('child_process').spawnSync;
Index: node-v20.11.0/benchmark/misc/startup-cli-version.js
===================================================================
--- node-v20.11.0.orig/benchmark/misc/startup-cli-version.js
+++ node-v20.11.0/benchmark/misc/startup-cli-version.js
@@ -10,9 +10,9 @@ const path = require('path');
// indispensible part of the CLI.
const bench = common.createBenchmark(main, {
cli: [
- 'tools/node_modules/eslint/bin/eslint.js',
'deps/npm/bin/npm-cli.js',
'deps/corepack/dist/corepack.js',
+ 'tools/node_modules/eslint/bin/eslint.js',
],
count: [30],
});
Index: node-v20.11.0/test/parallel/test-node-output-v8-warning.mjs
===================================================================
--- node-v20.11.0.orig/test/parallel/test-node-output-v8-warning.mjs
+++ node-v20.11.0/test/parallel/test-node-output-v8-warning.mjs
@@ -15,7 +15,7 @@ describe('v8 output', { concurrency: tru
.replaceAll('*test*', '*')
.replaceAll(/.*?\*fixtures\*v8\*/g, '(node:*) V8: *') // Replace entire path before fixtures/v8
.replaceAll('*fixtures*v8*', '*')
- .replaceAll('node --', '* --');
+ .replaceAll(/node\d+ --/g, '* --');
}
const common = snapshot
.transform(snapshot.replaceWindowsLineEndings, snapshot.replaceWindowsPaths, replaceNodeVersion);

View File

@@ -15,7 +15,17 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
###########################################################
#
# WARNING! WARNING! WARNING! WARNING! WARNING! WARNING!
#
# This spec file is generated from a template hosted at
# https://github.com/AdamMajer/nodejs-packaging
#
###########################################################
# Fedora doesn't have rpm-config-SUSE which provides
# ext_man in /usr/lib/rpm/macros.d/macros.obs
%if 0%{?fedora_version}
%define ext_man .gz
%endif
@@ -124,12 +134,12 @@ Source1: https://nodejs.org/dist/v%{version}/SHASUMS256.txt
Source2: https://nodejs.org/dist/v%{version}/SHASUMS256.txt.sig
Source3: nodejs.keyring
# Python 3.4 compatible node-gyp
### https://github.com/nodejs/node-gyp.git
### git archive v7.1.2 | xz > node-gyp_7.1.2.tar.xz
Source5: node-gyp_7.1.2.tar.xz
# Only required to run unit tests in NodeJS 10+
Source10: update_npm_tarball.sh
# Python 3.4 compatible node-gyp
### https://github.com/nodejs/node-gyp.git
### git archive v7.1.2 | xz > node-gyp_7.1.2.tar.xz
Source5: node-gyp_7.1.2.tar.xz
# Only required to run unit tests in NodeJS 10+
Source10: update_npm_tarball.sh
Source11: node_modules.tar.xz
Source20: bash_output_helper.bash
@@ -140,6 +150,8 @@ Patch5: sle12_python3_compat.patch
Patch7: manual_configure.patch
Patch13: openssl_binary_detection.patch
## Patches specific to SUSE and openSUSE
Patch100: linker_lto_jobs.patch
# PATCH-FIX-OPENSUSE -- set correct path for dtrace if it is built
@@ -167,8 +179,8 @@ Patch308: node-gyp-config.patch
Patch309: gcc13.patch
Patch311: c-ares-fixes.patch
BuildRequires: fdupes
BuildRequires: pkg-config
BuildRequires: fdupes
BuildRequires: procps
BuildRequires: xz
BuildRequires: zlib-devel
@@ -188,10 +200,10 @@ BuildRequires: config(netcfg)
%if 0%{?suse_version} == 1110
# GCC 5 is only available in the SUSE:SLE-11:SP4:Update repository (SDK).
%if %node_version_number >= 8
BuildRequires: gcc5-c++
BuildRequires: gcc5-c++
%define forced_gcc_version 5
%else
BuildRequires: gcc48-c++
BuildRequires: gcc48-c++
%define forced_gcc_version 4.8
%endif
%endif
@@ -201,15 +213,15 @@ BuildRequires: gcc48-c++
# for SLE-12:Update targets
%if 0%{?suse_version} == 1315
%if %node_version_number >= 17
BuildRequires: gcc12-c++
BuildRequires: gcc12-c++
%define forced_gcc_version 12
%else
%if %node_version_number >= 14
BuildRequires: gcc9-c++
BuildRequires: gcc9-c++
%define forced_gcc_version 9
%else
%if %node_version_number >= 8
BuildRequires: gcc7-c++
BuildRequires: gcc7-c++
%define forced_gcc_version 7
%endif
%endif
@@ -218,7 +230,7 @@ BuildRequires: gcc7-c++
%if 0%{?suse_version} == 1500
%if %node_version_number >= 17
BuildRequires: gcc12-c++
BuildRequires: gcc12-c++
%define forced_gcc_version 12
%endif
%endif
@@ -229,6 +241,7 @@ BuildRequires: gcc12-c++
BuildRequires: gcc-c++
%endif
# Python dependencies
%if %node_version_number >= 14
@@ -254,8 +267,8 @@ BuildRequires: python
%endif
%if 0%{?suse_version} >= 1500 && %{node_version_number} >= 10
BuildRequires: group(nobody)
BuildRequires: user(nobody)
BuildRequires: group(nobody)
%endif
# shared openssl
@@ -270,10 +283,11 @@ BuildRequires: openssl >= %{openssl_req_ver}
BuildRequires: (libopenssl1_1-hmac if libopenssl-1_1-devel)
BuildRequires: (libopenssl3-hmac if libopenssl-3-devel)
%else
BuildRequires: libopenssl1_1-hmac
BuildRequires: openssl-1_1 >= %{openssl_req_ver}
BuildRequires: libopenssl1_1-hmac
%endif
# /suse_version
%endif
@@ -356,8 +370,8 @@ ExclusiveArch: not_buildable
%endif
%endif
Provides: bundled(libuv) = 1.46.0
Provides: bundled(uvwasi) = 0.0.19
Provides: bundled(libuv) = 1.46.0
Provides: bundled(v8) = 11.3.244.8
%if %{with intree_brotli}
Provides: bundled(brotli) = 1.0.9
@@ -365,9 +379,10 @@ Provides: bundled(brotli) = 1.0.9
BuildRequires: pkgconfig(libbrotlidec)
%endif
Provides: bundled(base64) = 0.5.1
Provides: bundled(llhttp) = 8.1.1
Provides: bundled(ngtcp2) = 0.8.1
Provides: bundled(base64) = 0.5.1
Provides: bundled(simdutf) = 3.2.18
# bundled url-ada parser, not ada
@@ -393,8 +408,8 @@ provided by npm.
Summary: Development headers for NodeJS 20.x
Group: Development/Languages/NodeJS
Provides: nodejs-devel = %{version}
Requires: %{name} = %{version}
Requires: npm20 = %{version}
Requires: %{name} = %{version}
%description devel
This package provides development headers for Node.js needed for creation
@@ -411,12 +426,12 @@ Requires: nodejs-common
Requires: nodejs20 = %{version}
Provides: nodejs-npm = %{version}
Obsoletes: nodejs-npm < 4.0.0
Provides: npm = %{version}
Provides: npm(npm) = 10.2.4
Provides: npm = %{version}
%if 0%{?suse_version} >= 1500
%if %{node_version_number} >= 10
Requires: group(nobody)
Requires: user(nobody)
Requires: group(nobody)
%endif
%endif
Provides: bundled(node-abbrev) = 2.0.0
@@ -583,9 +598,9 @@ Provides: bundled(node-spdx-exceptions) = 2.3.0
Provides: bundled(node-spdx-expression-parse) = 3.0.1
Provides: bundled(node-spdx-license-ids) = 3.0.16
Provides: bundled(node-ssri) = 10.0.5
Provides: bundled(node-string_decoder) = 1.3.0
Provides: bundled(node-string-width) = 4.2.3
Provides: bundled(node-string-width) = 5.1.2
Provides: bundled(node-string_decoder) = 1.3.0
Provides: bundled(node-strip-ansi) = 6.0.1
Provides: bundled(node-strip-ansi) = 7.1.0
Provides: bundled(node-supports-color) = 9.4.0
@@ -713,6 +728,8 @@ find -name \*~ -print0 -delete
# abnormalities from patching
find \( -name \*.js.orig -or -name \*.md.orig -or -name \*.1.orig \) -delete
%build
# normalize shebang
%if %{node_version_number} >= 12
@@ -1072,7 +1089,6 @@ update-alternatives --remove npm-default %{_bindir}/npm%{node_version_number}
update-alternatives --remove npx-default %{_bindir}/npx%{node_version_number}
%else
%pre
# remove files that are no longer owned but provided by update-alternatives
if ! [ -L %{_mandir}/man1/node.1%{ext_man} ]; then