Temporarily add Node.js 20 as default for F41 and RHEL 11+

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
This commit is contained in:
Stephen Gallagher 2024-02-15 08:58:03 -05:00
parent 976a2c3e5e
commit 3391b85e23
3 changed files with 13 additions and 6 deletions

View File

@ -148,8 +148,14 @@ 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"
if [[ $((NODE_PKG_MAJOR)) -eq 20 ]]; then
RHEL_DEFAULT_RELEASE=" || 0%{?rhel} == 10"
fi
# Handle the situation where the next stable release of Node.js isn't yet
# available to include.
if [[ $((NODE_PKG_MAJOR)) -eq 20 ]]; then
TEMPORARY_RELEASE=" || 0%{?fedora} == 41 || 0%{?rhel} >= 11"
fi
rm -rf node-v${version}.tar.gz \
@ -307,7 +313,8 @@ IFS='' read -r -d '' template_json <<EOF
"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",
"TEMPORARY_RELEASE": "$TEMPORARY_RELEASE",
"RHEL_DEFAULT_RELEASE": "$RHEL_DEFAULT_RELEASE",
"NODE_SOVERSION": $NODE_SOVERSION,
"V8_MAJOR": $V8_MAJOR,
"V8_MINOR": $V8_MINOR,
@ -329,7 +336,7 @@ IFS='' read -r -d '' template_json <<EOF
"LEXER_VERSION": $LEXER_VERSION,
"UNDICI_VERSION": $UNDICI_VERSION,
"ADA_VERSION": $ADA_VERSION,
"PATCHES": $json_patchlist
"PATCHES": $json_patchlist
}
EOF

View File

@ -44,7 +44,7 @@
# Determine if this should be the default version for this Fedora release
# The default version will own /usr/bin/node and friends
%if 0%{?fedora} == 39 || 0%{?fedora} == 40 || 0%{?rhel} == 10
%if 0%{?fedora} == 39 || 0%{?fedora} == 40 || 0%{?rhel} == 10 || 0%{?fedora} == 41 || 0%{?rhel} >= 11
%global nodejs_default %{nodejs_pkg_major}
%endif

View File

@ -44,7 +44,7 @@
# Determine if this should be the default version for this Fedora release
# The default version will own /usr/bin/node and friends
%if 0%{?fedora} == {{ FEDORA_DEFAULT_RELEASE_LOW }} || 0%{?fedora} == {{ FEDORA_DEFAULT_RELEASE_HIGH }}{{ RHEL_DEFAULT_RELEASE }}
%if 0%{?fedora} == {{ FEDORA_DEFAULT_RELEASE_LOW }} || 0%{?fedora} == {{ FEDORA_DEFAULT_RELEASE_HIGH }}{{ RHEL_DEFAULT_RELEASE }}{{ TEMPORARY_RELEASE }}
%global nodejs_default %{nodejs_pkg_major}
%endif