]> git.pld-linux.org Git - packages/nodejs.git/commitdiff
up to 4.2.1-lts
authorElan Ruusamäe <glen@delfi.ee>
Sat, 17 Oct 2015 12:55:00 +0000 (15:55 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Sat, 17 Oct 2015 20:49:56 +0000 (23:49 +0300)
disable system v8 - nobody builds like that
disabe shared patch - node modules don't link with it, they just assume
symbols from node process

nodejs-use-system-certs.patch
nodejs.spec

index 952f3415db87af27fb1dd57e23d511fc878e8197..ec528c2ba844c78ab72ef8dcd5982af539c019e0 100644 (file)
@@ -6,40 +6,41 @@ 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
---- a/src/node_crypto.cc
-+++ b/src/node_crypto.cc
-@@ -64,7 +64,6 @@
- namespace node {
+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 @@
+ static uv_mutex_t* locks;
  
- const char* root_certs[] = {
+ const char* const root_certs[] = {
 -#include "node_root_certs.h"  // NOLINT(build/include_order)
-   NULL
  };
  
-@@ -561,32 +560,16 @@
-   assert(sc->ca_store_ == NULL);
+ X509_STORE* root_cert_store;
+@@ -706,32 +705,17 @@
+   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/certs/ca-certificates.crt", NULL) == 1) {
 +      root_cert_store = SSL_CTX_get_cert_store(sc->ctx_);
@@ -50,9 +51,7 @@ Modified 2014-08-11 by Elan Ruusamäe <glen@delfi.ee> with the correct path for
 +  } 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();
  }
index e5fcd8b5bca8ff5ea1afbca75fb90181a28a3853..fd49c9f683ef9e6e21994f81b8fe24b6724c8e69 100644 (file)
@@ -1,20 +1,20 @@
 #
 # Conditional build:
-%bcond_without system_v8       # system v8
-%bcond_without system_uv       # system uv
-%bcond_without shared  # build libnode.so shared library
+%bcond_with    system_v8       # system v8
+%bcond_with    system_uv       # system uv
+%bcond_with    shared  # build libnode.so shared library
 
 # NOTES:
 # - https://nodejs.org/en/download/releases/
 
 Summary:       Asynchronous JavaScript Engine
 Name:          nodejs
-Version:       0.10.40
-Release:       1
+Version:       4.2.1
+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: f6ef20f327ecd6cb1586c41c7184290c
+# Source0-md5: 41d2b9fb5220af3fd98dd70fb33a2a10
 Patch1:                %{name}-shared.patch
 # force node to use /usr/lib/node as the systemwide module directory
 Patch2:                %{name}-libpath.patch
@@ -90,20 +90,21 @@ This package contains the documentation for nodejs.
 %prep
 %setup -q -n node-v%{version}
 %{?with_shared:%patch1 -p1}
+#%patch1 -p1
 %if %{_lib} == "lib64"
 %patch3 -p1
 %else
 %patch2 -p1
 %endif
 %patch4 -p1
-%patch5 -p1
-%patch6 -p1
-%patch7 -p1
+#%{?with_system_uv:%patch5 -p1}
+#%patch6 -p1
+#%patch7 -p1
 
 grep -r '#!.*env python' -l . | xargs %{__sed} -i -e '1 s,#!.*env python,#!%{__python},'
 
 rm -r deps/npm
-rm -r deps/cares
+#rm -r deps/cares
 rm -r deps/http_parser
 rm -r deps/openssl
 %{?with_system_uv:rm -r deps/uv}
@@ -119,7 +120,7 @@ GYP_DEFINES="soname_version=%{sover}" \
        %{?with_system_v8:--shared-v8} \
        --shared-zlib \
        --shared-openssl \
-       --shared-cares \
+       %{?0:--shared-cares} \
        %{?with_system_uv:--shared-libuv} \
        --shared-http-parser \
        --without-npm \
This page took 0.14102 seconds and 4 git commands to generate.