|
|
@ -30,7 +30,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}}
|
|
|
|
|
|
|
|
|
|
|
@ -41,8 +41,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
|
|
|
@ -69,10 +69,7 @@
|
|
|
|
%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_major 6
|
|
|
|
%global llhttp_version 6.0.11
|
|
|
|
%global llhttp_minor 0
|
|
|
|
|
|
|
|
%global llhttp_patch 10
|
|
|
|
|
|
|
|
%global llhttp_version %{llhttp_major}.%{llhttp_minor}.%{llhttp_patch}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# libuv - from deps/uv/include/uv/version.h
|
|
|
|
# libuv - from deps/uv/include/uv/version.h
|
|
|
|
%global libuv_major 1
|
|
|
|
%global libuv_major 1
|
|
|
@ -81,10 +78,7 @@
|
|
|
|
%global libuv_version %{libuv_major}.%{libuv_minor}.%{libuv_patch}
|
|
|
|
%global libuv_version %{libuv_major}.%{libuv_minor}.%{libuv_patch}
|
|
|
|
|
|
|
|
|
|
|
|
# nghttp2 - from deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h
|
|
|
|
# nghttp2 - from deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h
|
|
|
|
%global nghttp2_major 1
|
|
|
|
%global nghttp2_version 1.52.0
|
|
|
|
%global nghttp2_minor 51
|
|
|
|
|
|
|
|
%global nghttp2_patch 0
|
|
|
|
|
|
|
|
%global nghttp2_version %{nghttp2_major}.%{nghttp2_minor}.%{nghttp2_patch}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
@ -118,11 +112,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
|
|
|
|
|
|
|
|
|
|
|
@ -136,22 +133,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
# npm - from deps/npm/package.json
|
|
|
|
# npm - from deps/npm/package.json
|
|
|
|
%global npm_epoch 1
|
|
|
|
%global npm_epoch 1
|
|
|
|
%global npm_major 9
|
|
|
|
%global npm_version 9.5.1
|
|
|
|
%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}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
@ -162,6 +144,12 @@
|
|
|
|
# Node.js 16.9.1 and later comes with an experimental package management tool
|
|
|
|
# Node.js 16.9.1 and later comes with an experimental package management tool
|
|
|
|
%global corepack_version 0.10.0
|
|
|
|
%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
|
|
|
|
Name: nodejs
|
|
|
|
Epoch: %{nodejs_epoch}
|
|
|
|
Epoch: %{nodejs_epoch}
|
|
|
|
Version: %{nodejs_version}
|
|
|
|
Version: %{nodejs_version}
|
|
|
@ -187,6 +175,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.
|
|
|
@ -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
|
|
|
|
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
|
|
|
|
# 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.21.0/lib/llhttp/llhttp*.wasm*
|
|
|
|
Source111: undici-5.20.0.tar.gz
|
|
|
|
Source111: undici-5.21.0.tar.gz
|
|
|
|
# The WASM blob was made using wasi-sdk v14; compiler libraries are linked in.
|
|
|
|
# The WASM blob was made using wasi-sdk v14; compiler libraries are linked in.
|
|
|
|
# Version source: build/Dockerfile
|
|
|
|
# Version source: build/Dockerfile
|
|
|
|
Source112: https://github.com/WebAssembly/wasi-sdk/archive/wasi-sdk-14/wasi-sdk-wasi-sdk-14.tar.gz
|
|
|
|
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
|
|
|
|
# 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
|
|
|
@ -310,6 +300,7 @@ Provides: bundled(uvwasi) = %{uvwasi_version}
|
|
|
|
Provides: bundled(histogram) = %{histogram_version}
|
|
|
|
Provides: bundled(histogram) = %{histogram_version}
|
|
|
|
Provides: bundled(corepack) = %{corepack_version}
|
|
|
|
Provides: bundled(corepack) = %{corepack_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
|
|
|
|
%if 0%{?rhel} < 8
|
|
|
|
%if 0%{?rhel} < 8
|
|
|
@ -403,6 +394,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 '%{SOURCE111}' 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~" {} \;
|
|
|
@ -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.
|
|
|
|
# automatic dependency on /usr/bin/pwsh that we cannot satisfy.
|
|
|
|
chmod -x %{buildroot}%{_prefix}/lib/node_modules/corepack/shims/*.ps1
|
|
|
|
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
|
|
|
|
# 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/*
|
|
|
|
|
|
|
|
|
|
|
@ -673,7 +679,7 @@ end
|
|
|
|
%{_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*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -696,7 +702,6 @@ end
|
|
|
|
%{_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*
|
|
|
@ -729,6 +734,13 @@ end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
%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
|
|
|
|
* 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-2022-4904
|
|
|
|
Resolves: CVE-2022-4904
|
|
|
|