From fa68d1cc51e3f55c3590ffb92151c7acbb53ff1c Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 9 Apr 2018 17:01:28 -0400 Subject: [PATCH] Suppress npm update message Signed-off-by: Stephen Gallagher --- no-npm-update-msg.patch | 16 ++++++++++++++++ nodejs.spec | 6 ++++++ 2 files changed, 22 insertions(+) create mode 100644 no-npm-update-msg.patch diff --git a/no-npm-update-msg.patch b/no-npm-update-msg.patch new file mode 100644 index 0000000..f16961a --- /dev/null +++ b/no-npm-update-msg.patch @@ -0,0 +1,16 @@ +diff '--color=auto' -ruN node-v9.11.1.orig/deps/npm/bin/npm-cli.js node-v9.11.1/deps/npm/bin/npm-cli.js +--- node-v9.11.1.orig/deps/npm/bin/npm-cli.js 2018-04-05 00:34:51.000000000 -0400 ++++ node-v9.11.1/deps/npm/bin/npm-cli.js 2018-04-09 16:57:31.595166069 -0400 +@@ -25,12 +25,6 @@ + + unsupported.checkForUnsupportedNode() + +- if (!unsupported.checkVersion(process.version).unsupported) { +- var updater = require('update-notifier') +- var pkg = require('../package.json') +- updater({pkg: pkg}).notify({defer: true}) +- } +- + var path = require('path') + var npm = require('../lib/npm.js') + var npmconf = require('../lib/config/core.js') diff --git a/nodejs.spec b/nodejs.spec index 6e180d8..c5cc340 100644 --- a/nodejs.spec +++ b/nodejs.spec @@ -122,6 +122,10 @@ Patch1: 0001-Disable-running-gyp-files-for-bundled-deps.patch # Follow https://bugs.chromium.org/p/v8/issues/detail?id=6939 Patch2: 0001-Fix-aarch64-debug.patch +# Suppress the message from npm to run `npm -g update npm` +# This does bad things on an RPM-managed npm. +Patch3: no-npm-update-msg.patch + BuildRequires: python2-devel BuildRequires: libicu-devel BuildRequires: zlib-devel @@ -282,6 +286,8 @@ rm -rf deps/icu-small \ %patch2 -p1 +%patch3 -p1 + %build # build with debugging symbols and add defines from libuv (#892601) # Node's v8 breaks with GCC 6 because of incorrect usage of methods on