Hello community, here is the log from the commit of package nodejs for openSUSE:Factory checked in at 2015-09-17 09:18:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nodejs (Old) and /work/SRC/openSUSE:Factory/.nodejs.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nodejs" Changes: -------- --- /work/SRC/openSUSE:Factory/nodejs/nodejs.changes 2015-08-05 06:51:02.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.nodejs.new/nodejs.changes 2015-09-17 09:18:47.000000000 +0200 @@ -1,0 +2,40 @@ +Sat Sep 12 05:38:35 UTC 2015 - [email protected] + +- update to 4.0.0 + * child_process: ChildProcess.prototype.send() and process.send() + operate asynchronously across all platforms so an optional + callback parameter has been introduced that will be invoked once + the message has been sent. + * node: Rename "io.js" code to "Node.js". + * node-gyp: This release bundles an updated version of node-gyp + that works with all versions of Node.js and io.js including + nightly and release candidate builds. From io.js v3 and Node.js + v4 onward, it will only download a headers tarball when building + addons rather than the entire source. + * npm: Upgrade to version 2.14.2 from 2.13.3, includes a security + update. + * timers: Improved timer performance from porting the 0.12 + implementation, plus minor fixes. + * util: The util.is*() functions have been deprecated, beginning + with deprecation warnings in the documentation for this release, + users are encouraged to seek more robust alternatives in the + npm registry. + * v8: Upgrade to version 4.5.103.30 from 4.4.63.30 + + Implement new TypedArray prototype methods: copyWithin(), + every(), fill(), filter(), find(), findIndex(), forEach(), + indexOf(), join(), lastIndexOf(), map(), reduce(), + reduceRight(), reverse(), slice(), some(), sort(). + + Implement new TypedArray.from() and TypedArray.of() functions. + + Implement arrow functions +- drop nodejs-openssl-missing-api.patch: it's for 0.9.8. +- ppc/ppc64(le) is natively supported since nodejs 3.0.0. + so drop nodejs-v0.12.7-release-ppc.patch.bz2 +- drop node-gcc5.patch, upstream fixed +- add nodejs-lib64path.patch, adjust libdir +- add nodejs-libpath.patch, adjust libdir +- add node-gyp-addon-gypi.patch + * use custom addon.gypi by default instead of downloading + node source +- add node_modules clean up codes + +------------------------------------------------------------------- Old: ---- README.SUSE.PowerPC node-gcc5.patch node-v0.12.7.tar.gz nodejs-openssl-missing-api.patch nodejs-v0.12.7-release-ppc.patch.bz2 New: ---- node-gyp-addon-gypi.patch node-v4.0.0.tar.xz nodejs-lib64path.patch nodejs-libpath.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nodejs.spec ++++++ --- /var/tmp/diff_new_pack.hnSIoH/_old 2015-09-17 09:18:48.000000000 +0200 +++ /var/tmp/diff_new_pack.hnSIoH/_new 2015-09-17 09:18:48.000000000 +0200 @@ -17,39 +17,36 @@ Name: nodejs -Version: 0.12.7 +Version: 4.0.0 Release: 0 Summary: Evented I/O for V8 JavaScript License: MIT -Group: Development/Languages/Other +Group: Development/Languages/NodeJS Url: http://www.nodejs.org -Source: http://nodejs.org/dist/v%{version}/node-v%{version}.tar.gz -Source99: README.SUSE.PowerPC -Patch1: nodejs-openssl-missing-api.patch -Patch2: nodejs-v%{version}-release-ppc.patch.bz2 +Source: http://nodejs.org/dist/v%{version}/node-v%{version}.tar.xz Patch3: support-arm64-build.patch -#PATCH-FIX-UPTREAM [email protected] fix gcc 5 version detection -Patch4: node-gcc5.patch +Patch5: nodejs-lib64path.patch +Patch6: nodejs-libpath.patch +# PATCH-FIX-UPSTREAM use custom addon.gypi by default instead of downloading node source +Patch7: node-gyp-addon-gypi.patch BuildRequires: curl +BuildRequires: fdupes BuildRequires: gcc-c++ -BuildRequires: procps -BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} BuildRequires: libopenssl-devel %else BuildRequires: openssl-devel %endif -BuildRequires: libopenssl-devel BuildRequires: pkg-config +BuildRequires: procps BuildRequires: python +BuildRequires: xz BuildRequires: zlib-devel Recommends: nodejs-npm = %{version} -#BuildRequires: v8-devel -#BuildRequires: libcares-devel #we need ABI virtual provides where SONAMEs aren't enough/not present so deps #break when binary compatibility is broken -%global nodejs_abi 0.10 +%global nodejs_abi 4.0 Provides: nodejs(abi) = %{nodejs_abi} #this corresponds to the "engine" requirement in package.json @@ -57,22 +54,21 @@ #building nodejs makes sense only on v8 archs ExclusiveArch: %{ix86} x86_64 armv7hl aarch64 ppc ppc64 ppc64le s390x +BuildRoot: %{_tmppath}/%{name}-%{version}-build %description -Provides an easy way to build scalable network programs -http://nodejs.org +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/Other +Group: Development/Languages/NodeJS Requires: %{name} = %{version} -Requires: gcc-c++ -Requires: python %description devel -Provides an easy way to build scalable network programs -http://nodejs.org - +This package provides development headers for Node.js. %package docs Summary: Node.js API documentation @@ -87,26 +83,25 @@ %package npm Summary: Package manager for Node.js (Bundled) -Group: Development/Languages/other +Group: Development/Languages/NodeJS Requires: %{name} = %{version} -Provides: npm = 2.11.3 -Obsoletes: npm <= 2.11.3 -Provides: npm(npm) = 2.11.3 +Provides: npm = 2.11.4 +Obsoletes: npm < 2.11.4 +Provides: npm(npm) = 2.11.4 Conflicts: otherproviders(npm(npm)) -%if 0%{?suse_version} >= 1200 -BuildArch: noarch -%endif %description npm A package manager for Node.js, bundled in nodejs. %prep %setup -q -n node-v%{version} -# need rebase -#%patch1 -p0 -%patch2 -p1 -%patch3 -%patch4 -p1 +%patch3 -p1 +%if %{_lib} == "lib64" +%patch5 -p1 +%else +%patch6 -p1 +%endif +%patch7 -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. @@ -115,9 +110,6 @@ find deps/$dir -name *.[ch] -delete done -# remove .orig file -find . -name "*.orig" -type f -delete -print - %build # percent-configure pulls in something that confuses node's configure # script, so we'll do it thus: @@ -137,8 +129,7 @@ --gdb \ %endif --without-dtrace -# --shared-v8 \ -# --shared-cares + %ifarch aarch64 make DESTCPU=arm64 %else @@ -150,7 +141,11 @@ %endif %install -%{?make_install} %{!?make_install:make install DESTDIR=$RPM_BUILD_ROOT} +make install DESTDIR=%{buildroot} %{?_smp_mflags} +rm -rf %{buildroot}%{_datadir}/doc/node + +# npm man page +install -m 644 deps/npm/man/man1/npm.1 %{buildroot}%{_mandir}/man1 #node-gyp needs common.gypi too mkdir -p %{buildroot}%{_datadir}/node @@ -159,31 +154,51 @@ # Documentation install -d %{buildroot}%{_docdir}/%{name} cp -r doc/api %{buildroot}%{_docdir}/%{name}/ -cp -r {AUTHORS,ChangeLog,CONTRIBUTING.md,LICENSE,README.md} %{buildroot}%{_docdir}/%{name}/ # Own nodejs_sitelib -install -d %{buildroot}%{_prefix}/lib/node_modules +install -d %{buildroot}%{_libexecdir}/node_modules -# fix permission -chmod 0644 %{buildroot}%{_includedir}/node/v8-debug.h +# clean +# file duplicates +%fdupes %{buildroot}%{_libdir}/node_modules/npm/ +%fdupes %{buildroot}%{_includedir}/node +# hidden files +find %{buildroot}%{_libdir}/node_modules/npm -name ".*" -delete +# 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 %files %defattr(-, root, root) +%doc AUTHORS LICENSE *.md +%dir %{_libexecdir}/node_modules %{_bindir}/node %{_prefix}/lib/node_modules -%{_mandir}/man1/* -%dir %{_docdir}/%{name} -%{_docdir}/%{name}/AUTHORS -%{_docdir}/%{name}/ChangeLog -%{_docdir}/%{name}/CONTRIBUTING.md -%{_docdir}/%{name}/LICENSE -%{_docdir}/%{name}/README.md -%exclude %{_prefix}/lib/node_modules/npm +%{_mandir}/man1/node.1%{ext_man} +%exclude %{_libdir}/node_modules/npm +%exclude %{_docdir}/%{name}/api %files npm %defattr(-, root, root) %{_bindir}/npm -%{_prefix}/lib/node_modules/npm +%dir %{_libdir}/node_modules +%{_libdir}/node_modules/npm +%{_mandir}/man1/npm.1%{ext_man} %files devel %defattr(-, root, root) ++++++ node-gyp-addon-gypi.patch ++++++ Index: node-v4.0.0/addon-rpm.gypi =================================================================== --- /dev/null +++ node-v4.0.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-v4.0.0/deps/npm/node_modules/node-gyp/lib/configure.js =================================================================== --- node-v4.0.0.orig/deps/npm/node_modules/node-gyp/lib/configure.js +++ node-v4.0.0/deps/npm/node_modules/node-gyp/lib/configure.js @@ -140,10 +140,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 @@ -158,6 +154,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() + } } } @@ -301,7 +303,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) ++++++ nodejs-lib64path.patch ++++++ Index: node-v4.0.0/lib/module.js =================================================================== --- node-v4.0.0.orig/lib/module.js +++ node-v4.0.0/lib/module.js @@ -486,7 +486,7 @@ Module._initPaths = function() { var homeDir = process.env.HOME; } - var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')]; + var paths = ["/usr/lib/node", "/usr/lib64/node"]; if (homeDir) { paths.unshift(path.resolve(homeDir, '.node_libraries')); Index: node-v4.0.0/tools/install.py =================================================================== --- node-v4.0.0.orig/tools/install.py +++ node-v4.0.0/tools/install.py @@ -86,7 +86,7 @@ def update_shebang(path, shebang): open(path, 'w').write(s) def npm_files(action): - target_path = 'lib/node_modules/npm/' + target_path = 'lib64/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 @@ -104,7 +104,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('../lib64/node_modules/npm/bin/npm-cli.js', link_path) if os.environ.get('PORTABLE'): # This crazy hack is necessary to make the shebang execute the copy # of node relative to the same directory as the npm script. The precompiled @@ -133,7 +133,7 @@ def files(action): action(['out/Release/node' + exeext], 'bin/node' + exeext) if 'true' == variables.get('node_use_dtrace'): - action(['out/Release/node.d'], 'lib/dtrace/node.d') + action(['out/Release/node.d'], 'lib64/dtrace/node.d') # behave similarly for systemtap action(['src/node.stp'], 'share/systemtap/tapset/') ++++++ nodejs-libpath.patch ++++++ Index: node-v4.0.0/lib/module.js =================================================================== --- node-v4.0.0.orig/lib/module.js +++ node-v4.0.0/lib/module.js @@ -486,7 +486,7 @@ Module._initPaths = function() { var homeDir = process.env.HOME; } - var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')]; + var paths = ["/usr/lib/node"]; if (homeDir) { paths.unshift(path.resolve(homeDir, '.node_libraries')); ++++++ support-arm64-build.patch ++++++ --- /var/tmp/diff_new_pack.hnSIoH/_old 2015-09-17 09:18:48.000000000 +0200 +++ /var/tmp/diff_new_pack.hnSIoH/_new 2015-09-17 09:18:48.000000000 +0200 @@ -1,30 +1,34 @@ ---- configure -+++ configure -@@ -444,6 +444,7 @@ - matchup = { - '__x86_64__' : 'x64', - '__i386__' : 'ia32', -+ '__aarch64__' : 'arm64', - '__arm__' : 'arm', - '__mips__' : 'mips', - '__PPC64__' : 'ppc64', ---- Makefile -+++ Makefile -@@ -255,6 +255,9 @@ +Index: node-v4.0.0/Makefile +=================================================================== +--- node-v4.0.0.orig/Makefile ++++ node-v4.0.0/Makefile +@@ -270,6 +270,9 @@ else ifeq ($(DESTCPU),arm) ARCH=arm else +ifeq ($(DESTCPU),arm64) +ARCH=arm64 +else - ifeq ($(DESTCPU),ppc) - ARCH=ppc + ifeq ($(DESTCPU),ppc64) + ARCH=ppc64 else -@@ -271,6 +274,7 @@ +@@ -280,6 +283,7 @@ ARCH=x86 endif endif endif +endif endif - endif - endif + + # enforce "x86" over "ia32" as the generally accepted way of referring to 32-bit intel +Index: node-v4.0.0/configure +=================================================================== +--- node-v4.0.0.orig/configure ++++ node-v4.0.0/configure +@@ -560,6 +560,7 @@ def host_arch_cc(): + '__aarch64__' : 'arm64', + '__arm__' : 'arm', + '__i386__' : 'ia32', ++ '__aarch64__' : 'arm64', + '__mips__' : 'mips', + '__PPC64__' : 'ppc64', + '__PPC__' : 'ppc',
