Hi jérémy,
On Wed, Apr 24, 2013 at 11:13:57AM +0200, Jérémy Lal wrote:
> (resending using another smtp, your mta rejected mine the first try)
>
> On 24/04/2013 06:23, Guido Günther wrote:
> > Package: npm
> > Followup-For: Bug #705236
> >
> > I wonder if it would make sense to ship npm from nodejs itself? This
> > would make sure these are in sync. cc: the nodejs maintainers for that.
> >
> > If not I'd be happy to NMU a new npm version.
> > Cheers,
>
> I think it doesn't make sense packaging npm within nodejs,
> - they are very different software
> - npm depends on many other modules, nodejs doesn't
> - the packaging work is very different
That's fine. I was just suggesting this since it might save some effort.
Having it packaged separately is preferable of course.
> There is still work to do on npm dependencies. Some of them
> should better be left bundled in npm (because they are so bound
> to npm and better alternatives exist, or because nobody would
> use them anyway).
>
> I'll have some time to finish this job next month. If you can
> help before, we can talk on #debian-js.
I've attached my current diff here (excluding the upstream import of
1.2.18) that gave me a working (but far from lintian clean) version.
I'll update it should I find some time to make some more progress.
Cheers,
-- Guido
diff --git a/debian/install b/debian/install
index 2972590..25a1372 100644
--- a/debian/install
+++ b/debian/install
@@ -1,9 +1,8 @@
lib/*.js usr/share/npm/lib
lib/utils/*.js usr/share/npm/lib/utils
lib/utils/completion usr/share/npm/lib/utils
-lib/utils/npm-registry-client usr/share/npm/lib/utils
bin/*.js usr/share/npm/bin
package.json usr/share/npm
node_modules usr/share/npm
debian/npmrc usr/share/npm
-doc usr/share/npm
\ No newline at end of file
+doc usr/share/npm
diff --git a/debian/patches/1001_sort_index_build.patch
b/debian/patches/1001_sort_index_build.patch
deleted file mode 100644
index 03b0101..000
--- a/debian/patches/1001_sort_index_build.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Description: Sort globbed files when building index of documentation.
-Origin: upstream,https://github.com/isaacs/npm/commit/af6444fe
-Forwarded: not-needed
-Author: Jérémy Lal
-Last-Update: 2012-04-07
a/scripts/index-build.js
-+++ b/scripts/index-build.js
-@@ -12,6 +12,7 @@
-
- function done (which) { return function (er, docs) {
- if (er) throw er
-+ docs.sort();
- if (which === "api") apidocs = docs
- else clidocs = docs
-
diff --git a/debian/patches/1002_only_use_numeric_UIDs_and_GIDs_in_spawn.patch
b/debian/patches/1002_only_use_numeric_UIDs_and_GIDs_in_spawn.patch
deleted file mode 100644
index 4b1640b..000
--- a/debian/patches/1002_only_use_numeric_UIDs_and_GIDs_in_spawn.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-Description: Only use numeric UIDs and GIDs in spawn.
-Origin: upstream,https://github.com/isaacs/npm/commit/76c7d93e
-Forwarded: not-needed
-Last-Update: 2012-09-09
- lib/utils/exec.js | 19 +--
- 1 file changed, 17 insertions(+), 2 deletions(-)
-
a/lib/utils/exec.js
-+++ b/lib/utils/exec.js
-@@ -11,6 +11,7 @@
- , myGID = process.getgid ? process.getgid() : null
- , isRoot = process.getuid && myUID === 0
- , constants = require("constants")
-+ , uidNumber = require("./uid-number.js")
-
- function exec (cmd, args, env, takeOver, cwd, uid, gid, cb) {
- if (typeof cb !== "function") cb = gid, gid = null
-@@ -34,6 +35,15 @@
- log.verbose(uid, "Setting uid from "+myUID)
- log.verbose(new Error().stack, "stack at uid setting")
- }
-+
-+ if (isNaN(uid) || isNaN(gid)) {
-+// get the numeric values
-+return uidNumber(uid, gid, function (er, uid, gid) {
-+ if (er) return cb(er)
-+ exec(cmd, args, env, takeOver, cwd, uid, gid, cb)
-+})
-+ }
-+
- log.silly(cmd+" "+args.map(JSON.stringify).join(" "), "exec")
- var stdout = ""
- , stderr = ""
-@@ -94,8 +104,8 @@
- , env : env || process.env
- , cwd : cwd || null }
- , cp
-- if (uid != null) opts.uid = uid
-- if (gid != null) opts.gid = gid
-+ if (!isNaN(uid)) opts.uid = uid
-+ if (!isNaN(gid)) opts.gid = gid
- if (!isNaN(opts.uid)) opts.uid = +opts.uid
- if (!isNaN(opts.gid)) opts.gid = +opts.gid
- var name = c +" "+ a.map(JSON.stringify).join(" ")
diff --git a/debian/patches/2001_no-false-attribs.patch
b/debian/patches/2001_no-false-attribs.patch
index 1afb202..f722f74 100644
--- a/debian/patches/2001_no-false-attribs.patch
+++ b/debian/patches/2001_no-false-attribs.patch
@@ -6,19 +6,30 @@ Description: Comply with Expat+no-false-attribs license
package to displays its own bug tracker instead.
Forwarded: not-needed
Author: Jérémy Lal
-Last-Update: 2012-03-13
+Last-Update: 2013-04-24
+
+---
+ lib/utils/error-handler.js | 10 +-
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/lib/utils/error-handler.js b/lib/utils/error-handler.js
+index 88ce742..0d1bc94 100644
--- a/lib/utils/error-handler.