|
|
|
|
Index: lib/build.js
|
|
|
|
|
--- lib/build.js.orig 2015-06-19 11:24:05.000000000 +0200
|
|
|
|
|
+++ lib/build.js 2015-06-20 17:58:23.765125785 +0200
|
|
|
|
|
@@ -217,7 +217,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 2015-06-19 11:24:05.000000000 +0200
|
|
|
|
|
+++ lib/cache/add-local-tarball.js 2015-06-20 17:58:23.765125785 +0200
|
|
|
|
|
@@ -167,7 +167,7 @@
|
|
|
|
|
if (er) return cb(er)
|
|
|
|
|
var read = fs.createReadStream(tgz)
|
|
|
|
|
var write = writeStream(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 2015-06-19 11:24:05.000000000 +0200
|
|
|
|
|
+++ lib/cache/add-local.js 2015-06-20 17:58:23.765125785 +0200
|
|
|
|
|
@@ -97,9 +97,7 @@
|
|
|
|
|
return cb(er)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- if (!cs || isNaN(cs.uid) || isNaN(cs.gid)) wrapped()
|
|
|
|
|
-
|
|
|
|
|
- chownr(made || tgz, cs.uid, cs.gid, wrapped)
|
|
|
|
|
+ wrapped()
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
Index: lib/cache/add-remote-git.js
|
|
|
|
|
--- lib/cache/add-remote-git.js.orig 2015-06-19 11:24:05.000000000 +0200
|
|
|
|
|
+++ lib/cache/add-remote-git.js 2015-06-20 17:59:27.335225128 +0200
|
|
|
|
|
@@ -231,19 +231,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)
|
|
|
|
|
- })
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@@ -390,9 +378,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 2015-06-19 11:24:05.000000000 +0200
|
|
|
|
|
+++ lib/cache/caching-client.js 2015-06-20 18:02:53.690885624 +0200
|
|
|
|
|
@@ -182,7 +182,7 @@
|
|
|
|
|
writeFile(cachePath, JSON.stringify(data), function (er) {
|
|
|
|
|
if (er) return saved()
|
|
|
|
|
|
|
|
|
|
- chownr(made || cachePath, st.uid, st.gid, saved)
|
|
|
|
|
+ saved()
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
Index: lib/cache/update-index.js
|
|
|
|
|
--- lib/cache/update-index.js.orig 2015-06-19 11:24:05.000000000 +0200
|
|
|
|
|
+++ lib/cache/update-index.js 2015-06-20 18:01:22.495291002 +0200
|
|
|
|
|
@@ -43,9 +43,6 @@
|
|
|
|
|
return updateIndex_(uri, params, {}, cachePath, cb)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
- chownr(made || cachePath, st.uid, st.gid, function (er) {
|
|
|
|
|
- if (er) return cb(er)
|
|
|
|
|
-
|
|
|
|
|
try {
|
|
|
|
|
data = JSON.parse(data)
|
|
|
|
|
} catch (ex) {
|
|
|
|
|
@@ -71,7 +68,6 @@
|
|
|
|
|
uri += '/since?stale=update_after&startkey=' + t
|
|
|
|
|
}
|
|
|
|
|
updateIndex_(uri, params, data, cachePath, cb)
|
|
|
|
|
- })
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
@@ -95,9 +91,7 @@
|
|
|
|
|
fs.writeFile(cachePath, JSON.stringify(data), function (er) {
|
|
|
|
|
delete data._updated
|
|
|
|
|
if (er) return cb(er)
|
|
|
|
|
- chownr(cachePath, st.uid, st.gid, function (er) {
|
|
|
|
|
- cb(er, data)
|
|
|
|
|
- })
|
|
|
|
|
+ cb(undefined, data)
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
Index: lib/npm.js
|
|
|
|
|
--- lib/npm.js.orig 2015-06-19 11:24:05.000000000 +0200
|
|
|
|
|
+++ lib/npm.js 2015-06-20 17:58:23.765125785 +0200
|
|
|
|
|
@@ -413,7 +413,7 @@
|
|
|
|
|
Object.defineProperty(npm, "globalDir",
|
|
|
|
|
{ get : function () {
|
|
|
|
|
return (process.platform !== "win32")
|
|
|
|
|
- ? path.resolve(npm.globalPrefix, "lib", "node_modules")
|
|
|
|
|
+ ? path.resolve(npm.globalPrefix, "lib", "node", "usr", "node_modules")
|
|
|
|
|
: path.resolve(npm.globalPrefix, "node_modules")
|
|
|
|
|
}
|
|
|
|
|
, enumerable : true
|
|
|
|
|
Index: lib/utils/correct-mkdir.js
|
|
|
|
|
--- lib/utils/correct-mkdir.js.orig 2015-06-19 11:24:05.000000000 +0200
|
|
|
|
|
+++ lib/utils/correct-mkdir.js 2015-06-20 18:04:09.765322179 +0200
|
|
|
|
|
@@ -104,7 +104,5 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function setPermissions (path, st, cb) {
|
|
|
|
|
- chownr(path, st.uid, st.gid, function (er) {
|
|
|
|
|
- return cb(er, st)
|
|
|
|
|
- })
|
|
|
|
|
+ return cb(undefined, st)
|
|
|
|
|
}
|
|
|
|
|
Index: node_modules/node-gyp/lib/node-gyp.js
|
|
|
|
|
--- node_modules/node-gyp/lib/node-gyp.js.orig 2015-06-19 11:24:05.000000000 +0200
|
|
|
|
|
+++ node_modules/node-gyp/lib/node-gyp.js 2015-06-20 17:58:23.765125785 +0200
|
|
|
|
|
@@ -49,6 +49,10 @@
|
|
|
|
|
// set the dir where node-gyp dev files get installed
|
|
|
|
|
// TODO: make this *more* configurable?
|
|
|
|
|
// see: https://github.com/TooTallNate/node-gyp/issues/21
|
|
|
|
|
+ var baseDir = process.env.NODE_GYP
|
|
|
|
|
+ if (baseDir)
|
|
|
|
|
+ this.devDir = path.resolve(baseDir)
|
|
|
|
|
+ else {
|
|
|
|
|
var homeDir = process.env.HOME || process.env.USERPROFILE
|
|
|
|
|
if (!homeDir) {
|
|
|
|
|
throw new Error(
|
|
|
|
|
@@ -57,6 +61,7 @@
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
this.devDir = path.resolve(homeDir, '.node-gyp')
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
this.commands = {}
|
|
|
|
|
|