Your message dated Tue, 25 Dec 2018 12:00:14 +0000
with message-id <e1gblne-0001oc...@fasolo.debian.org>
and subject line Bug#901474: fixed in nodejs 10.13.0~dfsg-1
has caused the Debian Bug report #901474,
regarding [nodejs][RFC] Multiarch and /usr/local search path
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
901474: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=901474
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: nodejs
Version: 10.4.0~dfsg-2
Severity: important
tags: patch


Hi,

In order to get search path in multiarch path and in /usr/local I use the 
following patch

/usr/local part will allow to satisfy policy 9.1.2 and the other part to get 
node package multiarch like perl or python.

I think this patch could be upstreamed if needed

search order is :
usr/local/lib/$(DEB_HOST_MULTIARCH)/nodejs:/usr/local/share/nodejs:/usr/local/lib/nodejs:/usr/lib/$(DEB_HOST_MULTIARCH)/nodejs:/usr/share/nodejs:/usr/lib/nodejs

note that /usr/lib/nodejs will tested last.

You could check the patch by doing require('os').constants and see 
 ARCH_TRIPLET: 'x86_64-linux-gnu',
  GLOBAL_NODE_PATH:
   
'/usr/local/lib/x86_64-linux-gnu/nodejs:/usr/local/share/nodejs:/usr/local/lib/nodejs:/usr/lib/x86_64-linux-gnu/nodejs:/usr/share/nodejs:/usr/lib/nodejs',

then checking the load path by:
require('module')
and see the array globalPaths:
lobalPaths:
   [ '/home/bastien/.node_modules',
     '/home/bastien/.node_libraries',
     '/usr/local/lib/x86_64-linux-gnu/nodejs',
     '/usr/local/share/nodejs',
     '/usr/local/lib/nodejs',
     '/usr/lib/x86_64-linux-gnu/nodejs',
     '/usr/share/nodejs',
     '/usr/lib/nodejs' ],

I have also added arch triplet because some module will need it.

Bastien

diff --git a/debian/patches/pass-arch-dir-to-constants 
b/debian/patches/pass-arch-dir-to-constants
new file mode 100644
index 00000000..b12f0f4e
--- /dev/null
+++ b/debian/patches/pass-arch-dir-to-constants
@@ -0,0 +1,51 @@
+Index: nodejs/src/node_constants.cc
+===================================================================
+--- nodejs.orig/src/node_constants.cc
++++ nodejs/src/node_constants.cc
+@@ -1309,6 +1309,15 @@ void DefineConstants(v8::Isolate* isolat
+   NODE_DEFINE_CONSTANT(fs_constants, UV_FS_COPYFILE_FICLONE);
+   NODE_DEFINE_CONSTANT(fs_constants, UV_FS_COPYFILE_FICLONE_FORCE);
+ 
++  // Define arch triplet
++#ifdef DEBIAN_ARCH_TRIPLET
++  NODE_DEFINE_STRING_CONSTANT(os_constants, "ARCH_TRIPLET", 
DEBIAN_ARCH_TRIPLET);
++#endif
++
++#ifdef DEBIAN_GLOBAL_NODE_PATH
++  NODE_DEFINE_STRING_CONSTANT(os_constants, "GLOBAL_NODE_PATH", 
DEBIAN_GLOBAL_NODE_PATH);
++#endif
++
+   os_constants->Set(OneByteString(isolate, "dlopen"), dlopen_constants);
+   os_constants->Set(OneByteString(isolate, "errno"), err_constants);
+   os_constants->Set(OneByteString(isolate, "signals"), sig_constants);
+Index: nodejs/lib/internal/modules/cjs/loader.js
+===================================================================
+--- nodejs.orig/lib/internal/modules/cjs/loader.js
++++ nodejs/lib/internal/modules/cjs/loader.js
+@@ -26,6 +26,7 @@ const util = require('util');
+ const vm = require('vm');
+ const assert = require('assert').ok;
+ const fs = require('fs');
++const GLOBAL_NODE_PATH = (require("os").constants).GLOBAL_NODE_PATH;
+ const internalFS = require('internal/fs/utils');
+ const path = require('path');
+ const {
+@@ -768,7 +769,17 @@ Module._initPaths = function() {
+   } else {
+     prefixDir = path.resolve(process.execPath, '..', '..');
+   }
+-  var paths = [path.resolve(prefixDir, 'lib', 'nodejs')];
++  var paths = [];
++  // prefer /usr/local over /usr and arch over all
++
++  if (GLOBAL_NODE_PATH) {
++    paths = GLOBAL_NODE_PATH.split(path.delimiter).filter(function 
pathsFilterCB(path) {
++      return !!path;
++    }).concat(paths);
++  }
++  else {
++    paths.push(path.resolve('/usr','lib','nodejs'));
++  }
+ 
+   if (homeDir) {
+     paths.unshift(path.resolve(homeDir, '.node_libraries'));
diff --git a/debian/patches/series b/debian/patches/series
index cd794b90..b35d3b3e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,3 +8,4 @@ build-doc-using-js-yaml.patch
 test_ci_buildd.patch
 fix_disable_cctest.patch
 benchmark_without_alice.patch
+pass-arch-dir-to-constants
diff --git a/debian/rules b/debian/rules
index a9014f81..c0f3a53b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -188,6 +188,13 @@ CPPFLAGS+=-fPIC
 CFLAGS+=-g
 CPPFLAGS+=-g
 CXXFLAGS+=$(CPPFLAGS)
+
+GLOBAL_NODE_PATH= 
/usr/local/lib/$(DEB_HOST_MULTIARCH)/nodejs:/usr/local/share/nodejs:/usr/local/lib/nodejs
+GLOBAL_NODE_PATH:= 
$(GLOBAL_NODE_PATH):/usr/lib/$(DEB_HOST_MULTIARCH)/nodejs:/usr/share/nodejs:/usr/lib/nodejs
+
+CFLAGS+=-DDEBIAN_ARCH_TRIPLET=\"$(DEB_HOST_MULTIARCH)\" 
-DDEBIAN_GLOBAL_NODE_PATH=\"$(GLOBAL_NODE_PATH)\" 
+CPPFLAGS+=-DDEBIAN_ARCH_TRIPLET=\"$(DEB_HOST_MULTIARCH)\" 
-DDEBIAN_GLOBAL_NODE_PATH=\"$(GLOBAL_NODE_PATH)\"
+CXXFLAGS+=-DDEBIAN_ARCH_TRIPLET=\"$(DEB_HOST_MULTIARCH)\" 
-DDEBIAN_GLOBAL_NODE_PATH=\"$(GLOBAL_NODE_PATH)\"
 export CPPFLAGS
 export CXXFLAGS
 export CFLAGS

Attachment: signature.asc
Description: This is a digitally signed message part.


--- End Message ---
--- Begin Message ---
Source: nodejs
Source-Version: 10.13.0~dfsg-1

We believe that the bug you reported is fixed in the latest version of
nodejs, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 901...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jérémy Lal <kapo...@melix.org> (supplier of updated nodejs package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 30 Oct 2018 10:26:02 +0100
Source: nodejs
Binary: nodejs-dev libnode-dev nodejs libnode64 nodejs-doc
Architecture: source amd64 all
Version: 10.13.0~dfsg-1
Distribution: experimental
Urgency: medium
Maintainer: Debian Javascript Maintainers 
<pkg-javascript-de...@lists.alioth.debian.org>
Changed-By: Jérémy Lal <kapo...@melix.org>
Description:
 libnode-dev - evented I/O for V8 javascript (development files)
 libnode64  - evented I/O for V8 javascript - runtime library
 nodejs     - evented I/O for V8 javascript - runtime executable
 nodejs-dev - evented I/O for V8 javascript (debhelper files)
 nodejs-doc - API documentation for Node.js, the javascript platform
Closes: 901297 901474 904274 905415 905886
Changes:
 nodejs (10.13.0~dfsg-1) experimental; urgency=medium
 .
   * New upstream version 10.13.0~dfsg
 .
 nodejs (10.12.0~dfsg-1) experimental; urgency=medium
 .
   * New upstream version 10.12.0~dfsg
   * openssl: use bundled copy because node is not compatible
     with openssl 1.1.1 right now (and there is no upstream fix).
     On the plus side:
     + this avoids ABI breakage for C++ addons (Closes: #904274)
     + upstream have security support for openssl vulns
     On the down side, it's a policy 4.13 violation.
   * copyright:
     + no longer exclude marked since it is removed
     + drop paragraph for pthread-barrier.h
   * Multiarch and DFHS:
     + patch adding --node-relative-path configuration variable
     + "/usr/lib/<$DEB_HOST_MULTIARCH>/nodejs" for c++ addons
     + "/usr/share/nodejs" for pure javascript modules
     + "/usr/lib/nodejs" for smooth migration of current modules
     + Expose those configuration variables in
       process.config.variables.node_relative_path
       process.config.variables.arch_triplet
     + In particular, if prefix is /usr/local all paths move there.
     + Fix test expecting lib/node, should be lib/nodejs.
     (Closes: #901474)
   * Build using shared libuv1 again (Closes: #905415)
   * Standards-Version 4.2.1
   * Add support for mips64r6el arch (Closes: #905886)
   * Drop libnodeXX-dev in favor of libnode-dev (Closes: #901297)
   * Patch tools/doc to restore old dependencies on marked,
     while waiting for remarked/rehyped modules to be available.
   * sequential/test-http2-session-timeout is a flaky test
   * Add lintian override for test/fixtures/assert-long-line.js,
     false source-is-missing positive.
   * Build using LANG=C
   * Stop excluding tools/gyp because upstream patches it
   * Tighten dependency on nghttp2 >= 1.34.0
Checksums-Sha1:
 190b64607faaba2fcffab29217aba15b5150e7fc 3173 nodejs_10.13.0~dfsg-1.dsc
 56cfa77d1cde0655aabe6cb66617c3ce8f686e43 15160472 
nodejs_10.13.0~dfsg.orig.tar.xz
 561dde7aa2685894e970089951d5f849258338a1 91516 
nodejs_10.13.0~dfsg-1.debian.tar.xz
 fe5a11df4b2f8126089410af863b93d87ead067d 386740 
libnode-dev_10.13.0~dfsg-1_amd64.deb
 7f1f33262938b3270b1304e3044bf7e5ec3224d0 297058240 
libnode64-dbgsym_10.13.0~dfsg-1_amd64.deb
 b437dd268679d98a37c3fddb41f14bc97eb386a3 6585052 
libnode64_10.13.0~dfsg-1_amd64.deb
 443a46881e154deee98cf753e588bad09b045632 13000 
nodejs-dbgsym_10.13.0~dfsg-1_amd64.deb
 4fd2c7d601e2f98d26f78e19fe06bc595132b400 81416 
nodejs-dev_10.13.0~dfsg-1_amd64.deb
 4d666c9faf24e3ee4b9ed0186cf403e5f396e1c2 940388 
nodejs-doc_10.13.0~dfsg-1_all.deb
 cc65651c71adc94d35f1c72d1ebf866aa0b80e79 10255 
nodejs_10.13.0~dfsg-1_amd64.buildinfo
 4d818d1867bc779ec56eabfba0a8368d246e47f5 85484 nodejs_10.13.0~dfsg-1_amd64.deb
Checksums-Sha256:
 f62da864215f58222d13f2ff859d65f2554fe257a754b9ea1f5aceac9b6b117f 3173 
nodejs_10.13.0~dfsg-1.dsc
 539b33b5900100779b5945be14b7eaa65d934fae5d6e377769ba3926406508a1 15160472 
nodejs_10.13.0~dfsg.orig.tar.xz
 92ed90c5962b8f92a32a5e12682ead5cd2294c1ba68d09669d03b32deea76f03 91516 
nodejs_10.13.0~dfsg-1.debian.tar.xz
 0f450a43fb88fae04a7d6dceffa23ca8583559fe98aa07aa5921c39d62b7f6ed 386740 
libnode-dev_10.13.0~dfsg-1_amd64.deb
 d5f8843c112ca473ed516fd1acfd33a8d4448618d920a5d39be3da498d41970e 297058240 
libnode64-dbgsym_10.13.0~dfsg-1_amd64.deb
 b5361e669848456c03be7d8b198c2b85b9e30dc9fa7eeac416774e3f6c9ee62e 6585052 
libnode64_10.13.0~dfsg-1_amd64.deb
 14496b25fb68dc40d8fcba921af8924e332c46cb116582e4f1aeebeb0af87c20 13000 
nodejs-dbgsym_10.13.0~dfsg-1_amd64.deb
 1124e7f185bbaca5e046d42b0bc6a895da1317f755a75ee72699313a7355a1d8 81416 
nodejs-dev_10.13.0~dfsg-1_amd64.deb
 08959d5a5d558e1f48d91f8f5bff71df80d67f576df123982815a52874f41ac4 940388 
nodejs-doc_10.13.0~dfsg-1_all.deb
 b509f289708990b323dc38f726d2b810b98d75aeccbc1d233fa984994ecd6840 10255 
nodejs_10.13.0~dfsg-1_amd64.buildinfo
 54acd96d7f4280a15b1ea7992bd47d8640ebf3a8700e4b976923aa47f92445b3 85484 
nodejs_10.13.0~dfsg-1_amd64.deb
Files:
 9c28423a8926305a48d4131464a2aff7 3173 javascript optional 
nodejs_10.13.0~dfsg-1.dsc
 be0ac6820252434e386bfdd91b451e41 15160472 javascript optional 
nodejs_10.13.0~dfsg.orig.tar.xz
 d8b4c099e8971d5074191deef73d01d3 91516 javascript optional 
nodejs_10.13.0~dfsg-1.debian.tar.xz
 b74bb7a1b1ceb2af9d8fd7673b468e32 386740 libdevel optional 
libnode-dev_10.13.0~dfsg-1_amd64.deb
 ede54585b452c17279b02a8042da784b 297058240 debug optional 
libnode64-dbgsym_10.13.0~dfsg-1_amd64.deb
 e440d9130b9e0440106aad2177a55b7b 6585052 libs optional 
libnode64_10.13.0~dfsg-1_amd64.deb
 86ea4b0df44f8cdf17bd1800faefd400 13000 debug optional 
nodejs-dbgsym_10.13.0~dfsg-1_amd64.deb
 6353f92be7afc453c471238c182ddf2a 81416 devel optional 
nodejs-dev_10.13.0~dfsg-1_amd64.deb
 63c0ce72f52f9ffb6033abc1789e7ad3 940388 doc optional 
nodejs-doc_10.13.0~dfsg-1_all.deb
 e61e68e582b5382faf11147fb817096e 10255 javascript optional 
nodejs_10.13.0~dfsg-1_amd64.buildinfo
 9c11c3d74134bbfaf9b6af5ce6f4e7cf 85484 javascript optional 
nodejs_10.13.0~dfsg-1_amd64.deb

-----BEGIN PGP SIGNATURE-----

iQJGBAEBCgAwFiEEA8Tnq7iA9SQwbkgVZhHAXt0583QFAlvYODESHGthcG91ZXJA
bWVsaXgub3JnAAoJEGYRwF7dOfN0qQ0P/A+K4mNB7jMCx1pgcyM00yi6AZyoVM2f
UCRobqXarVUtw98IKjpyy1cVyv5lGxL9IdO99N5Pkw6aBMft9KagtSQ8QjJQXRke
w2FDehEhPipkXglA5sDo6VcsO2FQdMap8U9Neg3JvXt/D75r92M6x7qL/oPtULjo
Kk0nEahIymodEg08q0u9Og3gdXtNUrILgjWkPKiOTOnxt0v+H2M7S8Q40mczh8rr
QGY7hAMwd4kzzZPggR0HvBViMPuUucefXqpCYGDtempKzBlUu6fFnea6ohKT4Npy
lpTkQnEaqYrymBnvFLaMaz4RqgF6ZDEaqxwWVLvTCJiCnaGuDpF8fnP7B3uyO4Av
3Ec3eXH1zTw5DNsuXxaBmgNOc/kL8i65gbXn9o5UukxbETF5+67mFwcRYuhE9EIx
BKhroAjEW3h0MGInQmtYONmHzb8tRnJyxyrLzY8jkbrNJmJCrWnNz0pzltDFIRZD
f/2qpFaJxQWYe+HWJGeBPjgObNTUcdKv2JcZfWBn7MStzMEQN4KS31FG/XNLYFCV
l86fMaOlUgWQcZk6Y5O4Kq2v/9KZtcRie93jGj5yeIAZhQMepy6p1ej8+3ZtRSmh
PDBhXwOCLf6LNRV+D+TpNB5oAAZxXLjaIhTUMxx1FWvv1rHlwW121MHIUKdQSONG
R/sGsPmi/+BH
=4Hnt
-----END PGP SIGNATURE-----

--- End Message ---
-- 
Pkg-javascript-devel mailing list
Pkg-javascript-devel@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel

Reply via email to