import nodejs22-22.11.0-1.el10

cs10 imports/cs10/nodejs22-22.11.0-1.el10
MSVSphere Packaging Team 4 weeks ago
parent 4618efc77c
commit 8b143d8f6e
Signed by: sys_gitsync
GPG Key ID: B2B0B9F29E528FE8

2
.gitignore vendored

@ -1,3 +1,3 @@
SOURCES/icu4c-75_1-data-bin-b.zip
SOURCES/icu4c-75_1-data-bin-l.zip
SOURCES/node-v22.4.1-stripped.tar.gz
SOURCES/node-v22.11.0-stripped.tar.gz

@ -1,3 +1,3 @@
6c7291d88272d84fdadf1395166acd40dd12f623 SOURCES/icu4c-75_1-data-bin-b.zip
ef164aa671780d004e304b4c789b05450e912304 SOURCES/icu4c-75_1-data-bin-l.zip
cd053741b2f50dc3c9c54f5014a0480978f9cb16 SOURCES/node-v22.4.1-stripped.tar.gz
b7ad1402166194f6cd14b2370f88ea8b515fc839 SOURCES/node-v22.11.0-stripped.tar.gz

@ -0,0 +1,128 @@
From fb3c0082f561d3e656b1b73c6176a04bc203cacb Mon Sep 17 00:00:00 2001
From: Richard Lau <rlau@redhat.com>
Date: Wed, 16 Oct 2024 17:26:42 +0000
Subject: [PATCH] build: conditionally compile bundled sqlite
Only compile the bundled sqlite in `deps/sqlite` if Node.js was not
configured with `--shared-sqlite`.
`node.gypi` is already correctly adding the sqlite dependency if
`node_shared_sqlite=="false"` so the unconditional entries in `node.gyp`
are not necessary.
Signed-off-by: rpm-build <rpm-build>
---
node.gyp | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/node.gyp b/node.gyp
index da6ea50..9f24b1c 100644
--- a/node.gyp
+++ b/node.gyp
@@ -840,7 +840,6 @@
'dependencies': [
'deps/googletest/googletest.gyp:gtest_prod',
'deps/histogram/histogram.gyp:histogram',
- 'deps/sqlite/sqlite.gyp:sqlite',
'deps/simdjson/simdjson.gyp:simdjson',
'deps/simdutf/simdutf.gyp:simdutf',
'deps/ada/ada.gyp:ada',
@@ -1030,7 +1029,6 @@
'dependencies': [
'<(node_lib_target_name)',
'deps/histogram/histogram.gyp:histogram',
- 'deps/sqlite/sqlite.gyp:sqlite',
],
'includes': [
@@ -1042,7 +1040,6 @@
'deps/v8/include',
'deps/cares/include',
'deps/uv/include',
- 'deps/sqlite',
'test/cctest',
],
@@ -1075,7 +1072,6 @@
'dependencies': [
'<(node_lib_target_name)',
'deps/histogram/histogram.gyp:histogram',
- 'deps/sqlite/sqlite.gyp:sqlite',
'deps/uvwasi/uvwasi.gyp:uvwasi',
],
'includes': [
@@ -1086,7 +1082,6 @@
'tools/msvs/genfiles',
'deps/v8/include',
'deps/cares/include',
- 'deps/sqlite',
'deps/uv/include',
'deps/uvwasi/include',
'test/cctest',
@@ -1121,7 +1116,6 @@
'<(node_lib_target_name)',
'deps/googletest/googletest.gyp:gtest_prod',
'deps/histogram/histogram.gyp:histogram',
- 'deps/sqlite/sqlite.gyp:sqlite',
'deps/uvwasi/uvwasi.gyp:uvwasi',
'deps/ada/ada.gyp:ada',
'deps/nbytes/nbytes.gyp:nbytes',
@@ -1134,7 +1128,6 @@
'tools/msvs/genfiles',
'deps/v8/include',
'deps/cares/include',
- 'deps/sqlite',
'deps/uv/include',
'deps/uvwasi/include',
'test/cctest',
@@ -1171,7 +1164,6 @@
'deps/googletest/googletest.gyp:gtest',
'deps/googletest/googletest.gyp:gtest_main',
'deps/histogram/histogram.gyp:histogram',
- 'deps/sqlite/sqlite.gyp:sqlite',
'deps/simdjson/simdjson.gyp:simdjson',
'deps/simdutf/simdutf.gyp:simdutf',
'deps/ada/ada.gyp:ada',
@@ -1188,7 +1180,6 @@
'deps/v8/include',
'deps/cares/include',
'deps/uv/include',
- 'deps/sqlite',
'test/cctest',
],
@@ -1253,7 +1244,6 @@
'dependencies': [
'<(node_lib_target_name)',
'deps/histogram/histogram.gyp:histogram',
- 'deps/sqlite/sqlite.gyp:sqlite',
'deps/ada/ada.gyp:ada',
'deps/nbytes/nbytes.gyp:nbytes',
],
@@ -1269,7 +1259,6 @@
'deps/v8/include',
'deps/cares/include',
'deps/uv/include',
- 'deps/sqlite',
'test/embedding',
],
@@ -1369,7 +1358,6 @@
'dependencies': [
'<(node_lib_target_name)',
'deps/histogram/histogram.gyp:histogram',
- 'deps/sqlite/sqlite.gyp:sqlite',
'deps/ada/ada.gyp:ada',
'deps/nbytes/nbytes.gyp:nbytes',
'deps/simdjson/simdjson.gyp:simdjson',
@@ -1386,7 +1374,6 @@
'deps/v8/include',
'deps/cares/include',
'deps/uv/include',
- 'deps/sqlite',
],
'defines': [ 'NODE_WANT_INTERNALS=1' ],
--
2.47.0

@ -0,0 +1,25 @@
From e79552fdbebb411b8a6f7bc323525f463c1ee7ad Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Wed, 30 Oct 2024 15:48:59 +0100
Subject: [PATCH] deps(ncrypto): include <openssl/rand.h>
Signed-off-by: rpm-build <rpm-build>
---
deps/ncrypto/ncrypto.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/deps/ncrypto/ncrypto.cc b/deps/ncrypto/ncrypto.cc
index 457bd2f..a38b4a2 100644
--- a/deps/ncrypto/ncrypto.cc
+++ b/deps/ncrypto/ncrypto.cc
@@ -5,6 +5,7 @@
#include <openssl/bn.h>
#include <openssl/evp.h>
#include <openssl/hmac.h>
+#include <openssl/rand.h>
#include <openssl/pkcs12.h>
#include <openssl/x509v3.h>
#if OPENSSL_VERSION_MAJOR >= 3
--
2.47.0

@ -3,24 +3,23 @@
# arguments, make sure to call
# `argbash nodejs-tarball.sh -o nodejs-tarball.sh`
# ARG_POSITIONAL_SINGLE([version],[Node.js release version])
# ARG_OPTIONAL_BOOLEAN([push],[],[Whether to upload to the lookaside cache],[on])
# ARG_OPTIONAL_BOOLEAN([debug],[],[Print all commands],[off])
# ARG_POSITIONAL_SINGLE([version],[Node.js release version],[""])
# ARG_DEFAULTS_POS([])
# ARG_HELP([Tool to aid in Node.js packaging of new releases])
# ARGBASH_GO()
# needed because of Argbash --> m4_ignore([
### START OF CODE GENERATED BY Argbash v2.10.0 one line above ###
### START OF CODE GENERATED BY Argbash v2.8.1 one line above ###
# Argbash is a bash code generator used to get arguments parsing right.
# Argbash is FREE SOFTWARE, see https://argbash.io for more info
die()
{
local _ret="${2:-1}"
test "${_PRINT_HELP:-no}" = yes && print_help >&2
local _ret=$2
test -n "$_ret" || _ret=1
test "$_PRINT_HELP" = yes && print_help >&2
echo "$1" >&2
exit "${_ret}"
exit ${_ret}
}
@ -33,19 +32,15 @@ begins_with_short_option()
# THE DEFAULTS INITIALIZATION - POSITIONALS
_positionals=()
_arg_version=
_arg_version=""
# THE DEFAULTS INITIALIZATION - OPTIONALS
_arg_push="on"
_arg_debug="off"
print_help()
{
printf '%s\n' "Tool to aid in Node.js packaging of new releases"
printf 'Usage: %s [--(no-)push] [--(no-)debug] [-h|--help] <version>\n' "$0"
printf '\t%s\n' "<version>: Node.js release version"
printf '\t%s\n' "--push, --no-push: Whether to upload to the lookaside cache (on by default)"
printf '\t%s\n' "--debug, --no-debug: Print all commands (off by default)"
printf 'Usage: %s [-h|--help] [<version>]\n' "$0"
printf '\t%s\n' "<version>: Node.js release version (default: '""')"
printf '\t%s\n' "-h, --help: Prints help"
}
@ -57,14 +52,6 @@ parse_commandline()
do
_key="$1"
case "$_key" in
--no-push|--push)
_arg_push="on"
test "${1:0:5}" = "--no-" && _arg_push="off"
;;
--no-debug|--debug)
_arg_debug="on"
test "${1:0:5}" = "--no-" && _arg_debug="off"
;;
-h|--help)
print_help
exit 0
@ -86,9 +73,7 @@ parse_commandline()
handle_passed_args_count()
{
local _required_args_string="'version'"
test "${_positionals_count}" -ge 1 || _PRINT_HELP=yes die "FATAL ERROR: Not enough positional arguments - we require exactly 1 (namely: $_required_args_string), but got only ${_positionals_count}." 1
test "${_positionals_count}" -le 1 || _PRINT_HELP=yes die "FATAL ERROR: There were spurious positional arguments --- we expect exactly 1 (namely: $_required_args_string), but got ${_positionals_count} (the last one was: '${_last_positional}')." 1
test "${_positionals_count}" -le 1 || _PRINT_HELP=yes die "FATAL ERROR: There were spurious positional arguments --- we expect between 0 and 1, but got ${_positionals_count} (the last one was: '${_last_positional}')." 1
}
@ -115,78 +100,33 @@ assign_positional_args 1 "${_positionals[@]}"
### END OF CODE GENERATED BY Argbash (sortof) ### ])
# [ <-- needed because of Argbash
if [ $_arg_debug = 'on' ]; then
set -x
fi
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
alias wget='wget --quiet'
packages=("jq" "wget" "tar" "fedpkg" "grep" "sed" "python3-jinja2-cli" "nodejs")
rpm -q ${packages[@]} >/dev/null
if [ $? -ne 0 ]; then
sudo dnf -y install ${packages[@]}
fi
set -e
version=$_arg_version
NODE_MAJOR=$(echo $version | cut -d. -f1)
NODE_MINOR=$(echo $version | cut -d. -f2)
NODE_PATCH=$(echo $version | cut -d. -f3)
echo $_arg_version
# Treat odd-numbered major releases as pre-releases for the
# next LTS release.
if [[ $((NODE_MAJOR % 2)) -eq 0 ]];
then NODE_PKG_MAJOR=${NODE_MAJOR};
else NODE_PKG_MAJOR=$((NODE_MAJOR + 1));
if [ x$_arg_version != x ]; then
version=$_arg_version
else
version=$(rpm -q --specfile --qf='%{version}\n' nodejs.spec | head -n1)
fi
FEDORA_DEFAULT_RELEASE_LOW=$((NODE_PKG_MAJOR + 19))
FEDORA_DEFAULT_RELEASE_HIGH=$((NODE_PKG_MAJOR + 20))
if [[ $((NODE_PKG_MAJOR)) -eq 20 ]]
then RHEL_DEFAULT_RELEASE=" || 0%{?rhel} == 10"
elif [[ $((NODE_PKG_MAJOR)) -eq 22 ]];
then RHEL_DEFAULT_RELEASE=" || 0%{?rhel} == 11"
fi
rm -rf node-v${version}.tar.gz \
node-v${version}-stripped.tar.gz \
node-v${version}/ \
wasi-sdk-* \
cjs-module-lexer* \
undici* \
SHASUMS256.txt
echo Downloading node-v${version}.tar.gz
rm -f node-v${version}.tar.gz node-v${version}-stripped.tar.gz
wget http://nodejs.org/dist/v${version}/node-v${version}.tar.gz \
http://nodejs.org/dist/v${version}/SHASUMS256.txt
echo Validating sha256sum
sha256sum -c SHASUMS256.txt --ignore-missing
rm -f SHASUMS256.txt
tar -zxf node-v${version}.tar.gz
# Remove bundled OpenSSL
# We will link to the system version
rm -rf node-v${version}/deps/openssl
tar -zcf node-v${version}-stripped.tar.gz node-v${version}
# Record the bundled cjs-module-lexer version
LEXER_VERSION=$(jq -r '.version' node-v${version}/deps/cjs-module-lexer/package.json)
# Record the bundled undici version
UNDICI_VERSION=$(jq -r '.version' node-v${version}/deps/undici/src/package.json)
# Download the ICU binary data files
ICU_MAJOR=$(jq -r '.[0].url' node-v${version}/tools/icu/current_ver.dep | sed --expression='s/.*release-\([[:digit:]]\+\)-\([[:digit:]]\+\).*/\1/g')
ICU_MINOR=$(jq -r '.[0].url' node-v${version}/tools/icu/current_ver.dep | sed --expression='s/.*release-\([[:digit:]]\+\)-\([[:digit:]]\+\).*/\2/g')
# Download the ICU binary data files
rm -Rf icu4c-${ICU_MAJOR}_${ICU_MINOR}-data-bin-*.zip
wget $(grep Source3 packaging/nodejs.spec.j2 | sed --expression="s/.*http/http/g" --expression="s/\(\%{icu_major}\)/${ICU_MAJOR}/g" --expression="s/\(\%{icu_minor}\)/${ICU_MINOR}/g")
wget $(grep Source4 packaging/nodejs.spec.j2 | sed --expression="s/.*http/http/g" --expression="s/\(\%{icu_major}\)/${ICU_MAJOR}/g" --expression="s/\(\%{icu_minor}\)/${ICU_MINOR}/g")
wget $(grep Source3 nodejs.spec | sed --expression="s/.*http/http/g" --expression="s/\(\%{icu_major}\)/${ICU_MAJOR}/g" --expression="s/\(\%{icu_minor}\)/${ICU_MINOR}/g")
wget $(grep Source4 nodejs.spec | sed --expression="s/.*http/http/g" --expression="s/\(\%{icu_major}\)/${ICU_MAJOR}/g" --expression="s/\(\%{icu_minor}\)/${ICU_MINOR}/g")
#fedpkg new-sources node-v${version}-stripped.tar.gz icu4c*-src.tgz
rm -f node-v${version}.tar.gz
@ -200,7 +140,10 @@ echo "Node.js version"
echo "========================="
echo "${version}"
echo
echo "libnode shared object version"
echo "Bundled software versions"
echo "-------------------------"
echo
echo "libnode shared object version (nodejs_soversion)"
echo "========================="
NODE_SOVERSION=$(grep -oP '(?<=#define NODE_MODULE_VERSION )\d+' node-v${version}/src/node_version.h)
echo "${NODE_SOVERSION}"
@ -251,6 +194,8 @@ echo $NGTCP2_VERSION
echo
echo "ICU"
echo "========================="
ICU_MAJOR=$(jq -r '.[0].url' node-v${version}/tools/icu/current_ver.dep | sed --expression='s/.*release-\([[:digit:]]\+\)-\([[:digit:]]\+\).*/\1/g')
ICU_MINOR=$(jq -r '.[0].url' node-v${version}/tools/icu/current_ver.dep | sed --expression='s/.*release-\([[:digit:]]\+\)-\([[:digit:]]\+\).*/\2/g')
echo "${ICU_MAJOR}.${ICU_MINOR}"
echo
echo "simdutf"
@ -258,90 +203,46 @@ echo "========================="
SIMDUTF_VERSION=$(grep -oP '(?<=#define SIMDUTF_VERSION ).*\"' node-v${version}/deps/simdutf/simdutf.h |sed -e 's/^"//' -e 's/"$//')
echo $SIMDUTF_VERSION
echo
echo "punycode"
echo "ada"
echo "========================="
PUNYCODE_VERSION=$(/usr/bin/node -e "console.log(require('punycode').version)")
echo $PUNYCODE_VERSION
ADA_VERSION=$(grep -osP '(?<=#define ADA_VERSION ).*\"' node-v${version}/deps/ada/ada.h |sed -e 's/^"//' -e 's/"$//')
ADA_VERSION=${ADA_VERSION:-0}
echo "${ADA_VERSION}"
echo
echo "uvwasi"
echo "punycode"
echo "========================="
UVWASI_MAJOR=$(grep -oP '(?<=#define UVWASI_VERSION_MAJOR )\d+' node-v${version}/deps/uvwasi/include/uvwasi.h)
UVWASI_MINOR=$(grep -oP '(?<=#define UVWASI_VERSION_MINOR )\d+' node-v${version}/deps/uvwasi/include/uvwasi.h)
UVWASI_PATCH=$(grep -oP '(?<=#define UVWASI_VERSION_PATCH )\d+' node-v${version}/deps/uvwasi/include/uvwasi.h)
UVWASI_VERSION="${UVWASI_MAJOR}.${UVWASI_MINOR}.${UVWASI_PATCH}"
echo $UVWASI_VERSION
PUNYCODE_VERSION=$(grep -oP "'version': '\K[^']+" ./node-v${version}/lib/punycode.js)
echo $PUNYCODE_VERSION
echo
echo "npm"
echo "========================="
NPM_VERSION=$(jq -r .version ./node-v${version}/deps/npm/package.json)
echo $NPM_VERSION
echo
echo "zlib"
echo "corepack"
echo "========================="
ZLIB_VERSION=$(grep -oP '(?<=#define ZLIB_VERSION ).*\"' node-v${version}/deps/zlib/zlib.h |sed -e 's/^"//' -e 's/"$//')
echo $ZLIB_VERSION
COREPACK_VERSION=$(jq -r .version ./node-v${version}/deps/corepack/package.json)
echo $COREPACK_VERSION
echo
echo "cjs-module-lexer"
echo "uvwasi"
echo "========================="
echo "${LEXER_VERSION}"
UVWASI_MAJOR=$(grep -oP '(?<=#define UVWASI_VERSION_MAJOR )\d+' node-v${version}/deps/uvwasi/include/uvwasi.h)
UVWASI_MINOR=$(grep -oP '(?<=#define UVWASI_VERSION_MINOR )\d+' node-v${version}/deps/uvwasi/include/uvwasi.h)
UVWASI_PATCH=$(grep -oP '(?<=#define UVWASI_VERSION_PATCH )\d+' node-v${version}/deps/uvwasi/include/uvwasi.h)
UVWASI_VERSION="${UVWASI_MAJOR}.${UVWASI_MINOR}.${UVWASI_PATCH}"
echo $UVWASI_VERSION
echo
echo "undici"
echo "histogram_c"
echo "========================="
echo "${UNDICI_VERSION}"
HISTOGRAM_VERSION=$(grep -oP '(?<=#define HDR_HISTOGRAM_VERSION ).*\"' node-v${version}/deps/histogram/include/hdr/hdr_histogram_version.h|sed -e 's/^"//' -e 's/"$//')
echo $HISTOGRAM_VERSION
echo
echo "ada"
echo "sqlite"
echo "========================="
ADA_VERSION=$(grep -osP '(?<=#define ADA_VERSION ).*\"' node-v${version}/deps/ada/ada.h |sed -e 's/^"//' -e 's/"$//')
ADA_VERSION=${ADA_VERSION:-0}
echo "${ADA_VERSION}"
SQLITE_VERSION="$(grep -osP '(?<=#define SQLITE_VERSION ).*\"' node-v${version}/deps/sqlite/sqlite3.h |sed -e 's/^\s*"//' -e 's/"\s*$//')"
echo "${SQLITE_VERSION}"
echo
echo "Applying versions to spec template"
# Get the list of patches we need to add to the specfile
readarray -t patchlist < <(git ls-files |grep '^[0-9]\{4\}-.*\.patch')
json_patchlist=$(jq --compact-output --null-input '$ARGS.positional' --args -- "${patchlist[@]}")
IFS='' read -r -d '' template_json <<EOF
{
"NODE_PKG_MAJOR": $NODE_PKG_MAJOR,
"NODE_MAJOR": $NODE_MAJOR,
"NODE_MINOR": $NODE_MINOR,
"NODE_PATCH": $NODE_PATCH,
"FEDORA_DEFAULT_RELEASE_LOW": $FEDORA_DEFAULT_RELEASE_LOW,
"FEDORA_DEFAULT_RELEASE_HIGH": $FEDORA_DEFAULT_RELEASE_HIGH,
"RHEL_DEFAULT_RELEASE": "$RHEL_DEFAULT_RELEASE",
"NODE_SOVERSION": $NODE_SOVERSION,
"V8_MAJOR": $V8_MAJOR,
"V8_MINOR": $V8_MINOR,
"V8_BUILD": $V8_BUILD,
"V8_PATCH": $V8_PATCH,
"C_ARES_VERSION": $C_ARES_VERSION,
"LLHTTP_VERSION": $LLHTTP_VERSION,
"LIBUV_VERSION": $LIBUV_VERSION,
"NGHTTP2_VERSION": $NGHTTP2_VERSION,
"NGHTTP3_VERSION": $NGHTTP3_VERSION,
"NGTCP2_VERSION": $NGTCP2_VERSION,
"ICU_MAJOR": $ICU_MAJOR,
"ICU_MINOR": $ICU_MINOR,
"SIMDUTF_VERSION": $SIMDUTF_VERSION,
"PUNYCODE_VERSION": $PUNYCODE_VERSION,
"UVWASI_VERSION": $UVWASI_VERSION,
"NPM_VERSION": $NPM_VERSION,
"ZLIB_VERSION": $ZLIB_VERSION,
"LEXER_VERSION": $LEXER_VERSION,
"UNDICI_VERSION": $UNDICI_VERSION,
"ADA_VERSION": $ADA_VERSION,
"PATCHES": $json_patchlist
}
EOF
echo ${template_json} | jinja2 ${SCRIPT_DIR}/packaging/nodejs.spec.j2 \
> ${SCRIPT_DIR}/nodejs${NODE_PKG_MAJOR}.spec
if [ $_arg_push = 'on' ]; then
fedpkg new-sources node-v${version}-stripped.tar.gz \
icu4c-${ICU_MAJOR}_${ICU_MINOR}-data-bin-*.zip
fi
echo "Make sure these versions match what is in the RPM spec file"
rm -rf node-v${version}
# ] <-- needed because of Argbash

@ -1,2 +1,3 @@
prefix=/usr/local
python=/usr/bin/python3
update-notifier=false

@ -2,7 +2,7 @@
## (rpmautospec version 0.6.5)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 3;
release_number = 1;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
@ -38,6 +38,8 @@
%bcond_with bundled_zlib
%endif
%bcond bundled_sqlite %{with bootstrap}
# LTO is currently broken on Node.js builds
%define _lto_cflags %{nil}
@ -60,8 +62,8 @@
# than a Fedora release lifecycle.
%global nodejs_epoch 1
%global nodejs_major 22
%global nodejs_minor 4
%global nodejs_patch 1
%global nodejs_minor 11
%global nodejs_patch 0
# nodejs_soversion - from NODE_MODULE_VERSION in src/node_version.h
%global nodejs_soversion 127
%global nodejs_abi %{nodejs_soversion}
@ -88,7 +90,7 @@
# c-ares - from deps/cares/include/ares_version.h
# https://github.com/nodejs/node/pull/9332
%global c_ares_version 1.31.0
%global c_ares_version 1.33.1
# llhttp - from deps/llhttp/include/llhttp.h
%global llhttp_version 9.2.1
@ -97,7 +99,7 @@
%global libuv_version 1.48.0
# nghttp2 - from deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h
%global nghttp2_version 1.62.1
%global nghttp2_version 1.63.0
# nghttp3 - from deps/ngtcp2/nghttp3/lib/includes/nghttp3/version.h
%global nghttp3_version 0.7.0
@ -115,7 +117,7 @@
# " this line just fixes syntax highlighting for vim that is confused by the above and continues literal
# simdutf from deps/simdutf/simdutf.h
%global simdutf_version 5.2.8
%global simdutf_version 5.5.0
# OpenSSL minimum version
%global openssl11_minimum 1:1.1.1
@ -128,7 +130,7 @@
# npm - from deps/npm/package.json
%global npm_epoch 1
%global npm_version 10.8.1
%global npm_version 10.9.0
# 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
@ -144,6 +146,9 @@
# histogram_c - assumed from timestamps
%global histogram_version 0.9.7
# sqlite from deps/sqlite/sqlite3.h
%global sqlite_version 3.46.1
Name: nodejs%{nodejs_pkg_major}
Epoch: %{nodejs_epoch}
@ -166,12 +171,14 @@ Source2: btest402.js
# The binary data that icu-small can use to get icu-full capability
Source3: https://github.com/unicode-org/icu/releases/download/release-%{icu_major}-%{icu_minor}/icu4c-%{icu_major}_%{icu_minor}-data-bin-b.zip
Source4: https://github.com/unicode-org/icu/releases/download/release-%{icu_major}-%{icu_minor}/icu4c-%{icu_major}_%{icu_minor}-data-bin-l.zip
Source200: nodejs-sources.sh
Source200: nodejs-tarball.sh
Source201: npmrc.builtin.in
Source202: nodejs.pc.in
Source203: v8.pc.in
Patch: 0001-Remove-unused-OpenSSL-config.patch
Patch: 0002-build-conditionally-compile-bundled-sqlite.patch
Patch: 0003-deps-ncrypto-include-openssl-rand.h.patch
%if 0%{?nodejs_default}
%global pkgname nodejs
@ -215,6 +222,12 @@ BuildRequires: libatomic
BuildRequires: ninja-build
BuildRequires: unzip
%if %{with bundled_sqlite}
Provides: bundled(sqlite) = %{sqlite_version}
%else
BuildRequires: pkgconfig(sqlite3) >= 3.45.0
%endif
%if 0%{?nodejs_default}
@ -337,19 +350,19 @@ Provides: bundled(simdutf) = %{simdutf_version}
# Upstream has added a new URL parser that has no option to build as a shared
# library (19.7.0+)
Provides: bundled(ada) = 2.8.0
Provides: bundled(ada) = 2.9.0
# undici and cjs-module-lexer ship with pre-built WASM binaries.
%if %{with bundled_cjs_module_lexer}
Provides: bundled(nodejs-cjs-module-lexer) = 1.2.2
Provides: bundled(nodejs-cjs-module-lexer) = 1.4.1
%else
BuildRequires: nodejs-cjs-module-lexer
Requires: nodejs-cjs-module-lexer
%endif
%if %{with bundled_undici}
Provides: bundled(nodejs-undici) = 6.19.2
Provides: bundled(nodejs-undici) = 6.20.0
%else
BuildRequires: nodejs-undici
Requires: nodejs-undici
@ -532,6 +545,10 @@ rm -rf deps/cjs-module-lexer
rm -rf deps/undici
%endif
%if %{without bundled_sqlite}
rm -rf deps/sqlite
%endif
# Replace any instances of unversioned python with python3
pfiles=( $(grep -rl python) )
%py3_shebang_fix ${pfiles[@]}
@ -593,6 +610,7 @@ export PATH="${cwd}/.bin:$PATH"
%{!?with_bundled_cjs_module_lexer:--shared-builtin-cjs_module_lexer/lexer-path %{nodejs_private_sitelib}/cjs-module-lexer/lexer.js} \
%{!?with_bundled_cjs_module_lexer:--shared-builtin-cjs_module_lexer/dist/lexer-path %{nodejs_private_sitelib}/cjs-module-lexer/dist/lexer.js} \
%{!?with_bundled_undici:--shared-builtin-undici/undici-path %{nodejs_private_sitelib}/undici/loader.js} \
%{!?with_bundled_sqlite:--shared-sqlite} \
--shared-brotli \
--shared-libuv \
--with-intl=small-icu \
@ -817,6 +835,11 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}%{_bindir}/node-%{nodejs_pkg_
# Make sure i18n support is working
NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules:%{buildroot}%{nodejs_private_sitelib}/npm/node_modules LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node-%{nodejs_pkg_major} --icu-data-dir=%{buildroot}%{icudatadir} %{SOURCE2}
# Ensure update-notifier is disabled
%if 0%{?nodejs_default}
LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node-%{nodejs_pkg_major} %{buildroot}%{_bindir}/npm-%{nodejs_pkg_major} --globalconfig=%{buildroot}%{_sysconfdir}/npmrc config list --json | jq -e '.["update-notifier"] == false'
%endif
%if 0%{?rhel} && 0%{?rhel} < 8
%pretrans %{pkgname}-npm -p <lua>
@ -932,6 +955,12 @@ end
%changelog
## START: Generated by rpmautospec
* Tue Nov 19 2024 Jan Staněk <jstanek@redhat.com> - 1:22.11.0-1
- Update to version 22.11.0 (LTS)
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1:22.4.1-4
- Bump release for October 2024 mass rebuild:
* Wed Aug 14 2024 Jan Staněk <jstanek@redhat.com> - 1:22.4.1-3
- make this stream the default for RHEL 10

Loading…
Cancel
Save