2018-06-13 23:28 GMT+02:00 Bastien ROUCARIES <roucaries.bast...@gmail.com>:

> On Wed, Jun 13, 2018 at 10:46 PM, Jérémy Lal <kapo...@melix.org> wrote:
> >
> >
> > 2018-06-13 22:09 GMT+02:00 Bastien ROUCARIÈS <
> roucaries.bast...@gmail.com>:
> >>
> >> 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
> >>
> >> ../..
> >>
> >> globalPaths:
> >>    [ '/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.
> >
> >
> > Cool ! I'll take only the fix for the require path of
> > system-multiarch-installed addons.
> > (nodejs does not search /usr/local - yarn global does not either - only
> npm
> > might
> > be concerned).
>
> Yes and no.
>
> Admin could want to delegate to staff group /usr/local and staff group
> will install under /usr/local.  It is the policy, and a SHOULD but it
> is nice to implement and document.
>
> But if you see the list is defined in debian/rules. Not hard coded.
>


nodejs allows one to set NODE_PATH environment variable,
so there is no need to recompile it to use /usr/local/xxx as a global
search path.
The only thing left to do is to properly place the node addon in the right
place (/usr/lib/x86_64-linux-gnu/nodejs) - and that can be achieved manually
or with a patch to npm... which would be easier to achieve if the actual
triplet was available to nodejs users, since it's "hard to guess".

Jérémy

Reply via email to