import UBI nodejs-18.20.6-2.module+el8.10.0+22910+33eca360

This commit is contained in:
eabdullin 2025-04-22 01:21:37 +00:00
parent b96829ac09
commit d855e66b02
2 changed files with 14 additions and 64 deletions

View File

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

View File

@ -30,7 +30,7 @@
# This is used by both the nodejs package and the npm subpackage that # 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 # has a separate version - the name is special so that rpmdev-bumpspec
# will bump this rather than adding .1 to the end. # will bump this rather than adding .1 to the end.
%global baserelease 1 %global baserelease 2
%{?!_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}} %{?!_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
@ -600,69 +600,11 @@ NODE_PATH=%{buildroot}%{_prefix}/lib/node_modules:%{buildroot}%{_prefix}/lib/nod
# Make sure i18n support is working # 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} 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}
# Ensure npm's update notifier has been disabled
%pretrans -n npm -p <lua> LD_LIBRARY_PATH=%{buildroot}%{_libdir} \
-- Remove all of the symlinks from the bundled npm node_modules directory %{buildroot}%{_bindir}/node \
-- This scriptlet can be removed in Fedora 31 %{buildroot}%{_bindir}/npm \
base_path = "%{_prefix}/lib/node_modules/npm/node_modules/" --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'
d_st = posix.stat(base_path)
if d_st then
for f in posix.files(base_path) do
path = base_path..f
st = posix.stat(path)
if st and st.type == "link" then
os.remove(path)
end
end
end
-- Replace the npm docs directory with a symlink
-- Drop this scriptlet when F31 is EOL
path = "%{_prefix}/lib/node_modules/npm/doc"
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
-- Replace the npm docs directory with a symlink
-- Drop this scriptlet when F31 is EOL
path = "%{_prefix}/lib/node_modules/npm/html"
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
-- Replace the npm man directory with a symlink
-- Drop this scriptlet when F31 is EOL
path = "%{_prefix}/lib/node_modules/npm/man"
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 %files
@ -738,6 +680,12 @@ end
%changelog %changelog
* Thu Mar 06 2025 Andrei Radchenko <aradchen@redhat.com> - 1:18.20.6-2
- Disable npm's update-notifier
Resolves: RHEL-81075
- Remove obsolete scriplets
Resolves: RHEL-81120
* Fri Feb 07 2025 Andrei Radchenko <aradchen@redhat.com> - 1:18.20.6-1 * Fri Feb 07 2025 Andrei Radchenko <aradchen@redhat.com> - 1:18.20.6-1
- Update to version 18.20.6 - Update to version 18.20.6
Resolves: RHEL-78326 Resolves: RHEL-78326