import nodejs-18.16.1-1.module+el9.2.0.z+19424+78951f07

This commit is contained in:
eabdullin 2023-08-02 10:12:05 +00:00
parent f1bcb90b05
commit 844cf98431
6 changed files with 63 additions and 16792 deletions

4
.gitignore vendored
View File

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

View File

@ -1,6 +1,6 @@
b0a91341ecf6c68a9d59a1c57d000fbbcc771679 SOURCES/cjs-module-lexer-1.2.2.tar.gz b0a91341ecf6c68a9d59a1c57d000fbbcc771679 SOURCES/cjs-module-lexer-1.2.2.tar.gz
a97546f0119c37a3526143bc29fb573a4417ff84 SOURCES/icu4c-72_1-src.tgz a97546f0119c37a3526143bc29fb573a4417ff84 SOURCES/icu4c-72_1-src.tgz
f4cd3bd79f9ed923f8fd85ac75cc270a91cae6ea SOURCES/node-v18.14.2-stripped.tar.gz e5c7cb54ade307bf4fb282796322bf65be20a5c7 SOURCES/node-v18.16.1-stripped.tar.gz
0b3e890fd45200fb3a2fdc14408cc51e23990480 SOURCES/undici-5.20.0.tar.gz a3c9593ddf15f83a48135641b1985adad4f2a669 SOURCES/undici-5.21.0.tar.gz
ff114dd45b4efeeae7afe4621bfc6f886a475b4b SOURCES/wasi-sdk-11.0-linux.tar.gz ff114dd45b4efeeae7afe4621bfc6f886a475b4b SOURCES/wasi-sdk-11.0-linux.tar.gz
c29e21be754c26cac4bf99848c5b1f4e8564e248 SOURCES/wasi-sdk-14.0-linux.tar.gz c29e21be754c26cac4bf99848c5b1f4e8564e248 SOURCES/wasi-sdk-14.0-linux.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> From: rpm-build <rpm-build>
Date: Tue, 30 May 2023 13:12:35 +0200 Date: Tue, 30 May 2023 13:12:35 +0200
Subject: [PATCH] Disable running gyp on shared deps 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(-) 2 files changed, 1 insertion(+), 18 deletions(-)
diff --git a/Makefile b/Makefile diff --git a/Makefile b/Makefile
index 9401346..c9d3da2 100644 index 0be0659..3c44201 100644
--- a/Makefile --- a/Makefile
+++ b/Makefile +++ b/Makefile
@@ -169,7 +169,7 @@ with-code-cache test-code-cache: @@ -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 \ out/Makefile: config.gypi common.gypi node.gyp \
- deps/uv/uv.gyp deps/llhttp/llhttp.gyp deps/zlib/zlib.gyp \ - deps/uv/uv.gyp deps/llhttp/llhttp.gyp deps/zlib/zlib.gyp \
+ deps/llhttp/llhttp.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/toolchain.gypi tools/v8_gypfiles/features.gypi \
tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp
diff --git a/node.gyp b/node.gyp diff --git a/node.gyp b/node.gyp
index cec24ae..13af00f 100644 index cf52281..c33b57b 100644
--- a/node.gyp --- a/node.gyp
+++ b/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 }, # 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

@ -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 3 %global baserelease 1
%{?!_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}} %{?!_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
@ -40,8 +40,8 @@
# than a Fedora release lifecycle. # than a Fedora release lifecycle.
%global nodejs_epoch 1 %global nodejs_epoch 1
%global nodejs_major 18 %global nodejs_major 18
%global nodejs_minor 14 %global nodejs_minor 16
%global nodejs_patch 2 %global nodejs_patch 1
%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
@ -68,13 +68,13 @@
%global c_ares_version 1.19.1 %global c_ares_version 1.19.1
# llhttp - from deps/llhttp/include/llhttp.h # llhttp - from deps/llhttp/include/llhttp.h
%global llhttp_version 6.0.10 %global llhttp_version 6.0.11
# libuv - from deps/uv/include/uv/version.h # libuv - from deps/uv/include/uv/version.h
%global libuv_version 1.44.2 %global libuv_version 1.44.2
# nghttp2 - from deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h # nghttp2 - from deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h
%global nghttp2_version 1.51.0 %global nghttp2_version 1.52.0
# nghttp3 - from deps/ngtcp2/nghttp3/lib/includes/nghttp3/version.h # nghttp3 - from deps/ngtcp2/nghttp3/lib/includes/nghttp3/version.h
%global nghttp3_major 0 %global nghttp3_major 0
@ -108,11 +108,14 @@
%endif %endif
# simduft from deps/simdutf/simdutf.h # simduft from deps/simdutf/simdutf.h
%global simduft_major 2 %global simduft_major 3
%global simduft_minor 0 %global simduft_minor 2
%global simduft_patch 7 %global simduft_patch 2
%global simduft_version %{simduft_major}.%{simduft_minor}.%{simduft_patch} %global simduft_version %{simduft_major}.%{simduft_minor}.%{simduft_patch}
# ada from deps/ada/ada.h
%global ada_version 1.0.4
# OpenSSL minimum version # OpenSSL minimum version
%global openssl_minimum 1:1.1.1 %global openssl_minimum 1:1.1.1
@ -123,7 +126,7 @@
# npm - from deps/npm/package.json # npm - from deps/npm/package.json
%global npm_epoch 1 %global npm_epoch 1
%global npm_version 9.5.0 %global npm_version 9.5.1
# In order to avoid needing to keep incrementing the release version for the # 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 # main package forever, we will just construct one for npm that is guaranteed
@ -132,7 +135,7 @@
%global npm_release %{nodejs_epoch}.%{nodejs_major}.%{nodejs_minor}.%{nodejs_patch}.%{nodejs_release} %global npm_release %{nodejs_epoch}.%{nodejs_major}.%{nodejs_minor}.%{nodejs_patch}.%{nodejs_release}
# uvwasi - from deps/uvwasi/include/uvwasi.h # uvwasi - from deps/uvwasi/include/uvwasi.h
%global uvwasi_version 0.0.14 %global uvwasi_version 0.0.15
# histogram_c - assumed from timestamps # histogram_c - assumed from timestamps
%global histogram_version 0.11.2 %global histogram_version 0.11.2
@ -162,6 +165,9 @@ Source100: %{name}-tarball.sh
# nodejs-packaging SRPM. # nodejs-packaging SRPM.
Source7: nodejs_native.attr 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. # 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. # 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. # Recipes for creating these blobs are included in the sources.
@ -175,16 +181,15 @@ 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.20.0.tar.gz # Original: https://github.com/nodejs/undici/archive/refs/tags/v5.21.0.tar.gz
# Adjustments: rm -f undici-5.20.0/lib/llhttp/llhttp*.wasm # Adjustments: rm -f undici-5.20.0/lib/llhttp/llhttp*.wasm
# wasi-sdk version can be found in Dockerfile # wasi-sdk version can be found in Dockerfile
# https://github.com/nodejs/undici/blob/v5.8.2/build/Dockerfile # https://github.com/nodejs/undici/blob/v5.21.0/build/Dockerfile
Source102: undici-5.20.0.tar.gz Source102: undici-5.21.0.tar.gz
Source112: https://github.com/WebAssembly/wasi-sdk/archive/wasi-sdk-14/wasi-sdk-14.0-linux.tar.gz Source112: https://github.com/WebAssembly/wasi-sdk/archive/wasi-sdk-14/wasi-sdk-14.0-linux.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
Patch2: 0002-deps-update-c-ares-to-1.19.1.patch
BuildRequires: make BuildRequires: make
BuildRequires: python3-devel BuildRequires: python3-devel
@ -284,6 +289,7 @@ Provides: bundled(icu) = %{icu_version}
Provides: bundled(uvwasi) = %{uvwasi_version} Provides: bundled(uvwasi) = %{uvwasi_version}
Provides: bundled(histogram) = %{histogram_version} Provides: bundled(histogram) = %{histogram_version}
Provides: bundled(simduft) = %{simduft_version} Provides: bundled(simduft) = %{simduft_version}
Provides: bundled(ada) = %{ada_version}
# 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}
@ -370,6 +376,22 @@ rm -rf deps/v8/third_party/jinja2
rm -rf tools/inspector_protocol/jinja2 rm -rf tools/inspector_protocol/jinja2
# Replace any instances of unversioned python' with python3 # 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 '%{SOURCE102}' deps/undici/src/package.json
%if %{with python3_fixup} %if %{with python3_fixup}
pathfix.py -i %{__python3} -pn $(find -type f ! -name "*.js") pathfix.py -i %{__python3} -pn $(find -type f ! -name "*.js")
find . -type f -exec sed -i "s~/usr\/bin\/env python~/usr/bin/python3~" {} \; find . -type f -exec sed -i "s~/usr\/bin\/env python~/usr/bin/python3~" {} \;
@ -513,15 +535,14 @@ find %{buildroot}%{_prefix}/lib/node_modules/npm \
chmod 0755 %{buildroot}%{_prefix}/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/node-gyp chmod 0755 %{buildroot}%{_prefix}/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/node-gyp
chmod 0755 %{buildroot}%{_prefix}/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js chmod 0755 %{buildroot}%{_prefix}/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js
# 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 # Drop the NPM default configuration in place
mkdir -p %{buildroot}%{_sysconfdir} mkdir -p %{buildroot}%{_sysconfdir}
cp %{SOURCE1} %{buildroot}%{_sysconfdir}/npmrc 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 the full-icu data files
install -Dpm0644 -t %{buildroot}%{icudatadir} deps/icu/source/converted/* install -Dpm0644 -t %{buildroot}%{icudatadir} deps/icu/source/converted/*
@ -556,7 +577,7 @@ NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules:%{buildroot}%{_prefix}/lib/nod
%{_rpmconfigdir}/fileattrs/nodejs_native.attr %{_rpmconfigdir}/fileattrs/nodejs_native.attr
%{_rpmconfigdir}/nodejs_native.req %{_rpmconfigdir}/nodejs_native.req
%license LICENSE %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* %doc %{_mandir}/man1/node.1*
@ -576,7 +597,6 @@ NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules:%{buildroot}%{_prefix}/lib/nod
%{_bindir}/npx %{_bindir}/npx
%{_prefix}/lib/node_modules/npm %{_prefix}/lib/node_modules/npm
%config(noreplace) %{_sysconfdir}/npmrc %config(noreplace) %{_sysconfdir}/npmrc
%{_prefix}/etc/npmrc
%ghost %{_sysconfdir}/npmignore %ghost %{_sysconfdir}/npmignore
%doc %{_mandir}/man1/npm*.1* %doc %{_mandir}/man1/npm*.1*
%doc %{_mandir}/man1/npx.1* %doc %{_mandir}/man1/npx.1*
@ -609,6 +629,13 @@ NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules:%{buildroot}%{_prefix}/lib/nod
%changelog %changelog
* Wed Jul 12 2023 Jan Staněk <jstanek@redhat.com> - 1:18.16.1-1
- Rebase to 18.16.1
Resolves: rhbz#2188292 rhbz#2187683
Resolves: CVE-2023-30581 CVE-2023-30588 CVE-2023-30589 CVE-2023-30590
- Replace /usr/etc/npmrc symlink with builtin configuration
Resolves: rhbz#2222285
* Tue May 30 2023 Jan Staněk <jstanek@redhat.com> - 1:18.14.2-3 * Tue May 30 2023 Jan Staněk <jstanek@redhat.com> - 1:18.14.2-3
- Update bundled c-ares to 1.19.1 - Update bundled c-ares to 1.19.1
Resolves: CVE-2023-31124 CVE-2023-31130 CVE-2023-31147 CVE-2023-32067 Resolves: CVE-2023-31124 CVE-2023-31130 CVE-2023-31147 CVE-2023-32067