File versioned.patch of Package nodejs14.22015
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
Index: node-v14.18.1/Makefile
===================================================================
--- node-v14.18.1.orig/Makefile
+++ node-v14.18.1/Makefile
@@ -51,7 +51,7 @@ BUILDTYPE_LOWER := $(shell echo $(BUILDT
EXEEXT := $(shell $(PYTHON) -c \
"import sys; print('.exe' if sys.platform == 'win32' else '')")
-NODE_EXE = node$(EXEEXT)
+NODE_EXE = node14$(EXEEXT)
NODE ?= ./$(NODE_EXE)
NODE_G_EXE = node_g$(EXEEXT)
NPM ?= ./deps/npm/bin/npm-cli.js
Index: node-v14.18.1/tools/install.py
===================================================================
--- node-v14.18.1.orig/tools/install.py
+++ node-v14.18.1/tools/install.py
@@ -81,34 +81,34 @@ def uninstall(paths, dst):
try_remove(path, dst)
def npm_files(action):
- target_path = sysconfig.get_config_var("LIB") + '/node_modules/npm/'
+ target_path = sysconfig.get_config_var("LIBDIR") + '/node_modules/npm14/'
# don't install npm if the target path is a symlink, it probably means
# that a dev version of npm is installed there
- if os.path.islink(abspath(install_path, target_path)): return
+ if os.path.islink(abspath(install_path, '..', target_path)): return
# npm has a *lot* of files and it'd be a pain to maintain a fixed list here
# so we walk its source directory instead...
for dirname, subdirs, basenames in os.walk('deps/npm', topdown=True):
subdirs[:] = [subdir for subdir in subdirs if subdir != 'test']
paths = [os.path.join(dirname, basename) for basename in basenames]
- action(paths, target_path + dirname[9:] + '/')
+ action(paths, install_path + '/..' + target_path + dirname[9:] + '/')
# create/remove symlink
- link_path = abspath(install_path, 'bin/npm')
+ link_path = abspath(install_path, 'bin/npm14')
if action == uninstall:
- action([link_path], 'bin/npm')
+ action([link_path], 'bin/npm14')
elif action == install:
- try_symlink("../" + sysconfig.get_config_var("LIB") + '/node_modules/npm/bin/npm-cli.js',link_path)
+ try_symlink("../../" + sysconfig.get_config_var("LIBDIR") + '/node_modules/npm14/bin/npm-cli.js',link_path)
else:
assert 0 # unhandled action type
# create/remove symlink
- link_path = abspath(install_path, 'bin/npx')
+ link_path = abspath(install_path, 'bin/npx14')
if action == uninstall:
- action([link_path], 'bin/npx')
+ action([link_path], 'bin/npx14')
elif action == install:
- try_symlink('../' + sysconfig.get_config_var("LIB") + '/node_modules/npm/bin/npx-cli.js', link_path)
+ try_symlink('../../' + sysconfig.get_config_var("LIBDIR") + '/node_modules/npm14/bin/npx-cli.js', link_path)
else:
assert 0 # unhandled action type
@@ -122,7 +122,7 @@ def subdir_files(path, dest, action):
def files(action):
is_windows = sys.platform == 'win32'
- output_file = 'node'
+ output_file = 'node14'
output_prefix = 'out/Release/'
if 'false' == variables.get('node_shared'):
@@ -140,10 +140,10 @@ def files(action):
action([output_prefix + output_file], 'lib/' + output_file)
if 'true' == variables.get('node_use_dtrace'):
- action(['out/Release/node.d'], sysconfig.get_config_var("LIB") + '/dtrace/node.d')
+ action(['out/Release/node.d'], ".." + sysconfig.get_config_var("LIBDIR") + '/dtrace/node.d')
# behave similarly for systemtap
- action(['src/node.stp'], 'share/systemtap/tapset/')
+ action(['src/node.stp'], 'share/systemtap/tapset/node14.stp')
action(['deps/v8/tools/gdbinit'], 'share/doc/node/')
action(['deps/v8/tools/lldb_commands.py'], 'share/doc/node/')
@@ -151,7 +151,7 @@ def files(action):
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/node14.1')
if 'true' == variables.get('node_install_npm'): npm_files(action)
@@ -177,28 +177,28 @@ def headers(action):
'src/node_buffer.h',
'src/node_object_wrap.h',
'src/node_version.h',
- ], 'include/node/')
+ ], 'include/node14/')
# Add the expfile that is created on AIX
if sys.platform.startswith('aix'):
- action(['out/Release/node.exp'], 'include/node/')
+ action(['out/Release/node.exp'], 'include/node14/')
- subdir_files('deps/v8/include', 'include/node/', ignore_inspector_headers)
+ subdir_files('deps/v8/include', 'include/node14/', ignore_inspector_headers)
if 'false' == variables.get('node_shared_libuv'):
- subdir_files('deps/uv/include', 'include/node/', action)
+ subdir_files('deps/uv/include', 'include/node14/', 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/node14/openssl/', action)
+ subdir_files('deps/openssl/config/archs', 'include/node14/openssl/archs', action)
+ subdir_files('deps/openssl/config', 'include/node14/openssl', action)
if 'false' == variables.get('node_shared_zlib'):
action([
'deps/zlib/zconf.h',
'deps/zlib/zlib.h',
- ], 'include/node/')
+ ], 'include/node14/')
def run(args):
global node_prefix, install_path, target_defaults, variables
Index: node-v14.18.1/doc/node.1
===================================================================
--- node-v14.18.1.orig/doc/node.1
+++ node-v14.18.1/doc/node.1
@@ -30,24 +30,24 @@
.Dt NODE 1
.
.Sh NAME
-.Nm node
+.Nm node14
.Nd server-side JavaScript runtime
.
.\"======================================================================
.Sh SYNOPSIS
-.Nm node
+.Nm node14
.Op Ar options
.Op Ar v8-options
.Op Fl e Ar string | Ar script.js | Fl
.Op Fl -
.Op Ar arguments ...
.
-.Nm node
+.Nm node14
.Cm inspect
.Op Fl e Ar string | Ar script.js | Fl | Ar <host>:<port>
.Ar ...
.
-.Nm node
+.Nm node14
.Op Fl -v8-options
.
.\"======================================================================
Index: node-v14.18.1/src/node.stp
===================================================================
--- node-v14.18.1.orig/src/node.stp
+++ node-v14.18.1/src/node.stp
@@ -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("node14").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("node14").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("node14").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("node14").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("node14").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("node14").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("node14").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("node14").mark("gc__done")
{
scavenge = 1 << 0;
compact = 1 << 1;
Index: node-v14.18.1/deps/npm/man/man1/npm.1
===================================================================
--- node-v14.18.1.orig/deps/npm/man/man1/npm.1
+++ node-v14.18.1/deps/npm/man/man1/npm.1
@@ -1,11 +1,11 @@
.TH "NPM" "1" "August 2021" "" ""
.SH "NAME"
-\fBnpm\fR \- javascript package manager
+\fBnpm14\fR \- javascript package manager
.SS Synopsis
.P
.RS 2
.nf
-npm <command> [args]
+npm14 <command> [args]
.fi
.RE
.SS Version
@@ -21,7 +21,7 @@ It is extremely configurable to support
Most commonly, it is used to publish, discover, install, and develop node
programs\.
.P
-Run \fBnpm help\fP to get a list of available commands\.
+Run \fBnpm14 help\fP to get a list of available commands\.
.SS Important
.P
npm is configured to use npm, Inc\.'s public registry at
@@ -35,11 +35,11 @@ terms of use\.
.P
You probably got npm because you want to install stuff\.
.P
-Use \fBnpm install blerg\fP to install the latest version of "blerg"\. Check out
-npm help \fBinstall\fP for more info\. It can do a lot of stuff\.
+Use \fBnpm14 install blerg\fP to install the latest version of "blerg"\. Check out
+npm14 help \fBinstall\fP for more info\. It can do a lot of stuff\.
.P
-Use the \fBnpm search\fP command to show everything that's available\.
-Use \fBnpm ls\fP to show everything you've installed\.
+Use the \fBnpm14 search\fP command to show everything that's available\.
+Use \fBnpm14 ls\fP to show everything you've installed\.
.SS Dependencies
.P
If a package references to another package with a git URL, npm depends
@@ -56,7 +56,7 @@ the node\-gyp repository \fIhttps://gith
the node\-gyp Wiki \fIhttps://github\.com/nodejs/node\-gyp/wiki\fR\|\.
.SS Directories
.P
-See npm help \fBfolders\fP to learn about where npm puts stuff\.
+See npm14 help \fBfolders\fP to learn about where npm puts stuff\.
.P
In particular, npm has two modes of operation:
.RS 0
@@ -81,24 +81,24 @@ following help topics:
.RS 0
.IP \(bu 2
json:
-Make a package\.json file\. See npm help \fBpackage\.json\fP\|\.
+Make a package\.json file\. See npm14 help \fBpackage\.json\fP\|\.
.IP \(bu 2
link:
For linking your current working code into Node's path, so that you
don't have to reinstall every time you make a change\. Use
-\fBnpm link\fP to do this\.
+\fBnpm14 link\fP to do this\.
.IP \(bu 2
install:
It's a good idea to install things if you don't need the symbolic link\.
Especially, installing other peoples code from the registry is done via
-\fBnpm install\fP
+\fBnpm14 install\fP
.IP \(bu 2
adduser:
Create an account or log in\. Credentials are stored in the
user config file\.
.IP \(bu 2
publish:
-Use the \fBnpm publish\fP command to upload your code to the registry\.
+Use the \fBnpm14 publish\fP command to upload your code to the registry\.
.RE
.SS Configuration
@@ -134,7 +134,7 @@ lib/utils/config\-defs\.js\. These must
.RE
.P
-See npm help \fBconfig\fP for much much more information\.
+See npm14 help \fBconfig\fP for much much more information\.
.SS Contributions
.P
Patches welcome!
@@ -171,14 +171,14 @@ i@izs\.me
.SS See Also
.RS 0
.IP \(bu 2
-npm help help
+npm14 help help
.IP \(bu 2
-npm help package\.json
+npm14 help package\.json
.IP \(bu 2
-npm help install
+npm14 help install
.IP \(bu 2
-npm help config
+npm14 help config
.IP \(bu 2
-npm help npmrc
+npm14 help npmrc
.RE
Index: node-v14.18.1/src/node_main.cc
===================================================================
--- node-v14.18.1.orig/src/node_main.cc
+++ node-v14.18.1/src/node_main.cc
@@ -136,6 +136,7 @@ int main(int argc, char* argv[]) {
#endif
// Disable stdio buffering, it interacts poorly with printf()
// calls elsewhere in the program (e.g., any logging from V8.)
+ setenv("NODE_VERSION", "14", 0);
setvbuf(stdout, nullptr, _IONBF, 0);
setvbuf(stderr, nullptr, _IONBF, 0);
return node::Start(argc, argv);
Index: node-v14.18.1/deps/npm/man/man1/npx.1
===================================================================
--- node-v14.18.1.orig/deps/npm/man/man1/npx.1
+++ node-v14.18.1/deps/npm/man/man1/npx.1
@@ -1,32 +1,32 @@
.TH "NPX" "1" "July 2020" "npx@10.2.3" "User Commands"
.SH "NAME"
-\fBnpx\fR \- execute npm package binaries
+\fBnpx14\fR \- execute npm package binaries
.SH SYNOPSIS
.P
-\fBnpx [options] <command>[@version] [command\-arg]\.\.\.\fP
+\fBnpx14 [options] <command>[@version] [command\-arg]\.\.\.\fP
.P
-\fBnpx [options] [\-p|\-\-package <pkg>]\.\.\. <command> [command\-arg]\.\.\.\fP
+\fBnpx14 [options] [\-p|\-\-package <pkg>]\.\.\. <command> [command\-arg]\.\.\.\fP
.P
-\fBnpx [options] \-c '<command\-string>'\fP
+\fBnpx14 [options] \-c '<command\-string>'\fP
.P
-\fBnpx \-\-shell\-auto\-fallback [shell]\fP
+\fBnpx14 \-\-shell\-auto\-fallback [shell]\fP
.SH INSTALL
.P
-\fBnpm install \-g npx\fP
+\fBnpm14 install \-g npx\fP
.SH DESCRIPTION
.P
Executes \fB<command>\fP either from a local \fBnode_modules/\.bin\fP, or from a central cache, installing any packages needed in order for \fB<command>\fP to run\.
.P
-By default, \fBnpx\fP will check whether \fB<command>\fP exists in \fB$PATH\fP, or in the local project binaries, and execute that\. If \fB<command>\fP is not found, it will be installed prior to execution\.
+By default, \fBnpx14\fP will check whether \fB<command>\fP exists in \fB$PATH\fP, or in the local project binaries, and execute that\. If \fB<command>\fP is not found, it will be installed prior to execution\.
.P
-Unless a \fB\-\-package\fP option is specified, \fBnpx\fP will try to guess the name of the binary to invoke depending on the specifier provided\. All package specifiers understood by \fBnpm\fP may be used with \fBnpx\fP, including git specifiers, remote tarballs, local directories, or scoped packages\.
+Unless a \fB\-\-package\fP option is specified, \fBnpx14\fP will try to guess the name of the binary to invoke depending on the specifier provided\. All package specifiers understood by \fBnpm14\fP may be used with \fBnpx14\fP, including git specifiers, remote tarballs, local directories, or scoped packages\.
.P
If a full specifier is included, or if \fB\-\-package\fP is used, npx will always use a freshly\-installed, temporary version of the package\. This can also be forced with the \fB\-\-ignore\-existing\fP flag\.
.RS 0
.IP \(bu 2
\fB\-p, \-\-package <package>\fP \- define the package to be installed\. This defaults to the value of \fB<command>\fP\|\. This is only needed for packages with multiple binaries if you want to call one of the other executables, or where the binary name does not match the package name\. If this option is provided \fB<command>\fP will be executed as\-is, without interpreting \fB@version\fP if it's there\. Multiple \fB\-\-package\fP options may be provided, and all the packages specified will be installed\.
.IP \(bu 2
-\fB\-\-no\-install\fP \- If passed to \fBnpx\fP, it will only try to run \fB<command>\fP if it already exists in the current path or in \fB$prefix/node_modules/\.bin\fP\|\. It won't try to install missing commands\.
+\fB\-\-no\-install\fP \- If passed to \fBnpx14\fP, it will only try to run \fB<command>\fP if it already exists in the current path or in \fB$prefix/node_modules/\.bin\fP\|\. It won't try to install missing commands\.
.IP \(bu 2
\fB\-\-cache <path>\fP \- set the location of the npm cache\. Defaults to npm's own cache settings\.
.IP \(bu 2
@@ -36,7 +36,7 @@ If a full specifier is included, or if \
.IP \(bu 2
\fB\-\-shell <string>\fP \- The shell to invoke the command with, if any\.
.IP \(bu 2
-\fB\-\-shell\-auto\-fallback [<shell>]\fP \- Generates shell code to override your shell's "command not found" handler with one that calls \fBnpx\fP\|\. Tries to figure out your shell, or you can pass its name (either \fBbash\fP, \fBfish\fP, or \fBzsh\fP) as an option\. See below for how to install\.
+\fB\-\-shell\-auto\-fallback [<shell>]\fP \- Generates shell code to override your shell's "command not found" handler with one that calls \fBnpx14\fP\|\. Tries to figure out your shell, or you can pass its name (either \fBbash\fP, \fBfish\fP, or \fBzsh\fP) as an option\. See below for how to install\.
.IP \(bu 2
\fB\-\-ignore\-existing\fP \- If this flag is set, npx will not look in \fB$PATH\fP, or in the current package's \fBnode_modules/\.bin\fP for an existing version before deciding whether to install\. Binaries in those paths will still be available for execution, but will be shadowed by any packages requested by this install\.
.IP \(bu 2
@@ -110,7 +110,7 @@ npx \-p node@8 npm run build
.RE
.SH SHELL AUTO FALLBACK
.P
-You can configure \fBnpx\fP to run as your default fallback command when you type something in the command line with an \fB@\fP but the command is not found\. This includes installing packages that were not found in the local prefix either\.
+You can configure \fBnpx14\fP to run as your default fallback command when you type something in the command line with an \fB@\fP but the command is not found\. This includes installing packages that were not found in the local prefix either\.
.P
For example:
.P
@@ -152,7 +152,7 @@ $ source (npx \-\-shell\-auto\-fallback
.RE
.SH ACKNOWLEDGEMENTS
.P
-Huge thanks to Kwyn Meagher \fIhttps://blog\.kwyn\.io\fR for generously donating the package name in the main npm registry\. Previously \fBnpx\fP was used for a Tessel board Neopixels library, which can now be found under \fBnpx\-tessel\fP \fIhttps://npm\.im/npx\-tessel\fR\|\.
+Huge thanks to Kwyn Meagher \fIhttps://blog\.kwyn\.io\fR for generously donating the package name in the main npm registry\. Previously \fBnpx14\fP was used for a Tessel board Neopixels library, which can now be found under \fBnpx\-tessel\fP \fIhttps://npm\.im/npx\-tessel\fR\|\.
.SH AUTHOR
.P
Written by Kat Marchan \fIhttps://github\.com/zkat\fR\|\.
@@ -165,11 +165,11 @@ This work is released by its authors int
.SH SEE ALSO
.RS 0
.IP \(bu 2
-\fBnpm(1)\fP
+\fBnpm14(1)\fP
.IP \(bu 2
-\fBnpm\-run\-script(1)\fP
+\fBnpm14\-run\-script(1)\fP
.IP \(bu 2
-\fBnpm\-config(7)\fP
+\fBnpm14\-config(7)\fP
.RE
Index: node-v14.18.1/tools/test.py
===================================================================
--- node-v14.18.1.orig/tools/test.py
+++ node-v14.18.1/tools/test.py
@@ -936,7 +936,7 @@ class Context(object):
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/node14'
else:
name = 'out/%s.%s/node' % (arch, mode)
Index: node-v14.18.1/node.gyp
===================================================================
--- node-v14.18.1.orig/node.gyp
+++ node-v14.18.1/node.gyp
@@ -23,8 +23,8 @@
'node_use_openssl%': 'true',
'node_shared_openssl%': 'false',
'node_v8_options%': '',
- 'node_core_target_name%': 'node',
- 'node_lib_target_name%': 'libnode',
+ 'node_core_target_name%': 'node14',
+ 'node_lib_target_name%': 'libnode14',
'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