Simplify npmrc default configuration
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
This commit is contained in:
parent
7d86b7301d
commit
2526ca953f
@ -1,26 +0,0 @@
|
|||||||
From d5f88f988423c6304549eb2724b05c9344b0b88b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Stephen Gallagher <sgallagh@redhat.com>
|
|
||||||
Date: Mon, 28 Oct 2019 13:24:57 -0400
|
|
||||||
Subject: [PATCH 2/3] Use /etc/npmrc for the default configuration
|
|
||||||
|
|
||||||
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
|
|
||||||
---
|
|
||||||
deps/npm/lib/config/defaults.js | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/deps/npm/lib/config/defaults.js b/deps/npm/lib/config/defaults.js
|
|
||||||
index 57d373df1e10c349142e14fa9e4bbc95b7df79e3..0ffe6aed8562070cd1d021010b13bef30bac8763 100644
|
|
||||||
--- a/deps/npm/lib/config/defaults.js
|
|
||||||
+++ b/deps/npm/lib/config/defaults.js
|
|
||||||
@@ -153,7 +153,7 @@ Object.defineProperty(exports, 'defaults', {get: function () {
|
|
||||||
'commit-hooks': true,
|
|
||||||
|
|
||||||
global: false,
|
|
||||||
- globalconfig: path.resolve(globalPrefix, 'etc', 'npmrc'),
|
|
||||||
+ globalconfig: '/etc/npmrc',
|
|
||||||
'global-style': false,
|
|
||||||
group: process.platform === 'win32' ? 0
|
|
||||||
: process.env.SUDO_GID || (process.getgid && process.getgid()),
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
16
nodejs.spec
16
nodejs.spec
@ -8,7 +8,7 @@
|
|||||||
# This is used by both the nodejs package and the npm subpackage thar
|
# This is used by both the nodejs package and the npm subpackage thar
|
||||||
# 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}}
|
||||||
|
|
||||||
@ -138,10 +138,6 @@ Source7: nodejs_native.attr
|
|||||||
# Disable running gyp on bundled deps we don't use
|
# Disable running gyp on bundled deps we don't use
|
||||||
Patch1: 0001-Disable-running-gyp-on-shared-deps.patch
|
Patch1: 0001-Disable-running-gyp-on-shared-deps.patch
|
||||||
|
|
||||||
# Use /etc/npmrc for the default configuration
|
|
||||||
# We'll use this to set the prefix to /usr/local for `npm -g install`
|
|
||||||
Patch2: 0002-Use-etc-npmrc-for-the-default-configuration.patch
|
|
||||||
|
|
||||||
# Patch to install both node and libnode.so, using the correct libdir
|
# Patch to install both node and libnode.so, using the correct libdir
|
||||||
Patch3: 0003-Install-both-binaries-and-use-libdir.patch
|
Patch3: 0003-Install-both-binaries-and-use-libdir.patch
|
||||||
|
|
||||||
@ -503,8 +499,12 @@ chmod 0755 %{buildroot}%{_prefix}/lib/node_modules/npm/node_modules/node-gyp/bin
|
|||||||
|
|
||||||
# Drop the NPM default configuration in place
|
# Drop the NPM default configuration in place
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}
|
mkdir -p %{buildroot}%{_sysconfdir}
|
||||||
cp %{SOURCE1} %{buildroot}%{_sysconfdir}/
|
cp %{SOURCE1} %{buildroot}%{_sysconfdir}/npmrc
|
||||||
|
|
||||||
|
# NPM upstream expectes it to be in /usr/etc/npmrc, so we'll put a symlink here
|
||||||
|
# This is done in the interests of keeping /usr read-only.
|
||||||
|
mkdir -p %{buildroot}%{_prefix}/etc
|
||||||
|
ln -s %{_sysconfdir}/npmrc %{buildroot}%{_prefix}/etc/npmrc
|
||||||
|
|
||||||
%check
|
%check
|
||||||
# Fail the build if the versions don't match
|
# Fail the build if the versions don't match
|
||||||
@ -609,6 +609,7 @@ end
|
|||||||
%{_bindir}/npx
|
%{_bindir}/npx
|
||||||
%{_prefix}/lib/node_modules/npm
|
%{_prefix}/lib/node_modules/npm
|
||||||
%config(noreplace) %{_sysconfdir}/npmrc
|
%config(noreplace) %{_sysconfdir}/npmrc
|
||||||
|
%{_prefix}/etc/npmrc
|
||||||
%ghost %{_sysconfdir}/npmignore
|
%ghost %{_sysconfdir}/npmignore
|
||||||
%doc %{_mandir}/man*/npm*
|
%doc %{_mandir}/man*/npm*
|
||||||
%doc %{_mandir}/man*/npx*
|
%doc %{_mandir}/man*/npx*
|
||||||
@ -625,6 +626,9 @@ end
|
|||||||
%{_pkgdocdir}/npm/doc
|
%{_pkgdocdir}/npm/doc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Oct 28 2019 Stephen Gallagher <sgallagh@redhat.com> - 1:12.13.0-2
|
||||||
|
- Simplify npmrc default configuration
|
||||||
|
|
||||||
* Mon Oct 28 2019 Stephen Gallagher <sgallagh@redhat.com> - 1:12.13.0-1
|
* Mon Oct 28 2019 Stephen Gallagher <sgallagh@redhat.com> - 1:12.13.0-1
|
||||||
- Update to 12.13.0 (LTS)
|
- Update to 12.13.0 (LTS)
|
||||||
- https://github.com/nodejs/node/blob/v12.13.0/doc/changelogs/CHANGELOG_V12.md
|
- https://github.com/nodejs/node/blob/v12.13.0/doc/changelogs/CHANGELOG_V12.md
|
||||||
|
Loading…
Reference in New Issue
Block a user