import UBI nodejs-18.20.8-1.module+el9.6.0+23094+56b98c98

This commit is contained in:
eabdullin 2025-06-11 14:53:15 +00:00
parent 8ebd5930a6
commit ab243ef675
6 changed files with 3932 additions and 28 deletions

4
.gitignore vendored
View File

@ -1,5 +1,5 @@
SOURCES/cjs-module-lexer-1.2.2.tar.gz SOURCES/cjs-module-lexer-1.2.2.tar.gz
SOURCES/icu4c-74_2-src.tgz SOURCES/icu4c-74_2-src.tgz
SOURCES/node-v18.20.6-stripped.tar.gz SOURCES/node-v18.20.8-stripped.tar.gz
SOURCES/undici-5.28.5.tar.gz SOURCES/undici-5.29.0.tar.gz
SOURCES/wasi-sdk-11.0-linux.tar.gz SOURCES/wasi-sdk-11.0-linux.tar.gz

View File

@ -1,5 +1,5 @@
164f7f39841415284b0280a648c43bd7ea1615ac SOURCES/cjs-module-lexer-1.2.2.tar.gz 164f7f39841415284b0280a648c43bd7ea1615ac SOURCES/cjs-module-lexer-1.2.2.tar.gz
43a8d688a3a6bc8f0f8c5e699d0ef7a905d24314 SOURCES/icu4c-74_2-src.tgz 43a8d688a3a6bc8f0f8c5e699d0ef7a905d24314 SOURCES/icu4c-74_2-src.tgz
838d4f6468dbc644da2f162027daf8f6f02187f0 SOURCES/node-v18.20.6-stripped.tar.gz 685f226bba089c59fa90155f7fd70f2ae3b4036f SOURCES/node-v18.20.8-stripped.tar.gz
ccd4e9c2e825305395469f4a1442eee55d23d54d SOURCES/undici-5.28.5.tar.gz f748d4d3137a367cbfb5684784df7dfe0e5acc2d SOURCES/undici-5.29.0.tar.gz
ff114dd45b4efeeae7afe4621bfc6f886a475b4b SOURCES/wasi-sdk-11.0-linux.tar.gz ff114dd45b4efeeae7afe4621bfc6f886a475b4b SOURCES/wasi-sdk-11.0-linux.tar.gz

View File

@ -5,25 +5,9 @@ Subject: [PATCH] Disable running gyp on shared deps
Signed-off-by: rpm-build <rpm-build> Signed-off-by: rpm-build <rpm-build>
--- ---
Makefile | 2 +-
node.gyp | 17 ----------------- node.gyp | 17 -----------------
2 files changed, 1 insertion(+), 18 deletions(-) 2 files changed, 1 insertion(+), 18 deletions(-)
diff --git a/Makefile b/Makefile
index 0be0659..3c44201 100644
--- a/Makefile
+++ b/Makefile
@@ -169,7 +169,7 @@ with-code-cache test-code-cache:
$(warning '$@' target is a noop)
out/Makefile: config.gypi common.gypi node.gyp \
- deps/uv/uv.gyp deps/llhttp/llhttp.gyp deps/zlib/zlib.gyp \
+ deps/llhttp/llhttp.gyp \
deps/simdutf/simdutf.gyp deps/ada/ada.gyp \
tools/v8_gypfiles/toolchain.gypi tools/v8_gypfiles/features.gypi \
tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp
diff --git a/node.gyp b/node.gyp
index cf52281..c33b57b 100644
--- a/node.gyp --- a/node.gyp
+++ b/node.gyp +++ b/node.gyp
@@ -430,23 +430,6 @@ @@ -430,23 +430,6 @@

60
SOURCES/test-runner.sh Executable file
View File

@ -0,0 +1,60 @@
#!/bin/bash
NODE_BIN="$1"
PARENT_TEST_FOLDER="$2"
TEST_LIST_FILE="$3"
# At most 10 min per test
TIMEOUT_DURATION=600
# Exit code
FINAL_RESULT=0
ARCH=$(uname -m)
echo "Started test run:"
# Run the list of test
while IFS= read -r test_line; do
# ignore commented lines
if [[ "$test_line" =~ ^# ]]; then
continue
fi
# If test has specified ARCH which it should be skipped
# Extract it
TEST_PATH=$(echo "$test_line" | awk '{print $1}')
IGNORE_ARCHES=$(echo "$test_line" |\
awk '{for (i=2; i<=NF; i++) printf "%s ", $i; print ""}')
# Skip test for specified ARCH
for ARCH_IGNORE in $IGNORE_ARCHES; do
if [[ "$ARCH_IGNORE" == "$ARCH" ]]; then
continue 2
fi
done
# Construct test path
TEST_SCRIPT="$PARENT_TEST_FOLDER/$TEST_PATH"
if [ ! -f "$TEST_SCRIPT" ]; then
echo "Test script not found: $TEST_SCRIPT"
continue
fi
TEST_OUTPUT=$(timeout "$TIMEOUT_DURATION" "$NODE_BIN" "$TEST_SCRIPT" 2>&1)
TEST_RESULT=$?
# Handle test result
if [ $TEST_RESULT -ne 0 ]; then
FINAL_RESULT=1
if [ $TEST_RESULT -eq 124 ]; then
echo "Test timed out: $TEST_SCRIPT"
else
echo "Test failed: $TEST_SCRIPT"
fi
echo "Test failure message:"
echo "$TEST_OUTPUT"
fi
done < "$TEST_LIST_FILE"
if [ $FINAL_RESULT -eq 0 ]; then
echo "All tests succesfully passed."
fi
exit $FINAL_RESULT

3839
SOURCES/test-should-pass.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@ -29,7 +29,7 @@
# This is used by both the nodejs package and the npm subpackage that # This is used by both the nodejs package and the npm subpackage that
# has a separate version - the name is special so that rpmdev-bumpspec # has a separate version - the name is special so that rpmdev-bumpspec
# will bump this rather than adding .1 to the end. # will bump this rather than adding .1 to the end.
%global baserelease 2 %global baserelease 1
%{?!_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}} %{?!_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
@ -41,7 +41,7 @@
%global nodejs_epoch 1 %global nodejs_epoch 1
%global nodejs_major 18 %global nodejs_major 18
%global nodejs_minor 20 %global nodejs_minor 20
%global nodejs_patch 6 %global nodejs_patch 8
%global nodejs_abi %{nodejs_major}.%{nodejs_minor} %global nodejs_abi %{nodejs_major}.%{nodejs_minor}
# nodejs_soversion - from NODE_MODULE_VERSION in src/node_version.h # nodejs_soversion - from NODE_MODULE_VERSION in src/node_version.h
%global nodejs_soversion 108 %global nodejs_soversion 108
@ -110,7 +110,7 @@
# simduft from deps/simdutf/simdutf.h # simduft from deps/simdutf/simdutf.h
%global simduft_major 5 %global simduft_major 5
%global simduft_minor 6 %global simduft_minor 6
%global simduft_patch 0 %global simduft_patch 4
%global simduft_version %{simduft_major}.%{simduft_minor}.%{simduft_patch} %global simduft_version %{simduft_major}.%{simduft_minor}.%{simduft_patch}
# ada from deps/ada/ada.h # ada from deps/ada/ada.h
@ -160,6 +160,10 @@ Source2: btest402.js
Source3: https://github.com/unicode-org/icu/releases/download/release-%{icu_major}-%{icu_minor}/icu4c-%{icu_major}_%{icu_minor}-src.tgz Source3: https://github.com/unicode-org/icu/releases/download/release-%{icu_major}-%{icu_minor}/icu4c-%{icu_major}_%{icu_minor}-src.tgz
Source100: %{name}-tarball.sh Source100: %{name}-tarball.sh
# Test runner for native tests during build
Source300: test-runner.sh
Source301: test-should-pass.txt
# The native module Requires generator remains in the nodejs SRPM, so it knows # The native module Requires generator remains in the nodejs SRPM, so it knows
# the nodejs and v8 versions. The remainder has migrated to the # the nodejs and v8 versions. The remainder has migrated to the
# nodejs-packaging SRPM. # nodejs-packaging SRPM.
@ -181,10 +185,10 @@ Source101: cjs-module-lexer-1.2.2.tar.gz
Source111: https://github.com/WebAssembly/wasi-sdk/archive/wasi-sdk-11/wasi-sdk-11.0-linux.tar.gz Source111: https://github.com/WebAssembly/wasi-sdk/archive/wasi-sdk-11/wasi-sdk-11.0-linux.tar.gz
# Version: jq '.version' deps/undici/src/package.json # Version: jq '.version' deps/undici/src/package.json
# Original: https://github.com/nodejs/undici/archive/refs/tags/v5.28.5.tar.gz # Original: https://github.com/nodejs/undici/archive/refs/tags/v5.29.0.tar.gz
# Adjustments: rm -f undici-5.28.5/lib/llhttp/llhttp*.wasm # Adjustments: rm -f undici-5.29.0/lib/llhttp/llhttp*.wasm
# Build uses alpine image, see alpine for sources for wasi-sdk # Build uses alpine image, see alpine for sources for wasi-sdk
Source102: undici-5.28.5.tar.gz Source102: undici-5.29.0.tar.gz
# Disable running gyp on bundled deps we don't use # Disable running gyp on bundled deps we don't use
Patch1: 0001-Disable-running-gyp-on-shared-deps.patch Patch1: 0001-Disable-running-gyp-on-shared-deps.patch
@ -290,6 +294,12 @@ Provides: bundled(histogram) = %{histogram_version}
Provides: bundled(simduft) = %{simduft_version} Provides: bundled(simduft) = %{simduft_version}
Provides: bundled(ada) = %{ada_version} Provides: bundled(ada) = %{ada_version}
# Node.js bundles undici
Provides: bundled(nodejs-undici) = 5.29.0
# Node.js bundles cjs-module-lexer
Provides: bundled(nodejs-cjs-module-lexer) = 1.2.2
# Make sure we keep NPM up to date when we update Node.js # Make sure we keep NPM up to date when we update Node.js
Recommends: npm >= %{npm_epoch}:%{npm_version}-%{npm_release}%{?dist} Recommends: npm >= %{npm_epoch}:%{npm_version}-%{npm_release}%{?dist}
@ -552,6 +562,13 @@ install -Dpm0644 -t %{buildroot}%{icudatadir} deps/icu/source/converted/*
%check %check
#run unit test that should pass from list
LD_LIBRARY_PATH=%{buildroot}%{_libdir} \
bash %{SOURCE300} \
%{buildroot}/%{_bindir}/node \
%{_builddir}/node-v%{nodejs_version}/test/ \
%{SOURCE301}
# Fail the build if the versions don't match # Fail the build if the versions don't match
%{buildroot}/%{_bindir}/node -e "require('assert').equal(process.versions.node, '%{nodejs_version}')" %{buildroot}/%{_bindir}/node -e "require('assert').equal(process.versions.node, '%{nodejs_version}')"
%{buildroot}/%{_bindir}/node -e "require('assert').equal(process.versions.v8.replace(/-node\.\d+$/, ''), '%{v8_version}')" %{buildroot}/%{_bindir}/node -e "require('assert').equal(process.versions.v8.replace(/-node\.\d+$/, ''), '%{v8_version}')"
@ -638,13 +655,17 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} \
%changelog %changelog
* Mon May 05 2025 Andrei Radchenko <aradchen@redhat.com> - 1:18.20.8-1
- Update to version 18.20.8
Resolves: RHEL-88884 RHEL-89802
* Thu Mar 06 2025 Andrei Radchenko <aradchen@redhat.com> - 1:18.20.6-2 * Thu Mar 06 2025 Andrei Radchenko <aradchen@redhat.com> - 1:18.20.6-2
- Disable npm's update-notifier - Disable npm's update-notifier
Resolves: RHEL-81090 Resolves: RHEL-81091
* Fri Jan 31 2025 Tomáš Juhász <tjuhasz@redhat.com> - 1:18.20.6-1 * Fri Jan 31 2025 Tomáš Juhász <tjuhasz@redhat.com> - 1:18.20.6-1
- Update to version 18.20.6 - Update to version 18.20.6
Resolves: RHEL-76803 Resolves: RHEL-76801
Fixes: CVE-2025-23085 Fixes: CVE-2025-23085
* Mon Aug 05 2024 Honza Horak <hhorak@redhat.com> - 1:18.20.4-1 * Mon Aug 05 2024 Honza Horak <hhorak@redhat.com> - 1:18.20.4-1