From cebc50b2c07364948230ce22491cf635354211b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Stan=C4=9Bk?= Date: Tue, 23 Jul 2024 15:13:22 +0200 Subject: [PATCH] Disable npm update-notifier Related: https://gitlab.com/redhat/centos-stream/rpms/nodejs/-/merge_requests/84 --- nodejs22.spec | 3 +++ npmrc | 1 + packaging/nodejs.spec.j2 | 3 +++ 3 files changed, 7 insertions(+) diff --git a/nodejs22.spec b/nodejs22.spec index a6d734e..c688ec2 100644 --- a/nodejs22.spec +++ b/nodejs22.spec @@ -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 diff --git a/npmrc b/npmrc index 50be1d1..51e696d 100644 --- a/npmrc +++ b/npmrc @@ -1,2 +1,3 @@ prefix=/usr/local python=/usr/bin/python3 +update-notifier=false diff --git a/packaging/nodejs.spec.j2 b/packaging/nodejs.spec.j2 index 6cf9baf..d34b0dd 100644 --- a/packaging/nodejs.spec.j2 +++ b/packaging/nodejs.spec.j2 @@ -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