|
|
|
|
Index: lib/build.js
|
|
|
|
|
--- lib/build.js.orig 2016-10-21 03:46:47.000000000 +0200
|
|
|
|
|
+++ lib/build.js 2016-10-21 18:18:51.746070163 +0200
|
|
|
|
|
@@ -230,7 +230,7 @@
|
|
|
|
|
function linkMans (pkg, folder, parent, gtop, cb) {
|
|
|
|
|
if (!pkg.man || !gtop || process.platform === 'win32') return cb()
|
|
|
|
|
|
|
|
|
|
- var manRoot = path.resolve(npm.config.get('prefix'), 'share', 'man')
|
|
|
|
|
+ var manRoot = path.resolve(npm.config.get('prefix'), 'man')
|
|
|
|
|
log.verbose('linkMans', 'man files are', pkg.man, 'in', manRoot)
|
|
|
|
|
|
|
|
|
|
// make sure that the mans are unique.
|
|
|
|
|
Index: lib/cache/add-local-tarball.js
|
|
|
|
|
--- lib/cache/add-local-tarball.js.orig 2016-10-21 03:46:47.000000000 +0200
|
|
|
|
|
+++ lib/cache/add-local-tarball.js 2016-10-21 18:27:02.837082568 +0200
|
|
|
|
|
@@ -157,13 +157,13 @@
|
|
|
|
|
// or the root dir, if none had to be created, so that
|
|
|
|
|
// we know that we get all the children.
|
|
|
|
|
function chown () {
|
|
|
|
|
- chownr(created || root, cs.uid, cs.gid, done)
|
|
|
|
|
+ done(null)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (er) return cb(er)
|
|
|
|
|
var read = fs.createReadStream(tgz)
|
|
|
|
|
var write = writeStreamAtomic(target, { mode: npm.modes.file })
|
|
|
|
|
- var fin = cs.uid && cs.gid ? chown : done
|
|
|
|
|
+ var fin = cs.uid && cs.gid ? done : done
|
|
|
|
|
read.on('error', cb).pipe(write).on('error', cb).on('close', fin)
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
Index: lib/cache/add-local.js
|
|
|
|
|
--- lib/cache/add-local.js.orig 2016-10-21 03:46:47.000000000 +0200
|
|
|
|
|
+++ lib/cache/add-local.js 2016-10-21 18:18:51.746070163 +0200
|
|
|
|
|
@@ -123,12 +123,7 @@
|
|
|
|
|
return wrapped(er)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- if (!cs || isNaN(cs.uid) || isNaN(cs.gid)) return wrapped()
|
|
|
|
|
-
|
|
|
|
|
- chownr(made || tgz, cs.uid, cs.gid, function (er) {
|
|
|
|
|
- if (er && er.code === 'ENOENT') return wrapped()
|
|
|
|
|
- wrapped(er)
|
|
|
|
|
- })
|
|
|
|
|
+ wrapped()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
Index: lib/cache/add-remote-git.js
|
|
|
|
|
--- lib/cache/add-remote-git.js.orig 2016-10-21 03:46:47.000000000 +0200
|
|
|
|
|
+++ lib/cache/add-remote-git.js 2016-10-21 18:18:51.746070163 +0200
|
|
|
|
|
@@ -233,19 +233,7 @@
|
|
|
|
|
return cb(er)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- chownr(cachedRemote, cs.uid, cs.gid, function (er) {
|
|
|
|
|
- if (er) {
|
|
|
|
|
- log.error(
|
|
|
|
|
- 'setPermissions',
|
|
|
|
|
- 'Failed to change git repository ownership under npm cache for',
|
|
|
|
|
- cachedRemote
|
|
|
|
|
- )
|
|
|
|
|
- return cb(er)
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- log.verbose('setPermissions', from, 'set permissions on', cachedRemote)
|
|
|
|
|
resolveHead(from, cloneURL, treeish, cachedRemote, cb)
|
|
|
|
|
- })
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@@ -406,9 +394,7 @@
|
|
|
|
|
|
|
|
|
|
// Ensure that both the template and remotes directories have the correct
|
|
|
|
|
// permissions.
|
|
|
|
|
- fs.chown(templates, stats.uid, stats.gid, function (er) {
|
|
|
|
|
- cb(er, stats)
|
|
|
|
|
- })
|
|
|
|
|
+ cb(undefined, stats)
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
Index: lib/cache/caching-client.js
|
|
|
|
|
--- lib/cache/caching-client.js.orig 2016-10-21 03:46:47.000000000 +0200
|
|
|
|
|
+++ lib/cache/caching-client.js 2016-10-21 18:18:51.746070163 +0200
|
|
|
|
|
@@ -183,7 +183,7 @@
|
|
|
|
|
writeFile(cachePath, JSON.stringify(data), function (er) {
|
|
|
|
|
if (er) return saved()
|
|
|
|
|
|
|
|
|
|
- chownr(made || cachePath, st.uid, st.gid, saved)
|
|
|
|
|
+ saved()
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
Index: lib/search/all-package-metadata.js
|
|
|
|
|
--- lib/search/all-package-metadata.js.orig 2016-10-21 03:46:47.000000000 +0200
|
|
|
|
|
+++ lib/search/all-package-metadata.js 2016-10-21 18:26:12.456101745 +0200
|
|
|
|
|
@@ -238,7 +238,7 @@
|
|
|
|
|
if (er) return cb(er)
|
|
|
|
|
mkdir(cacheBase, function (er, made) {
|
|
|
|
|
if (er) return cb(er)
|
|
|
|
|
- chownr(made || cacheBase, st.uid, st.gid, cb)
|
|
|
|
|
+ cb(null)
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
Index: lib/utils/correct-mkdir.js
|
|
|
|
|
--- lib/utils/correct-mkdir.js.orig 2016-10-21 03:46:47.000000000 +0200
|
|
|
|
|
+++ lib/utils/correct-mkdir.js 2016-10-21 18:25:35.946379699 +0200
|
|
|
|
|
@@ -116,8 +116,5 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function setPermissions (path, st, cb) {
|
|
|
|
|
- chownr(path, st.uid, st.gid, function (er) {
|
|
|
|
|
- if (er && er.code === 'ENOENT') return cb(null, st)
|
|
|
|
|
- return cb(er, st)
|
|
|
|
|
- })
|
|
|
|
|
+ cb(null, st)
|
|
|
|
|
}
|