From 777056595316ab858632914bbeb404220067cadd Mon Sep 17 00:00:00 2001 From: Zuzana Svetlikova Date: Wed, 9 Feb 2022 12:18:48 +0100 Subject: [PATCH] Replace explicit version of npm in %%check with variable and make build fail if it doesn't match --- nodejs.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nodejs.spec b/nodejs.spec index 0e7157c..78ec060 100644 --- a/nodejs.spec +++ b/nodejs.spec @@ -25,7 +25,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 1 +%global baserelease 2 %{?!_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}} @@ -619,7 +619,7 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node -e "require( LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node -e "require(\"assert\").equal(require(\"punycode\").version, '%{punycode_version}')" # Ensure we have npm and that the version matches -LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}%{_bindir}/node %{buildroot}%{_bindir}/npm version --json |jq '. | select(.npm | contains("7.24.0"))' +LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}%{_bindir}/node %{buildroot}%{_bindir}/npm version --json |jq -e '.npm == "%{npm_version}"' # Make sure i18n support is working NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules:%{buildroot}%{_prefix}/lib/node_modules/npm/node_modules LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}/%{_bindir}/node --icu-data-dir=%{buildroot}%{icudatadir} %{SOURCE2} @@ -730,6 +730,9 @@ end %changelog +* Wed Feb 09 2022 Zuzana Svetlikova - 1:16.14.0-2 +- Replace explicit version of npm in %%check with variable and make build fail if it doesn't match + * Tue Feb 08 2022 Stephen Gallagher - 1:16.14.0-1 - Update to Node.js 16.14.0