template: Add support for RHEL default version

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
This commit is contained in:
Stephen Gallagher 2023-03-01 14:34:39 -05:00
parent 0479a8dfd7
commit c4586d42a2
No known key found for this signature in database
GPG Key ID: 45DB85A568286D11
3 changed files with 9 additions and 2 deletions

View File

@ -137,6 +137,10 @@ 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"
fi
rm -rf node-v${version}.tar.gz \
node-v${version}-stripped.tar.gz \
node-v${version}/ \
@ -301,6 +305,7 @@ 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",
"NODE_SOVERSION": $NODE_SOVERSION,
"V8_MAJOR": $V8_MAJOR,
"V8_MINOR": $V8_MINOR,

View File

@ -39,9 +39,10 @@
# 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
%if 0%{?fedora} == 39 || 0%{?fedora} == 40 | 0%{?rhel} == 10
%global nodejs_default %{nodejs_major}
%endif
%global nodejs_private_sitelib %{nodejs_sitelib}_%{nodejs_major}

View File

@ -39,9 +39,10 @@
# 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 }}
%if 0%{?fedora} == {{ FEDORA_DEFAULT_RELEASE_LOW }} || 0%{?fedora} == {{ FEDORA_DEFAULT_RELEASE_HIGH }}{{ RHEL_DEFAULT_RELEASE }}
%global nodejs_default %{nodejs_major}
%endif
%global nodejs_private_sitelib %{nodejs_sitelib}_%{nodejs_major}