[packages/nodejs] up to 6.11.5
glen
glen at pld-linux.org
Thu Nov 2 16:08:17 CET 2017
commit a5a3e19540259f32a42779c6e9ff1dc00f805e93
Author: Elan Ruusamäe <glen at pld-linux.org>
Date: Thu Nov 2 13:36:04 2017 +0200
up to 6.11.5
nodejs-lib64path.patch | 16 +++++-----
nodejs-use-system-certs.patch | 69 +++++++++++++++++++++----------------------
nodejs.spec | 18 ++++++-----
3 files changed, 50 insertions(+), 53 deletions(-)
---
diff --git a/nodejs.spec b/nodejs.spec
index d61f710..db65ba5 100644
--- a/nodejs.spec
+++ b/nodejs.spec
@@ -18,14 +18,16 @@
Summary: Asynchronous JavaScript Engine
Summary(pl.UTF-8): Asynchroniczny silnik JavaScriptu
Name: nodejs
-# 6.9 is LTS, Active LTS: 2018-04-18, EOL: 2019-04-18
-# https://github.com/nodejs/LTS
-Version: 6.9.4
-Release: 1
+# 6.x LTS - https://github.com/nodejs/LTS:
+# Active start: 2016-10-18
+# Maintenance start: April 2018
+# Maintenance end: April 2019
+Version: 6.11.5
+Release: 0.1
License: BSD and MIT and Apache v2.0 and GPL v3
Group: Development/Languages
Source0: https://nodejs.org/dist/v%{version}/node-v%{version}.tar.gz
-# Source0-md5: 3795199b5950b25179248847b1a5fc86
+# Source0-md5: 7a3159a3245a45ff6e6f546ffdfa1160
Patch1: %{name}-shared.patch
# force node to use /usr/lib/node as the systemwide module directory
Patch2: %{name}-libpath.patch
@@ -138,8 +140,8 @@ Sondy systemtap/dtrace dla Node.js.
%else
%patch2 -p1
%endif
-%patch4 -p1
-%{__rm} src/node_root_certs.h
+#%patch4 -p1
+#%{__rm} src/node_root_certs.h
#%{?with_system_uv:%patch5 -p1}
grep -r '#!.*env python' -l . | xargs %{__sed} -i -e '1 s,#!.*env python,#!%{__python},'
@@ -236,7 +238,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc README.md AUTHORS CHANGELOG.md ROADMAP.md LICENSE
+%doc README.md AUTHORS CHANGELOG.md LICENSE
%attr(755,root,root) %{_bindir}/node
%attr(755,root,root) %{_bindir}/nodejs
%if %{with shared}
diff --git a/nodejs-lib64path.patch b/nodejs-lib64path.patch
index f5d8d90..8830d51 100644
--- a/nodejs-lib64path.patch
+++ b/nodejs-lib64path.patch
@@ -1,13 +1,11 @@
-diff -ur node-v0.9.9-0/lib/module.js node-v0.9.9/lib/module.js
---- node-v0.9.9-0/lib/module.js 2013-02-07 10:11:11.000000000 -0700
-+++ node-v0.9.9/lib/module.js 2013-02-15 21:40:33.000000000 -0700
-@@ -506,7 +506,7 @@
- var homeDir = process.env.HOME;
+--- node-v6.11.5/lib/module.js~ 2017-10-24 22:10:13.000000000 +0300
++++ node-v6.11.5/lib/module.js 2017-11-02 13:32:42.480301417 +0200
+@@ -625,7 +625,7 @@
+ } else {
+ prefixDir = path.resolve(process.execPath, '..', '..');
}
-
-- var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')];
-+ var paths = ["/usr/lib64/node", "/usr/lib/node", "/usr/lib/node_modules"];
+- var paths = [path.resolve(prefixDir, 'lib', 'node')];
++ var paths = ["/usr/lib64/node", "/usr/lib/node", "/usr/lib/node_modules", path.resolve(prefixDir, 'lib', 'node')];
if (homeDir) {
paths.unshift(path.resolve(homeDir, '.node_libraries'));
-Only in node-v0.9.9/lib: module.js~
diff --git a/nodejs-use-system-certs.patch b/nodejs-use-system-certs.patch
index ea34b0b..06262c9 100644
--- a/nodejs-use-system-certs.patch
+++ b/nodejs-use-system-certs.patch
@@ -4,51 +4,48 @@ Forwarded: https://github.com/nodejs/node/issues/3159
Author: Jérémy Lal <kapouer at melix.org>
Modified 2014-08-11 by Elan Ruusamäe <glen at delfi.ee> with the correct path for PLD
Modified 2015-10-17 by Elan Ruusamäe <glen at delfi.ee> updated for node 4.2.1-LTS
---- nodejs-4.5.0/src/node_crypto.cc.orig 2016-08-16 17:09:50.000000000 +0200
-+++ nodejs-4.5.0/src/node_crypto.cc 2016-09-09 23:40:11.959456422 +0200
-@@ -117,7 +117,6 @@
- static uv_mutex_t* locks;
+Modified 2017-11-02 by Elan Ruusamäe <glen at delfi.ee> updated for node 6.11.5-LTS
+--- node-v6.11.5/src/node_crypto.cc~ 2017-10-24 22:10:14.000000000 +0300
++++ node-v6.11.5/src/node_crypto.cc 2017-11-02 13:38:45.435760247 +0200
+@@ -121,8 +121,6 @@
+ static Mutex* mutexes;
- const char* const root_certs[] = {
+ static const char* const root_certs[] = {
-#include "node_root_certs.h" // NOLINT(build/include_order)
- };
+-};
- X509_STORE* root_cert_store;
-@@ -754,29 +753,18 @@
- CHECK_EQ(sc->ca_store_, nullptr);
+ static std::string extra_root_certs_file; // NOLINT(runtime/string)
+
+@@ -850,24 +848,18 @@
+ (void) &clear_error_on_return; // Silence compiler warning.
if (!root_cert_store) {
-- root_cert_store = X509_STORE_new();
--
-- for (size_t i = 0; i < arraysize(root_certs); i++) {
-- BIO* bp = NodeBIO::NewFixed(root_certs[i], strlen(root_certs[i]));
-- if (bp == nullptr) {
-- return;
-- }
+- root_cert_store = NewRootCertStore();
-
-- X509 *x509 = PEM_read_bio_X509(bp, nullptr, CryptoPemCallback, nullptr);
-- if (x509 == nullptr) {
-- BIO_free_all(bp);
-- return;
+- if (!extra_root_certs_file.empty()) {
+- unsigned long err = AddCertsFromFile( // NOLINT(runtime/int)
+- root_cert_store,
+- extra_root_certs_file.c_str());
+- if (err) {
+- ProcessEmitWarning(sc->env(),
+- "Ignoring extra certs from `%s`, load failed: %s\n",
+- extra_root_certs_file.c_str(),
+- ERR_error_string(err, nullptr));
- }
--
-- X509_STORE_add_cert(root_cert_store, x509);
--
-- BIO_free_all(bp);
-- X509_free(x509);
-+ if (SSL_CTX_load_verify_locations(sc->ctx_, "/etc/certs/ca-certificates.crt", NULL) == 1) {
-+ root_cert_store = SSL_CTX_get_cert_store(sc->ctx_);
-+ } else {
-+ // new empty store
-+ root_cert_store = X509_STORE_new();
- }
-+ } else {
-+ SSL_CTX_set_cert_store(sc->ctx_, root_cert_store);
+- }
++ if (SSL_CTX_load_verify_locations(sc->ctx_, "/etc/certs/ca-certificates.crt", NULL) == 1) {
++ root_cert_store = SSL_CTX_get_cert_store(sc->ctx_);
++ } else {
++ // new empty store
++ root_cert_store = NewRootCertStore();
++ }
++ } 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_);
+ // Increment reference count so global store is not deleted along with CTX.
+ X509_STORE_up_ref(root_cert_store);
+- SSL_CTX_set_cert_store(sc->ctx_, root_cert_store);
}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/nodejs.git/commitdiff/e2a62df7476baa3057a5502450a6e33fe6eb196a
More information about the pld-cvs-commit
mailing list