From 9c73262db0a4ebf4deb366c544c8e3ac1f0ffe20 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Tue, 1 Apr 2025 08:40:57 +0000 Subject: [PATCH] import CS nodejs-22.13.1-2.module_el9_6+1203+32355adb --- SOURCES/npmrc | 2 ++ SPECS/nodejs.spec | 34 ++++++++++++++++------------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/SOURCES/npmrc b/SOURCES/npmrc index 50be1d1..30b238d 100644 --- a/SOURCES/npmrc +++ b/SOURCES/npmrc @@ -1,2 +1,4 @@ prefix=/usr/local python=/usr/bin/python3 +update-notifier=false + diff --git a/SPECS/nodejs.spec b/SPECS/nodejs.spec index 6b53c45..fadc653 100644 --- a/SPECS/nodejs.spec +++ b/SPECS/nodejs.spec @@ -46,7 +46,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}} @@ -780,6 +780,15 @@ 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 npm's update notifier has been disabled +# Temporarily wrapped. As of 4.3.2025 %nodejs_default is always set so should be okay. +# Will be unwrapped once we get rid of %nodejs_default confusion in rhel. +%if 0%{nodejs_default} +LD_LIBRARY_PATH=%{buildroot}%{_libdir} \ +%{buildroot}%{_bindir}/node \ +%{buildroot}%{_bindir}/npm \ +--globalconfig=%{buildroot}$(LD_LIBRARY_PATH=%{buildroot}%{_libdir} %{buildroot}%{_bindir}/node %{buildroot}%{_bindir}/npm config get globalconfig) config ls -l --json | jq -e '.["update-notifier"] == false' +%endif %if 0%{?rhel} && 0%{?rhel} < 8 %pretrans %{pkgname}-npm -p @@ -797,23 +806,6 @@ if d_st then end %endif -# This can be removed once F37 is EOL -%pretrans -n %{pkgname} -p -path = "/usr/lib/node_modules" -st = posix.stat(path) -if st and st.type == "directory" then - status = os.rename(path, path .. ".rpmmoved") - if not status then - suffix = 0 - while not status do - suffix = suffix + 1 - status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix) - end - os.rename(path, path .. ".rpmmoved") - end -end - - %files -n %{pkgname} %doc CHANGELOG.md onboarding.md GOVERNANCE.md README.md @@ -894,6 +886,12 @@ end %changelog +* Mon Feb 24 2025 Andrei Radchenko - 1:22.13.1-2 +- Remove lua pretransaction script from spec file + Resolves: RHEL-81122 +- Disable npm update notifications for users + Resolves: RHEL-81079 + * Thu Jan 30 2025 Jan Staněk - 1:22.13.1-1 - Update to version 22.13.1 Fixes CVE-2025-23083 CVE-2025-23085 CVE-2025-22150