[Pkg-javascript-devel] Bug#705236: npm doesn't work with node v0.10.1

2013-04-25 Thread Guido Günther
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.

[Pkg-javascript-devel] Bug#705236: npm doesn't work with node v0.10.1

2013-04-24 Thread Jérémy Lal
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

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.

Jérémy

___
Pkg-javascript-devel mailing list
Pkg-javascript-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel


[Pkg-javascript-devel] Bug#705236: npm doesn't work with node v0.10.1

2013-04-23 Thread Guido Günther
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,
 -- Guido


-- System Information:
Debian Release: 7.0
  APT prefers testing
  APT policy: (990, 'testing'), (50, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-4-686-pae (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

___
Pkg-javascript-devel mailing list
Pkg-javascript-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel


[Pkg-javascript-devel] Bug#705236: npm doesn't work with node v0.10.1

2013-04-11 Thread Michael Gebetsroither
Package: npm
Version: 1.1.4~dfsg-2
Severity: normal

Dear Maintainer,

I just had a nodejs application which was not compatible with nodejs 0.6
anymore and thus had to upgrade to 0.10 from experimental.

Though it seems npm from debian does not work on nodejs from experimental.

Error: npm doesn't work with node v0.10.1
Required: node@0.6 || 0.7 || 0.8
at /usr/share/npm/bin/npm-cli.js:67:23
at Object. (/usr/share/npm/bin/npm-cli.js:87:3)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3

ps.: node v0.10.3 with included npm works.

Michael Gebetsroither

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.5-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages npm depends on:
ii  node-abbrev   1.0.3-1
ii  node-fstream  0.1.13-1
ii  node-graceful-fs  1.1.8-1
ii  node-ini  1.0.2-1
ii  node-minimatch0.2.0-1
ii  node-mkdirp   0.3.1-2
ii  node-node-uuid1.3.3-1
ii  node-nopt 1.0.10-2
ii  node-request  2.9.153-1
ii  node-rimraf   2.0.1-1
ii  node-semver   1.0.13-2
ii  node-tar  0.1.13-1
ii  node-which1.0.5-2
ii  nodejs0.10.1~dfsg1-2
ii  nodejs-dev0.10.1~dfsg1-2

npm recommends no packages.

Versions of packages npm suggests:
ii  build-essential  11.5

-- no debconf information

___
Pkg-javascript-devel mailing list
Pkg-javascript-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-javascript-devel