]> git.pld-linux.org Git - packages/nodejs.git/commitdiff
- up to 4.5.0 (LTS)
authormis <mistoo@gmail.com>
Fri, 9 Sep 2016 22:04:02 +0000 (00:04 +0200)
committermis <mistoo@gmail.com>
Fri, 9 Sep 2016 22:04:02 +0000 (00:04 +0200)
nodejs-use-system-certs.patch
nodejs.spec

index ec528c2ba844c78ab72ef8dcd5982af539c019e0..ea34b0be933ac16ac8d15cc72569b9cc39b85a7c 100644 (file)
@@ -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 <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 2014-08-11 by Elan Ruusamäe <glen@delfi.ee> with the correct path for PLD
 Modified 2015-10-17 by Elan Ruusamäe <glen@delfi.ee> 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 <glen@delfi.ee> 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 <glen@delfi.ee> 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_);
  }
index c7e7fef28072875e2bb9d98e1db222eb09216ce7..fac2c44494765c8b6c9793df1e917336f2c96b07 100644 (file)
 %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
This page took 0.112197 seconds and 4 git commands to generate.