changed debian/source/format to native

This commit is contained in:
Lu zhiping 2022-08-16 11:14:24 +08:00
parent dcc8b501bb
commit fa95507f2f
29 changed files with 1 additions and 3209 deletions

View File

@ -1,135 +0,0 @@
Description: add __FreeBSD_kernel__ to the list of *bsd conditions
Forwarded: not-needed, not yet tested enough
Author: Jérémy Lal <kapouer@melix.org>
Last-Update: 2015-09-18
--- a/tools/install.py
+++ b/tools/install.py
@@ -136,7 +136,7 @@
action(['deps/v8/tools/lldbinit'], 'share/doc/node/')
action(['deps/v8/tools/lldb_commands.py'], 'share/doc/node/')
- if 'freebsd' in sys.platform or 'openbsd' in sys.platform:
+ if ('freebsd' in sys.platform and not 'kfreebsd' in sys.platform) or 'openbsd' in sys.platform:
action(['doc/node.1'], 'man/man1/')
else:
action(['doc/node.1'], 'share/man/man1/')
--- a/node.gyp
+++ b/node.gyp
@@ -533,6 +533,11 @@
'_LINUX_SOURCE_COMPAT',
],
}],
+ [ 'OS=="kfreebsd"', {
+ 'libraries': [
+ '-lkvm',
+ ],
+ }],
[ 'OS=="solaris"', {
'libraries': [
'-lkstat',
--- a/common.gypi
+++ b/common.gypi
@@ -393,7 +393,7 @@
}],
],
}],
- ['OS=="freebsd" and node_use_dtrace=="true"', {
+ ['(OS=="freebsd" or OS=="kfreebsd") and node_use_dtrace=="true"', {
'libraries': [ '-lelf' ],
}],
['OS=="freebsd"', {
--- a/deps/v8/include/v8config.h
+++ b/deps/v8/include/v8config.h
@@ -95,7 +95,7 @@
#elif defined(_AIX)
#define V8_OS_POSIX 1
#define V8_OS_AIX 1
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
# define V8_OS_BSD 1
# define V8_OS_FREEBSD 1
# define V8_OS_POSIX 1
--- a/deps/v8/src/base/platform/platform-posix.cc
+++ b/deps/v8/src/base/platform/platform-posix.cc
@@ -23,7 +23,7 @@
#include <sys/time.h>
#include <sys/types.h>
#if defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || \
- defined(__NetBSD__) || defined(__OpenBSD__)
+ defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD_kernel__)
#include <sys/sysctl.h> // NOLINT, for sysctl
#endif
@@ -345,7 +345,7 @@
return static_cast<int>(gettid());
#elif V8_OS_AIX
return static_cast<int>(thread_self());
-#elif V8_OS_SOLARIS
+#elif V8_OS_SOLARIS || defined(__FreeBSD_kernel__)
return static_cast<int>(pthread_self());
#else
return static_cast<int>(reinterpret_cast<intptr_t>(pthread_self()));
@@ -563,7 +563,8 @@
static void SetThreadName(const char* name) {
-#if V8_OS_DRAGONFLYBSD || V8_OS_FREEBSD || V8_OS_OPENBSD
+
+#if (V8_OS_DRAGONFLYBSD || V8_OS_FREEBSD || V8_OS_OPENBSD ) && !defined(__FreeBSD_kernel__)
pthread_set_name_np(pthread_self(), name);
#elif V8_OS_NETBSD
STATIC_ASSERT(Thread::kMaxThreadNameLength <= PTHREAD_MAX_NAMELEN_NP);
--- a/deps/v8/src/d8-posix.cc
+++ b/deps/v8/src/d8-posix.cc
@@ -372,7 +372,7 @@
// See http://code.google.com/p/v8/issues/detail?id=401.
#if defined(WNOWAIT) && !defined(ANDROID) && !defined(__APPLE__) \
&& !defined(__NetBSD__)
-#if !defined(__FreeBSD__)
+#if !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__)
#define HAS_WAITID 1
#endif
#endif
--- a/src/node.cc
+++ b/src/node.cc
@@ -3474,7 +3474,7 @@
void SignalExit(int signo) {
uv_tty_reset_mode();
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
// FreeBSD has a nasty bug, see RegisterSignalHandler for details
struct sigaction sa;
memset(&sa, 0, sizeof(sa));
--- a/deps/v8/tools/gyp/v8.gyp
+++ b/deps/v8/tools/gyp/v8.gyp
@@ -1827,7 +1827,6 @@
['OS=="freebsd"', {
'link_settings': {
'libraries': [
- '-L/usr/local/lib -lexecinfo',
]},
'sources': [
'../../src/base/platform/platform-freebsd.cc',
--- a/deps/v8/src/base/platform/platform-linux.cc
+++ b/deps/v8/src/base/platform/platform-linux.cc
@@ -49,6 +49,8 @@
// PNaCL doesn't have this, so we always grab all of the memory, which is bad.
#define MAP_NORESERVE 0
#endif
+#elif defined(__FreeBSD_kernel__)
+#include <sys/syscall.h>
#else
#include <sys/prctl.h>
#include <sys/syscall.h>
--- a/tools/utils.py
+++ b/tools/utils.py
@@ -47,6 +47,8 @@
id = platform.system()
if id == 'Linux':
return 'linux'
+ elif id == 'GNU/kFreeBSD':
+ return 'freebsd'
elif id == 'Darwin':
return 'macos'
elif id.find('CYGWIN') >= 0:

View File

@ -1,34 +0,0 @@
Description: use configuration directive to set mips fpu mode
Author: YunQiang Su <wzssyqa@gmail.com>
Forwarded: https://github.com/paul99/v8m-rb/issues/192
Last-Update: 2015-09-29
--- a/deps/v8/src/base/cpu.cc
+++ b/deps/v8/src/base/cpu.cc
@@ -140,22 +140,11 @@
#if V8_HOST_ARCH_MIPS
int __detect_fp64_mode(void) {
- double result = 0;
- // Bit representation of (double)1 is 0x3FF0000000000000.
- __asm__ volatile(
- ".set push\n\t"
- ".set noreorder\n\t"
- ".set oddspreg\n\t"
- "lui $t0, 0x3FF0\n\t"
- "ldc1 $f0, %0\n\t"
- "mtc1 $t0, $f1\n\t"
- "sdc1 $f0, %0\n\t"
- ".set pop\n\t"
- : "+m"(result)
- :
- : "t0", "$f0", "$f1", "memory");
-
- return !(result == 1);
+#ifdef FPU_MODE_FP64
+ return 1;
+#else
+ return 0;
+#endif
}

View File

@ -1,32 +0,0 @@
From 24c403cfaf8bdbcd8b19037531c8998709d2b949 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= <targos@protonmail.com>
Date: Tue, 5 Oct 2021 13:34:39 +0200
Subject: [PATCH] tools: patch jinja2 for Python 3.10 compat
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
PR-URL: https://github.com/nodejs/node/pull/40296
Fixes: https://github.com/nodejs/node/issues/40294
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
---
tools/inspector_protocol/jinja2/tests.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/inspector_protocol/jinja2/tests.py b/tools/inspector_protocol/jinja2/tests.py
index 0adc3d4dbcbb..b14f85ff148c 100644
--- a/tools/inspector_protocol/jinja2/tests.py
+++ b/tools/inspector_protocol/jinja2/tests.py
@@ -10,7 +10,7 @@
"""
import operator
import re
-from collections import Mapping
+from collections.abc import Mapping
from jinja2.runtime import Undefined
from jinja2._compat import text_type, string_types, integer_types
import decimal

View File

@ -1,59 +0,0 @@
From 7232c2a1604d241ce0455d919ba9b0b8e9959f81 Mon Sep 17 00:00:00 2001
From: Daniel Bevenius <daniel.bevenius@gmail.com>
Date: Tue, 2 Jun 2020 05:33:25 +0200
Subject: [PATCH] src: use getauxval in node_main.cc
This commit suggests using getauxval in node_main.cc.
The motivation for this is that getauxval was introduced in glibc 2.16
and looking at BUILDING.md, in the 'Platform list' section, it looks
like we now support glibc >= 2.17 and perhaps this change would be
alright now.
PR-URL: https://github.com/nodejs/node/pull/33693
Refs: https://github.com/nodejs/node/pull/12548
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
---
src/node_main.cc | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/src/node_main.cc b/src/node_main.cc
index 9f4ea22d12c6..6bac10759325 100644
--- a/src/node_main.cc
+++ b/src/node_main.cc
@@ -74,13 +74,7 @@ int wmain(int argc, wchar_t* wargv[]) {
#else
// UNIX
#ifdef __linux__
-#include <elf.h>
-#ifdef __LP64__
-#define Elf_auxv_t Elf64_auxv_t
-#else
-#define Elf_auxv_t Elf32_auxv_t
-#endif // __LP64__
-extern char** environ;
+#include <sys/auxv.h>
#endif // __linux__
#if defined(__POSIX__) && defined(NODE_SHARED_MODE)
#include <string.h>
@@ -109,15 +103,7 @@ int main(int argc, char* argv[]) {
#endif
#if defined(__linux__)
- char** envp = environ;
- while (*envp++ != nullptr) {}
- Elf_auxv_t* auxv = reinterpret_cast<Elf_auxv_t*>(envp);
- for (; auxv->a_type != AT_NULL; auxv++) {
- if (auxv->a_type == AT_SECURE) {
- node::per_process::linux_at_secure = auxv->a_un.a_val;
- break;
- }
- }
+ node::per_process::linux_at_secure = getauxval(AT_SECURE);
#endif
// Disable stdio buffering, it interacts poorly with printf()
// calls elsewhere in the program (e.g., any logging from V8.)

View File

@ -1,23 +0,0 @@
Description: keep nodejs compatible with libc-ares 1.17.1
Forwarded: not-needed
Last-Update: 2021-08-11
Author: Jérémy Lal <kapouer@melix.org>
--- a/src/cares_wrap.cc
+++ b/src/cares_wrap.cc
@@ -39,7 +39,15 @@
# include <netdb.h>
#endif // __POSIX__
-# include <ares_nameser.h>
+#if defined(__ANDROID__) || \
+ defined(__MINGW32__) || \
+ defined(__OpenBSD__) || \
+ defined(_MSC_VER)
+
+# include <nameser.h>
+#else
+# include <arpa/nameser.h>
+#endif
// OpenBSD does not define these
#ifndef AI_ALL

View File

@ -1,21 +0,0 @@
Description: Link to -latomic by default
This avoids surprises on mips*el/ppc*el
Author: Jérémy Lal <kapouer@melix.org>
Last-Update: 2019-10-25
Forwarded: not-needed
Bug: https://github.com/nodejs/node/pull/28532
Bug: https://github.com/nodejs/node/issues/30093
--- a/node.gypi
+++ b/node.gypi
@@ -210,6 +210,11 @@
'-lkvm',
],
}],
+ [ 'OS=="linux"', {
+ 'libraries': [
+ '-latomic',
+ ],
+ }],
[ 'OS=="aix"', {
'defines': [
'_LINUX_SOURCE_COMPAT',

View File

@ -1,61 +0,0 @@
Description: a test uses a benchmark that read alice.html, dfsg excluded
Author: Jérémy Lal <kapouer@melix.org>
Forwarded: not-needed
Reviewed-By: Xavier Guimard <yadd@debian.org>
Last-Update: 2020-03-04
--- a/benchmark/buffers/buffer-indexof-number.js
+++ b/benchmark/buffers/buffer-indexof-number.js
@@ -10,7 +10,7 @@
function main({ n, value }) {
const aliceBuffer = fs.readFileSync(
- path.resolve(__dirname, '../fixtures/alice.html')
+ path.resolve(__dirname, '../../doc/api/all.html')
);
let count = 0;
--- a/benchmark/buffers/buffer-indexof.js
+++ b/benchmark/buffers/buffer-indexof.js
@@ -26,7 +26,7 @@
function main({ n, search, encoding, type }) {
let aliceBuffer = fs.readFileSync(
- path.resolve(__dirname, '../fixtures/alice.html')
+ path.resolve(__dirname, '../../doc/api/all.html')
);
if (encoding === 'undefined') {
--- a/benchmark/http2/compat.js
+++ b/benchmark/http2/compat.js
@@ -3,7 +3,7 @@
const common = require('../common.js');
const path = require('path');
const fs = require('fs');
-const file = path.join(path.resolve(__dirname, '../fixtures'), 'alice.html');
+const file = path.join(path.resolve(__dirname, '../../doc/api'), 'all.html');
const bench = common.createBenchmark(main, {
requests: [100, 1000, 5000],
--- a/benchmark/http2/respond-with-fd.js
+++ b/benchmark/http2/respond-with-fd.js
@@ -4,7 +4,7 @@
const path = require('path');
const fs = require('fs');
-const file = path.join(path.resolve(__dirname, '../fixtures'), 'alice.html');
+const file = path.join(path.resolve(__dirname, '../../doc/api'), 'all.html');
const bench = common.createBenchmark(main, {
requests: [100, 1000, 5000],
--- a/benchmark/http2/simple.js
+++ b/benchmark/http2/simple.js
@@ -3,7 +3,7 @@
const common = require('../common.js');
const path = require('path');
const fs = require('fs');
-const file = path.join(path.resolve(__dirname, '../fixtures'), 'alice.html');
+const file = path.join(path.resolve(__dirname, '../../doc/api'), 'all.html');
const bench = common.createBenchmark(main, {
requests: [100, 1000, 5000],

View File

@ -1,32 +0,0 @@
Description: cannot rebuilt dist/lexer.js, just use pure-js lexer
Author: Jérémy Lal <kapouer@melix.org>
Last-Update: 2020-11-24
Forwarded: not-needed
--- a/lib/internal/modules/esm/translators.js
+++ b/lib/internal/modules/esm/translators.js
@@ -59,14 +59,7 @@
let cjsParse;
async function initCJSParse() {
- if (typeof WebAssembly === 'undefined') {
- cjsParse = require('internal/deps/cjs-module-lexer/lexer').parse;
- } else {
- const { parse, init } =
- require('internal/deps/cjs-module-lexer/dist/lexer');
- await init();
- cjsParse = parse;
- }
+ cjsParse = require('internal/deps/cjs-module-lexer/lexer').parse;
}
const translators = new SafeMap();
--- a/node.gyp
+++ b/node.gyp
@@ -250,7 +250,6 @@
'deps/acorn-plugins/acorn-private-methods/index.js',
'deps/acorn-plugins/acorn-static-class-features/index.js',
'deps/cjs-module-lexer/lexer.js',
- 'deps/cjs-module-lexer/dist/lexer.js',
],
'node_mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)node_mksnapshot<(EXECUTABLE_SUFFIX)',
'mkcodecache_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mkcodecache<(EXECUTABLE_SUFFIX)',

View File

@ -1,103 +0,0 @@
Description: Multiarch search path, arch triplet, DFHS path for modules
Author: "Bastien ROUCARIÈS" <roucaries.bastien@gmail.com>
Last-Update: 2018-09-30
Forwarded: https://github.com/nodejs/node/issues/22745
Reviewed-By: Xavier Guimard <yadd@debian.org>
Last-Update: 2020-03-04
--- a/lib/internal/modules/cjs/loader.js
+++ b/lib/internal/modules/cjs/loader.js
@@ -1102,6 +1102,7 @@
Module._initPaths = function() {
const homeDir = isWindows ? process.env.USERPROFILE : safeGetenv('HOME');
const nodePath = isWindows ? process.env.NODE_PATH : safeGetenv('NODE_PATH');
+ const relativePaths = process.config.variables.node_relative_path;
// process.execPath is $PREFIX/bin/node except on Windows where it is
// $PREFIX\node.exe where $PREFIX is the root of the Node.js installation.
@@ -1109,7 +1110,17 @@
path.resolve(process.execPath, '..') :
path.resolve(process.execPath, '..', '..');
- let paths = [path.resolve(prefixDir, 'lib', 'node')];
+ var postDirs = [];
+ if (relativePaths) {
+ relativePaths.split(path.delimiter).map(path => {
+ if (path) postDirs.push(path);
+ });
+ } else {
+ postDirs.push(path.join('lib', 'node'));
+ }
+ let paths = postDirs.map(postDir => {
+ return path.resolve(prefixDir, postDir);
+ });
if (homeDir) {
paths.unshift(path.resolve(homeDir, '.node_libraries'));
--- a/configure.py
+++ b/configure.py
@@ -83,6 +83,11 @@
dest='coverage',
help='Build node with code coverage enabled')
+parser.add_option('--arch-triplet',
+ action='store',
+ dest='arch_triplet',
+ help='arch triplet used by distro')
+
parser.add_option('--debug',
action='store_true',
dest='debug',
@@ -121,6 +126,11 @@
dest='gdb',
help='add gdb support')
+parser.add_option('--node-relative-path',
+ action='store',
+ dest='node_relative_path',
+ help='Node path(s) used by require, resolved relative to prefix dir.')
+
parser.add_option('--no-ifaddrs',
action='store_true',
dest='no_ifaddrs',
@@ -1220,6 +1230,17 @@
version = getnapibuildversion.get_napi_version()
output['variables']['napi_build_version'] = version
+def configure_debian(output):
+ if options.arch_triplet:
+ output['variables']['arch_triplet'] = options.arch_triplet
+ else:
+ output['variables']['arch_triplet'] = 'unknown-unknown-unknown'
+
+ if options.node_relative_path:
+ output['variables']['node_relative_path'] = options.node_relative_path
+ else:
+ output['variables']['node_relative_path']= ''
+
def configure_library(lib, output, pkgname=None):
shared_lib = 'shared_' + lib
output['variables']['node_' + shared_lib] = b(getattr(options, shared_lib))
@@ -1711,6 +1732,7 @@
configure_node(output)
configure_napi(output)
+configure_debian(output)
configure_library('zlib', output)
configure_library('http_parser', output)
configure_library('libuv', output)
--- a/test/parallel/test-module-loading-globalpaths.js
+++ b/test/parallel/test-module-loading-globalpaths.js
@@ -73,10 +73,10 @@
// Test module in $PREFIX/lib/node.
// Write module into $PREFIX/lib/node.
- const expectedString = '$PREFIX/lib/node';
+ const expectedString = '$PREFIX/lib/nodejs';
const prefixLibPath = path.join(prefixPath, 'lib');
fs.mkdirSync(prefixLibPath);
- const prefixLibNodePath = path.join(prefixLibPath, 'node');
+ const prefixLibNodePath = path.join(prefixLibPath, 'nodejs');
fs.mkdirSync(prefixLibNodePath);
const pkgPath = path.join(prefixLibNodePath, `${pkgName}.js`);
fs.writeFileSync(pkgPath, `exports.string = '${expectedString}';`);

View File

@ -1,46 +0,0 @@
From e548e053a2fda35f38272fb023f543e52ae77566 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= <targos@protonmail.com>
Date: Tue, 5 Oct 2021 13:33:50 +0200
Subject: [PATCH] deps: V8: patch jinja2 for Python 3.10 compat
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
PR-URL: https://github.com/nodejs/node/pull/40296
Fixes: https://github.com/nodejs/node/issues/40294
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
---
common.gypi | 2 +-
deps/v8/third_party/jinja2/tests.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
#diff --git a/common.gypi b/common.gypi
#index e14b10cbe788..18e00193ffb9 100644
#--- a/common.gypi
#+++ b/common.gypi
#@@ -36,7 +36,7 @@
#
# # Reset this number to 0 on major V8 upgrades.
# # Increment by one for each non-official patch applied to deps/v8.
#- 'v8_embedder_string': '-node.8',
#+ 'v8_embedder_string': '-node.9',
#
# ##### V8 defaults for Node.js #####
#
diff --git a/deps/v8/third_party/jinja2/tests.py b/deps/v8/third_party/jinja2/tests.py
index 0adc3d4dbcbb..b14f85ff148c 100644
--- a/deps/v8/third_party/jinja2/tests.py
+++ b/deps/v8/third_party/jinja2/tests.py
@@ -10,7 +10,7 @@
"""
import operator
import re
-from collections import Mapping
+from collections.abc import Mapping
from jinja2.runtime import Undefined
from jinja2._compat import text_type, string_types, integer_types
import decimal

View File

@ -1,16 +0,0 @@
Description: fix for js-yaml ≥ 4
Author: Yadd <yadd@debian.org>
Forwarded: not-needed
Last-Update: 2021-11-24
--- a/tools/doc/common.js
+++ b/tools/doc/common.js
@@ -21,7 +21,7 @@
.replace(/-->$/, '');
// js-yaml.safeLoad() throws on error.
- const meta = yaml.safeLoad(text);
+ const meta = yaml.load(text);
if (meta.added) {
// Since semver-minors can trickle down to previous major versions,

View File

@ -1,20 +0,0 @@
Description: do not build cctest, build broken on debian
Last-Update: 2017-12-18
Author: Jérémy Lal <kapouer@melix.org>
Forwarded: not yet !
--- a/Makefile
+++ b/Makefile
@@ -156,8 +156,12 @@
exit 1; \
fi
+build:
+ $(MAKE) $(PARALLEL_ARGS) -C out $(NODE_EXE) BUILDTYPE=$(BUILDTYPE) V=$(V)
+ ln -sf out/$(BUILDTYPE)/node .
+
.PHONY: install
-install: all ## Installs node into $PREFIX (default=/usr/local).
+install: ## Installs node into $PREFIX (default=/usr/local).
$(PYTHON) tools/install.py $@ '$(DESTDIR)' '$(PREFIX)'
.PHONY: uninstall

View File

@ -1,12 +0,0 @@
Description: Adds .GNU-stack section header to disable executable stack flag
Author: James Addison <jay@jp-hosting.net>
Origin: https://github.com/nodejs/node/pull/37688
--- a/src/large_pages/node_text_start.S
+++ b/src/large_pages/node_text_start.S
@@ -1,3 +1,6 @@
+#if defined(__ELF__)
+.section .note.GNU-stack,"",@progbits
+#endif
.text
.align 0x2000
.global __node_text_start

View File

@ -1,42 +0,0 @@
Description: do not use dns.ADDRCONFIG for localhost
it fails on IPv6-only systems. Setting it with libc fails on linux.
https://github.com/nodejs/node/issues/33279
Author: Jérémy Lal <kapouer@melix.org>
Last-Update: 2020-06-11
Bug-Debian: https://bugs.debian.org/962318
Forwarded: https://github.com/nodejs/node/issues/33816
--- a/lib/net.js
+++ b/lib/net.js
@@ -1,4 +1,5 @@
// Copyright Joyent, Inc. and other Node contributors.
+
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
@@ -1028,13 +1029,6 @@
hints: options.hints || 0
};
- if (!isWindows &&
- dnsopts.family !== 4 &&
- dnsopts.family !== 6 &&
- dnsopts.hints === 0) {
- dnsopts.hints = dns.ADDRCONFIG;
- }
-
debug('connect: find host', host);
debug('connect: dns options', dnsopts);
self._host = host;
--- a/test/sequential/sequential.status
+++ b/test/sequential/sequential.status
@@ -17,6 +17,10 @@
# https://github.com/nodejs/node/issues/24403
test-cli-syntax: PASS,FLAKY
+# does not work on IPv6 only host
+test-tls-psk-client: PASS,FLAKY
+test-tls-securepair-client: PASS,FLAKY
+
[$system==win32]
# https://github.com/nodejs/node/issues/22327
test-http2-large-file: PASS, FLAKY

File diff suppressed because it is too large Load Diff

View File

@ -1,210 +0,0 @@
Description: upstream mips fix
Origin: https://github.com/nodejs/node/issues/31118
Last-Update: 2020-05-30
--- a/deps/v8/AUTHORS
+++ b/deps/v8/AUTHORS
@@ -106,6 +106,7 @@
James M Snell <jasnell@gmail.com>
Jianghua Yang <jianghua.yjh@alibaba-inc.com>
Jiawen Geng <technicalcute@gmail.com>
+Jiaxun Yang <jiaxun.yang@flygoat.com>
Joel Stanley <joel@jms.id.au>
Johan Bergström <johan@bergstroem.nu>
Jonathan Liu <net147@gmail.com>
--- a/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-aix.cc
+++ b/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-aix.cc
@@ -94,10 +94,6 @@
void PlatformEmbeddedFileWriterAIX::DeclareFunctionEnd(const char* name) {}
-int PlatformEmbeddedFileWriterAIX::HexLiteral(uint64_t value) {
- return fprintf(fp_, "0x%" PRIx64, value);
-}
-
void PlatformEmbeddedFileWriterAIX::FilePrologue() {}
void PlatformEmbeddedFileWriterAIX::DeclareExternalFilename(
@@ -120,12 +116,6 @@
return kLong;
}
-int PlatformEmbeddedFileWriterAIX::WriteByteChunk(const uint8_t* data) {
- DCHECK_EQ(ByteChunkDataDirective(), kLong);
- const uint32_t* long_ptr = reinterpret_cast<const uint32_t*>(data);
- return HexLiteral(*long_ptr);
-}
-
#undef SYMBOL_PREFIX
} // namespace internal
--- a/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-aix.h
+++ b/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-aix.h
@@ -37,8 +37,6 @@
void DeclareFunctionBegin(const char* name) override;
void DeclareFunctionEnd(const char* name) override;
- int HexLiteral(uint64_t value) override;
-
void Comment(const char* string) override;
void FilePrologue() override;
@@ -48,7 +46,6 @@
int IndentedDataDirective(DataDirective directive) override;
DataDirective ByteChunkDataDirective() const override;
- int WriteByteChunk(const uint8_t* data) override;
private:
void DeclareSymbolGlobal(const char* name);
--- a/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-base.cc
+++ b/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-base.cc
@@ -24,6 +24,10 @@
}
}
+int PlatformEmbeddedFileWriterBase::HexLiteral(uint64_t value) {
+ return fprintf(fp_, "0x%" PRIx64, value);
+}
+
int DataDirectiveSize(DataDirective directive) {
switch (directive) {
case kByte:
@@ -39,24 +43,37 @@
}
int PlatformEmbeddedFileWriterBase::WriteByteChunk(const uint8_t* data) {
- DCHECK_EQ(ByteChunkDataDirective(), kOcta);
-
- static constexpr size_t kSize = kInt64Size;
-
- uint64_t part1, part2;
- // Use memcpy for the reads since {data} is not guaranteed to be aligned.
+ size_t kSize = DataDirectiveSize(ByteChunkDataDirective());
+ size_t kHalfSize = kSize / 2;
+ uint64_t high = 0, low = 0;
+
+ switch (kSize) {
+ case 1:
+ low = *data;
+ break;
+ case 4:
+ low = *reinterpret_cast<const uint32_t*>(data);
+ break;
+ case 8:
+ low = *reinterpret_cast<const uint64_t*>(data);
+ break;
+ case 16:
#ifdef V8_TARGET_BIG_ENDIAN
- memcpy(&part1, data, kSize);
- memcpy(&part2, data + kSize, kSize);
+ memcpy(&high, data, kHalfSize);
+ memcpy(&low, data + kHalfSize, kHalfSize);
#else
- memcpy(&part1, data + kSize, kSize);
- memcpy(&part2, data, kSize);
+ memcpy(&high, data + kHalfSize, kHalfSize);
+ memcpy(&low, data, kHalfSize);
#endif // V8_TARGET_BIG_ENDIAN
+ break;
+ default:
+ UNREACHABLE();
+ }
- if (part1 != 0) {
- return fprintf(fp(), "0x%" PRIx64 "%016" PRIx64, part1, part2);
+ if (high != 0) {
+ return fprintf(fp(), "0x%" PRIx64 "%016" PRIx64, high, low);
} else {
- return fprintf(fp(), "0x%" PRIx64, part2);
+ return fprintf(fp(), "0x%" PRIx64, low);
}
}
--- a/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-base.h
+++ b/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-base.h
@@ -67,7 +67,7 @@
virtual void DeclareFunctionEnd(const char* name) = 0;
// Returns the number of printed characters.
- virtual int HexLiteral(uint64_t value) = 0;
+ virtual int HexLiteral(uint64_t value);
virtual void Comment(const char* string) = 0;
virtual void Newline() { fprintf(fp_, "\n"); }
--- a/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.cc
+++ b/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.cc
@@ -112,10 +112,6 @@
void PlatformEmbeddedFileWriterGeneric::DeclareFunctionEnd(const char* name) {}
-int PlatformEmbeddedFileWriterGeneric::HexLiteral(uint64_t value) {
- return fprintf(fp_, "0x%" PRIx64, value);
-}
-
void PlatformEmbeddedFileWriterGeneric::FilePrologue() {}
void PlatformEmbeddedFileWriterGeneric::DeclareExternalFilename(
@@ -142,6 +138,18 @@
return fprintf(fp_, " %s ", DirectiveAsString(directive));
}
+DataDirective PlatformEmbeddedFileWriterGeneric::ByteChunkDataDirective()
+ const {
+#if defined(V8_TARGET_ARCH_MIPS) || defined(V8_TARGET_ARCH_MIPS64)
+ // MIPS uses a fixed 4 byte instruction set, using .long
+ // to prevent any unnecessary padding.
+ return kLong;
+#else
+ // Other ISAs just listen to the base
+ return PlatformEmbeddedFileWriterBase::ByteChunkDataDirective();
+#endif
+}
+
#undef SYMBOL_PREFIX
} // namespace internal
--- a/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.h
+++ b/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.h
@@ -39,8 +39,6 @@
void DeclareFunctionBegin(const char* name) override;
void DeclareFunctionEnd(const char* name) override;
- int HexLiteral(uint64_t value) override;
-
void Comment(const char* string) override;
void FilePrologue() override;
@@ -49,6 +47,8 @@
int IndentedDataDirective(DataDirective directive) override;
+ DataDirective ByteChunkDataDirective() const override;
+
private:
void DeclareSymbolGlobal(const char* name);
--- a/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-mac.cc
+++ b/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-mac.cc
@@ -87,10 +87,6 @@
void PlatformEmbeddedFileWriterMac::DeclareFunctionEnd(const char* name) {}
-int PlatformEmbeddedFileWriterMac::HexLiteral(uint64_t value) {
- return fprintf(fp_, "0x%" PRIx64, value);
-}
-
void PlatformEmbeddedFileWriterMac::FilePrologue() {}
void PlatformEmbeddedFileWriterMac::DeclareExternalFilename(
--- a/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-mac.h
+++ b/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-mac.h
@@ -37,8 +37,6 @@
void DeclareFunctionBegin(const char* name) override;
void DeclareFunctionEnd(const char* name) override;
- int HexLiteral(uint64_t value) override;
-
void Comment(const char* string) override;
void FilePrologue() override;

View File

@ -1,26 +0,0 @@
Description: mksnapshot uses too much memory on 32-bit mipsel
Author: Jérémy Lal <kapouer@melix.org>
Last-Update: 2020-06-03
Forwarded: https://bugs.chromium.org/p/v8/issues/detail?id=10586
--- a/deps/v8/src/common/globals.h
+++ b/deps/v8/src/common/globals.h
@@ -206,7 +206,7 @@
constexpr size_t kMinExpectedOSPageSize = 64 * KB; // OS page on PPC Linux
#elif V8_TARGET_ARCH_MIPS
constexpr bool kRequiresCodeRange = false;
-constexpr size_t kMaximalCodeRangeSize = 2048LL * MB;
+constexpr size_t kMaximalCodeRangeSize = 512 * MB;
constexpr size_t kMinimumCodeRangeSize = 0 * MB;
constexpr size_t kMinExpectedOSPageSize = 4 * KB; // OS page.
#else
--- a/deps/v8/src/codegen/mips/constants-mips.h
+++ b/deps/v8/src/codegen/mips/constants-mips.h
@@ -137,7 +137,7 @@
namespace v8 {
namespace internal {
-constexpr size_t kMaxPCRelativeCodeRangeInMB = 4096;
+constexpr size_t kMaxPCRelativeCodeRangeInMB = 1024;
// -----------------------------------------------------------------------------
// Registers and FPURegisters.

View File

@ -1,16 +0,0 @@
Description: on mipsel, mips64el, node --jitless segfaults
Author: Jérémy Lal <kapouer@melix.org>
Last-Update: 2020-06-03
Forwarded: https://github.com/nodejs/node/issues/33703
--- a/test/parallel/test-cli-node-options.js
+++ b/test/parallel/test-cli-node-options.js
@@ -68,7 +68,8 @@
expect('--abort_on-uncaught_exception', 'B\n');
expect('--disallow-code-generation-from-strings', 'B\n');
expect('--huge-max-old-generation-size', 'B\n');
-expect('--jitless', 'B\n');
+if (!['mipsel', 'mips64el'].includes(process.arch))
+ expect('--jitless', 'B\n');
expect('--max-old-space-size=0', 'B\n');
expect('--stack-trace-limit=100',
/(\s*at f \(\[(eval|worker eval)\]:1:\d*\)\r?\n)/,

View File

@ -1,47 +0,0 @@
Date: Sat, 13 Jun 2020 20:49:35 +0200
Subject: [PATCH] Fix crashes on Linux/PPC64 ELFv1
Origin: https://github.com/nodejs/node/pull/33866
From: Marcus Comstedt <marcus@mc.pp.se>
--- nodejs-12.18.0~dfsg.orig/deps/v8/src/compiler/backend/instruction-selector.cc
+++ nodejs-12.18.0~dfsg/deps/v8/src/compiler/backend/instruction-selector.cc
@@ -2788,7 +2788,7 @@ void InstructionSelector::VisitCall(Node
switch (call_descriptor->kind()) {
case CallDescriptor::kCallAddress: {
int misc_field = static_cast<int>(call_descriptor->ParameterCount());
-#if defined(_AIX)
+#if ABI_USES_FUNCTION_DESCRIPTORS
// Highest misc_field bit is used on AIX to indicate if a CFunction call
// has function descriptor or not.
misc_field |= call_descriptor->HasFunctionDescriptor()
--- nodejs-12.18.0~dfsg.orig/deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc
+++ nodejs-12.18.0~dfsg/deps/v8/src/compiler/backend/ppc/code-generator-ppc.cc
@@ -1026,7 +1026,7 @@ CodeGenerator::CodeGenResult CodeGenerat
Label start_call;
bool isWasmCapiFunction =
linkage()->GetIncomingDescriptor()->IsWasmCapiFunction();
-#if defined(_AIX)
+#if ABI_USES_FUNCTION_DESCRIPTORS
// AIX/PPC64BE Linux uses a function descriptor
int kNumParametersMask = kHasFunctionDescriptorBitMask - 1;
num_parameters = kNumParametersMask & misc_field;
--- nodejs-12.18.0~dfsg.orig/deps/v8/src/execution/simulator.h
+++ nodejs-12.18.0~dfsg/deps/v8/src/execution/simulator.h
@@ -122,7 +122,7 @@ class GeneratedCode {
DISABLE_CFI_ICALL Return Call(Args... args) {
// When running without a simulator we call the entry directly.
-#if V8_OS_AIX
+#if ABI_USES_FUNCTION_DESCRIPTORS
// AIX ABI requires function descriptors (FD). Artificially create a pseudo
// FD to ensure correct dispatch to generated code. The 'volatile'
// declaration is required to avoid the compiler from not observing the
@@ -134,7 +134,7 @@ class GeneratedCode {
return fn(args...);
#else
return fn_ptr_(args...);
-#endif // V8_OS_AIX
+#endif // ABI_USES_FUNCTION_DESCRIPTORS
}
#endif // USE_SIMULATOR

View File

@ -1,18 +0,0 @@
Description: remove google font from template.html, and link to local
Author: Jérémy Lal <kapouer@melix.org>
Last-Update: 2015-09-09
Forwarded: not-needed
--- a/doc/template.html
+++ b/doc/template.html
@@ -5,10 +5,9 @@
<meta name="viewport" content="width=device-width">
<meta name="nodejs.org:node-version" content="__VERSION__">
<title>__SECTION__ | Node.js __VERSION__ Documentation</title>
- <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic&display=fallback">
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/hljs.css">
- <link rel="canonical" href="https://nodejs.org/api/__FILENAME__.html">
+ <link rel="canonical" href="__FILENAME__.html">
</head>
<body class="alt apidoc" id="api-section-__FILENAME__">
<div id="content" class="clearfix">

View File

@ -1,32 +0,0 @@
Description: support build with python3
Forwarded: not-needed
Last-Update: 2020-08-08
Author: Jérémy Lal <kapouer@melix.org>
--- a/configure
+++ b/configure
@@ -4,7 +4,7 @@
# mix of single and double quotes is intentional, as is the fact that
# the ] goes on a new line.
_=[ 'exec' '/bin/sh' '-c' '''
-which python2.7 >/dev/null && exec python2.7 "$0" "$@"
+which python3 >/dev/null && exec python3 "$0" "$@"
which python2 >/dev/null && exec python2 "$0" "$@"
exec python "$0" "$@"
''' "$0" "$@"
@@ -13,16 +13,5 @@
import sys
from distutils.spawn import find_executable as which
-if sys.version_info[:2] != (2, 7):
- sys.stderr.write('Please use Python 2.7')
-
- python2 = which('python2') or which('python2.7')
-
- if python2:
- sys.stderr.write(':\n\n')
- sys.stderr.write(' ' + python2 + ' ' + ' '.join(sys.argv))
-
- sys.stderr.write('\n')
- sys.exit(1)
import configure

View File

@ -1,169 +0,0 @@
From: Eric Bickle <ebickle@users.noreply.github.com>
Date: Tue, 3 Mar 2020 13:35:28 -0800
Subject: Revert src fix missing extra ca in tls.rootCertificates
Revert this patch because it breaks system CA:
https://github.com/nodejs/node/pull/32315
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -988,6 +988,24 @@
}
+void GetRootCertificates(const FunctionCallbackInfo<Value>& args) {
+ Environment* env = Environment::GetCurrent(args);
+ Local<Value> result[arraysize(root_certs)];
+
+ for (size_t i = 0; i < arraysize(root_certs); i++) {
+ if (!String::NewFromOneByte(
+ env->isolate(),
+ reinterpret_cast<const uint8_t*>(root_certs[i]),
+ NewStringType::kNormal).ToLocal(&result[i])) {
+ return;
+ }
+ }
+
+ args.GetReturnValue().Set(
+ Array::New(env->isolate(), result, arraysize(root_certs)));
+}
+
+
void SecureContext::AddCACert(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);
@@ -2664,21 +2682,6 @@
}
}
-static MaybeLocal<Value> X509ToPEM(Environment* env, X509* cert) {
- BIOPointer bio(BIO_new(BIO_s_mem()));
- if (!bio) {
- ThrowCryptoError(env, ERR_get_error(), "BIO_new");
- return MaybeLocal<Value>();
- }
-
- if (PEM_write_bio_X509(bio.get(), cert) == 0) {
- ThrowCryptoError(env, ERR_get_error(), "PEM_write_bio_X509");
- return MaybeLocal<Value>();
- }
-
- return BIOToStringOrBuffer(env, bio.get(), kKeyFormatPEM);
-}
-
static bool WritePublicKeyInner(EVP_PKEY* pkey,
const BIOPointer& bio,
const PublicKeyEncodingConfig& config) {
@@ -6676,36 +6679,6 @@
}
-void GetRootCertificates(const FunctionCallbackInfo<Value>& args) {
- Environment* env = Environment::GetCurrent(args);
-
- if (root_cert_store == nullptr)
- root_cert_store = NewRootCertStore();
-
- stack_st_X509_OBJECT* objs = X509_STORE_get0_objects(root_cert_store);
- int num_objs = sk_X509_OBJECT_num(objs);
-
- std::vector<Local<Value>> result;
- result.reserve(num_objs);
-
- for (int i = 0; i < num_objs; i++) {
- X509_OBJECT* obj = sk_X509_OBJECT_value(objs, i);
- if (X509_OBJECT_get_type(obj) == X509_LU_X509) {
- X509* cert = X509_OBJECT_get0_X509(obj);
-
- Local<Value> value;
- if (!X509ToPEM(env, cert).ToLocal(&value))
- return;
-
- result.push_back(value);
- }
- }
-
- args.GetReturnValue().Set(
- Array::New(env->isolate(), result.data(), result.size()));
-}
-
-
// Convert the input public key to compressed, uncompressed, or hybrid formats.
void ConvertKey(const FunctionCallbackInfo<Value>& args) {
MarkPopErrorOnReturn mark_pop_error_on_return;
--- a/test/parallel/test-tls-root-certificates.js
+++ b/test/parallel/test-tls-root-certificates.js
@@ -2,49 +2,30 @@
const common = require('../common');
if (!common.hasCrypto) common.skip('missing crypto');
-const fixtures = require('../common/fixtures');
const assert = require('assert');
const tls = require('tls');
-const { fork } = require('child_process');
-if (process.argv[2] !== 'child') {
- // Parent
- const NODE_EXTRA_CA_CERTS = fixtures.path('keys', 'ca1-cert.pem');
-
- fork(
- __filename,
- ['child'],
- { env: { ...process.env, NODE_EXTRA_CA_CERTS } }
- ).on('exit', common.mustCall(function(status) {
- assert.strictEqual(status, 0);
- }));
-} else {
- // Child
- assert(Array.isArray(tls.rootCertificates));
- assert(tls.rootCertificates.length > 0);
-
- // Getter should return the same object.
- assert.strictEqual(tls.rootCertificates, tls.rootCertificates);
-
- // Array is immutable...
- assert.throws(() => tls.rootCertificates[0] = 0, /TypeError/);
- assert.throws(() => tls.rootCertificates.sort(), /TypeError/);
-
- // ...and so is the property.
- assert.throws(() => tls.rootCertificates = 0, /TypeError/);
-
- // Does not contain duplicates.
- assert.strictEqual(tls.rootCertificates.length,
- new Set(tls.rootCertificates).size);
-
- assert(tls.rootCertificates.every((s) => {
- return s.startsWith('-----BEGIN CERTIFICATE-----\n');
- }));
-
- assert(tls.rootCertificates.every((s) => {
- return s.endsWith('\n-----END CERTIFICATE-----\n');
- }));
-
- const extraCert = fixtures.readKey('ca1-cert.pem', 'utf8');
- assert(tls.rootCertificates.includes(extraCert));
-}
+assert(Array.isArray(tls.rootCertificates));
+assert(tls.rootCertificates.length > 0);
+
+// Getter should return the same object.
+assert.strictEqual(tls.rootCertificates, tls.rootCertificates);
+
+// Array is immutable...
+assert.throws(() => tls.rootCertificates[0] = 0, /TypeError/);
+assert.throws(() => tls.rootCertificates.sort(), /TypeError/);
+
+// ...and so is the property.
+assert.throws(() => tls.rootCertificates = 0, /TypeError/);
+
+// Does not contain duplicates.
+assert.strictEqual(tls.rootCertificates.length,
+ new Set(tls.rootCertificates).size);
+
+assert(tls.rootCertificates.every((s) => {
+ return s.startsWith('-----BEGIN CERTIFICATE-----\n');
+}));
+
+assert(tls.rootCertificates.every((s) => {
+ return s.endsWith('\n-----END CERTIFICATE-----');
+}));

26
debian/patches/series vendored
View File

@ -1,26 +0,0 @@
test-lowerseclevel.patch
ares_compat.patch
shared_uv_from_uvwasi.patch
large_pages_assembly_gnu_stack.patch
dfhs_module_path_arch_triplet.patch
# 2012_kfreebsd.patch
use_system_node_gyp.patch
privacy_breach.patch
fix-for-js-yaml-4.patch
make-doc.patch
2017_mips_configure_fpu.patch
test_ci_buildd.patch
fix_disable_cctest.patch
benchmark_without_alice.patch
atomic.patch
mips-fix.patch
mips-less-memory.patch
mips-no-jitless.patch
localhost-no-addrconfig.patch
ppc64.patch
python3.patch
cjs-module-lexer.patch
upstream-fix-test-worker-prof.patch
7232c2a1604d241ce0455d919ba9b0b8e9959f81.patch
24c403cfaf8bdbcd8b19037531c8998709d2b949.patch
e548e053a2fda35f38272fb023f543e52ae77566.patch

View File

@ -1,26 +0,0 @@
Description: uvwasi depends on uv.gyp and ignores shared_libuv
Author: Jérémy Lal <kapouer@melix.org>
Last-Update: 2021-07-03
Forwarded: https://github.com/nodejs/node/issues/39248
--- a/deps/uvwasi/uvwasi.gyp
+++ b/deps/uvwasi/uvwasi.gyp
@@ -18,9 +18,6 @@
'src/wasi_rights.c',
'src/wasi_serdes.c',
],
- 'dependencies': [
- '../uv/uv.gyp:libuv',
- ],
'direct_dependent_settings': {
'include_dirs': ['include']
},
@@ -31,6 +28,9 @@
'_POSIX_C_SOURCE=200112',
],
}],
+ [ 'node_shared_libuv=="false"', {
+ 'dependencies': [ '../uv/uv.gyp:libuv' ],
+ }],
],
}
]

View File

@ -1,32 +0,0 @@
Description: Lower SECLEVEL in the openssl.cnf used for testing
In Ubuntu SECLEVEL is compiled into openssl, rather than
set/unset from system openssl.cnf.
Author: Dimitri John Ledkov <xnox@ubuntu.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1858971
--- nodejs-10.17.0~dfsg.orig/deps/openssl/openssl/apps/openssl.cnf
+++ nodejs-10.17.0~dfsg/deps/openssl/openssl/apps/openssl.cnf
@@ -11,6 +11,8 @@
# defined.
HOME = .
+openssl_conf = default_conf
+
# Extra OBJECT IDENTIFIER info:
#oid_file = $ENV::HOME/.oid
oid_section = new_oids
@@ -348,3 +350,13 @@ ess_cert_id_chain = no # Must the ESS ce
# (optional, default: no)
ess_cert_id_alg = sha1 # algorithm to compute certificate
# identifier (optional, default: sha1)
+
+[default_conf]
+ssl_conf = ssl_sect
+
+[ssl_sect]
+system_default = system_default_sect
+
+[system_default_sect]
+MinProtocol = TLSv1.2
+CipherString = DEFAULT@SECLEVEL=1

View File

@ -1,180 +0,0 @@
Description: adapt test-ci build target for buildd
* run tests with ./node
* remove addons from test-ci suite, because it creates a dependency loop
nodejs -> node-gyp -> nodejs which is painful to manage.
* disabled because it requires stdin:
+ test-stdout-close-unref
+ test-regress-GH-746
* test-tick-processor fails on ppc64 and s390x, currently investigated
https://github.com/nodejs/node/issues/2471
* test-cluster-disconnect sometimes fails on busy buildd, forwarded upstream
https://github.com/nodejs/node/issues/3383
* test-fs-watch is flaky, might be related to https://github.com/nodejs/node/issues/4082
* huge timeout value for all platforms, buildd could be busy
* test-npm-install and test-release-npm must fail, debian package dfsg-repacked npm out
* ability to override CI_NATIVE_SUITES, CI_JS_SUITES
* disable tests failing because DNS is disabled
* sequential/test-http2-session-timeout is flaky https://github.com/nodejs/node/issues/20628
Author: Jérémy Lal <kapouer@melix.org>
Forwarded: not-needed
Reviewed-By: Xavier Guimard <yadd@debian.org>
Last-Update: 2020-02-09
--- a/Makefile
+++ b/Makefile
@@ -508,7 +508,7 @@
# This target should not use a native compiler at all
# Related CI job: node-test-commit-arm-fanned
test-ci-js: | clear-stalled
- $(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
+ $(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap \
--mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \
$(TEST_CI_ARGS) $(CI_JS_SUITES)
@echo "Clean up any leftover processes, error if found."
--- a/test/parallel/parallel.status
+++ b/test/parallel/parallel.status
@@ -6,6 +6,37 @@
[true] # This section applies to all platforms
+test-process-config : PASS,FLAKY
+test-regress-GH-746 : PASS,FLAKY
+test-stdout-close-unref : PASS,FLAKY
+test-npm-install : FAIL
+test-npm-version : FAIL
+test-release-npm : FAIL
+# skip tests accessing network
+test-dns : SKIP
+test-net-connect-immediate-finish : SKIP
+test-net-better-error-messages-port-hostname : SKIP
+
+# in debian build env, skip because it somehow tries to access network
+test-https-connect-address-family : SKIP
+test-tls-connect-address-family : SKIP
+test-dns-cancel-reverse-lookup: SKIP
+
+# https://bugs.debian.org/919588
+## flaky on some user environments
+test-net-listen-after-destroying-stdin: PASS,FLAKY
+## fails when running with eatmydata
+test-fs-error-messages: PASS,FLAKY
+
+# should have been disabled 'cause openssl 1.1.0
+test-tls-ecdh-disable : SKIP
+
+# only works with zlib >= 1.2.11
+test-zlib-failed-init: SKIP
+
+# might fail, see https://github.com/nodejs/node/issues/17909
+test-fs-utimes: PASS,FLAKY
+
[$system==win32]
# https://github.com/nodejs/node/issues/20750
test-http2-client-upload: PASS,FLAKY
@@ -39,6 +70,10 @@
# https://github.com/nodejs/node/issues/33796
test-fs-stream-construct: PASS,FLAKY
+[$arch==mips64el]
+# the debug flag is for hacking v8 internals
+test-debug-args: PASS,FLAKY
+
[$system==solaris] # Also applies to SmartOS
[$system==freebsd]
@@ -71,3 +106,6 @@
test-tls-env-extra-ca: SKIP
# https://github.com/nodejs/node/pull/34209
test-dgram-error-message-address: SKIP
+
+[$arch==mipsel]
+test-inspect-async-hook-setup-at-inspect: SKIP
--- a/test/sequential/sequential.status
+++ b/test/sequential/sequential.status
@@ -8,6 +8,15 @@
# https://github.com/nodejs/node/issues/27611#issuecomment-613100468
test-cpu-prof-dir-worker: PASS, FLAKY
+# flaky or failing at least on debian build servers
+test-fs-watch : PASS,FLAKY
+test-force-repl : SKIP
+test-performance : SKIP
+test-http2-session-timeout : PASS,FLAKY
+
+# https://github.com/nodejs/node/issues/24403
+test-cli-syntax: PASS,FLAKY
+
[$system==win32]
# https://github.com/nodejs/node/issues/22327
test-http2-large-file: PASS, FLAKY
@@ -35,3 +44,10 @@
[$arch==arm]
# https://github.com/nodejs/node/issues/26401#issuecomment-613095719
test-worker-prof: PASS, FLAKY
+
+[$arch==mipsel]
+test-inspector-async-hook-setup-at-inspect-brk: SKIP
+test-inspector-async-hook-setup-at-signal: SKIP
+test-inspector-async-stack-traces-set-interval: SKIP
+
+
--- a/tools/test.py
+++ b/tools/test.py
@@ -890,25 +890,7 @@
self.node_has_crypto = True
def GetVm(self, arch, mode):
- if self.vm is not None:
- return self.vm
- if arch == 'none':
- name = 'out/Debug/node' if mode == 'debug' else 'out/Release/node'
- else:
- name = 'out/%s.%s/node' % (arch, mode)
-
- # Currently GYP does not support output_dir for MSVS.
- # http://code.google.com/p/gyp/issues/detail?id=40
- # It will put the builds into Release/node.exe or Debug/node.exe
- if utils.IsWindows():
- if not exists(name + '.exe'):
- name = name.replace('out/', '')
- name = os.path.abspath(name + '.exe')
-
- if not exists(name):
- raise ValueError('Could not find executable. Should be ' + name)
-
- return name
+ return './node'
def GetTimeout(self, mode):
return self.timeout * TIMEOUT_SCALEFACTOR[ARCH_GUESS or 'ia32'][mode]
--- a/test/common/index.js
+++ b/test/common/index.js
@@ -235,27 +235,7 @@
function platformTimeout(ms) {
- const multipliers = typeof ms === 'bigint' ?
- { two: 2n, four: 4n, seven: 7n } : { two: 2, four: 4, seven: 7 };
-
- if (process.features.debug)
- ms = multipliers.two * ms;
-
- if (isAIX)
- return multipliers.two * ms; // Default localhost speed is slower on AIX
-
- if (process.arch !== 'arm')
- return ms;
-
- const armv = process.config.variables.arm_version;
-
- if (armv === '6')
- return multipliers.seven * ms; // ARMv6
-
- if (armv === '7')
- return multipliers.two * ms; // ARMv7
-
- return ms; // ARMv8+
+ return 20 * ms; // for debian build servers
}
let knownGlobals = [

View File

@ -1,93 +0,0 @@
From 04fb597996455d0abbe7b12bbc2d2a5ce16fbb3d Mon Sep 17 00:00:00 2001
From: Rich Trott <rtrott@gmail.com>
Date: Sun, 14 Feb 2021 15:52:54 -0800
Subject: [PATCH] test: fix flaky test-worker-prof
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fixes: https://github.com/nodejs/node/issues/26401
Co-authored-by: Gireesh Punathil <gpunathi@in.ibm.com>
PR-URL: https://github.com/nodejs/node/pull/37372
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
---
test/sequential/sequential.status | 4 ----
test/sequential/test-worker-prof.js | 15 ++++++++-------
2 files changed, 8 insertions(+), 11 deletions(-)
--- a/test/sequential/sequential.status
+++ b/test/sequential/sequential.status
@@ -24,8 +24,6 @@
[$system==win32]
# https://github.com/nodejs/node/issues/22327
test-http2-large-file: PASS, FLAKY
-# https://github.com/nodejs/node/issues/26401
-test-worker-prof: PASS, FLAKY
[$system==linux]
@@ -45,10 +43,6 @@
# https://github.com/nodejs/node/pull/30819
test-perf-hooks: SKIP
-[$arch==arm]
-# https://github.com/nodejs/node/issues/26401#issuecomment-613095719
-test-worker-prof: PASS, FLAKY
-
[$arch==mipsel]
test-inspector-async-hook-setup-at-inspect-brk: SKIP
test-inspector-async-hook-setup-at-signal: SKIP
--- a/test/sequential/test-worker-prof.js
+++ b/test/sequential/test-worker-prof.js
@@ -23,17 +23,17 @@
const fs = require('fs');
const { Worker, parentPort } = require('worker_threads');
parentPort.on('message', (m) => {
- if (counter++ === 10)
+ if (counter++ === 1024)
process.exit(0);
- parentPort.postMessage(
- fs.readFileSync(m.toString()).slice(0, 1024 * 1024));
+ parentPort.postMessage(
+ fs.readFileSync(m.toString()).slice(0, 1024 * 1024));
});
`;
const { Worker } = require('worker_threads');
const w = new Worker(pingpong, { eval: true });
w.on('message', (m) => {
- w.postMessage(process.execPath);
+ w.postMessage(__filename);
});
w.on('exit', common.mustCall(() => {
@@ -46,12 +46,13 @@
}
process.exit(0);
}));
- w.postMessage(process.execPath);
+ w.postMessage(__filename);
} else {
tmpdir.refresh();
+ const timeout = common.platformTimeout(30_000);
const spawnResult = spawnSync(
process.execPath, ['--prof', __filename, 'child'],
- { cwd: tmpdir.path, encoding: 'utf8', timeout: 30_000 });
+ { cwd: tmpdir.path, encoding: 'utf8', timeout });
assert.strictEqual(spawnResult.stderr.toString(), '',
`child exited with an error: \
${util.inspect(spawnResult)}`);
@@ -72,7 +73,7 @@
// Test that at least 15 ticks have been recorded for both parent and child
// threads. When not tracking Worker threads, only 1 or 2 ticks would
// have been recorded.
- // When running locally on x64 Linux, this number is usually at least 200
+ // When running locally, this number is usually around 200
// for both threads, so 15 seems like a very safe threshold.
assert(ticks >= 15, `${ticks} >= 15`);
}

View File

@ -1,23 +0,0 @@
Description: use system-installed node-gyp for building test modules
Author: Jérémy Lal <kapouer@melix.org>
Last-Update: 2015-09-09
Forwarded: not-needed
--- a/Makefile
+++ b/Makefile
@@ -376,14 +376,14 @@
$(filter-out test/addons/??_*/*.h, $(wildcard test/addons/*/*.h))
ADDONS_PREREQS := config.gypi \
- deps/npm/node_modules/node-gyp/package.json tools/build-addons.js \
+ tools/build-addons.js \
deps/uv/include/*.h deps/v8/include/*.h \
src/node.h src/node_buffer.h src/node_object_wrap.h src/node_version.h
define run_build_addons
env npm_config_loglevel=$(LOGLEVEL) npm_config_nodedir="$$PWD" \
npm_config_python="$(PYTHON)" $(NODE) "$$PWD/tools/build-addons" \
- "$$PWD/deps/npm/node_modules/node-gyp/bin/node-gyp.js" \
+ "/usr/bin/node-gyp" \
$1
touch $2
endef

View File

@ -1 +1 @@
3.0 (quilt) 3.0 (native)