Disable npm update-notifier

Related: https://gitlab.com/redhat/centos-stream/rpms/nodejs/-/merge_requests/84
This commit is contained in:
Jan Staněk 2024-07-23 15:13:22 +02:00
parent a63f65e903
commit cebc50b2c0
No known key found for this signature in database
GPG Key ID: 2972F2037B243B6D
3 changed files with 7 additions and 0 deletions

View File

@ -807,6 +807,9 @@ 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
LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}%{_bindir}/npm-%{nodejs_pkg_major} --globalconfig=%{buildroot}%{_sysconfdir}/npmrc config list --json | jq -e '.["update-notifier"] == false'
%if 0%{?rhel} && 0%{?rhel} < 8
%pretrans %{pkgname}-npm -p <lua>

1
npmrc
View File

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

View File

@ -819,6 +819,9 @@ 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
LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}%{_bindir}/npm-%{nodejs_pkg_major} --globalconfig=%{buildroot}%{_sysconfdir}/npmrc config list --json | jq -e '.["update-notifier"] == false'
%if 0%{?rhel} && 0%{?rhel} < 8
%pretrans %{pkgname}-npm -p <lua>