|
|
|
@ -29,7 +29,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}}
|
|
|
|
|
|
|
|
|
@ -40,8 +40,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
|
|
|
|
@ -68,13 +68,13 @@
|
|
|
|
|
%global c_ares_version 1.19.1
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
%global libuv_version 1.44.2
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
%global nghttp3_major 0
|
|
|
|
@ -108,11 +108,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
|
|
|
|
|
|
|
|
|
@ -123,7 +126,7 @@
|
|
|
|
|
|
|
|
|
|
# npm - from deps/npm/package.json
|
|
|
|
|
%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
|
|
|
|
|
# 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}
|
|
|
|
|
|
|
|
|
|
# uvwasi - from deps/uvwasi/include/uvwasi.h
|
|
|
|
|
%global uvwasi_version 0.0.14
|
|
|
|
|
%global uvwasi_version 0.0.15
|
|
|
|
|
|
|
|
|
|
# histogram_c - assumed from timestamps
|
|
|
|
|
%global histogram_version 0.11.2
|
|
|
|
@ -162,6 +165,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.
|
|
|
|
@ -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
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
# wasi-sdk version can be found in Dockerfile
|
|
|
|
|
# https://github.com/nodejs/undici/blob/v5.8.2/build/Dockerfile
|
|
|
|
|
Source102: undici-5.20.0.tar.gz
|
|
|
|
|
# https://github.com/nodejs/undici/blob/v5.21.0/build/Dockerfile
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
@ -284,6 +289,7 @@ Provides: bundled(icu) = %{icu_version}
|
|
|
|
|
Provides: bundled(uvwasi) = %{uvwasi_version}
|
|
|
|
|
Provides: bundled(histogram) = %{histogram_version}
|
|
|
|
|
Provides: bundled(simduft) = %{simduft_version}
|
|
|
|
|
Provides: bundled(ada) = %{ada_version}
|
|
|
|
|
|
|
|
|
|
# Make sure we keep NPM up to date when we update Node.js
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
# 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}
|
|
|
|
|
pathfix.py -i %{__python3} -pn $(find -type f ! -name "*.js")
|
|
|
|
|
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/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
|
|
|
|
|
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/*
|
|
|
|
|
|
|
|
|
@ -556,7 +577,7 @@ NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules:%{buildroot}%{_prefix}/lib/nod
|
|
|
|
|
%{_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*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -576,7 +597,6 @@ NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules:%{buildroot}%{_prefix}/lib/nod
|
|
|
|
|
%{_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*
|
|
|
|
@ -609,9 +629,16 @@ NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules:%{buildroot}%{_prefix}/lib/nod
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Wed Jul 19 2023 MSVSphere Packaging Team <packager@msvsphere.ru> - 1:18.14.2-3
|
|
|
|
|
* Wed Jul 19 2023 MSVSphere Packaging Team <packager@msvsphere.ru> - 1:18.16.1-1
|
|
|
|
|
- Rebuilt for MSVSphere 9.2.
|
|
|
|
|
|
|
|
|
|
* 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
|
|
|
|
|
- Update bundled c-ares to 1.19.1
|
|
|
|
|
Resolves: CVE-2023-31124 CVE-2023-31130 CVE-2023-31147 CVE-2023-32067
|
|
|
|
|