2022-05-19 17:11:22 +02:00
Author: Adam Majer <amajer@suse.de>
Date: Fri May 11 16:10:16 CEST 2018
Summary: Generate versioned binaries
Generate versioned binaries and install paths
so we can allow concurrent installations and
management via update_alternatives.
This is also important for generation of binary
modules for multiple versions of NodeJS
2023-04-13 16:31:06 +02:00
Index: node-v18.16.0/Makefile
2022-05-19 17:11:22 +02:00
===================================================================
2023-04-13 16:31:06 +02:00
--- node-v18.16.0.orig/Makefile
+++ node-v18.16.0/Makefile
2022-10-17 15:14:57 +02:00
@@ -76,7 +76,7 @@ BUILDTYPE_LOWER := $(shell echo $(BUILDT
2022-05-19 17:11:22 +02:00
EXEEXT := $(shell $(PYTHON) -c \
"import sys; print('.exe' if sys.platform == 'win32' else '')")
-NODE_EXE = node$(EXEEXT)
+NODE_EXE = node18$(EXEEXT)
NODE ?= ./$(NODE_EXE)
NODE_G_EXE = node_g$(EXEEXT)
NPM ?= ./deps/npm/bin/npm-cli.js
2023-04-13 16:31:06 +02:00
Index: node-v18.16.0/tools/install.py
2022-05-19 17:11:22 +02:00
===================================================================
2023-04-13 16:31:06 +02:00
--- node-v18.16.0.orig/tools/install.py
+++ node-v18.16.0/tools/install.py
2022-05-19 17:11:22 +02:00
@@ -86,7 +86,7 @@ def uninstall(paths, dst):
try_remove(path, dst)
def package_files(action, name, bins):
- target_path = libdir() + '/node_modules/' + name + '/'
+ target_path = libdir() + '/node_modules/' + name + '18/'
# don't install npm if the target path is a symlink, it probably means
# that a dev version of npm is installed there
@@ -106,19 +106,19 @@ def package_files(action, name, bins):
if action == uninstall:
action([link_path], 'bin/' + bin_name)
elif action == install:
- try_symlink('../' + libdir() + '/node_modules/' + name + '/' + bin_target, link_path)
+ try_symlink('../' + libdir() + '/node_modules/' + name + '18/' + bin_target, link_path)
else:
assert 0 # unhandled action type
def npm_files(action):
package_files(action, 'npm', {
- 'npm': 'bin/npm-cli.js',
- 'npx': 'bin/npx-cli.js',
+ 'npm18': 'bin/npm-cli.js',
+ 'npx18': 'bin/npx-cli.js',
})
def corepack_files(action):
package_files(action, 'corepack', {
- 'corepack': 'dist/corepack.js',
+ 'corepack18': 'dist/corepack.js',
# Not the default just yet:
# 'yarn': 'dist/yarn.js',
# 'yarnpkg': 'dist/yarn.js',
2022-08-01 12:17:34 +02:00
@@ -147,7 +147,7 @@ def subdir_files(path, dest, action):
2022-05-19 17:11:22 +02:00
def files(action):
is_windows = sys.platform == 'win32'
- output_file = 'node'
+ output_file = 'node18'
output_prefix = 'out/Release/'
if is_windows:
2022-09-29 16:55:28 +02:00
@@ -186,7 +186,7 @@ def files(action):
action(['out/Release/node.d'], 'lib/dtrace/node.d')
# behave similarly for systemtap
- action(['src/node.stp'], 'share/systemtap/tapset/')
+ action(['src/node.stp'], 'share/systemtap/tapset/node18.stp')
action(['deps/v8/tools/gdbinit'], 'share/doc/node/')
action(['deps/v8/tools/lldb_commands.py'], 'share/doc/node/')
@@ -194,7 +194,7 @@ def files(action):
2022-05-19 17:11:22 +02:00
if 'freebsd' in sys.platform or 'openbsd' in sys.platform:
action(['doc/node.1'], 'man/man1/')
else:
- action(['doc/node.1'], 'share/man/man1/')
+ action(['doc/node.1'], 'share/man/man1/node18.1')
if 'true' == variables.get('node_install_npm'):
npm_files(action)
2022-09-29 16:55:28 +02:00
@@ -281,28 +281,28 @@ def headers(action):
2022-05-19 17:11:22 +02:00
'src/node_buffer.h',
'src/node_object_wrap.h',
'src/node_version.h',
- ], 'include/node/')
+ ], 'include/node18/')
# Add the expfile that is created on AIX
2023-04-13 16:31:06 +02:00
if sys.platform.startswith('aix') or sys.platform == "os400":
2022-05-19 17:11:22 +02:00
- action(['out/Release/node.exp'], 'include/node/')
+ action(['out/Release/node.exp'], 'include/node18/')
- subdir_files('deps/v8/include', 'include/node/', wanted_v8_headers)
+ subdir_files('deps/v8/include', 'include/node18/', wanted_v8_headers)
if 'false' == variables.get('node_shared_libuv'):
- subdir_files('deps/uv/include', 'include/node/', action)
+ subdir_files('deps/uv/include', 'include/node18/', action)
if 'true' == variables.get('node_use_openssl') and \
'false' == variables.get('node_shared_openssl'):
- subdir_files('deps/openssl/openssl/include/openssl', 'include/node/openssl/', action)
- subdir_files('deps/openssl/config/archs', 'include/node/openssl/archs', action)
- subdir_files('deps/openssl/config', 'include/node/openssl', action)
+ subdir_files('deps/openssl/openssl/include/openssl', 'include/node18/openssl/', action)
+ subdir_files('deps/openssl/config/archs', 'include/node18/openssl/archs', action)
+ subdir_files('deps/openssl/config', 'include/node18/openssl', action)
if 'false' == variables.get('node_shared_zlib'):
action([
'deps/zlib/zconf.h',
'deps/zlib/zlib.h',
- ], 'include/node/')
+ ], 'include/node18/')
if sys.platform == 'zos':
zoslibinc = os.environ.get('ZOSLIB_INCLUDES')
2023-04-13 16:31:06 +02:00
Index: node-v18.16.0/doc/node.1
2022-05-19 17:11:22 +02:00
===================================================================
2023-04-13 16:31:06 +02:00
--- node-v18.16.0.orig/doc/node.1
+++ node-v18.16.0/doc/node.1
2023-01-16 16:07:36 +01:00
@@ -31,24 +31,24 @@
2022-05-19 17:11:22 +02:00
.Dt NODE 1
.
.Sh NAME
-.Nm node
+.Nm node18
.Nd server-side JavaScript runtime
.
.\"======================================================================
.Sh SYNOPSIS
-.Nm node
+.Nm node18
.Op Ar options
.Op Ar v8-options
.Op Fl e Ar string | Ar script.js | Fl
.Op Fl -
.Op Ar arguments ...
.
-.Nm node
+.Nm node18
.Cm inspect
.Op Fl e Ar string | Ar script.js | Fl | Ar <host>:<port>
.Ar ...
.
-.Nm node
+.Nm node18
.Op Fl -v8-options
.
.\"======================================================================
2023-04-13 16:31:06 +02:00
Index: node-v18.16.0/src/node.stp
2022-05-19 17:11:22 +02:00
===================================================================
2023-04-13 16:31:06 +02:00
--- node-v18.16.0.orig/src/node.stp
+++ node-v18.16.0/src/node.stp
2022-05-19 17:11:22 +02:00
@@ -19,7 +19,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
-probe node_net_server_connection = process("node").mark("net__server__connection")
+probe node_net_server_connection = process("node18").mark("net__server__connection")
{
remote = user_string($arg2);
port = $arg3;
@@ -32,7 +32,7 @@ probe node_net_server_connection = proce
fd);
}
-probe node_net_stream_end = process("node").mark("net__stream__end")
+probe node_net_stream_end = process("node18").mark("net__stream__end")
{
remote = user_string($arg2);
port = $arg3;
@@ -45,7 +45,7 @@ probe node_net_stream_end = process("nod
fd);
}
-probe node_http_server_request = process("node").mark("http__server__request")
+probe node_http_server_request = process("node18").mark("http__server__request")
{
remote = user_string($arg3);
port = $arg4;
@@ -62,7 +62,7 @@ probe node_http_server_request = process
fd);
}
-probe node_http_server_response = process("node").mark("http__server__response")
+probe node_http_server_response = process("node18").mark("http__server__response")
{
remote = user_string($arg2);
port = $arg3;
@@ -75,7 +75,7 @@ probe node_http_server_response = proces
fd);
}
-probe node_http_client_request = process("node").mark("http__client__request")
+probe node_http_client_request = process("node18").mark("http__client__request")
{
remote = user_string($arg3);
port = $arg4;
@@ -92,7 +92,7 @@ probe node_http_client_request = process
fd);
}
-probe node_http_client_response = process("node").mark("http__client__response")
+probe node_http_client_response = process("node18").mark("http__client__response")
{
remote = user_string($arg2);
port = $arg3;
@@ -105,7 +105,7 @@ probe node_http_client_response = proces
fd);
}
-probe node_gc_start = process("node").mark("gc__start")
+probe node_gc_start = process("node18").mark("gc__start")
{
scavenge = 1 << 0;
compact = 1 << 1;
@@ -125,7 +125,7 @@ probe node_gc_start = process("node").ma
flags);
}
-probe node_gc_stop = process("node").mark("gc__done")
+probe node_gc_stop = process("node18").mark("gc__done")
{
scavenge = 1 << 0;
compact = 1 << 1;
2023-04-13 16:31:06 +02:00
Index: node-v18.16.0/deps/npm/man/man1/npm.1
2022-05-19 17:11:22 +02:00
===================================================================
2023-04-13 16:31:06 +02:00
--- node-v18.16.0.orig/deps/npm/man/man1/npm.1
+++ node-v18.16.0/deps/npm/man/man1/npm.1
2023-02-22 15:23:30 +01:00
@@ -1,11 +1,11 @@
2023-02-22 15:28:12 +01:00
.TH "NPM" "1" "February 2023" "" ""
2022-05-19 17:11:22 +02:00
.SH "NAME"
2023-02-22 15:23:30 +01:00
-\fBnpm\fR - javascript package manager
+\fBnpm18\fR - javascript package manager
.SS "Synopsis"
2022-05-19 17:11:22 +02:00
.P
2023-01-16 16:07:36 +01:00
.RS 2
2023-02-22 15:23:30 +01:00
.nf
-npm
+npm18
.fi
.RE
2022-05-19 17:11:22 +02:00
.P
2023-02-22 15:23:30 +01:00
@@ -19,7 +19,7 @@ npm is the package manager for the Node
2022-05-19 17:11:22 +02:00
.P
2023-02-22 15:23:30 +01:00
It is extremely configurable to support a variety of use cases. Most commonly, you use it to publish, discover, install, and develop node programs.
2022-05-19 17:11:22 +02:00
.P
2023-02-22 15:23:30 +01:00
-Run \fBnpm help\fR to get a list of available commands.
+Run \fBnpm18 help\fR to get a list of available commands.
.SS "Important"
2022-05-19 17:11:22 +02:00
.P
2023-02-22 15:23:30 +01:00
npm comes preconfigured to use npm's public registry at https://registry.npmjs.org by default. Use of the npm public registry is subject to terms of use available at https://docs.npmjs.com/policies/terms.
@@ -115,17 +115,17 @@ Or suggest formal RFC proposals:
.SS "See Also"
2022-05-19 17:11:22 +02:00
.RS 0
2023-02-22 15:23:30 +01:00
.IP \(bu 4
2022-05-19 17:11:22 +02:00
-npm help help
+npm18 help help
2023-02-22 15:23:30 +01:00
.IP \(bu 4
\fBpackage.json\fR \fI\(la/configuring-npm/package-json\(ra\fR
.IP \(bu 4
2022-05-19 17:11:22 +02:00
-npm help npmrc
+npm18 help npmrc
2023-02-22 15:23:30 +01:00
.IP \(bu 4
2022-05-19 17:11:22 +02:00
-npm help config
+npm18 help config
2023-02-22 15:23:30 +01:00
.IP \(bu 4
2022-05-19 17:11:22 +02:00
-npm help install
+npm18 help install
2023-02-22 15:23:30 +01:00
.IP \(bu 4
2022-05-19 17:11:22 +02:00
-npm help prefix
+npm18 help prefix
2023-02-22 15:23:30 +01:00
.IP \(bu 4
2022-05-19 17:11:22 +02:00
-npm help publish
+npm18 help publish
2023-02-22 15:23:30 +01:00
.RE 0
2023-04-13 16:31:06 +02:00
Index: node-v18.16.0/src/node_main.cc
2022-05-19 17:11:22 +02:00
===================================================================
2023-04-13 16:31:06 +02:00
--- node-v18.16.0.orig/src/node_main.cc
+++ node-v18.16.0/src/node_main.cc
2022-10-17 15:14:57 +02:00
@@ -90,6 +90,7 @@ int wmain(int argc, wchar_t* wargv[]) {
// UNIX
int main(int argc, char* argv[]) {
2022-05-19 17:11:22 +02:00
+ setenv("NODE_VERSION", "18", 0);
return node::Start(argc, argv);
2022-10-17 15:14:57 +02:00
}
#endif
2023-04-13 16:31:06 +02:00
Index: node-v18.16.0/tools/test.py
2022-05-19 17:11:22 +02:00
===================================================================
2023-04-13 16:31:06 +02:00
--- node-v18.16.0.orig/tools/test.py
+++ node-v18.16.0/tools/test.py
2023-02-22 15:23:30 +01:00
@@ -954,7 +954,7 @@ class Context(object):
2022-05-19 17:11:22 +02:00
if self.vm is not None:
return self.vm
if arch == 'none':
- name = 'out/Debug/node' if mode == 'debug' else 'out/Release/node'
+ name = 'out/Debug/node' if mode == 'debug' else 'out/Release/node18'
else:
name = 'out/%s.%s/node' % (arch, mode)
2023-04-13 16:31:06 +02:00
Index: node-v18.16.0/node.gyp
2022-05-19 17:11:22 +02:00
===================================================================
2023-04-13 16:31:06 +02:00
--- node-v18.16.0.orig/node.gyp
+++ node-v18.16.0/node.gyp
2023-01-16 16:07:36 +01:00
@@ -25,8 +25,8 @@
2022-05-19 17:11:22 +02:00
'node_shared_openssl%': 'false',
'node_v8_options%': '',
2023-01-16 16:07:36 +01:00
'node_enable_v8_vtunejit%': 'false',
2022-05-19 17:11:22 +02:00
- 'node_core_target_name%': 'node',
- 'node_lib_target_name%': 'libnode',
+ 'node_core_target_name%': 'node18',
+ 'node_lib_target_name%': 'libnode18',
'node_intermediate_lib_type%': 'static_library',
'node_builtin_modules_path%': '',
# We list the deps/ files out instead of globbing them in js2c.py since we
2023-04-13 16:31:06 +02:00
Index: node-v18.16.0/deps/npm/man/man1/npx.1
2022-05-19 17:11:22 +02:00
===================================================================
2023-04-13 16:31:06 +02:00
--- node-v18.16.0.orig/deps/npm/man/man1/npx.1
+++ node-v18.16.0/deps/npm/man/man1/npx.1
2023-02-22 15:23:30 +01:00
@@ -1,14 +1,14 @@
2023-02-22 15:28:12 +01:00
.TH "NPX" "1" "February 2023" "" ""
2023-02-22 15:23:30 +01:00
.SH "NAME"
-\fBnpx\fR - Run a command from a local or remote npm package
+\fBnpx18\fR - Run a command from a local or remote npm package
.SS "Synopsis"
2022-05-19 17:11:22 +02:00
.P
.RS 2
.nf
2023-02-22 15:23:30 +01:00
-npx -- <pkg>\[lB]@<version>\[rB] \[lB]args...\[rB]
-npx --package=<pkg>\[lB]@<version>\[rB] -- <cmd> \[lB]args...\[rB]
-npx -c '<cmd> \[lB]args...\[rB]'
-npx --package=foo -c '<cmd> \[lB]args...\[rB]'
+npx18 -- <pkg>\[lB]@<version>\[rB] \[lB]args...\[rB]
+npx18 --package=<pkg>\[lB]@<version>\[rB] -- <cmd> \[lB]args...\[rB]
+npx18 -c '<cmd> \[lB]args...\[rB]'
+npx18 --package=foo -c '<cmd> \[lB]args...\[rB]'
2022-05-19 17:11:22 +02:00
.fi
.RE
2023-02-22 15:23:30 +01:00
.SS "Description"