Welcome! Log In Create A New Profile

Advanced

Re: How to build NodeJS support without an Internet connection?

Valentin V. Bartenev
December 09, 2018 01:14PM
On Sunday, 9 December 2018 16:41:56 MSK Ralph Seichter wrote:
> Hello developer team.
>
> I am the maintainer of the NGINX Unit ebuild for Gentoo Linux, and
> currently I am struggling with colliding requirements of Unit's and
> Gentoo's build strategies.
>
> As you may know, the Gentoo way is to build everything from the source
> code, with only very few exceptions. If, for example, the user desires
> Python support in Unit, my ebuild ensures that this requirement is met
> before Unit's release tarball is even unpacked.
>
> NodeJS support is a different beast, because the existing Unit build
> method relies on node-gyp and npm to download and install dependencies
> during the build process. This fails, because Gentoo builds are executed
> in a sandbox environment that prohibits both network access and files
> being written outside the sandbox. Hence, "npm install --global ..."
> won't do.
>
> Is there a way I can modify the existing Unit build to comply with these
> restrictions? Everything required for the build must either already
> exist, or it must be downloaded by Gentoo before Unit's compile phase.
> Also, all required artefacts are recorded with a checksum when an ebuild
> is added to the Gentoo tree, so no "download whatever is the most recent
> version of XYZ".
>
> Your help is appreciated.

Hi Ralph,

Thank you for your effort.

All the Node.js module dependencies are set in its package.json file:
http://hg.nginx.org/unit/file/tip/src/nodejs/unit-http/package.json

There's just one:

"dependencies": {
"node-addon-api": "1.2.0"
}

and I'm not sure that it's needed at all, especially for Gentoo.

I think you can just remove it.

See also this overlay for some ideas:
https://github.com/msva/mva-overlay/tree/master/www-servers/nginx-unit

wbr, Valentin V. Bartenev



_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

How to build NodeJS support without an Internet connection?

Ralph Seichter December 09, 2018 08:42AM

Re: How to build NodeJS support without an Internet connection?

Valentin V. Bartenev December 09, 2018 01:14PM

Re: How to build NodeJS support without an Internet connection?

Valentin V. Bartenev December 12, 2018 12:10PM

Re: How to build NodeJS support without an Internet connection?

Ralph Seichter December 12, 2018 01:14PM

Re: How to build NodeJS support without an Internet connection?

Valentin V. Bartenev December 12, 2018 01:26PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 270
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready