mirror of
https://src.fedoraproject.org/rpms/nodejs18.git
synced 2024-11-24 17:44:23 +00:00
Upgrade to Node.js 4.2.2 (LTS)
This commit is contained in:
parent
20320bc673
commit
f2c3b615ec
7 changed files with 113 additions and 857 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -32,3 +32,4 @@
|
|||
/node-v0.10.32-stripped.tar.gz
|
||||
/node-v0.10.33-stripped.tar.gz
|
||||
/node-v0.10.36-stripped.tar.gz
|
||||
/node-v4.2.2-stripped.tar.gz
|
||||
|
|
|
@ -1,26 +1,29 @@
|
|||
From 4464455834276c845a63fede515cb62655afb2da Mon Sep 17 00:00:00 2001
|
||||
From: "T.C. Hollingsworth" <tchollingsworth@gmail.com>
|
||||
Date: Tue, 12 Nov 2013 14:51:03 -0700
|
||||
Subject: [PATCH] disable running gyp files for bundled deps
|
||||
From 34a6454fc02ae79362cc03f501bb08fb95495a1b Mon Sep 17 00:00:00 2001
|
||||
From: Stephen Gallagher <sgallagh@redhat.com>
|
||||
Date: Tue, 1 Dec 2015 16:35:29 -0500
|
||||
Subject: [PATCH 1/2] disable running gyp files for bundled deps
|
||||
|
||||
these aren't used in Fedora
|
||||
---
|
||||
Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 8177017..81d150f 100644
|
||||
index 02619fac98ddd7bd90648f6493ccf49fcf22c47b..981c3ce4daa8724547979d7646117182399b22db 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -43,7 +43,7 @@ node_g: config.gypi out/Makefile
|
||||
ln -fs out/Debug/node $@
|
||||
endif
|
||||
@@ -47,11 +47,11 @@ $(NODE_EXE): config.gypi out/Makefile
|
||||
|
||||
-out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp deps/zlib/zlib.gyp deps/v8/build/common.gypi deps/v8/tools/gyp/v8.gyp node.gyp config.gypi
|
||||
+out/Makefile: common.gypi node.gyp config.gypi
|
||||
ifeq ($(USE_NINJA),1)
|
||||
touch out/Makefile
|
||||
$(PYTHON) tools/gyp_node.py -f ninja
|
||||
$(NODE_G_EXE): config.gypi out/Makefile
|
||||
$(MAKE) -C out BUILDTYPE=Debug V=$(V)
|
||||
ln -fs out/Debug/$(NODE_EXE) $@
|
||||
|
||||
-out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp deps/zlib/zlib.gyp deps/v8/build/toolchain.gypi deps/v8/build/features.gypi deps/v8/tools/gyp/v8.gyp node.gyp config.gypi
|
||||
+out/Makefile: common.gypi deps/v8/build/toolchain.gypi deps/v8/build/features.gypi deps/v8/tools/gyp/v8.gyp node.gyp config.gypi
|
||||
$(PYTHON) tools/gyp_node.py -f make
|
||||
|
||||
config.gypi: configure
|
||||
if [ -f $@ ]; then
|
||||
$(error Stale $@, please re-run ./configure)
|
||||
--
|
||||
1.8.4.2
|
||||
2.5.0
|
||||
|
||||
|
|
|
@ -1,689 +0,0 @@
|
|||
From a9e60792a9c4044e29ec7bbb88419d9283044b86 Mon Sep 17 00:00:00 2001
|
||||
From: "T.C. Hollingsworth" <tchollingsworth@gmail.com>
|
||||
Date: Wed, 18 Jun 2014 23:19:19 -0700
|
||||
Subject: [PATCH] Revert "src: replace usage of String::Utf8Value"
|
||||
|
||||
This reverts commit 535c7777ac674ba86cf93c44824e07b0e23ea8c4.
|
||||
---
|
||||
src/cares_wrap.cc | 8 ++---
|
||||
src/fs_event_wrap.cc | 3 +-
|
||||
src/node.cc | 42 +++++++++++++-------------
|
||||
src/node_crypto.cc | 31 ++++++++++---------
|
||||
src/node_dtrace.cc | 6 ++--
|
||||
src/node_file.cc | 37 +++++++++++------------
|
||||
src/node_stat_watcher.cc | 3 +-
|
||||
src/process_wrap.cc | 9 +++---
|
||||
src/udp_wrap.cc | 9 +++---
|
||||
src/util.h | 78 ------------------------------------------------
|
||||
10 files changed, 68 insertions(+), 158 deletions(-)
|
||||
delete mode 100644 src/util.h
|
||||
|
||||
diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc
|
||||
index 321e144..b7ba828 100644
|
||||
--- a/src/cares_wrap.cc
|
||||
+++ b/src/cares_wrap.cc
|
||||
@@ -741,7 +739,7 @@ static Handle<Value> Query(const Arguments& args) {
|
||||
// object reference, causing wrap->GetObject() to return undefined.
|
||||
Local<Object> object = Local<Object>::New(wrap->GetObject());
|
||||
|
||||
- node::Utf8Value name(args[0]);
|
||||
+ String::Utf8Value name(args[0]);
|
||||
|
||||
int r = wrap->Send(*name);
|
||||
if (r) {
|
||||
@@ -770,7 +768,7 @@ static Handle<Value> QueryWithFamily(const Arguments& args) {
|
||||
// object reference, causing wrap->GetObject() to return undefined.
|
||||
Local<Object> object = Local<Object>::New(wrap->GetObject());
|
||||
|
||||
- node::Utf8Value name(args[0]);
|
||||
+ String::Utf8Value name(args[0]);
|
||||
int family = args[1]->Int32Value();
|
||||
|
||||
int r = wrap->Send(*name, family);
|
||||
@@ -900,7 +898,7 @@ static Handle<Value> IsIP(const Arguments& args) {
|
||||
static Handle<Value> GetAddrInfo(const Arguments& args) {
|
||||
HandleScope scope;
|
||||
|
||||
- node::Utf8Value hostname(args[0]);
|
||||
+ String::Utf8Value hostname(args[0]);
|
||||
|
||||
int fam = AF_UNSPEC;
|
||||
if (args[1]->IsInt32()) {
|
||||
diff --git a/src/fs_event_wrap.cc b/src/fs_event_wrap.cc
|
||||
index fc54283..7e3eb8c 100644
|
||||
--- a/src/fs_event_wrap.cc
|
||||
+++ b/src/fs_event_wrap.cc
|
||||
@@ -21,7 +21,6 @@
|
||||
|
||||
#include "node.h"
|
||||
#include "handle_wrap.h"
|
||||
-#include "util.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -98,7 +97,7 @@ Handle<Value> FSEventWrap::Start(const Arguments& args) {
|
||||
return ThrowException(Exception::TypeError(String::New("Bad arguments")));
|
||||
}
|
||||
|
||||
- node::Utf8Value path(args[0]);
|
||||
+ String::Utf8Value path(args[0]);
|
||||
|
||||
int r = uv_fs_event_init(uv_default_loop(), &wrap->handle_, *path, OnEvent, 0);
|
||||
if (r == 0) {
|
||||
diff --git a/src/node.cc b/src/node.cc
|
||||
index e9696cd..8257604 100644
|
||||
--- a/src/node.cc
|
||||
+++ b/src/node.cc
|
||||
@@ -1102,7 +1100,7 @@ enum encoding ParseEncoding(Handle<Value> encoding_v, enum encoding _default) {
|
||||
|
||||
if (!encoding_v->IsString()) return _default;
|
||||
|
||||
- node::Utf8Value encoding(encoding_v);
|
||||
+ String::Utf8Value encoding(encoding_v);
|
||||
|
||||
if (strcasecmp(*encoding, "utf8") == 0) {
|
||||
return UTF8;
|
||||
@@ -1202,12 +1200,12 @@ void DisplayExceptionLine (TryCatch &try_catch) {
|
||||
|
||||
if (!message.IsEmpty()) {
|
||||
// Print (filename):(line number): (message).
|
||||
- node::Utf8Value filename(message->GetScriptResourceName());
|
||||
+ String::Utf8Value filename(message->GetScriptResourceName());
|
||||
const char* filename_string = *filename;
|
||||
int linenum = message->GetLineNumber();
|
||||
fprintf(stderr, "%s:%i\n", filename_string, linenum);
|
||||
// Print line of source code.
|
||||
- node::Utf8Value sourceline(message->GetSourceLine());
|
||||
+ String::Utf8Value sourceline(message->GetSourceLine());
|
||||
const char* sourceline_string = *sourceline;
|
||||
|
||||
// Because of how node modules work, all scripts are wrapped with a
|
||||
@@ -1254,7 +1252,7 @@ static void ReportException(TryCatch &try_catch, bool show_line) {
|
||||
|
||||
if (show_line) DisplayExceptionLine(try_catch);
|
||||
|
||||
- node::Utf8Value trace(try_catch.StackTrace());
|
||||
+ String::Utf8Value trace(try_catch.StackTrace());
|
||||
|
||||
// range errors have a trace member set to undefined
|
||||
if (trace.length() > 0 && !try_catch.StackTrace()->IsUndefined()) {
|
||||
@@ -1269,11 +1267,11 @@ static void ReportException(TryCatch &try_catch, bool show_line) {
|
||||
!(er->ToObject()->Get(String::New("name"))->IsUndefined());
|
||||
|
||||
if (isErrorObject) {
|
||||
- node::Utf8Value name(er->ToObject()->Get(String::New("name")));
|
||||
+ String::Utf8Value name(er->ToObject()->Get(String::New("name")));
|
||||
fprintf(stderr, "%s: ", *name);
|
||||
}
|
||||
|
||||
- node::Utf8Value msg(!isErrorObject ? er
|
||||
+ String::Utf8Value msg(!isErrorObject ? er
|
||||
: er->ToObject()->Get(String::New("message")));
|
||||
fprintf(stderr, "%s\n", *msg);
|
||||
}
|
||||
@@ -1355,7 +1353,7 @@ static Handle<Value> Chdir(const Arguments& args) {
|
||||
return ThrowException(Exception::Error(String::New("Bad argument.")));
|
||||
}
|
||||
|
||||
- node::Utf8Value path(args[0]);
|
||||
+ String::Utf8Value path(args[0]);
|
||||
|
||||
uv_err_t r = uv_chdir(*path);
|
||||
|
||||
@@ -1406,7 +1404,7 @@ static Handle<Value> Umask(const Arguments& args) {
|
||||
oct = args[0]->Uint32Value();
|
||||
} else {
|
||||
oct = 0;
|
||||
- node::Utf8Value str(args[0]);
|
||||
+ String::Utf8Value str(args[0]);
|
||||
|
||||
// Parse the octal string.
|
||||
for (int i = 0; i < str.length(); i++) {
|
||||
@@ -1512,7 +1510,7 @@ static uid_t uid_by_name(Handle<Value> value) {
|
||||
if (value->IsUint32()) {
|
||||
return static_cast<uid_t>(value->Uint32Value());
|
||||
} else {
|
||||
- node::Utf8Value name(value);
|
||||
+ String::Utf8Value name(value);
|
||||
return uid_by_name(*name);
|
||||
}
|
||||
}
|
||||
@@ -1522,7 +1520,7 @@ static gid_t gid_by_name(Handle<Value> value) {
|
||||
if (value->IsUint32()) {
|
||||
return static_cast<gid_t>(value->Uint32Value());
|
||||
} else {
|
||||
- node::Utf8Value name(value);
|
||||
+ String::Utf8Value name(value);
|
||||
return gid_by_name(*name);
|
||||
}
|
||||
}
|
||||
@@ -1665,7 +1663,7 @@ static Handle<Value> InitGroups(const Arguments& args) {
|
||||
return ThrowTypeError("argument 2 must be a number or a string");
|
||||
}
|
||||
|
||||
- node::Utf8Value arg0(args[0]);
|
||||
+ String::Utf8Value arg0(args[0]);
|
||||
gid_t extra_group;
|
||||
bool must_free;
|
||||
char* user;
|
||||
@@ -1826,7 +1824,7 @@ Handle<Value> DLOpen(const v8::Arguments& args) {
|
||||
}
|
||||
|
||||
Local<Object> module = args[0]->ToObject(); // Cast
|
||||
- node::Utf8Value filename(args[1]); // Cast
|
||||
+ String::Utf8Value filename(args[1]); // Cast
|
||||
|
||||
if (exports_symbol.IsEmpty()) {
|
||||
exports_symbol = NODE_PSYMBOL("exports");
|
||||
@@ -1842,7 +1840,7 @@ Handle<Value> DLOpen(const v8::Arguments& args) {
|
||||
return ThrowException(Exception::Error(errmsg));
|
||||
}
|
||||
|
||||
- node::Utf8Value path(args[1]);
|
||||
+ String::Utf8Value path(args[1]);
|
||||
base = *path;
|
||||
|
||||
/* Find the shared library filename within the full path. */
|
||||
@@ -1961,7 +1959,7 @@ static Handle<Value> Binding(const Arguments& args) {
|
||||
HandleScope scope;
|
||||
|
||||
Local<String> module = args[0]->ToString();
|
||||
- node::Utf8Value module_v(module);
|
||||
+ String::Utf8Value module_v(module);
|
||||
node_module_struct* modp;
|
||||
|
||||
if (binding_cache.IsEmpty()) {
|
||||
@@ -2020,7 +2018,7 @@ static void ProcessTitleSetter(Local<String> property,
|
||||
Local<Value> value,
|
||||
const AccessorInfo& info) {
|
||||
HandleScope scope;
|
||||
- node::Utf8Value title(value);
|
||||
+ String::Utf8Value title(value);
|
||||
// TODO: protect with a lock
|
||||
uv_set_process_title(*title);
|
||||
}
|
||||
@@ -2030,7 +2028,7 @@ static Handle<Value> EnvGetter(Local<String> property,
|
||||
const AccessorInfo& info) {
|
||||
HandleScope scope;
|
||||
#ifdef __POSIX__
|
||||
- node::Utf8Value key(property);
|
||||
+ String::Utf8Value key(property);
|
||||
const char* val = getenv(*key);
|
||||
if (val) {
|
||||
return scope.Close(String::New(val));
|
||||
@@ -2059,8 +2057,8 @@ static Handle<Value> EnvSetter(Local<String> property,
|
||||
const AccessorInfo& info) {
|
||||
HandleScope scope;
|
||||
#ifdef __POSIX__
|
||||
- node::Utf8Value key(property);
|
||||
- node::Utf8Value val(value);
|
||||
+ String::Utf8Value key(property);
|
||||
+ String::Utf8Value val(value);
|
||||
setenv(*key, *val, 1);
|
||||
#else // _WIN32
|
||||
String::Value key(property);
|
||||
@@ -2080,7 +2078,7 @@ static Handle<Integer> EnvQuery(Local<String> property,
|
||||
const AccessorInfo& info) {
|
||||
HandleScope scope;
|
||||
#ifdef __POSIX__
|
||||
- node::Utf8Value key(property);
|
||||
+ String::Utf8Value key(property);
|
||||
if (getenv(*key)) {
|
||||
return scope.Close(Integer::New(0));
|
||||
}
|
||||
@@ -2108,7 +2106,7 @@ static Handle<Boolean> EnvDeleter(Local<String> property,
|
||||
const AccessorInfo& info) {
|
||||
HandleScope scope;
|
||||
#ifdef __POSIX__
|
||||
- node::Utf8Value key(property);
|
||||
+ String::Utf8Value key(property);
|
||||
if (!getenv(*key)) return False();
|
||||
unsetenv(*key); // can't check return value, it's void on some platforms
|
||||
return True();
|
||||
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
|
||||
index 46faba2..0ae1f8a 100644
|
||||
--- a/src/node_crypto.cc
|
||||
+++ b/src/node_crypto.cc
|
||||
@@ -242,7 +241,7 @@ Handle<Value> SecureContext::Init(const Arguments& args) {
|
||||
OPENSSL_CONST SSL_METHOD *method = SSLv23_method();
|
||||
|
||||
if (args.Length() == 1 && args[0]->IsString()) {
|
||||
- node::Utf8Value sslmethod(args[0]);
|
||||
+ String::Utf8Value sslmethod(args[0]);
|
||||
|
||||
if (strcmp(*sslmethod, "SSLv2_method") == 0) {
|
||||
#ifndef OPENSSL_NO_SSL2
|
||||
@@ -362,7 +361,7 @@ static BIO* LoadBIO (Handle<Value> v) {
|
||||
int r = -1;
|
||||
|
||||
if (v->IsString()) {
|
||||
- node::Utf8Value s(v);
|
||||
+ String::Utf8Value s(v);
|
||||
r = BIO_write(bio, *s, s.length());
|
||||
} else if (Buffer::HasInstance(v)) {
|
||||
char* buffer_data = Buffer::Data(v);
|
||||
@@ -414,7 +413,7 @@ Handle<Value> SecureContext::SetKey(const Arguments& args) {
|
||||
BIO *bio = LoadBIO(args[0]);
|
||||
if (!bio) return False();
|
||||
|
||||
- node::Utf8Value passphrase(args[1]);
|
||||
+ String::Utf8Value passphrase(args[1]);
|
||||
|
||||
EVP_PKEY* key = PEM_read_bio_PrivateKey(bio, NULL, NULL,
|
||||
len == 1 ? NULL : *passphrase);
|
||||
@@ -644,7 +643,7 @@ Handle<Value> SecureContext::SetCiphers(const Arguments& args) {
|
||||
return ThrowException(Exception::TypeError(String::New("Bad parameter")));
|
||||
}
|
||||
|
||||
- node::Utf8Value ciphers(args[0]);
|
||||
+ String::Utf8Value ciphers(args[0]);
|
||||
SSL_CTX_set_cipher_list(sc->ctx_, *ciphers);
|
||||
|
||||
return True();
|
||||
@@ -673,7 +672,7 @@ Handle<Value> SecureContext::SetSessionIdContext(const Arguments& args) {
|
||||
return ThrowException(Exception::TypeError(String::New("Bad parameter")));
|
||||
}
|
||||
|
||||
- node::Utf8Value sessionIdContext(args[0]);
|
||||
+ String::Utf8Value sessionIdContext(args[0]);
|
||||
const unsigned char* sid_ctx = (const unsigned char*) *sessionIdContext;
|
||||
unsigned int sid_ctx_len = sessionIdContext.length();
|
||||
|
||||
@@ -1281,7 +1280,7 @@ Handle<Value> Connection::New(const Arguments& args) {
|
||||
if (is_server) {
|
||||
SSL_CTX_set_tlsext_servername_callback(sc->ctx_, SelectSNIContextCallback_);
|
||||
} else {
|
||||
- node::Utf8Value servername(args[2]);
|
||||
+ String::Utf8Value servername(args[2]);
|
||||
SSL_set_tlsext_host_name(p->ssl_, *servername);
|
||||
}
|
||||
#endif
|
||||
@@ -2234,7 +2233,7 @@ class Cipher : public ObjectWrap {
|
||||
ssize_t key_written = DecodeWrite(key_buf, key_buf_len, args[1], BINARY);
|
||||
assert(key_written == key_buf_len);
|
||||
|
||||
- node::Utf8Value cipherType(args[0]);
|
||||
+ String::Utf8Value cipherType(args[0]);
|
||||
|
||||
bool r = cipher->CipherInit(*cipherType, key_buf, key_buf_len);
|
||||
|
||||
@@ -2285,7 +2284,7 @@ class Cipher : public ObjectWrap {
|
||||
ssize_t iv_written = DecodeWrite(iv_buf, iv_len, args[2], BINARY);
|
||||
assert(iv_written == iv_len);
|
||||
|
||||
- node::Utf8Value cipherType(args[0]);
|
||||
+ String::Utf8Value cipherType(args[0]);
|
||||
|
||||
bool r = cipher->CipherInitIv(*cipherType, key_buf,key_len,iv_buf,iv_len);
|
||||
|
||||
@@ -2544,7 +2543,7 @@ class Decipher : public ObjectWrap {
|
||||
ssize_t key_written = DecodeWrite(key_buf, key_len, args[1], BINARY);
|
||||
assert(key_written == key_len);
|
||||
|
||||
- node::Utf8Value cipherType(args[0]);
|
||||
+ String::Utf8Value cipherType(args[0]);
|
||||
|
||||
bool r = cipher->DecipherInit(*cipherType, key_buf,key_len);
|
||||
|
||||
@@ -2595,7 +2594,7 @@ class Decipher : public ObjectWrap {
|
||||
ssize_t iv_written = DecodeWrite(iv_buf, iv_len, args[2], BINARY);
|
||||
assert(iv_written == iv_len);
|
||||
|
||||
- node::Utf8Value cipherType(args[0]);
|
||||
+ String::Utf8Value cipherType(args[0]);
|
||||
|
||||
bool r = cipher->DecipherInitIv(*cipherType, key_buf,key_len,iv_buf,iv_len);
|
||||
|
||||
@@ -2776,7 +2775,7 @@ class Hmac : public ObjectWrap {
|
||||
return ThrowException(exception);
|
||||
}
|
||||
|
||||
- node::Utf8Value hashType(args[0]);
|
||||
+ String::Utf8Value hashType(args[0]);
|
||||
|
||||
bool r;
|
||||
|
||||
@@ -2921,7 +2920,7 @@ class Hash : public ObjectWrap {
|
||||
"Must give hashtype string as argument")));
|
||||
}
|
||||
|
||||
- node::Utf8Value hashType(args[0]);
|
||||
+ String::Utf8Value hashType(args[0]);
|
||||
|
||||
Hash *hash = new Hash();
|
||||
if (!hash->HashInit(*hashType)) {
|
||||
@@ -3095,7 +3094,7 @@ class Sign : public ObjectWrap {
|
||||
"Must give signtype string as argument")));
|
||||
}
|
||||
|
||||
- node::Utf8Value signType(args[0]);
|
||||
+ String::Utf8Value signType(args[0]);
|
||||
|
||||
bool r = sign->SignInit(*signType);
|
||||
|
||||
@@ -3328,7 +3327,7 @@ class Verify : public ObjectWrap {
|
||||
"Must give verifytype string as argument")));
|
||||
}
|
||||
|
||||
- node::Utf8Value verifyType(args[0]);
|
||||
+ String::Utf8Value verifyType(args[0]);
|
||||
|
||||
bool r = verify->VerifyInit(*verifyType);
|
||||
|
||||
@@ -3511,7 +3510,7 @@ class DiffieHellman : public ObjectWrap {
|
||||
String::New("No group name given")));
|
||||
}
|
||||
|
||||
- node::Utf8Value group_name(args[0]);
|
||||
+ String::Utf8Value group_name(args[0]);
|
||||
|
||||
modp_group* it = modp_groups;
|
||||
|
||||
diff --git a/src/node_dtrace.cc b/src/node_dtrace.cc
|
||||
index 0b2d0f4..4b851e3 100644
|
||||
--- a/src/node_dtrace.cc
|
||||
+++ b/src/node_dtrace.cc
|
||||
@@ -68,7 +66,7 @@ using namespace v8;
|
||||
return (ThrowException(Exception::Error(String::New("expected " \
|
||||
"object for " #obj " to contain string member " #member)))); \
|
||||
} \
|
||||
- node::Utf8Value _##member(obj->Get(String::New(#member))); \
|
||||
+ String::Utf8Value _##member(obj->Get(String::New(#member))); \
|
||||
if ((*(const char **)valp = *_##member) == NULL) \
|
||||
*(const char **)valp = "<unknown>";
|
||||
|
||||
@@ -243,7 +241,7 @@ Handle<Value> DTRACE_HTTP_SERVER_REQUEST(const Arguments& args) {
|
||||
"object for request to contain string member headers"))));
|
||||
|
||||
Local<Value> strfwdfor = headers->Get(String::New("x-forwarded-for"));
|
||||
- node::Utf8Value fwdfor(strfwdfor);
|
||||
+ String::Utf8Value fwdfor(strfwdfor);
|
||||
|
||||
if (!strfwdfor->IsString() || (req.forwardedFor = *fwdfor) == NULL)
|
||||
req.forwardedFor = const_cast<char*>("");
|
||||
diff --git a/src/node_file.cc b/src/node_file.cc
|
||||
index 3c35e0b..f665b19 100644
|
||||
--- a/src/node_file.cc
|
||||
+++ b/src/node_file.cc
|
||||
@@ -404,7 +403,7 @@ static Handle<Value> Stat(const Arguments& args) {
|
||||
if (args.Length() < 1) return TYPE_ERROR("path required");
|
||||
if (!args[0]->IsString()) return TYPE_ERROR("path must be a string");
|
||||
|
||||
- node::Utf8Value path(args[0]);
|
||||
+ String::Utf8Value path(args[0]);
|
||||
|
||||
if (args[1]->IsFunction()) {
|
||||
ASYNC_CALL(stat, args[1], *path)
|
||||
@@ -421,7 +420,7 @@ static Handle<Value> LStat(const Arguments& args) {
|
||||
if (args.Length() < 1) return TYPE_ERROR("path required");
|
||||
if (!args[0]->IsString()) return TYPE_ERROR("path must be a string");
|
||||
|
||||
- node::Utf8Value path(args[0]);
|
||||
+ String::Utf8Value path(args[0]);
|
||||
|
||||
if (args[1]->IsFunction()) {
|
||||
ASYNC_CALL(lstat, args[1], *path)
|
||||
@@ -459,12 +458,12 @@ static Handle<Value> Symlink(const Arguments& args) {
|
||||
if (!args[0]->IsString()) return TYPE_ERROR("dest path must be a string");
|
||||
if (!args[1]->IsString()) return TYPE_ERROR("src path must be a string");
|
||||
|
||||
- node::Utf8Value dest(args[0]);
|
||||
- node::Utf8Value path(args[1]);
|
||||
+ String::Utf8Value dest(args[0]);
|
||||
+ String::Utf8Value path(args[1]);
|
||||
int flags = 0;
|
||||
|
||||
if (args[2]->IsString()) {
|
||||
- node::Utf8Value mode(args[2]);
|
||||
+ String::Utf8Value mode(args[2]);
|
||||
if (strcmp(*mode, "dir") == 0) {
|
||||
flags |= UV_FS_SYMLINK_DIR;
|
||||
} else if (strcmp(*mode, "junction") == 0) {
|
||||
@@ -492,8 +491,8 @@ static Handle<Value> Link(const Arguments& args) {
|
||||
if (!args[0]->IsString()) return TYPE_ERROR("dest path must be a string");
|
||||
if (!args[1]->IsString()) return TYPE_ERROR("src path must be a string");
|
||||
|
||||
- node::Utf8Value orig_path(args[0]);
|
||||
- node::Utf8Value new_path(args[1]);
|
||||
+ String::Utf8Value orig_path(args[0]);
|
||||
+ String::Utf8Value new_path(args[1]);
|
||||
|
||||
if (args[2]->IsFunction()) {
|
||||
ASYNC_DEST_CALL(link, args[2], *new_path, *orig_path, *new_path)
|
||||
@@ -509,7 +508,7 @@ static Handle<Value> ReadLink(const Arguments& args) {
|
||||
if (args.Length() < 1) return TYPE_ERROR("path required");
|
||||
if (!args[0]->IsString()) return TYPE_ERROR("path must be a string");
|
||||
|
||||
- node::Utf8Value path(args[0]);
|
||||
+ String::Utf8Value path(args[0]);
|
||||
|
||||
if (args[1]->IsFunction()) {
|
||||
ASYNC_CALL(readlink, args[1], *path)
|
||||
@@ -528,8 +527,8 @@ static Handle<Value> Rename(const Arguments& args) {
|
||||
if (!args[0]->IsString()) return TYPE_ERROR("old path must be a string");
|
||||
if (!args[1]->IsString()) return TYPE_ERROR("new path must be a string");
|
||||
|
||||
- node::Utf8Value old_path(args[0]);
|
||||
- node::Utf8Value new_path(args[1]);
|
||||
+ String::Utf8Value old_path(args[0]);
|
||||
+ String::Utf8Value new_path(args[1]);
|
||||
|
||||
if (args[2]->IsFunction()) {
|
||||
ASYNC_DEST_CALL(rename, args[2], *new_path, *old_path, *new_path)
|
||||
@@ -599,7 +598,7 @@ static Handle<Value> Unlink(const Arguments& args) {
|
||||
if (args.Length() < 1) return TYPE_ERROR("path required");
|
||||
if (!args[0]->IsString()) return TYPE_ERROR("path must be a string");
|
||||
|
||||
- node::Utf8Value path(args[0]);
|
||||
+ String::Utf8Value path(args[0]);
|
||||
|
||||
if (args[1]->IsFunction()) {
|
||||
ASYNC_CALL(unlink, args[1], *path)
|
||||
@@ -615,7 +614,7 @@ static Handle<Value> RMDir(const Arguments& args) {
|
||||
if (args.Length() < 1) return TYPE_ERROR("path required");
|
||||
if (!args[0]->IsString()) return TYPE_ERROR("path must be a string");
|
||||
|
||||
- node::Utf8Value path(args[0]);
|
||||
+ String::Utf8Value path(args[0]);
|
||||
|
||||
if (args[1]->IsFunction()) {
|
||||
ASYNC_CALL(rmdir, args[1], *path)
|
||||
@@ -632,7 +631,7 @@ static Handle<Value> MKDir(const Arguments& args) {
|
||||
return THROW_BAD_ARGS;
|
||||
}
|
||||
|
||||
- node::Utf8Value path(args[0]);
|
||||
+ String::Utf8Value path(args[0]);
|
||||
int mode = static_cast<int>(args[1]->Int32Value());
|
||||
|
||||
if (args[2]->IsFunction()) {
|
||||
@@ -649,7 +648,7 @@ static Handle<Value> ReadDir(const Arguments& args) {
|
||||
if (args.Length() < 1) return TYPE_ERROR("path required");
|
||||
if (!args[0]->IsString()) return TYPE_ERROR("path must be a string");
|
||||
|
||||
- node::Utf8Value path(args[0]);
|
||||
+ String::Utf8Value path(args[0]);
|
||||
|
||||
if (args[1]->IsFunction()) {
|
||||
ASYNC_CALL(readdir, args[1], *path, 0 /*flags*/)
|
||||
@@ -687,7 +686,7 @@ static Handle<Value> Open(const Arguments& args) {
|
||||
if (!args[1]->IsInt32()) return TYPE_ERROR("flags must be an int");
|
||||
if (!args[2]->IsInt32()) return TYPE_ERROR("mode must be an int");
|
||||
|
||||
- node::Utf8Value path(args[0]);
|
||||
+ String::Utf8Value path(args[0]);
|
||||
int flags = args[1]->Int32Value();
|
||||
int mode = static_cast<int>(args[2]->Int32Value());
|
||||
|
||||
@@ -827,7 +826,7 @@ static Handle<Value> Chmod(const Arguments& args) {
|
||||
if(args.Length() < 2 || !args[0]->IsString() || !args[1]->IsInt32()) {
|
||||
return THROW_BAD_ARGS;
|
||||
}
|
||||
- node::Utf8Value path(args[0]);
|
||||
+ String::Utf8Value path(args[0]);
|
||||
int mode = static_cast<int>(args[1]->Int32Value());
|
||||
|
||||
if(args[2]->IsFunction()) {
|
||||
@@ -874,7 +873,7 @@ static Handle<Value> Chown(const Arguments& args) {
|
||||
if (!args[1]->IsUint32()) return TYPE_ERROR("uid must be an unsigned int");
|
||||
if (!args[2]->IsUint32()) return TYPE_ERROR("gid must be an unsigned int");
|
||||
|
||||
- node::Utf8Value path(args[0]);
|
||||
+ String::Utf8Value path(args[0]);
|
||||
uv_uid_t uid = static_cast<uv_uid_t>(args[1]->Uint32Value());
|
||||
uv_gid_t gid = static_cast<uv_gid_t>(args[2]->Uint32Value());
|
||||
|
||||
@@ -925,7 +924,7 @@ static Handle<Value> UTimes(const Arguments& args) {
|
||||
if (!args[1]->IsNumber()) return TYPE_ERROR("atime must be a number");
|
||||
if (!args[2]->IsNumber()) return TYPE_ERROR("mtime must be a number");
|
||||
|
||||
- const node::Utf8Value path(args[0]);
|
||||
+ const String::Utf8Value path(args[0]);
|
||||
const double atime = static_cast<double>(args[1]->NumberValue());
|
||||
const double mtime = static_cast<double>(args[2]->NumberValue());
|
||||
|
||||
diff --git a/src/node_stat_watcher.cc b/src/node_stat_watcher.cc
|
||||
index fd3e5d1..c3f668c 100644
|
||||
--- a/src/node_stat_watcher.cc
|
||||
+++ b/src/node_stat_watcher.cc
|
||||
@@ -105,7 +104,7 @@ Handle<Value> StatWatcher::Start(const Arguments& args) {
|
||||
HandleScope scope;
|
||||
|
||||
StatWatcher* wrap = ObjectWrap::Unwrap<StatWatcher>(args.Holder());
|
||||
- node::Utf8Value path(args[0]);
|
||||
+ String::Utf8Value path(args[0]);
|
||||
const bool persistent = args[1]->BooleanValue();
|
||||
const uint32_t interval = args[2]->Uint32Value();
|
||||
|
||||
diff --git a/src/process_wrap.cc b/src/process_wrap.cc
|
||||
index ac63e4b..784300f 100644
|
||||
--- a/src/process_wrap.cc
|
||||
+++ b/src/process_wrap.cc
|
||||
@@ -188,7 +187,7 @@ class ProcessWrap : public HandleWrap {
|
||||
|
||||
// options.file
|
||||
Local<Value> file_v = js_options->Get(String::NewSymbol("file"));
|
||||
- node::Utf8Value file(file_v->IsString() ? file_v : Local<Value>());
|
||||
+ String::Utf8Value file(file_v->IsString() ? file_v : Local<Value>());
|
||||
if (file.length() > 0) {
|
||||
options.file = *file;
|
||||
} else {
|
||||
@@ -203,7 +202,7 @@ class ProcessWrap : public HandleWrap {
|
||||
// Heap allocate to detect errors. +1 is for NULL.
|
||||
options.args = new char*[argc + 1];
|
||||
for (int i = 0; i < argc; i++) {
|
||||
- node::Utf8Value arg(js_argv->Get(i));
|
||||
+ String::Utf8Value arg(js_argv->Get(i));
|
||||
options.args[i] = strdup(*arg);
|
||||
}
|
||||
options.args[argc] = NULL;
|
||||
@@ -211,7 +210,7 @@ class ProcessWrap : public HandleWrap {
|
||||
|
||||
// options.cwd
|
||||
Local<Value> cwd_v = js_options->Get(String::NewSymbol("cwd"));
|
||||
- node::Utf8Value cwd(cwd_v->IsString() ? cwd_v : Local<Value>());
|
||||
+ String::Utf8Value cwd(cwd_v->IsString() ? cwd_v : Local<Value>());
|
||||
if (cwd.length() > 0) {
|
||||
options.cwd = *cwd;
|
||||
}
|
||||
@@ -223,7 +222,7 @@ class ProcessWrap : public HandleWrap {
|
||||
int envc = env->Length();
|
||||
options.env = new char*[envc + 1]; // Heap allocated to detect errors.
|
||||
for (int i = 0; i < envc; i++) {
|
||||
- node::Utf8Value pair(env->Get(i));
|
||||
+ String::Utf8Value pair(env->Get(i));
|
||||
options.env[i] = strdup(*pair);
|
||||
}
|
||||
options.env[envc] = NULL;
|
||||
diff --git a/src/udp_wrap.cc b/src/udp_wrap.cc
|
||||
index 31a4e78..b33f4e8 100644
|
||||
--- a/src/udp_wrap.cc
|
||||
+++ b/src/udp_wrap.cc
|
||||
@@ -161,7 +160,7 @@ Handle<Value> UDPWrap::DoBind(const Arguments& args, int family) {
|
||||
// bind(ip, port, flags)
|
||||
assert(args.Length() == 3);
|
||||
|
||||
- node::Utf8Value address(args[0]);
|
||||
+ String::Utf8Value address(args[0]);
|
||||
const int port = args[1]->Uint32Value();
|
||||
const int flags = args[2]->Uint32Value();
|
||||
|
||||
@@ -220,8 +219,8 @@ Handle<Value> UDPWrap::SetMembership(const Arguments& args,
|
||||
|
||||
assert(args.Length() == 2);
|
||||
|
||||
- node::Utf8Value address(args[0]);
|
||||
- node::Utf8Value iface(args[1]);
|
||||
+ String::Utf8Value address(args[0]);
|
||||
+ String::Utf8Value iface(args[1]);
|
||||
|
||||
const char* iface_cstr = *iface;
|
||||
if (args[1]->IsUndefined() || args[1]->IsNull()) {
|
||||
@@ -272,7 +271,7 @@ Handle<Value> UDPWrap::DoSend(const Arguments& args, int family) {
|
||||
length);
|
||||
|
||||
const unsigned short port = args[3]->Uint32Value();
|
||||
- node::Utf8Value address(args[4]);
|
||||
+ String::Utf8Value address(args[4]);
|
||||
|
||||
switch (family) {
|
||||
case AF_INET:
|
||||
diff --git a/src/util.h b/src/util.h
|
||||
--- a/src/util.h
|
||||
+++ b/src/util.h
|
||||
@@ -41,52 +41,6 @@
|
||||
obj->Set(domain_symbol, domain);
|
||||
}
|
||||
|
||||
-class Utf8Value {
|
||||
- public:
|
||||
- explicit Utf8Value(v8::Handle<v8::Value> value)
|
||||
- : length_(0), str_(NULL) {
|
||||
- if (value.IsEmpty())
|
||||
- return;
|
||||
-
|
||||
- v8::Local<v8::String> val_ = value->ToString();
|
||||
-
|
||||
- // Allocate enough space to include the null terminator
|
||||
- size_t len = StringBytes::StorageSize(val_, UTF8) + 1;
|
||||
-
|
||||
- char* str = static_cast<char*>(calloc(1, len));
|
||||
-
|
||||
- int flags = WRITE_UTF8_FLAGS;
|
||||
- flags |= ~v8::String::NO_NULL_TERMINATION;
|
||||
-
|
||||
- length_ = val_->WriteUtf8(str,
|
||||
- len,
|
||||
- 0,
|
||||
- flags);
|
||||
-
|
||||
- str_ = reinterpret_cast<char*>(str);
|
||||
- }
|
||||
-
|
||||
- ~Utf8Value() {
|
||||
- free(str_);
|
||||
- }
|
||||
-
|
||||
- char* operator*() {
|
||||
- return str_;
|
||||
- };
|
||||
-
|
||||
- const char* operator*() const {
|
||||
- return str_;
|
||||
- };
|
||||
-
|
||||
- size_t length() const {
|
||||
- return length_;
|
||||
- };
|
||||
-
|
||||
- private:
|
||||
- size_t length_;
|
||||
- char* str_;
|
||||
-};
|
||||
-
|
||||
} // namespace node
|
||||
|
||||
#endif // SRC_UTIL_H_
|
||||
--
|
||||
1.9.3
|
||||
|
|
@ -1,91 +0,0 @@
|
|||
From c7c934c66cd8712c9ff169f1ef4c5670d3ff99c8 Mon Sep 17 00:00:00 2001
|
||||
From: "T.C. Hollingsworth" <tchollingsworth@gmail.com>
|
||||
Date: Wed, 18 Jun 2014 23:09:03 -0700
|
||||
Subject: [PATCH] Revert "string_bytes: Guarantee valid utf-8 output"
|
||||
|
||||
This reverts commit 0da4c671659cfbae12def127b2e94690b9d9b5e1.
|
||||
---
|
||||
src/node.cc | 7 -------
|
||||
src/string_bytes.cc | 2 +-
|
||||
src/string_bytes.h | 2 --
|
||||
test/simple/test-buffer.js | 12 ------------
|
||||
4 files changed, 1 insertion(+), 22 deletions(-)
|
||||
|
||||
diff --git a/src/node.cc b/src/node.cc
|
||||
index 4223973..e9696cd 100644
|
||||
--- a/src/node.cc
|
||||
+++ b/src/node.cc
|
||||
@@ -180,9 +180,6 @@ static uv_async_t dispatch_debug_messages_async;
|
||||
// Declared in node_internals.h
|
||||
Isolate* node_isolate = NULL;
|
||||
|
||||
-int WRITE_UTF8_FLAGS = v8::String::HINT_MANY_WRITES_EXPECTED |
|
||||
- v8::String::NO_NULL_TERMINATION;
|
||||
-
|
||||
static void Spin(uv_idle_t* handle, int status) {
|
||||
assert((uv_idle_t*) handle == &tick_spinner);
|
||||
assert(status == 0);
|
||||
@@ -3077,11 +3074,6 @@ static char **copy_argv(int argc, char **argv) {
|
||||
|
||||
|
||||
int Start(int argc, char *argv[]) {
|
||||
- const char* replaceInvalid = getenv("NODE_INVALID_UTF8");
|
||||
-
|
||||
- if (replaceInvalid == NULL)
|
||||
- WRITE_UTF8_FLAGS |= String::REPLACE_INVALID_UTF8;
|
||||
-
|
||||
// Hack aroung with the argv pointer. Used for process.title = "blah".
|
||||
argv = uv_setup_args(argc, argv);
|
||||
|
||||
diff --git a/src/string_bytes.cc b/src/string_bytes.cc
|
||||
index a7bab38..e4a34fe 100644
|
||||
--- a/src/string_bytes.cc
|
||||
+++ b/src/string_bytes.cc
|
||||
@@ -199,7 +199,7 @@ size_t StringBytes::Write(char* buf,
|
||||
break;
|
||||
|
||||
case UTF8:
|
||||
- len = str->WriteUtf8(buf, buflen, chars_written, WRITE_UTF8_FLAGS);
|
||||
+ len = str->WriteUtf8(buf, buflen, chars_written, flags);
|
||||
break;
|
||||
|
||||
case UCS2:
|
||||
diff --git a/src/string_bytes.h b/src/string_bytes.h
|
||||
index 31f04bb..8071a49 100644
|
||||
--- a/src/string_bytes.h
|
||||
+++ b/src/string_bytes.h
|
||||
@@ -29,8 +29,6 @@
|
||||
|
||||
namespace node {
|
||||
|
||||
-extern int WRITE_UTF8_FLAGS;
|
||||
-
|
||||
using v8::Handle;
|
||||
using v8::Local;
|
||||
using v8::String;
|
||||
diff --git a/test/simple/test-buffer.js b/test/simple/test-buffer.js
|
||||
index f8b2798..3026824 100644
|
||||
--- a/test/simple/test-buffer.js
|
||||
+++ b/test/simple/test-buffer.js
|
||||
@@ -791,18 +791,6 @@ assert.equal(buf[3], 0xFF);
|
||||
assert.equal(buf[3], 0xFF);
|
||||
});
|
||||
|
||||
-// test unmatched surrogates not producing invalid utf8 output
|
||||
-// ef bf bd = utf-8 representation of unicode replacement character
|
||||
-// see https://codereview.chromium.org/121173009/
|
||||
-buf = new Buffer('ab\ud800cd', 'utf8');
|
||||
-assert.equal(buf[0], 0x61);
|
||||
-assert.equal(buf[1], 0x62);
|
||||
-assert.equal(buf[2], 0xef);
|
||||
-assert.equal(buf[3], 0xbf);
|
||||
-assert.equal(buf[4], 0xbd);
|
||||
-assert.equal(buf[5], 0x63);
|
||||
-assert.equal(buf[6], 0x64);
|
||||
-
|
||||
// test for buffer overrun
|
||||
buf = new Buffer([0, 0, 0, 0, 0]); // length: 5
|
||||
var sub = buf.slice(0, 4); // length: 4
|
||||
--
|
||||
1.9.3
|
||||
|
|
@ -1,45 +1,69 @@
|
|||
Description: do not bundle CA certificates, openssl on Debian have them
|
||||
As a consequence, nodejs must depend on ca-certificates.
|
||||
From 8bdb9e5d7dcde463d9664fc6a999c11a3048a673 Mon Sep 17 00:00:00 2001
|
||||
From: Stephen Gallagher <sgallagh@redhat.com>
|
||||
Date: Tue, 1 Dec 2015 16:29:07 -0500
|
||||
Subject: [PATCH 2/2] Do not bundle CA Certificates
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
CA Certificates are provided by Fedora.
|
||||
|
||||
Forwarded: need some feedback before submitting the matter upstream
|
||||
Author: Jérémy Lal <kapouer@melix.org>
|
||||
Last-Update: 2014-03-02
|
||||
|
||||
Modified 2014-05-02 by T.C. Hollingsworth <tchollingsworth@gmail.com> with the
|
||||
correct path for Fedora
|
||||
|
||||
Modified 2015-12-01 by Stephen Gallagher <sgallagh@redhat.com> to update for
|
||||
Node.js 4.2
|
||||
---
|
||||
src/node_crypto.cc | 31 ++++++++-----------------------
|
||||
1 file changed, 8 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
|
||||
index bd7314c9db902c59035b60ee5e2ebb4dc99a9a9f..ddc6f081136dd327e35d6326ba9835df7f834e70 100644
|
||||
--- a/src/node_crypto.cc
|
||||
+++ b/src/node_crypto.cc
|
||||
@@ -64,7 +64,6 @@
|
||||
namespace node {
|
||||
|
||||
const char* root_certs[] = {
|
||||
-#include "node_root_certs.h" // NOLINT(build/include_order)
|
||||
NULL
|
||||
@@ -125,11 +125,11 @@ struct ClearErrorOnReturn {
|
||||
};
|
||||
|
||||
@@ -561,32 +560,16 @@
|
||||
assert(sc->ca_store_ == NULL);
|
||||
static uv_mutex_t* locks;
|
||||
|
||||
const char* const root_certs[] = {
|
||||
-#include "node_root_certs.h" // NOLINT(build/include_order)
|
||||
+ NULL
|
||||
};
|
||||
|
||||
X509_STORE* root_cert_store;
|
||||
|
||||
// Just to generate static methods
|
||||
@@ -715,36 +715,21 @@ void SecureContext::AddRootCerts(const FunctionCallbackInfo<Value>& args) {
|
||||
(void) &clear_error_on_return; // Silence compiler warning.
|
||||
|
||||
CHECK_EQ(sc->ca_store_, nullptr);
|
||||
|
||||
if (!root_cert_store) {
|
||||
- root_cert_store = X509_STORE_new();
|
||||
-
|
||||
- for (int i = 0; root_certs[i]; i++) {
|
||||
- BIO *bp = BIO_new(BIO_s_mem());
|
||||
- for (size_t i = 0; i < ARRAY_SIZE(root_certs); i++) {
|
||||
- BIO* bp = NodeBIO::New();
|
||||
-
|
||||
- if (!BIO_write(bp, root_certs[i], strlen(root_certs[i]))) {
|
||||
- BIO_free(bp);
|
||||
- return False();
|
||||
- BIO_free_all(bp);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- X509 *x509 = PEM_read_bio_X509(bp, NULL, NULL, NULL);
|
||||
- X509 *x509 = PEM_read_bio_X509(bp, nullptr, CryptoPemCallback, nullptr);
|
||||
-
|
||||
- if (x509 == NULL) {
|
||||
- BIO_free(bp);
|
||||
- return False();
|
||||
- if (x509 == nullptr) {
|
||||
- BIO_free_all(bp);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- X509_STORE_add_cert(root_cert_store, x509);
|
||||
-
|
||||
- BIO_free(bp);
|
||||
- BIO_free_all(bp);
|
||||
- X509_free(x509);
|
||||
+ if (SSL_CTX_load_verify_locations(sc->ctx_, "/etc/pki/tls/certs/ca-bundle.crt", NULL) == 1) {
|
||||
+ root_cert_store = SSL_CTX_get_cert_store(sc->ctx_);
|
||||
|
@ -50,9 +74,14 @@ correct path for Fedora
|
|||
+ } else {
|
||||
+ SSL_CTX_set_cert_store(sc->ctx_, root_cert_store);
|
||||
}
|
||||
-
|
||||
|
||||
sc->ca_store_ = root_cert_store;
|
||||
- SSL_CTX_set_cert_store(sc->ctx_, sc->ca_store_);
|
||||
|
||||
return True();
|
||||
}
|
||||
|
||||
|
||||
void SecureContext::SetCiphers(const FunctionCallbackInfo<Value>& args) {
|
||||
SecureContext* sc = Unwrap<SecureContext>(args.Holder());
|
||||
--
|
||||
2.5.0
|
||||
|
||||
|
|
81
nodejs.spec
81
nodejs.spec
|
@ -1,6 +1,6 @@
|
|||
Name: nodejs
|
||||
Version: 0.10.36
|
||||
Release: 5%{?dist}
|
||||
Version: 4.2.2
|
||||
Release: 1%{?dist}
|
||||
Summary: JavaScript runtime
|
||||
License: MIT and ASL 2.0 and ISC and BSD
|
||||
Group: Development/Languages
|
||||
|
@ -28,30 +28,16 @@ Patch1: nodejs-disable-gyp-deps.patch
|
|||
# http://patch-tracker.debian.org/patch/series/view/nodejs/0.10.26~dfsg1-1/2014_donotinclude_root_certs.patch
|
||||
Patch2: nodejs-use-system-certs.patch
|
||||
|
||||
# The invalid UTF8 fix has been reverted since this breaks v8 API, which cannot
|
||||
# be done in a stable distribution release. This build of nodejs will behave as
|
||||
# if NODE_INVALID_UTF8 was set. For more information on the implications, see:
|
||||
# http://blog.nodejs.org/2014/06/16/openssl-and-breaking-utf-8-change/
|
||||
Patch3: nodejs-revert-utf8-v8.patch
|
||||
Patch4: nodejs-revert-utf8-node.patch
|
||||
# V8 presently breaks ABI at least every x.y release while never bumping SONAME
|
||||
%global v8_abi 4.6
|
||||
|
||||
# V8 presently breaks ABI at least every x.y release while never bumping SONAME,
|
||||
# so we need to be more explicit until spot fixes that
|
||||
%global v8_ge 1:3.14.5.10-17
|
||||
%global v8_lt 1:3.15
|
||||
%global v8_abi 3.14
|
||||
|
||||
BuildRequires: v8-devel >= %{v8_ge}
|
||||
BuildRequires: http-parser-devel >= 2.0
|
||||
BuildRequires: compat-libuv010-devel
|
||||
BuildRequires: c-ares-devel
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: libuv-devel >= 1.7.5
|
||||
BuildRequires: http-parser-devel >= 2.6
|
||||
BuildRequires: zlib-devel
|
||||
# Node.js requires some features from openssl 1.0.1 for SPDY support
|
||||
BuildRequires: openssl-devel >= 1:1.0.1
|
||||
|
||||
Requires: v8%{?_isa} >= %{v8_ge}
|
||||
Requires: v8%{?_isa} < %{v8_lt}
|
||||
|
||||
# we need the system certificate store when Patch2 is applied
|
||||
Requires: ca-certificates
|
||||
|
||||
|
@ -67,7 +53,7 @@ Provides: nodejs(engine) = %{version}
|
|||
# Node.js currently has a conflict with the 'node' package in Fedora
|
||||
# The ham-radio group has agreed to rename their binary for us, but
|
||||
# in the meantime, we're setting an explicit Conflicts: here
|
||||
Conflicts: node <= 0.3.2-11
|
||||
Conflicts: node <= 0.3.2-12
|
||||
|
||||
# The punycode module was absorbed into the standard library in v0.6.
|
||||
# It still exists as a seperate package for the benefit of users of older
|
||||
|
@ -79,6 +65,18 @@ Provides: nodejs-punycode = 1.3.1
|
|||
Provides: npm(punycode) = 1.3.1
|
||||
|
||||
|
||||
# Node.js has forked c-ares from upstream in an incompatible way, so we need
|
||||
# to carry the bundled version internally.
|
||||
# See https://github.com/nodejs/node/commit/766d063e0578c0f7758c3a965c971763f43fec85
|
||||
Provides: bundled(c-ares) = 1.10.1
|
||||
|
||||
# Node.js is closely tied to the version of v8 that is used with it. It makes
|
||||
# sense to use the bundled version because upstream consistently breaks ABI
|
||||
# even in point releases. Node.js upstream has now removed the ability to build
|
||||
# against a shared system version entirely.
|
||||
# See https://github.com/nodejs/node/commit/d726a177ed59c37cf5306983ed00ecd858cfbbef
|
||||
Provides: bundled(v8) = 4.6.85
|
||||
|
||||
%description
|
||||
Node.js is a platform built on Chrome's JavaScript runtime
|
||||
for easily building fast, scalable network applications.
|
||||
|
@ -90,8 +88,8 @@ real-time applications that run across distributed devices.
|
|||
Summary: JavaScript runtime - development headers
|
||||
Group: Development/Languages
|
||||
Requires: %{name}%{?_isa} == %{version}-%{release}
|
||||
Requires: compat-libuv010-devel%{?_isa} http-parser-devel%{?_isa} v8-devel%{?_isa}
|
||||
Requires: openssl-devel%{?_isa} c-ares-devel%{?_isa} zlib-devel%{?_isa}
|
||||
Requires: libuv-devel%{?_isa} http-parser-devel%{?_isa}
|
||||
Requires: openssl-devel%{?_isa} zlib-devel%{?_isa}
|
||||
Requires: nodejs-packaging
|
||||
|
||||
%description devel
|
||||
|
@ -109,17 +107,17 @@ The API documentation for the Node.js JavaScript runtime.
|
|||
%prep
|
||||
%setup -q -n node-v%{version}
|
||||
|
||||
# remove bundled dependencies
|
||||
# remove bundled dependencies that we aren't building
|
||||
%patch1 -p1
|
||||
rm -rf deps
|
||||
rm -rf deps/http_parser \
|
||||
deps/npm \
|
||||
deps/uv \
|
||||
deps/zlib
|
||||
|
||||
# remove bundled CA certificates
|
||||
%patch2 -p1
|
||||
rm -f src/node_root_certs.h
|
||||
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
|
||||
|
||||
%build
|
||||
# build with debugging symbols and add defines from libuv (#892601)
|
||||
|
@ -127,10 +125,8 @@ export CFLAGS='%{optflags} -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
|
|||
export CXXFLAGS='%{optflags} -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
|
||||
|
||||
./configure --prefix=%{_prefix} \
|
||||
--shared-v8 \
|
||||
--shared-openssl \
|
||||
--shared-zlib \
|
||||
--shared-cares \
|
||||
--shared-libuv \
|
||||
--shared-libuv-libname=:libuv.so.0.10 \
|
||||
--shared-libuv-includes=%{_includedir}/compat-libuv010 \
|
||||
|
@ -144,7 +140,7 @@ make BUILDTYPE=Debug %{?_smp_mflags}
|
|||
%install
|
||||
rm -rf %{buildroot}
|
||||
|
||||
./tools/install.py install %{buildroot}
|
||||
./tools/install.py install %{buildroot} %{_prefix}
|
||||
|
||||
# and remove dtrace file again
|
||||
rm -rf %{buildroot}/%{_prefix}/lib/dtrace
|
||||
|
@ -172,36 +168,43 @@ chmod 0755 %{buildroot}%{_rpmconfigdir}/nodejs_native.req
|
|||
mkdir -p %{buildroot}%{_pkgdocdir}/html
|
||||
cp -pr doc/* %{buildroot}%{_pkgdocdir}/html
|
||||
rm -f %{buildroot}%{_pkgdocdir}/html/nodejs.1
|
||||
cp -p LICENSE %{buildroot}%{_pkgdocdir}/html
|
||||
cp -p ChangeLog LICENSE README.md AUTHORS %{buildroot}%{_pkgdocdir}
|
||||
|
||||
#node-gyp needs common.gypi too
|
||||
mkdir -p %{buildroot}%{_datadir}/node
|
||||
cp -p common.gypi %{buildroot}%{_datadir}/node
|
||||
|
||||
# Install the GDB init tool into the documentation directory
|
||||
mv %{buildroot}/%{_datadir}/doc/node/gdbinit %{buildroot}/%{_pkgdocdir}/gdbinit
|
||||
|
||||
%files
|
||||
%{_bindir}/node
|
||||
%{_mandir}/man1/node.*
|
||||
%dir %{_prefix}/lib/node_modules
|
||||
%dir %{_datadir}/node
|
||||
%dir %{_datadir}/systemtap
|
||||
%dir %{_datadir}/systemtap/tapset
|
||||
%{_datadir}/systemtap/tapset/node.stp
|
||||
%{_rpmconfigdir}/fileattrs/nodejs_native.attr
|
||||
%{_rpmconfigdir}/nodejs_native.req
|
||||
%dir %{_pkgdocdir}
|
||||
%{_pkgdocdir}/ChangeLog
|
||||
%{_pkgdocdir}/LICENSE
|
||||
%{_pkgdocdir}/README.md
|
||||
%{_pkgdocdir}/AUTHORS
|
||||
|
||||
%license LICENSE
|
||||
%doc AUTHORS CHANGELOG.md COLLABORATOR_GUIDE.md GOVERNANCE.md README.md
|
||||
%doc ROADMAP.md WORKING_GROUPS.md
|
||||
|
||||
%files devel
|
||||
%{_bindir}/node_g
|
||||
%{_includedir}/node
|
||||
%{_datadir}/node/common.gypi
|
||||
%{_pkgdocdir}/gdbinit
|
||||
|
||||
%files docs
|
||||
%dir %{_pkgdocdir}
|
||||
%{_pkgdocdir}/html
|
||||
|
||||
%changelog
|
||||
* Tue Dec 01 2015 Stephen Gallagher <sgallagh@redhat.com> 4.2.2-0.1
|
||||
- Upgrade to Node.js 4.2.2 (LTS)
|
||||
|
||||
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.36-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
|
|
2
sources
2
sources
|
@ -1 +1 @@
|
|||
f1a50d8a1f6e09659b5c2aad00867ae2 node-v0.10.36-stripped.tar.gz
|
||||
32d052698f6059e64eee5f06532e27fd node-v4.2.2-stripped.tar.gz
|
||||
|
|
Loading…
Reference in a new issue