source: general/genlib/nodejs.xml

trunk
Last change on this file was 85171f7b, checked in by Rahul Chandra <rahul@…>, 7 days ago

Update to nodejs-20.12.2

  • Property mode set to 100644
File size: 8.3 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY nodejs-download-http "https://nodejs.org/dist/v&nodejs-version;/node-v&nodejs-version;.tar.xz">
8 <!ENTITY nodejs-download-ftp " ">
9 <!ENTITY nodejs-md5sum "85986134f75f98e9a1c006e7a72d1172">
10 <!ENTITY nodejs-size "40 MB">
11 <!ENTITY nodejs-buildsize "974 MB (add 62 MB for tests)">
12 <!ENTITY nodejs-time "10.9 SBU (add 3.2 SBU for tests: both using parallelism=8 and 8 CPUs online, parts of the tests will use all online CPUs)">
13]>
14
15<sect1 id="nodejs" xreflabel="nodejs-&nodejs-version;">
16 <?dbhtml filename="nodejs.html"?>
17
18
19 <title>Node.js-&nodejs-version;</title>
20
21 <indexterm zone="nodejs">
22 <primary sortas="a-nodejs">nodejs</primary>
23 </indexterm>
24
25 <sect2 role="package">
26 <title>Introduction to Node.js</title>
27
28 <para>
29 <application>Node.js</application> is a
30 <application>JavaScript</application> runtime built on
31 <application>Chrome's</application> V8 JavaScript engine.
32 </para>
33
34 &lfs121_checked;
35
36 <bridgehead renderas="sect3">Package Information</bridgehead>
37 <itemizedlist spacing="compact">
38 <listitem>
39 <para>
40 Download (HTTP): <ulink url="&nodejs-download-http;"/>
41 </para>
42 </listitem>
43 <listitem>
44 <para>
45 Download (FTP): <ulink url="&nodejs-download-ftp;"/>
46 </para>
47 </listitem>
48 <listitem>
49 <para>
50 Download MD5 sum: &nodejs-md5sum;
51 </para>
52 </listitem>
53 <listitem>
54 <para>
55 Download size: &nodejs-size;
56 </para>
57 </listitem>
58 <listitem>
59 <para>
60 Estimated disk space required: &nodejs-buildsize;
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 Estimated build time: &nodejs-time;
66 </para>
67 </listitem>
68 </itemizedlist>
69
70<!--
71 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
72 <itemizedlist spacing="compact">
73 <listitem>
74 <para>
75 Required patch:
76 <ulink url="&patch-root;/node-v&nodejs-version;-icu_69-1.patch"/>
77 </para>
78 </listitem>
79 </itemizedlist>
80-->
81
82 <bridgehead renderas="sect3">Node.js Dependencies</bridgehead>
83
84 <bridgehead renderas="sect4">Required</bridgehead>
85 <para role="required">
86 <xref linkend="which"/>
87 </para>
88
89 <bridgehead renderas="sect4">Recommended</bridgehead>
90 <para role="recommended">
91 <xref linkend="brotli"/>,
92 <xref linkend="c-ares"/>,
93 <xref linkend="icu"/>,
94 <xref linkend="libuv"/>, and
95 <xref linkend="nghttp2"/>
96 </para>
97
98 <bridgehead renderas="sect4">Optional</bridgehead>
99 <para role="optional">
100 <ulink url="https://github.com/nodejs/http-parser">http-parser</ulink> and
101 <ulink url="https://www.npmjs.com/">npm</ulink> (an internal copy of
102 <command>npm</command> will be installed if not present)
103 </para>
104
105
106 </sect2>
107
108 <sect2 role="installation">
109 <title>Installation of Node.js</title>
110
111<!--
112 <para>
113 If Python-3.12 is installed, fix the <command>configure</command> script:
114 </para>
115
116<screen><userinput>sed -e '/python3.11/i command -v python3.12 >/dev/null &amp;&amp; exec python3.12 "$0" "$@"' \
117 -e '/3, 11/s/\(.3, 11.\)/(3, 12), \1/' \
118 -i configure</userinput></screen>
119-->
120
121 <para>
122 Build <application>Node.js</application> by running the following
123 commands:
124 </para>
125
126<screen><userinput>./configure --prefix=/usr \
127 --shared-brotli \
128 --shared-cares \
129 --shared-libuv \
130 --shared-openssl \
131 --shared-nghttp2 \
132 --shared-zlib \
133 --with-intl=system-icu &amp;&amp;
134make</userinput></screen>
135
136 <para>
137 To test the results, issue: <command>make test-only</command>.
138<!--
139Failed tests:
140out/Release/node - -tls-min-v1.0 /build/node/node-v18.18.2/test/parallel/test-https-agent-session-eviction.js
141out/Release/node /build/node/node-v18.18.2/test/parallel/test-tls-alert.js
142out/Release/node - -tls-max-v1.2 /build/node/node-v18.18.2/test/parallel/test-tls-cli-max-version-1.2.js
143out/Release/node - -tls-max-v1.3 /build/node/node-v18.18.2/test/parallel/test-tls-cli-max-version-1.3.js
144out/Release/node - -tls-min-v1.1 /build/node/node-v18.18.2/test/parallel/test-tls-cli-min-version-1.1.js
145out/Release/node - -tls-min-v1.2 /build/node/node-v18.18.2/test/parallel/test-tls-cli-min-version-1.2.js
146out/Release/node - -tls-min-v1.3 /build/node/node-v18.18.2/test/parallel/test-tls-cli-min-version-1.3.js
147out/Release/node /build/node/node-v18.18.2/test/parallel/test-tls-getprotocol.js
148out/Release/node /build/node/node-v18.18.2/test/parallel/test-tls-min-max-version.js
149out/Release/node /build/node/node-v18.18.2/test/parallel/test-tls-session-cache.js
150
151For node-v20.9.0 all 3969 tests passed. bdubbs 3 Nov 23
152-->
153 </para>
154
155 <para>
156 Now, as the <systemitem class="username">root</systemitem> user:
157 </para>
158
159<screen role="root"><userinput>make install &amp;&amp;
160ln -sf node /usr/share/doc/node-&nodejs-version;</userinput></screen>
161 </sect2>
162
163 <sect2 role="commands">
164 <title>Command Explanations</title>
165
166 <para>
167 <parameter>--with-intl=system-icu</parameter>: use the system version
168 of <application>icu</application>. Other values are
169 <option>full-icu</option> (to build a local, full
170 <application>icu</application> library) and <option>small-icu</option>
171 (to build a local, minimal <application>icu</application> library).
172 </para>
173
174 <para>
175 <parameter>--shared-{brotli,cares,libuv,nghttp2,openssl,zlib}</parameter>:
176 use the system installed libraries instead of local copies.
177 </para>
178
179 <para>
180 <option>--without-npm</option>: do not build
181 <application>npm</application> (use if you'd like to build a separate
182 <application>npm</application> later).
183 </para>
184
185 <para>
186 <option>--shared-http-parser</option>: use the system
187 installed library instead of a local copy.
188 </para>
189
190 </sect2>
191
192 <sect2 role="content">
193 <title>Contents</title>
194
195 <segmentedlist>
196 <segtitle>Installed Programs</segtitle>
197 <segtitle>Installed Library</segtitle>
198 <segtitle>Installed Directories</segtitle>
199
200 <seglistitem>
201 <seg>
202 corepack, node, npm, and npx
203 </seg>
204 <seg>
205 None
206 </seg>
207 <seg>
208 /usr/include/node,
209 /usr/lib/node_modules/{corepack,npm},
210 /usr/share/doc/{node,node-&nodejs-version;}, and
211 /usr/share/systemtap/tapset
212 </seg>
213 </seglistitem>
214 </segmentedlist>
215
216 <variablelist>
217 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
218 <?dbfo list-presentation="list"?>
219 <?dbhtml list-presentation="table"?>
220
221 <varlistentry id="corepack">
222 <term><command>corepack</command></term>
223 <listitem>
224 <para>
225 is an experimental tool to help with managing versions of package
226 managers.
227 </para>
228 <indexterm zone="nodejs corepack">
229 <primary sortas="b-corepack">corepack</primary>
230 </indexterm>
231 </listitem>
232 </varlistentry>
233
234 <varlistentry id="node">
235 <term><command>node</command></term>
236 <listitem>
237 <para>
238 is the server-side JavaScript runtime
239 </para>
240 <indexterm zone="nodejs node">
241 <primary sortas="b-node">node</primary>
242 </indexterm>
243 </listitem>
244 </varlistentry>
245
246 <varlistentry id="npm">
247 <term><command>npm</command></term>
248 <listitem>
249 <para>
250 is the <application>Node.js</application> package manager
251 </para>
252 <indexterm zone="nodejs npm">
253 <primary sortas="b-npm">npm</primary>
254 </indexterm>
255 </listitem>
256 </varlistentry>
257
258 <varlistentry>
259 <term>
260 <filename class="directory">/usr/lib/node_modules/npm/</filename>
261 </term>
262 <listitem>
263 <para>
264 is the installation root for Node.js executables and libraries
265 </para>
266 </listitem>
267 </varlistentry>
268
269 </variablelist>
270
271 </sect2>
272
273</sect1>
Note: See TracBrowser for help on using the repository browser.