- Package unification across various branches of NodeJS. Package
for 4.x, 6.x and current (7.x) branches of NodeJS are now handled via GitHub repository. - NodeJS 6.x LTS package, based on NodeJS 4.x LTS layout. All NodeJS packages are interchangeable. (FATE #321373) OBS-URL: https://build.opensuse.org/package/show/devel:languages:nodejs/nodejs6?expand=0&rev=1
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 18 11:59:06 UTC 2016 - adam.majer@suse.de
|
||||
|
||||
- Package unification across various branches of NodeJS. Package
|
||||
for 4.x, 6.x and current (7.x) branches of NodeJS are now
|
||||
handled via GitHub repository.
|
||||
- NodeJS 6.x LTS package, based on NodeJS 4.x LTS layout. All
|
||||
NodeJS packages are interchangeable. (FATE #321373)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 7 13:15:21 UTC 2016 - adam.majer@suse.de
|
||||
|
||||
- Add versioned dependencies for unbundling of c-ares and icu
|
||||
libraries
|
||||
- SLE12 can have unbundled libicu
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 2 04:13:20 UTC 2016 - qantas94heavy@gmail.com
|
||||
|
||||
- Fork package devel:languages:nodejs/nodejs
|
||||
- Remove support-arm64-build.patch (not necessary for aarch64 build)
|
||||
- Use system library versions of c-ares and ICU where supported
|
||||
- Remove /usr/{lib,lib64}/node_modules from global module paths
|
||||
* This is deprecated behaviour that was caused by an incorrect patch
|
||||
in devel:languages:nodejs/nodejs almost 6 months ago (boo#985350)
|
||||
- Modify nodejs-libpath.patch
|
||||
* Move /usr/lib64/node_modules to %{_libexecpath} as npm isn't
|
||||
architecture dependent (only npm itself is stored there)
|
||||
- Remove nodejs-libpath64.patch
|
||||
- Use separate .sig file instead of .asc file for source verification
|
||||
- Use exec instead of xargs to remove files in install script
|
||||
+350
@@ -0,0 +1,350 @@
|
||||
#
|
||||
# spec file for package nodejs
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
###########################################################
|
||||
#
|
||||
# WARNING! WARNING! WARNING! WARNING! WARNING! WARNING!
|
||||
#
|
||||
# This spec file is generated from a template hosted at
|
||||
# https://github.com/AdamMajer/nodejs-packaging
|
||||
#
|
||||
###########################################################
|
||||
|
||||
Name: nodejs6
|
||||
Version: 6.9.1
|
||||
Release: 0
|
||||
|
||||
%if 0%{?sles_version} == 11
|
||||
%define _libexecdir %{_exec_prefix}/lib
|
||||
%endif
|
||||
|
||||
# Only Leap 42.2+, SLE 12 SP2+ and Tumbleweed have OpenSSL 1.0.2.
|
||||
%if 0%{?suse_version} > 1320 || 0%{?sle_version} >= 120200
|
||||
%bcond_with intree_openssl
|
||||
%else
|
||||
%bcond_without intree_openssl
|
||||
%endif
|
||||
|
||||
%if 0%{suse_version} >= 1330
|
||||
%bcond_with intree_cares
|
||||
%else
|
||||
%bcond_without intree_cares
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version} >= 1200
|
||||
%bcond_with intree_icu
|
||||
%else
|
||||
%bcond_without intree_icu
|
||||
%endif
|
||||
|
||||
%ifarch aarch64 ppc ppc64 ppc64le s390 s390x
|
||||
%bcond_with gdb
|
||||
%else
|
||||
%bcond_without gdb
|
||||
%endif
|
||||
|
||||
# No binutils_gold on SLE12 (aarch64).
|
||||
%ifarch aarch64
|
||||
|
||||
%if 0%{?sle_version} >= 120100 || 0%{?is_opensuse}
|
||||
%bcond_without binutils_gold
|
||||
%else
|
||||
%bcond_with binutils_gold
|
||||
%endif
|
||||
|
||||
%else # aarch64
|
||||
|
||||
# No binutils_gold on s390x.
|
||||
%ifarch s390x s390
|
||||
%bcond_with binutils_gold
|
||||
%else
|
||||
%bcond_without binutils_gold
|
||||
%endif # s390x s390
|
||||
|
||||
%endif # aarch64
|
||||
|
||||
Summary: Evented I/O for V8 JavaScript
|
||||
License: MIT
|
||||
Group: Development/Languages/NodeJS
|
||||
Url: https://nodejs.org
|
||||
Source: https://nodejs.org/dist/v%{version}/node-v%{version}.tar.xz
|
||||
Source1: https://nodejs.org/dist/v%{version}/SHASUMS256.txt
|
||||
Source2: https://nodejs.org/dist/v%{version}/SHASUMS256.txt.sig
|
||||
Source3: nodejs.keyring
|
||||
|
||||
## UPSTREAM PATCHES HERE, if any
|
||||
Patch1: https://patch-diff.githubusercontent.com/raw/nodejs/node/pull/8334.diff
|
||||
## Our patches
|
||||
# PATCH-FIX-OPENSUSE -- set correct path for dtrace if it is built
|
||||
Patch101: nodejs-libpath.patch
|
||||
# PATCH-FIX-UPSTREAM -- use custom addon.gypi by default instead of
|
||||
# downloading node source
|
||||
Patch102: node-gyp-addon-gypi.patch
|
||||
# PATCH-FIX-SLE -- configure script uses Python check_output method
|
||||
# which isn't included in Python 2.6 (used in SLE 11).
|
||||
Patch103: nodejs-sle11-python26-check_output.patch
|
||||
# PATCH-FIX-OPENSUSE -- install user global npm packages to /usr/local
|
||||
# instead of /usr
|
||||
Patch104: npm_search_paths.patch
|
||||
|
||||
%if %{with binutils_gold}
|
||||
BuildRequires: binutils-gold
|
||||
%endif
|
||||
|
||||
%if 0%{?sles_version} == 11
|
||||
BuildRequires: gcc48-c++
|
||||
%else
|
||||
BuildRequires: gcc-c++
|
||||
%endif
|
||||
|
||||
BuildRequires: curl
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: procps
|
||||
BuildRequires: python
|
||||
BuildRequires: xz
|
||||
BuildRequires: zlib-devel
|
||||
|
||||
%if ! %{with intree_openssl}
|
||||
BuildRequires: openssl-devel >= 1.0.2
|
||||
%endif
|
||||
|
||||
%if ! %{with intree_cares}
|
||||
BuildRequires: pkgconfig(libcares) >= 1.10.0
|
||||
%endif
|
||||
|
||||
%if ! %{with intree_icu}
|
||||
BuildRequires: pkgconfig(icu-i18n) >= 52
|
||||
%endif
|
||||
|
||||
Recommends: npm(npm) = 3.10.8
|
||||
|
||||
#we need ABI virtual provides where SONAMEs aren't enough/not present so deps
|
||||
#break when binary compatibility is broken
|
||||
%global nodejs_abi 6.0
|
||||
Provides: nodejs(abi) = %{nodejs_abi}
|
||||
|
||||
#this corresponds to the "engine" requirement in package.json
|
||||
Provides: nodejs(engine) = %{version}
|
||||
|
||||
# For SLE11, to be able to use the certificate store we need to have properly
|
||||
# symlinked certificates. The compatability symlinks are provided by the
|
||||
# openssl1 library in the Security Module
|
||||
%if 0%{?sles_version} == 11
|
||||
Requires: openssl1
|
||||
%endif
|
||||
|
||||
# Building Node.js only makes sense on V8 architectures.
|
||||
ExclusiveArch: %{ix86} x86_64 armv7hl aarch64 ppc ppc64 ppc64le s390 s390x
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine.
|
||||
Node.js uses an event-driven, non-blocking I/O model that makes it
|
||||
lightweight and efficient. Node.js' package ecosystem, npm, is the largest
|
||||
ecosystem of open source libraries in the world.
|
||||
|
||||
%package devel
|
||||
Summary: Files needed for development of NodeJS platforms
|
||||
Group: Development/Languages/NodeJS
|
||||
Provides: nodejs-devel = %{version}
|
||||
Requires: %{name} = %{version}
|
||||
Conflicts: otherproviders(nodejs-devel)
|
||||
|
||||
%description devel
|
||||
This package provides development headers for Node.js.
|
||||
|
||||
%package -n npm6
|
||||
Summary: Package manager for Node.js
|
||||
Group: Development/Languages/NodeJS
|
||||
Requires: %{name}-devel = %{version}
|
||||
Provides: nodejs-npm = %{version}
|
||||
Obsoletes: nodejs-npm < 5.3.1
|
||||
Provides: npm(npm) = 3.10.8
|
||||
Provides: npm = %{version}
|
||||
Conflicts: otherproviders(npm)
|
||||
|
||||
%description -n npm6
|
||||
A package manager for Node.js that allows developers to install and
|
||||
publish packages to a package registry.
|
||||
|
||||
%package docs
|
||||
Summary: Node.js API documentation
|
||||
Group: Documentation/Other
|
||||
%if 0%{?suse_version} >= 1200
|
||||
# using noarch subpackage seems to break debuginfo on older releases
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
|
||||
%description docs
|
||||
The API documentation for the Node.js JavaScript runtime.
|
||||
|
||||
%prep
|
||||
echo "`grep node-v%{version}.tar.xz %{S:1} | head -n1 | cut -c1-64` %{S:0}" | sha256sum -c
|
||||
%setup -q -n node-v%{version}
|
||||
%patch1 -p1
|
||||
%patch101 -p1
|
||||
%patch102 -p1
|
||||
# Add check_output to configure script (not part of Python 2.6 in SLE11).
|
||||
%if 0%{?sles_version} == 11
|
||||
%patch103 -p1
|
||||
%endif
|
||||
%patch104 -p1
|
||||
# Make sure nothing gets included from bundled deps:
|
||||
# We only delete the source and header files, because
|
||||
# the remaining build scripts are still used.
|
||||
%if ! %{with intree_openssl}
|
||||
find deps/openssl -name *.[ch] -delete
|
||||
%endif
|
||||
|
||||
%if ! %{with intree_icu}
|
||||
rm -rf deps/icu-small
|
||||
%endif
|
||||
|
||||
%if ! %{with intree_cares}
|
||||
find deps/cares -name *.[ch] -delete
|
||||
%endif
|
||||
|
||||
find deps/zlib -name *.[ch] -delete
|
||||
|
||||
%build
|
||||
# percent-configure pulls in something that confuses node's configure
|
||||
# script, so we'll do it thus:
|
||||
export CFLAGS="%{optflags}"
|
||||
export CXXFLAGS="%{optflags}"
|
||||
# It seems that GCC 4.8 is needed to compile on SLE 11 SP4.
|
||||
%if 0%{?sles_version} == 11
|
||||
export CXX="g++-4.8"
|
||||
%endif
|
||||
|
||||
./configure \
|
||||
--prefix=%{_prefix} \
|
||||
%if ! %{with intree_openssl}
|
||||
--shared-openssl \
|
||||
%endif
|
||||
--shared-zlib \
|
||||
%if ! %{with intree_cares}
|
||||
--shared-cares \
|
||||
%endif
|
||||
%if ! %{with intree_icu}
|
||||
--with-intl=system-icu \
|
||||
%endif
|
||||
%if %{with gdb}
|
||||
--gdb \
|
||||
%endif
|
||||
--without-dtrace \
|
||||
--use-system-ca-store
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
make install DESTDIR=%{buildroot} %{?_smp_mflags}
|
||||
rm %{buildroot}%{_datadir}/doc/node/gdbinit
|
||||
|
||||
# npm man page
|
||||
rm -rf %{buildroot}%{_libdir}/node_modules/npm/man
|
||||
mkdir -p %{buildroot}%{_mandir}/{man1,man5,man7}
|
||||
install -m 644 deps/npm/man/man1/* %{buildroot}%{_mandir}/man1
|
||||
install -m 644 deps/npm/man/man5/* %{buildroot}%{_mandir}/man5
|
||||
install -m 644 deps/npm/man/man7/* %{buildroot}%{_mandir}/man7
|
||||
|
||||
#node-gyp needs common.gypi too
|
||||
install -D -m 644 common.gypi \
|
||||
%{buildroot}%{_datadir}/node/common.gypi
|
||||
# install addon-rpm.gypi
|
||||
install -D -m 644 addon-rpm.gypi \
|
||||
%{buildroot}%{_libdir}/node_modules/npm/node_modules/node-gyp/addon-rpm.gypi
|
||||
|
||||
# Own nodejs_sitelib
|
||||
#mkdir -p %{buildroot}%{_libdir}/node_modules/npm
|
||||
|
||||
# clean
|
||||
# hidden files and directories
|
||||
find %{buildroot}%{_libdir}/node_modules/npm -name ".*" -print0 | xargs -r0 -0 rm -rf --
|
||||
# windows stuff
|
||||
find %{buildroot}%{_libdir}/node_modules/npm -name "*.bat" -delete
|
||||
find %{buildroot}%{_libdir}/node_modules/npm -name "*.cmd" -delete
|
||||
# build stuff
|
||||
find %{buildroot}%{_libdir}/node_modules/npm -name "Makefile" -delete
|
||||
rm -rf %{buildroot}%{_libdir}/node_modules/npm/{test,scripts}
|
||||
find %{buildroot}%{_libdir}/node_modules/npm/node_modules -name "*.sh" -delete
|
||||
find %{buildroot}%{_libdir}/node_modules/npm -name "src" -print0 | xargs -0 rm -rf --
|
||||
# remove examples/tests/benchmark stuff
|
||||
find %{buildroot}%{_libdir}/node_modules/npm/node_modules -name "example*" -print0 | xargs -0 rm -rf --
|
||||
find %{buildroot}%{_libdir}/node_modules/npm/node_modules -name "test*" -print0 | xargs -0 rm -rf --
|
||||
find %{buildroot}%{_libdir}/node_modules/npm/node_modules -name "*_test.*" -delete
|
||||
find %{buildroot}%{_libdir}/node_modules/npm/node_modules -type d -name "benchmark" -print0 | xargs -0 rm -rf --
|
||||
# README.md LICENSE file permission
|
||||
find %{buildroot}%{_libdir}/node_modules/npm -name "README.md" -exec chmod -x {} +
|
||||
find %{buildroot}%{_libdir}/node_modules/npm -name "LICENSE" -exec chmod -x {} +
|
||||
# browser.js is useless for npm cli
|
||||
find %{buildroot}%{_libdir}/node_modules/npm -name "browser.js" -delete
|
||||
# fix permissions
|
||||
chmod 0644 %{buildroot}%{_libdir}/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/lib/index.js \
|
||||
%{buildroot}%{_libdir}/node_modules/npm/node_modules/request/node_modules/qs/lib/parse.js \
|
||||
%{buildroot}%{_libdir}/node_modules/npm/node_modules/request/node_modules/hawk/lib/index.js \
|
||||
%{buildroot}%{_libdir}/node_modules/npm/node_modules/config-chain/index.js \
|
||||
%{buildroot}%{_libdir}/node_modules/npm/node_modules/request/node_modules/qs/lib/stringify.js \
|
||||
%{buildroot}%{_libdir}/node_modules/npm/node_modules/request/node_modules/hawk/lib/client.js \
|
||||
%{buildroot}%{_libdir}/node_modules/npm/node_modules/request/node_modules/hawk/lib/crypto.js \
|
||||
%{buildroot}%{_libdir}/node_modules/npm/node_modules/request/node_modules/hawk/lib/utils.js \
|
||||
%{buildroot}%{_libdir}/node_modules/npm/node_modules/request/index.js \
|
||||
%{buildroot}%{_libdir}/node_modules/npm/node_modules/request/node_modules/qs/lib/index.js \
|
||||
%{buildroot}%{_libdir}/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js \
|
||||
%{buildroot}%{_libdir}/node_modules/npm/node_modules/request/node_modules/hawk/lib/server.js \
|
||||
%{buildroot}%{_libdir}/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/lib/index.js \
|
||||
%{buildroot}%{_libdir}/node_modules/npm/node_modules/request/node_modules/hawk/node_modules/sntp/index.js \
|
||||
%{buildroot}%{_libdir}/node_modules/npm/node_modules/request/node_modules/qs/lib/utils.js \
|
||||
%{buildroot}%{_libdir}/node_modules/npm/node_modules/uid-number/get-uid-gid.js \
|
||||
%{buildroot}%{_libdir}/node_modules/npm/bin/read-package-json.js
|
||||
|
||||
# file duplicates
|
||||
%fdupes %{buildroot}%{_libdir}/node_modules/npm
|
||||
%fdupes %{buildroot}%{_includedir}/node
|
||||
%fdupes %{buildroot}%{_mandir}/man5
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
%doc AUTHORS LICENSE *.md
|
||||
%doc deps/v8/tools/gdbinit
|
||||
%dir %{_libdir}/node_modules
|
||||
%{_bindir}/node
|
||||
%{_libdir}/node_modules
|
||||
%{_mandir}/man1/node.1%{ext_man}
|
||||
%exclude %{_libdir}/node_modules/npm
|
||||
|
||||
%files -n npm6
|
||||
%defattr(-, root, root)
|
||||
%{_bindir}/npm
|
||||
%{_libdir}/node_modules/npm
|
||||
%{_mandir}/man*/*npm*%{ext_man}
|
||||
%{_mandir}/man5/package.json.5%{ext_man}
|
||||
%{_mandir}/man7/semver.7%{ext_man}
|
||||
|
||||
%files devel
|
||||
%defattr(-, root, root)
|
||||
%{_includedir}/node
|
||||
%{_datadir}/node
|
||||
%dir %{_datadir}/systemtap
|
||||
%dir %{_datadir}/systemtap/tapset
|
||||
%{_datadir}/systemtap/tapset/node.stp
|
||||
|
||||
%files docs
|
||||
%defattr(-,root,root)
|
||||
%doc doc/api
|
||||
|
||||
%changelog
|
||||
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
@@ -0,0 +1 @@
|
||||
.osc
|
||||
@@ -0,0 +1,88 @@
|
||||
Source: https://github.com/nodejs/node/pull/8334
|
||||
Author: Adam Majer <amajer@suse.de>
|
||||
Summary: add option to use system CA store
|
||||
|
||||
Index: node-v6.9.0/configure
|
||||
===================================================================
|
||||
--- node-v6.9.0.orig/configure
|
||||
+++ node-v6.9.0/configure
|
||||
@@ -187,6 +187,11 @@ shared_optgroup.add_option('--shared-ope
|
||||
dest='shared_openssl_libpath',
|
||||
help='a directory to search for the shared OpenSSL DLLs')
|
||||
|
||||
+shared_optgroup.add_option('--use-system-ca-store',
|
||||
+ action='store_true',
|
||||
+ dest='use_system_ca_store',
|
||||
+ help='use system supplied Root CA store instead of bundled copy')
|
||||
+
|
||||
shared_optgroup.add_option('--shared-zlib',
|
||||
action='store_true',
|
||||
dest='shared_zlib',
|
||||
@@ -905,6 +910,8 @@ def configure_openssl(o):
|
||||
o['variables']['node_use_openssl'] = b(not options.without_ssl)
|
||||
o['variables']['node_shared_openssl'] = b(options.shared_openssl)
|
||||
o['variables']['openssl_no_asm'] = 1 if options.openssl_no_asm else 0
|
||||
+ if options.use_system_ca_store:
|
||||
+ o['defines'] += ['NODE_SYSTEM_CERT_STORE']
|
||||
if options.openssl_fips:
|
||||
o['variables']['openssl_fips'] = options.openssl_fips
|
||||
fips_dir = os.path.join(root_dir, 'deps', 'openssl', 'fips')
|
||||
Index: node-v6.9.0/src/node_crypto.cc
|
||||
===================================================================
|
||||
--- node-v6.9.0.orig/src/node_crypto.cc
|
||||
+++ node-v6.9.0/src/node_crypto.cc
|
||||
@@ -751,6 +751,23 @@ void SecureContext::AddRootCerts(const F
|
||||
CHECK_EQ(sc->ca_store_, nullptr);
|
||||
|
||||
if (!root_cert_store) {
|
||||
+#if defined(NODE_SYSTEM_CERT_STORE)
|
||||
+ // *Assume* OpenSSL is setup correctly, which is the case
|
||||
+ // for distribution supplied versions.
|
||||
+ //
|
||||
+ // If this does not work, define SSL_CERT_DIR environment
|
||||
+ if (SSL_CTX_set_default_verify_paths(sc->ctx_)) {
|
||||
+ root_cert_store = SSL_CTX_get_cert_store(sc->ctx_);
|
||||
+ // root_cert_store created here is already assigned to the SSL_CTX
|
||||
+ // so when it is assigned again below, the reference is dropped by 1
|
||||
+ // and then we will delete root store with the SSL_CTX deletion.
|
||||
+ // Increase references to 2 to avoid this scenario.
|
||||
+ CRYPTO_add(&root_cert_store->references, 1, CRYPTO_LOCK_X509_STORE);
|
||||
+ } else {
|
||||
+ // failed to load, default to nothing
|
||||
+ root_cert_store = X509_STORE_new();
|
||||
+ }
|
||||
+#else /* Use supplied certificates */
|
||||
root_cert_store = X509_STORE_new();
|
||||
|
||||
for (size_t i = 0; i < arraysize(root_certs); i++) {
|
||||
@@ -770,9 +787,12 @@ void SecureContext::AddRootCerts(const F
|
||||
BIO_free_all(bp);
|
||||
X509_free(x509);
|
||||
}
|
||||
+#endif // defined(USE_SYSTEM_CERTIFICATE_STORE)
|
||||
}
|
||||
|
||||
sc->ca_store_ = root_cert_store;
|
||||
+ // increment reference count so global store is not deleted along with CTX
|
||||
+ CRYPTO_add(&root_cert_store->references, 1, CRYPTO_LOCK_X509_STORE);
|
||||
SSL_CTX_set_cert_store(sc->ctx_, sc->ca_store_);
|
||||
}
|
||||
|
||||
Index: node-v6.9.0/src/node_crypto.h
|
||||
===================================================================
|
||||
--- node-v6.9.0.orig/src/node_crypto.h
|
||||
+++ node-v6.9.0/src/node_crypto.h
|
||||
@@ -142,13 +142,6 @@ class SecureContext : public BaseObject
|
||||
void FreeCTXMem() {
|
||||
if (ctx_) {
|
||||
env()->isolate()->AdjustAmountOfExternalAllocatedMemory(-kExternalSize);
|
||||
- if (ctx_->cert_store == root_cert_store) {
|
||||
- // SSL_CTX_free() will attempt to free the cert_store as well.
|
||||
- // Since we want our root_cert_store to stay around forever
|
||||
- // we just clear the field. Hopefully OpenSSL will not modify this
|
||||
- // struct in future versions.
|
||||
- ctx_->cert_store = nullptr;
|
||||
- }
|
||||
SSL_CTX_free(ctx_);
|
||||
if (cert_ != nullptr)
|
||||
X509_free(cert_);
|
||||
@@ -0,0 +1,42 @@
|
||||
77c14510c4b09188450f8c10b8c163ef4b4f616c8b7f455d538f07a810bc98bf node-v6.9.1-aix-ppc64.tar.gz
|
||||
392e511ca0d6203c80700ed753187535e04069d0df0074cbfd1e4f1bd571d4c5 node-v6.9.1-darwin-x64.tar.gz
|
||||
910395e1e98fb351c62b5702a9deef22aaecf05d6df1d7edc283337542207f3f node-v6.9.1-darwin-x64.tar.xz
|
||||
bd73a816a1bfde82c5e6d0a4b5e669f7ce08e0149ba7994388a4f0b99216fb41 node-v6.9.1-headers.tar.gz
|
||||
e30d67064877ed435e864ea52af20c6c54b7386bcf829a75a89ae1b666ae68bd node-v6.9.1-headers.tar.xz
|
||||
8a8da2c3aad9da2d80035eeba0b9aae41230bec394729224fafcfae152fa5f66 node-v6.9.1-linux-arm64.tar.gz
|
||||
7aa69b6c8cff578d0d97d5bd4f76941b2fade5476f0408d53828666ee427dd4e node-v6.9.1-linux-arm64.tar.xz
|
||||
0b30184fe98bd22b859db7f4cbaa56ecc04f7f526313c8da42315d89fabe23b2 node-v6.9.1-linux-armv6l.tar.gz
|
||||
57ff5c069fbfbad87d7155eb47023d6132190a4d9a77b91ba776e5935c634f4c node-v6.9.1-linux-armv6l.tar.xz
|
||||
c4651804af2422b10cf49e1eeab96feb2664eaeb6c6ae3913933a946134e3375 node-v6.9.1-linux-armv7l.tar.gz
|
||||
9a5542ef94fb9d96f1e9ce280b869396728a17461faa52593599bfe27faf9069 node-v6.9.1-linux-armv7l.tar.xz
|
||||
5714678db7e6ff93ae96417c0b210a1f084ee7a0aabf0f2d33307a1f1d0445ce node-v6.9.1-linux-ppc64le.tar.gz
|
||||
6f6362cba63c20eab4914c2983edd9699c1082792d0a35ef9c54d18b6c488e59 node-v6.9.1-linux-ppc64le.tar.xz
|
||||
2accb9e0f8082ea29f224cf4046d4ce318bb68b6cc41415e1291b58929de49a7 node-v6.9.1-linux-ppc64.tar.gz
|
||||
cc9b4a189c78c71ac89c7030f90e472965eab75bc3c0e82841b26dda43bd4e38 node-v6.9.1-linux-ppc64.tar.xz
|
||||
aa4ba50e0af65590903e4627703d90119711aea84c17f3f1b4a9211ed9cc23a8 node-v6.9.1-linux-s390x.tar.gz
|
||||
92e12509b46b2ea1cfab031b571278d51db399d1d4883caed38aeaa2678035e5 node-v6.9.1-linux-s390x.tar.xz
|
||||
a9d9e6308931fa2a2b0cada070516d45b76d752430c31c9198933c78f8d54b17 node-v6.9.1-linux-x64.tar.gz
|
||||
d4eb161e4715e11bbef816a6c577974271e2bddae9cf008744627676ff00036a node-v6.9.1-linux-x64.tar.xz
|
||||
d2f4cb3f7e784a8c1c1b6477db613d67635d69cbf9ca80c17b87c9e85378d3bd node-v6.9.1-linux-x86.tar.gz
|
||||
f9b2ca03016e45bc35d2441a63a73db94d3e7b92350f15577d796467b9f7efb0 node-v6.9.1-linux-x86.tar.xz
|
||||
cdf399288aee1cfc2fcfd301b221d7e3141f3d549ab884f36d325605f6ac98fa node-v6.9.1.pkg
|
||||
955d396a888c164d12d134baae098e2e214bfb46898e520f5be2e88a404697e2 node-v6.9.1-sunos-x64.tar.gz
|
||||
d94202bc4567475ccca077f3f819a92c9d7f280bac688ec0506f9a31c3b19201 node-v6.9.1-sunos-x64.tar.xz
|
||||
ec758b4a638f4599bb4a782196088f7704f4b08e70509ac235c3dd3f5b62382b node-v6.9.1-sunos-x86.tar.gz
|
||||
643d675ac6678745784b29ab829519d11c9832aa77095a9b611d71b7ac4d4321 node-v6.9.1-sunos-x86.tar.xz
|
||||
a98997ca3a4d10751f0ebe97839b2308a31ae884b4203cda0c99cf36bc7fe3bf node-v6.9.1.tar.gz
|
||||
0bdd8d1305777cc8cd206129ea494d6c6ce56001868dd80147aff531d6df0729 node-v6.9.1.tar.xz
|
||||
6ea6768af81948bd0e54760d948f04e0ab182411b235d2067e45a1e2b9052bcb node-v6.9.1-win-x64.7z
|
||||
e4c5a82cf481c1eb6ea7db109d70c43a0169203eae7608e2140863efc42c25ce node-v6.9.1-win-x64.zip
|
||||
aec417a95b46a21fa13190ed3f9a22de8bc1ecec77f981102345b0c7165420bd node-v6.9.1-win-x86.7z
|
||||
78716a433b7f7ca680ffb1242f233fc0fa0fd59f475bca7aed0614a059ce8a8a node-v6.9.1-win-x86.zip
|
||||
148aa14ce1491b2cdc47230c90e862e48d1af32baf5cc415b29593b6113ea1cf node-v6.9.1-x64.msi
|
||||
314eaf8b5b9e08a835cb5c005ea5f4299b9e9e4d8c97277c1617e511382c15dc node-v6.9.1-x86.msi
|
||||
513923b0490ebb7466a56483a62595814ed9d036d6f35476debb0cd606bec526 win-x64/node.exe
|
||||
3951aefa4afd6fb836ab06468b1fc2a69fa75bd66ec2f5a0e08c4e32547681e3 win-x64/node.lib
|
||||
a6110ec403a7a5fce0b3f4bd4667d8f31755114ab2f6720358934dc519f781b9 win-x64/node_pdb.7z
|
||||
6f526496bb08d727b6d7e7c0d21de4bc9f1928878ca245f7d8e9fd51346e669e win-x64/node_pdb.zip
|
||||
017659cf538c6cd5244f386be41b6e648221a2df4c4a028759978039bd62213a win-x86/node.exe
|
||||
8584b55302cc738f6b0d9e6a8a4740654f55abae9b672a64a0abfd27d3c52627 win-x86/node.lib
|
||||
6fcffec4a0d304c8c72fcdb0608a4d00c59ae8694d43032d739e0e74b74e9bb2 win-x86/node_pdb.7z
|
||||
6f25d51c14d6882308e3c32eaddae84cdcd555670660e8bbf17c70ef092dd37c win-x86/node_pdb.zip
|
||||
Binary file not shown.
@@ -0,0 +1,78 @@
|
||||
Index: node-v6.9.0/addon-rpm.gypi
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ node-v6.9.0/addon-rpm.gypi
|
||||
@@ -0,0 +1,35 @@
|
||||
+{
|
||||
+ 'target_defaults': {
|
||||
+ 'type': 'loadable_module',
|
||||
+ 'product_prefix': '',
|
||||
+ 'include_dirs': [
|
||||
+ '/usr/include/node/',
|
||||
+ '/usr/include/'
|
||||
+ ],
|
||||
+
|
||||
+ 'target_conditions': [
|
||||
+ ['_type=="loadable_module"', {
|
||||
+ 'product_extension': 'node',
|
||||
+ 'defines': [ 'BUILDING_NODE_EXTENSION' ],
|
||||
+ }]
|
||||
+ ],
|
||||
+
|
||||
+ 'conditions': [
|
||||
+ [ 'OS=="mac"', {
|
||||
+ 'libraries': [ '-undefined dynamic_lookup' ],
|
||||
+ 'xcode_settings': {
|
||||
+ 'DYLIB_INSTALL_NAME_BASE': '@rpath'
|
||||
+ },
|
||||
+ }],
|
||||
+ [ 'OS=="win"', {
|
||||
+ 'libraries': [ '-l<(node_root_dir)/$(Configuration)/node.lib' ],
|
||||
+ # warning C4251: 'node::ObjectWrap::handle_' : class 'v8::Persistent<T>'
|
||||
+ # needs to have dll-interface to be used by clients of class 'node::ObjectWrap'
|
||||
+ 'msvs_disabled_warnings': [ 4251 ],
|
||||
+ }],
|
||||
+ [ 'OS=="freebsd" or OS=="openbsd" or OS=="solaris" or (OS=="linux" and target_arch!="ia32")', {
|
||||
+ 'cflags': [ '-fPIC' ],
|
||||
+ }]
|
||||
+ ]
|
||||
+ }
|
||||
+}
|
||||
Index: node-v6.9.0/deps/npm/node_modules/node-gyp/lib/configure.js
|
||||
===================================================================
|
||||
--- node-v6.9.0.orig/deps/npm/node_modules/node-gyp/lib/configure.js
|
||||
+++ node-v6.9.0/deps/npm/node_modules/node-gyp/lib/configure.js
|
||||
@@ -60,10 +60,6 @@ function configure (gyp, argv, callback)
|
||||
if ('v' + release.version !== process.version) {
|
||||
// if --target was given, then determine a target version to compile for
|
||||
log.verbose('get node dir', 'compiling against --target node version: %s', release.version)
|
||||
- } else {
|
||||
- // if no --target was specified then use the current host node version
|
||||
- log.verbose('get node dir', 'no --target version specified, falling back to host node version: %s', release.version)
|
||||
- }
|
||||
|
||||
if (!release.semver) {
|
||||
// could not parse the version string with semver
|
||||
@@ -78,6 +74,12 @@ function configure (gyp, argv, callback)
|
||||
nodeDir = path.resolve(gyp.devDir, release.versionDir)
|
||||
createBuildDir()
|
||||
})
|
||||
+ } else {
|
||||
+ // if no --target was specified then use RPM-installed headers
|
||||
+ log.verbose('get node dir', 'no --target version specified, falling back to RPM installed headers')
|
||||
+ nodeDir = '/usr/share/node'
|
||||
+ createBuildDir()
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,7 +250,8 @@ function configure (gyp, argv, callback)
|
||||
|
||||
// this logic ported from the old `gyp_addon` python file
|
||||
var gyp_script = path.resolve(__dirname, '..', 'gyp', 'gyp_main.py')
|
||||
- var addon_gypi = path.resolve(__dirname, '..', 'addon.gypi')
|
||||
+ var addon_gypi_file = gyp.opts.target || gyp.opts.nodeDir ? 'addon.gypi' : 'addon-rpm.gypi'
|
||||
+ var addon_gypi = path.resolve(__dirname, '..', addon_gypi_file)
|
||||
var common_gypi = path.resolve(nodeDir, 'include/node/common.gypi')
|
||||
fs.stat(common_gypi, function (err, stat) {
|
||||
if (err)
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0bdd8d1305777cc8cd206129ea494d6c6ce56001868dd80147aff531d6df0729
|
||||
size 15617228
|
||||
@@ -0,0 +1,52 @@
|
||||
Index: node-v6.9.0/lib/module.js
|
||||
===================================================================
|
||||
--- node-v6.9.0.orig/lib/module.js
|
||||
+++ node-v6.9.0/lib/module.js
|
||||
@@ -616,7 +616,7 @@ Module._initPaths = function() {
|
||||
homeDir = process.env.HOME;
|
||||
}
|
||||
|
||||
- var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')];
|
||||
+ var paths = ['/usr/lib/node_modules', '/usr/lib/node'];
|
||||
|
||||
if (homeDir) {
|
||||
paths.unshift(path.resolve(homeDir, '.node_libraries'));
|
||||
Index: node-v6.9.0/tools/install.py
|
||||
===================================================================
|
||||
--- node-v6.9.0.orig/tools/install.py
|
||||
+++ node-v6.9.0/tools/install.py
|
||||
@@ -6,6 +6,7 @@ import os
|
||||
import re
|
||||
import shutil
|
||||
import sys
|
||||
+from distutils import sysconfig
|
||||
from getmoduleversion import get_version
|
||||
|
||||
# set at init time
|
||||
@@ -76,7 +77,7 @@ def install(paths, dst): map(lambda path
|
||||
def uninstall(paths, dst): map(lambda path: try_remove(path, dst), paths)
|
||||
|
||||
def npm_files(action):
|
||||
- target_path = 'lib/node_modules/npm/'
|
||||
+ target_path = sysconfig.get_config_var("LIB") + '/node_modules/npm/'
|
||||
|
||||
# don't install npm if the target path is a symlink, it probably means
|
||||
# that a dev version of npm is installed there
|
||||
@@ -94,7 +95,7 @@ def npm_files(action):
|
||||
if action == uninstall:
|
||||
action([link_path], 'bin/npm')
|
||||
elif action == install:
|
||||
- try_symlink('../lib/node_modules/npm/bin/npm-cli.js', link_path)
|
||||
+ try_symlink("../" + sysconfig.get_config_var("LIB") + '/node_modules/npm/bin/npm-cli.js',link_path)
|
||||
else:
|
||||
assert(0) # unhandled action type
|
||||
|
||||
@@ -127,7 +128,7 @@ def files(action):
|
||||
action([output_prefix + output_file], 'bin/' + output_file)
|
||||
|
||||
if 'true' == variables.get('node_use_dtrace'):
|
||||
- action(['out/Release/node.d'], 'lib/dtrace/node.d')
|
||||
+ action(['out/Release/node.d'], sysconfig.get_config_var("LIB") + '/dtrace/node.d')
|
||||
|
||||
# behave similarly for systemtap
|
||||
action(['src/node.stp'], 'share/systemtap/tapset/')
|
||||
@@ -0,0 +1,33 @@
|
||||
Index: node-v5.3.0/configure
|
||||
===================================================================
|
||||
--- node-v5.3.0.orig/configure
|
||||
+++ node-v5.3.0/configure
|
||||
@@ -9,6 +9,28 @@ import sys
|
||||
import shutil
|
||||
import string
|
||||
|
||||
+# http://stackoverflow.com/questions/28904750/python-check-output-workaround-in-2-6
|
||||
+if "check_output" not in dir( subprocess ): # duck punch it in!
|
||||
+ def check_output(*popenargs, **kwargs):
|
||||
+ r"""Run command with arguments and return its output as a byte string.
|
||||
+ Backported from Python 2.7 as it's implemented as pure python on stdlib.
|
||||
+
|
||||
+ >>> check_output(['/usr/bin/python', '--version'])
|
||||
+ Python 2.6.2+ """
|
||||
+ process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs)
|
||||
+ output, unused_err = process.communicate()
|
||||
+ retcode = process.poll()
|
||||
+ if retcode:
|
||||
+ cmd = kwargs.get("args")
|
||||
+ if cmd is None:
|
||||
+ cmd = popenargs[0]
|
||||
+ error = subprocess.CalledProcessError(retcode, cmd)
|
||||
+ error.output = output
|
||||
+ raise error
|
||||
+ return output
|
||||
+
|
||||
+ subprocess.check_output = check_output
|
||||
+
|
||||
# gcc and g++ as defaults matches what GYP's Makefile generator does,
|
||||
# except on OS X.
|
||||
CC = os.environ.get('CC', 'cc' if sys.platform == 'darwin' else 'gcc')
|
||||
Binary file not shown.
@@ -0,0 +1,73 @@
|
||||
Index: node-v6.3.0/deps/npm/lib/config/core.js
|
||||
===================================================================
|
||||
--- node-v6.3.0.orig/deps/npm/lib/config/core.js
|
||||
+++ node-v6.3.0/deps/npm/lib/config/core.js
|
||||
@@ -151,16 +151,12 @@ function load_ (builtin, rc, cli, cb) {
|
||||
// Eg, `npm config get globalconfig --prefix ~/local` should
|
||||
// return `~/local/etc/npmrc`
|
||||
// annoying humans and their expectations!
|
||||
- if (conf.get('prefix')) {
|
||||
- var etc = path.resolve(conf.get('prefix'), 'etc')
|
||||
+ var etc = path.resolve("/etc/nodejs")
|
||||
mkdirp(etc, function () {
|
||||
defaults.globalconfig = path.resolve(etc, 'npmrc')
|
||||
defaults.globalignorefile = path.resolve(etc, 'npmignore')
|
||||
afterUserContinuation()
|
||||
})
|
||||
- } else {
|
||||
- afterUserContinuation()
|
||||
- }
|
||||
}
|
||||
|
||||
function afterUserContinuation () {
|
||||
Index: node-v6.3.0/deps/npm/lib/help.js
|
||||
===================================================================
|
||||
--- node-v6.3.0.orig/deps/npm/lib/help.js
|
||||
+++ node-v6.3.0/deps/npm/lib/help.js
|
||||
@@ -58,7 +58,7 @@ function help (args, cb) {
|
||||
}
|
||||
|
||||
// npm help <section>: Try to find the path
|
||||
- var manroot = path.resolve(__dirname, '..', 'man')
|
||||
+ var manroot = "/usr/share/man"
|
||||
|
||||
// legacy
|
||||
if (section === 'global') section = 'folders'
|
||||
@@ -108,7 +108,7 @@ function viewMan (man, cb) {
|
||||
var section = path.basename(man, '.' + num)
|
||||
|
||||
// at this point, we know that the specified man page exists
|
||||
- var manpath = path.join(__dirname, '..', 'man')
|
||||
+ var manpath = "/usr/share/man"
|
||||
var env = {}
|
||||
Object.keys(process.env).forEach(function (i) {
|
||||
env[i] = process.env[i]
|
||||
Index: node-v6.3.0/deps/npm/lib/help-search.js
|
||||
===================================================================
|
||||
--- node-v6.3.0.orig/deps/npm/lib/help-search.js
|
||||
+++ node-v6.3.0/deps/npm/lib/help-search.js
|
||||
@@ -18,7 +18,7 @@ function helpSearch (args, silent, cb) {
|
||||
}
|
||||
if (!args.length) return cb(helpSearch.usage)
|
||||
|
||||
- var docPath = path.resolve(__dirname, '..', 'doc')
|
||||
+ var docPath = "/usr/share/doc/packages/nodejs"
|
||||
return glob(docPath + '/*/*.md', function (er, files) {
|
||||
if (er) return cb(er)
|
||||
readFiles(files, function (er, data) {
|
||||
Index: node-v6.3.0/deps/npm/lib/config/defaults.js
|
||||
===================================================================
|
||||
--- node-v6.3.0.orig/deps/npm/lib/config/defaults.js
|
||||
+++ node-v6.3.0/deps/npm/lib/config/defaults.js
|
||||
@@ -102,6 +102,11 @@ Object.defineProperty(exports, 'defaults
|
||||
if (process.env.DESTDIR) {
|
||||
globalPrefix = path.join(process.env.DESTDIR, globalPrefix)
|
||||
}
|
||||
+
|
||||
+ // don't poop all over distro territory - use /usr/local instead
|
||||
+ if (globalPrefix === '/usr') {
|
||||
+ globalPrefix = path.join(globalPrefix, '/local');
|
||||
+ }
|
||||
}
|
||||
|
||||
defaults = {
|
||||
Reference in New Issue
Block a user