import UBI nodejs-18.16.1-1.module+el8.8.0+19438+94e84959

This commit is contained in:
eabdullin 2023-08-08 13:49:30 +00:00
parent c3a7adcfdb
commit a77e3470cc
6 changed files with 68 additions and 16812 deletions

4
.gitignore vendored
View File

@ -1,6 +1,6 @@
SOURCES/cjs-module-lexer-1.2.2.tar.gz
SOURCES/icu4c-72_1-src.tgz
SOURCES/node-v18.14.2-stripped.tar.gz
SOURCES/undici-5.20.0.tar.gz
SOURCES/node-v18.16.1-stripped.tar.gz
SOURCES/undici-5.21.0.tar.gz
SOURCES/wasi-sdk-wasi-sdk-11.tar.gz
SOURCES/wasi-sdk-wasi-sdk-14.tar.gz

View File

@ -1,6 +1,6 @@
6976e77068429bd0b47b573793289e065ceb6b27 SOURCES/cjs-module-lexer-1.2.2.tar.gz
a97546f0119c37a3526143bc29fb573a4417ff84 SOURCES/icu4c-72_1-src.tgz
f0f8d1ceb4dc2bf7170ac999d731611f776b0af3 SOURCES/node-v18.14.2-stripped.tar.gz
0b3e890fd45200fb3a2fdc14408cc51e23990480 SOURCES/undici-5.20.0.tar.gz
e5c7cb54ade307bf4fb282796322bf65be20a5c7 SOURCES/node-v18.16.1-stripped.tar.gz
a3c9593ddf15f83a48135641b1985adad4f2a669 SOURCES/undici-5.21.0.tar.gz
8979d177dd62e3b167a6fd7dc7185adb0128c439 SOURCES/wasi-sdk-wasi-sdk-11.tar.gz
900a50a32f0079d53c299db92b88bb3c5d2022b8 SOURCES/wasi-sdk-wasi-sdk-14.tar.gz

View File

@ -1,4 +1,4 @@
From 030bbedf7d79025848122081e13fe94b0324ad88 Mon Sep 17 00:00:00 2001
From c73e0892eb1d0aa2df805618c019dc5c96b79705 Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Tue, 30 May 2023 13:12:35 +0200
Subject: [PATCH] Disable running gyp on shared deps
@ -10,7 +10,7 @@ Signed-off-by: rpm-build <rpm-build>
2 files changed, 1 insertion(+), 18 deletions(-)
diff --git a/Makefile b/Makefile
index 9401346..c9d3da2 100644
index 0be0659..3c44201 100644
--- a/Makefile
+++ b/Makefile
@@ -169,7 +169,7 @@ with-code-cache test-code-cache:
@ -19,14 +19,14 @@ index 9401346..c9d3da2 100644
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/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 cec24ae..13af00f 100644
index cf52281..c33b57b 100644
--- a/node.gyp
+++ b/node.gyp
@@ -429,23 +429,6 @@
@@ -430,23 +430,6 @@
],
},
],
@ -51,5 +51,5 @@ index cec24ae..13af00f 100644
],
}, # node_core_target_name
--
2.40.1
2.41.0

File diff suppressed because it is too large Load Diff

5
SOURCES/npmrc.builtin.in Normal file
View File

@ -0,0 +1,5 @@
# This is the distibution-level configuration file for npm.
# To configure NPM on a system level, use the globalconfig below (defaults to @SYSCONFDIR@/npmrc).
# vim:set filetype=dosini:
globalconfig=@SYSCONFDIR@/npmrc

View File

@ -30,7 +30,7 @@
# 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
# will bump this rather than adding .1 to the end.
%global baserelease 3
%global baserelease 1
%{?!_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
@ -41,8 +41,8 @@
# than a Fedora release lifecycle.
%global nodejs_epoch 1
%global nodejs_major 18
%global nodejs_minor 14
%global nodejs_patch 2
%global nodejs_minor 16
%global nodejs_patch 1
%global nodejs_abi %{nodejs_major}.%{nodejs_minor}
# nodejs_soversion - from NODE_MODULE_VERSION in src/node_version.h
%global nodejs_soversion 108
@ -69,10 +69,7 @@
%global c_ares_version 1.19.1
# llhttp - from deps/llhttp/include/llhttp.h
%global llhttp_major 6
%global llhttp_minor 0
%global llhttp_patch 10
%global llhttp_version %{llhttp_major}.%{llhttp_minor}.%{llhttp_patch}
%global llhttp_version 6.0.11
# libuv - from deps/uv/include/uv/version.h
%global libuv_major 1
@ -81,10 +78,7 @@
%global libuv_version %{libuv_major}.%{libuv_minor}.%{libuv_patch}
# nghttp2 - from deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h
%global nghttp2_major 1
%global nghttp2_minor 51
%global nghttp2_patch 0
%global nghttp2_version %{nghttp2_major}.%{nghttp2_minor}.%{nghttp2_patch}
%global nghttp2_version 1.52.0
# nghttp3 - from deps/ngtcp2/nghttp3/lib/includes/nghttp3/version.h
%global nghttp3_major 0
@ -118,11 +112,14 @@
%endif
# simduft from deps/simdutf/simdutf.h
%global simduft_major 2
%global simduft_minor 0
%global simduft_patch 7
%global simduft_major 3
%global simduft_minor 2
%global simduft_patch 2
%global simduft_version %{simduft_major}.%{simduft_minor}.%{simduft_patch}
# ada from deps/ada/ada.h
%global ada_version 1.0.4
# OpenSSL minimum version
%global openssl_minimum 1:1.1.1
@ -136,22 +133,7 @@
# npm - from deps/npm/package.json
%global npm_epoch 1
%global npm_major 9
%global npm_minor 5
%global npm_patch 0
%global npm_version %{npm_major}.%{npm_minor}.%{npm_patch}
# uvwasi - from deps/uvwasi/include/uvwasi.h
%global uvwasi_major 0
%global uvwasi_minor 0
%global uvwasi_patch 13
%global uvwasi_version %{uvwasi_major}.%{uvwasi_minor}.%{uvwasi_patch}
# histogram_c - assumed from timestamps
%global histogram_major 0
%global histogram_minor 11
%global histogram_patch 2
%global histogram_version %{histogram_major}.%{histogram_minor}.%{histogram_patch}
%global npm_version 9.5.1
# In order to avoid needing to keep incrementing the release version for the
# main package forever, we will just construct one for npm that is guaranteed
@ -162,6 +144,12 @@
# Node.js 16.9.1 and later comes with an experimental package management tool
%global corepack_version 0.10.0
# uvwasi - from deps/uvwasi/include/uvwasi.h
%global uvwasi_version 0.0.15
# histogram_c - assumed from timestamps
%global histogram_version 0.11.2
Name: nodejs
Epoch: %{nodejs_epoch}
Version: %{nodejs_version}
@ -187,6 +175,9 @@ Source100: %{name}-tarball.sh
# nodejs-packaging SRPM.
Source7: nodejs_native.attr
# Configure npm to look into /etc for configuration
Source8: npmrc.builtin.in
# These are full sources for dependencies included as WASM blobs in the source of Node itself.
# Note: These sources would also include pre-compiled WASM blobs… so they are adjusted not to.
# Recipes for creating these blobs are included in the sources.
@ -200,16 +191,15 @@ Source101: cjs-module-lexer-1.2.2.tar.gz
Source102: https://github.com/WebAssembly/wasi-sdk/archive/wasi-sdk-11/wasi-sdk-wasi-sdk-11.tar.gz
# Version: jq '.version' deps/undici/src/package.json
# Original: https://github.com/nodejs/undici/archive/refs/tags/v5.20.0.tar.gz
# Adjustments: rm -f undici-5.20.0/lib/llhttp/llhttp*.wasm*
Source111: undici-5.20.0.tar.gz
# Original: https://github.com/nodejs/undici/archive/refs/tags/v5.21.0.tar.gz
# Adjustments: rm -f undici-5.21.0/lib/llhttp/llhttp*.wasm*
Source111: undici-5.21.0.tar.gz
# The WASM blob was made using wasi-sdk v14; compiler libraries are linked in.
# Version source: build/Dockerfile
Source112: https://github.com/WebAssembly/wasi-sdk/archive/wasi-sdk-14/wasi-sdk-wasi-sdk-14.tar.gz
# Disable running gyp on bundled deps we don't use
Patch1: 0001-Disable-running-gyp-on-shared-deps.patch
Patch2: 0002-deps-update-c-ares-to-1.19.1.patch
BuildRequires: make
BuildRequires: python3-devel
@ -310,6 +300,7 @@ Provides: bundled(uvwasi) = %{uvwasi_version}
Provides: bundled(histogram) = %{histogram_version}
Provides: bundled(corepack) = %{corepack_version}
Provides: bundled(simduft) = %{simduft_version}
Provides: bundled(ada) = %{ada_version}
# Make sure we keep NPM up to date when we update Node.js
%if 0%{?rhel} < 8
@ -403,6 +394,22 @@ rm -rf deps/v8/third_party/jinja2
rm -rf tools/inspector_protocol/jinja2
# Replace any instances of unversioned python' with python3
# check for correct versions of dependencies we are bundling
check_wasm_dep() {
local -r name="$1" source="$2" packagejson="$3"
local -r expected_version="$(jq -r '.version' "${packagejson}")"
if ls "${source}"|grep -q --fixed-strings "${expected_version}"; then
printf '%s version matches\n' "${name}" >&2
else
printf '%s version MISMATCH: %s !~ %s\n' "${name}" "${expected_version}" "${source}" >&2
return 1
fi
}
check_wasm_dep cjs-module-lexer '%{SOURCE101}' deps/cjs-module-lexer/package.json
check_wasm_dep undici '%{SOURCE111}' deps/undici/src/package.json
%if %{with python3_fixup}
pathfix.py -i %{__python3} -pn $(find -type f ! -name "*.js")
find . -type f -exec sed -i "s~/usr\/bin\/env python~/usr/bin/python3~" {} \;
@ -561,15 +568,14 @@ chmod 0755 %{buildroot}%{_prefix}/lib/node_modules/npm/node_modules/node-gyp/bin
# automatic dependency on /usr/bin/pwsh that we cannot satisfy.
chmod -x %{buildroot}%{_prefix}/lib/node_modules/corepack/shims/*.ps1
# Drop the NPM builtin configuration in place
sed -e 's#@SYSCONFDIR@#%{_sysconfdir}#g' \
%{SOURCE8} > %{buildroot}%{_prefix}/lib/node_modules/npm/npmrc
# Drop the NPM default configuration in place
mkdir -p %{buildroot}%{_sysconfdir}
cp %{SOURCE1} %{buildroot}%{_sysconfdir}/npmrc
# NPM upstream expects it to be in /usr/etc/npmrc, so we'll put a symlink here
# This is done in the interests of keeping /usr read-only.
mkdir -p %{buildroot}%{_prefix}/etc
ln -s %{_sysconfdir}/npmrc %{buildroot}%{_prefix}/etc/npmrc
# Install the full-icu data files
install -Dpm0644 -t %{buildroot}%{icudatadir} deps/icu/source/converted/*
@ -673,7 +679,7 @@ end
%{_rpmconfigdir}/fileattrs/nodejs_native.attr
%{_rpmconfigdir}/nodejs_native.req
%license LICENSE
%doc AUTHORS CHANGELOG.md onboarding.md GOVERNANCE.md README.md
%doc CHANGELOG.md onboarding.md GOVERNANCE.md README.md
%doc %{_mandir}/man1/node.1*
@ -696,7 +702,6 @@ end
%{_bindir}/npx
%{_prefix}/lib/node_modules/npm
%config(noreplace) %{_sysconfdir}/npmrc
%{_prefix}/etc/npmrc
%ghost %{_sysconfdir}/npmignore
%doc %{_mandir}/man1/npm*.1*
%doc %{_mandir}/man1/npx.1*
@ -729,6 +734,13 @@ end
%changelog
* Wed Jul 12 2023 Jan Staněk <jstanek@redhat.com> - 1:18.16.1-1
- Rebase to 18.16.1
Resolves: rhbz#2188290 rhbz#2166926
Resolves: CVE-2023-30581 CVE-2023-30588 CVE-2023-30589 CVE-2023-30590
- Replace /usr/etc/npmrc symlink with builtin configuration
Resolves: rhbz#2222287
* Tue May 30 2023 Jan Staněk <jstanek@redhat.com> - 1:18.14.2-3
- Update bundled c-ares to 1.19.1
Resolves: CVE-2022-4904