commit 318ea6dba09e6bcbb7c6cc870d593377e8663ef9
Author: mis <[email protected]>
Date:   Sat Sep 10 00:04:02 2016 +0200

    - up to 4.5.0 (LTS)

 nodejs-use-system-certs.patch | 27 ++++++++++++---------------
 nodejs.spec                   | 12 ++++++------
 2 files changed, 18 insertions(+), 21 deletions(-)
---
diff --git a/nodejs.spec b/nodejs.spec
index c7e7fef..fac2c44 100644
--- a/nodejs.spec
+++ b/nodejs.spec
@@ -14,13 +14,13 @@
 %define                node_module_version     46
 Summary:       Asynchronous JavaScript Engine
 Name:          nodejs
-# 4.2.x is LTS
-Version:       4.2.6
+# 4.5.0 is LTS
+Version:       4.5.0
 Release:       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: b1287c356e904954da7e0c6435ff9948
+# Source0-md5: 1885586b4b8a2263f77dce27855661e9
 Patch1:                %{name}-shared.patch
 # force node to use /usr/lib/node as the systemwide module directory
 Patch2:                %{name}-libpath.patch
@@ -30,12 +30,12 @@ Patch4:             %{name}-use-system-certs.patch
 Patch5:                uv-fpic.patch
 URL:           https://nodejs.org/
 BuildRequires: gcc >= 5:4.0
-BuildRequires: http-parser-devel >= 2.5.0
+BuildRequires: http-parser-devel >= 2.7.0
 BuildRequires: libstdc++-devel
 %{?with_system_uv:BuildRequires:       libuv-devel >= 1.6.0}
 BuildRequires: openssl-devel >= 1.0.1
 BuildRequires: pkgconfig
-BuildRequires: python >= 1:2.5.2
+BuildRequires: python >= 2.7
 BuildRequires: python-jsmin
 BuildRequires: python-modules
 BuildRequires: rpm >= 4.4.9-56
@@ -180,7 +180,7 @@ EOF
 # install documentation
 install -d $RPM_BUILD_ROOT%{_docdir}/%{name}-doc-%{version}
 cp -a doc/api/* $RPM_BUILD_ROOT%{_docdir}/%{name}-doc-%{version}
-rm $RPM_BUILD_ROOT%{_docdir}/%{name}-doc-%{version}/*.markdown
+rm $RPM_BUILD_ROOT%{_docdir}/%{name}-doc-%{version}/*.md
 rm $RPM_BUILD_ROOT%{_docdir}/%{name}-doc-%{version}/*.json
 
 %clean
diff --git a/nodejs-use-system-certs.patch b/nodejs-use-system-certs.patch
index ec528c2..ea34b0b 100644
--- a/nodejs-use-system-certs.patch
+++ b/nodejs-use-system-certs.patch
@@ -1,15 +1,12 @@
 Description: do not bundle CA certificates, openssl on Debian have them
  As a consequence, nodejs must depend on ca-certificates.
-Forwarded: need some feedback before submitting the matter upstream
+Forwarded: https://github.com/nodejs/node/issues/3159
 Author: Jérémy Lal <[email protected]>
-Last-Update: 2014-03-02
-
-Modified 2014-05-02 by T.C. Hollingsworth <[email protected]> with the 
correct path for Fedora
 Modified 2014-08-11 by Elan Ruusamäe <[email protected]> with the correct path for 
PLD
 Modified 2015-10-17 by Elan Ruusamäe <[email protected]> updated for node 4.2.1-LTS
---- node-v4.2.1/src/node_crypto.cc     2015-10-17 15:14:47.248709690 +0300
-+++ node-v4.2.1/src/node_crypto.cc     2015-10-17 15:21:21.109176336 +0300
-@@ -127,7 +127,6 @@
+--- 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;
  
  const char* const root_certs[] = {
@@ -17,22 +14,19 @@ Modified 2015-10-17 by Elan Ruusamäe <[email protected]> 
updated for node 4.2.1-LTS
  };
  
  X509_STORE* root_cert_store;
-@@ -706,32 +705,17 @@
+@@ -754,29 +753,18 @@
    CHECK_EQ(sc->ca_store_, nullptr);
  
    if (!root_cert_store) {
 -    root_cert_store = X509_STORE_new();
 -
--    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_all(bp);
+-    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;
 -      }
 -
 -      X509 *x509 = PEM_read_bio_X509(bp, nullptr, CryptoPemCallback, nullptr);
--
 -      if (x509 == nullptr) {
 -        BIO_free_all(bp);
 -        return;
@@ -45,13 +39,16 @@ Modified 2015-10-17 by Elan Ruusamäe <[email protected]> 
updated for node 4.2.1-LTS
 +    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 {
-+      // empty store
++      // new empty store
 +      root_cert_store = X509_STORE_new();
      }
 +  } 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_);
  }
+ 
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nodejs.git/commitdiff/318ea6dba09e6bcbb7c6cc870d593377e8663ef9

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to