commit nodejs for openSUSE:Factory
Hello community, here is the log from the commit of package nodejs for openSUSE:Factory checked in at 2013-04-29 14:08:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nodejs (Old) and /work/SRC/openSUSE:Factory/.nodejs.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "nodejs", Maintainer is "JMassaguerPla@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/nodejs/nodejs.changes 2013-04-23 15:17:37.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.nodejs.new/nodejs.changes 2013-04-29 14:08:08.000000000 +0200 @@ -1,0 +2,10 @@ +Thu Apr 25 18:33:51 UTC 2013 - adaugherity@tamu.edu + +- update to 0.10.5 + +------------------------------------------------------------------- +Thu Apr 25 18:12:39 UTC 2013 - adaugherity@tamu.edu + +- rebase 0.10.4 build/patches against current OBS state + +------------------------------------------------------------------- @@ -18,0 +29,32 @@ + +------------------------------------------------------------------- +Fri Apr 19 20:05:20 UTC 2013 - adaugherity@tamu.edu + +- make v8 version deps explicit, and add more provides (copied from Fedora) + +This will require manually updating the nodejs pkg whenever there's a +minor version bump in v8 (3.x to 3.y, not micro, i.e. 3.x.a to 3.x.b), +but that's better than v8 updates breaking existing nodejs installations. + +------------------------------------------------------------------- +Thu Apr 18 23:31:58 UTC 2013 - adaugherity@tamu.edu + +- Fix build on platforms w/openssl 0.9.8 (e.g. SLES 11). +- Fix -devel subpkg -- manually install headers (copied from Fedora), + and move dtrace and share to -devel subpkg. + + NodeJS <= 0.8 installed headers itself, so this was not previously + necessary. + + NB: Fedora uses an external libuv pkg, but we don't, so we must + also copy libuv headers. + +------------------------------------------------------------------- +Thu Apr 18 14:23:49 UTC 2013 - dimstar@opensuse.org + +- Update to version 0.10.4: + + See https://raw.github.com/joyent/node/v0.10.4/ChangeLog +- Delete no longer needed patches: + + node-v0.8.12_missing_include.patch + + nodejs-devel-lib64path.patch + + nodejs-no-v8-headers.patch +- Rebase nodejs-lib64path.patch and nodejs-libpath.patch. +- Add nodejs-v8-3.18.0.patch: make node.js compatible to V8 3.18.0. Old: ---- node-v0.8.12_missing_include.patch node-v0.8.23.tar.gz nodejs-devel-lib64path.patch nodejs-no-v8-headers.patch nodejs-v8-deprecated-api.patch New: ---- node-v0.10.5.tar.gz nodejs-v8-3.18.0.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nodejs.spec ++++++ --- /var/tmp/diff_new_pack.AeDhzD/_old 2013-04-29 14:08:12.000000000 +0200 +++ /var/tmp/diff_new_pack.AeDhzD/_new 2013-04-29 14:08:12.000000000 +0200 @@ -17,7 +17,7 @@ Name: nodejs -Version: 0.8.23 +Version: 0.10.5 Release: 0 Summary: Evented I/O for V8 JavaScript License: MIT @@ -25,22 +25,23 @@ Url: http://www.nodejs.org Source: http://nodejs.org/dist/v%{version}/node-v%{version}.tar.gz Patch0: nodejs-lib64path.patch -Patch1: nodejs-devel-lib64path.patch Patch2: nodejs-libpath.patch -Patch3: node-v0.8.12_missing_include.patch Patch4: node-gyp-addon-gypi.patch -Patch5: nodejs-no-v8-headers.patch +Patch5: nodejs-v8-3.18.0.patch Patch6: nodejs-openssl-missing-api.patch -Patch7: nodejs-v8-deprecated-api.patch BuildRequires: curl BuildRequires: gcc-c++ BuildRequires: procps -%if 0%{?suse_version} == 1140 -BuildRequires: v8-devel >= 3.7 -%else -BuildRequires: v8-devel >= 3.15.3 -%endif -Requires: %(rpm -q --requires v8-devel | grep libv8) +# V8 presently breaks ABI at least every x.y release while never bumping SONAME, +# so we need to be more explicit. v8_ge may be specified as e.g. +# major.minor.micro-release if necessary. +%global v8_ge 3.18 +%global v8_lt 3.19 +%global v8_abi 3.18 +BuildRequires: v8-devel >= %{v8_ge} +Requires: v8%{?isa} < %{v8_lt} +Requires: v8%{?isa} >= %{v8_ge} + BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} BuildRequires: libopenssl-devel @@ -48,11 +49,19 @@ BuildRequires: openssl-devel %endif BuildRequires: pkg-config -BuildRequires: zlib-devel -# for waf BuildRequires: python +BuildRequires: zlib-devel Provides: npm = %{version} Obsoletes: npm <= 1.0.999 +#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 +Provides: nodejs(abi) = %{nodejs_abi} +Provides: nodejs(v8-abi) = %{v8_abi} + +#this corresponds to the "engine" requirement in package.json +Provides: nodejs(engine) = %{version} + #building nodejs makes sense only on v8 archs ExclusiveArch: %{ix86} x86_64 %{arm} @@ -75,22 +84,14 @@ %setup -q -n node-v%{version} %if %{_lib} == "lib64" %patch0 -p1 -%patch1 %else -%patch2 +%patch2 -p1 %endif -%patch3 -cd deps/npm/node_modules/node-gyp +(cd deps/npm/node_modules/node-gyp %patch4 -p1 -cd - -%patch5 +) +%patch5 -p1 %patch6 - -%if 0%{?suse_version} != 1140 -# nodejs-v8-deprecated-api.patch, only for nodejs 0.8 with v8 >= 3.15.3. -%patch7 -%endif - # Make sure nothing gets included from bundled deps: # We only delete the source and header files, because # the remaining build scripts are still used. @@ -113,6 +114,15 @@ %install %{?make_install} %{!?make_install:make install DESTDIR=$RPM_BUILD_ROOT} +# npm man page +cp -p deps/npm/man/man1/npm.1 %{buildroot}/%{_mandir}/man1 +#install development headers +#FIXME: we probably don't really need *.h but node-gyp downloads the whole +#freaking source tree so I can't be sure ATM +mkdir -p %{buildroot}%{_includedir}/node +cp -p src/*.h %{buildroot}%{_includedir}/node +cp -pR deps/uv/include/* %{buildroot}%{_includedir}/node + #node-gyp needs common.gypi too mkdir -p %{buildroot}%{_datadir}/node cp -p common.gypi %{buildroot}%{_datadir}/node @@ -120,21 +130,15 @@ %files %defattr(-, root, root) %{_bindir}/node -%{_mandir}/*/* -%{_libdir}/dtrace -%{_datadir}/node -#npm -%doc AUTHORS LICENSE +%{_bindir}/npm %{_libdir}/node_modules -%exclude %{_libdir}/node_modules/npm/.npmignore -%attr(755,root,root) %{_bindir}/npm -%attr(755,root,root) %{_libdir}/node_modules/npm/scripts/clean-old.sh -%attr(755,root,root) %{_libdir}/node_modules/npm/scripts/install.sh +%{_mandir}/man1/* +%doc AUTHORS LICENSE %files devel %defattr(-, root, root) -%{_bindir}/node-waf %{_includedir}/node -%{_libdir}/node +%{_libdir}/dtrace +%{_datadir}/node %changelog ++++++ node-v0.8.23.tar.gz -> node-v0.10.5.tar.gz ++++++ /work/SRC/openSUSE:Factory/nodejs/node-v0.8.23.tar.gz /work/SRC/openSUSE:Factory/.nodejs.new/node-v0.10.5.tar.gz differ: char 5, line 1 ++++++ nodejs-lib64path.patch ++++++ --- /var/tmp/diff_new_pack.AeDhzD/_old 2013-04-29 14:08:12.000000000 +0200 +++ /var/tmp/diff_new_pack.AeDhzD/_new 2013-04-29 14:08:12.000000000 +0200 @@ -1,37 +1,21 @@ -diff -urN node-v0.8.18/lib/module.js node-v0.8.18-patch/lib/module.js ---- node-v0.8.18/lib/module.js 2013-01-18 22:15:41.000000000 +0200 -+++ node-v0.8.18-patch/lib/module.js 2013-01-25 08:26:59.000000000 +0200 -@@ -493,7 +493,7 @@ - }; +Index: node-v0.10.4/lib/module.js +=================================================================== +--- node-v0.10.4.orig/lib/module.js ++++ node-v0.10.4/lib/module.js +@@ -508,7 +508,7 @@ Module._initPaths = function() { + var homeDir = process.env.HOME; + } - Module._initPaths = function() { - var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')]; + var paths = ["/usr/lib/node", "/usr/lib64/node"]; - if (process.env['HOME']) { - paths.unshift(path.resolve(process.env['HOME'], '.node_libraries')); -diff -urN node-v0.8.18/tools/install.py node-v0.8.18-patch/tools/install.py ---- node-v0.8.18/tools/install.py 2013-01-18 22:15:41.000000000 +0200 -+++ node-v0.8.18-patch/tools/install.py 2013-01-25 08:26:59.000000000 +0200 -@@ -97,7 +97,7 @@ - 'tools/wafadmin/TaskGen.py', - 'tools/wafadmin/Task.py', - 'tools/wafadmin/Utils.py'], -- 'lib/node/wafadmin/') -+ 'lib64/node/wafadmin/') - action(['tools/wafadmin/Tools/ar.py', - 'tools/wafadmin/Tools/cc.py', - 'tools/wafadmin/Tools/ccroot.py', -@@ -131,7 +131,7 @@ - 'tools/wafadmin/Tools/winres.py', - 'tools/wafadmin/Tools/xlc.py', - 'tools/wafadmin/Tools/xlcxx.py'], -- 'lib/node/wafadmin/Tools/') -+ 'lib64/node/wafadmin/Tools/') - - def update_shebang(path, shebang): - print 'updating shebang of %s to %s' % (path, shebang) -@@ -140,7 +140,7 @@ + if (homeDir) { + paths.unshift(path.resolve(homeDir, '.node_libraries')); +Index: node-v0.10.4/tools/install.py +=================================================================== +--- node-v0.10.4.orig/tools/install.py ++++ node-v0.10.4/tools/install.py +@@ -86,7 +86,7 @@ def update_shebang(path, shebang): open(path, 'w').write(s) def npm_files(action): @@ -40,7 +24,7 @@ # don't install npm if the target path is a symlink, it probably means # that a dev version of npm is installed there -@@ -158,7 +158,7 @@ +@@ -104,7 +104,7 @@ def npm_files(action): if action == uninstall: action([link_path], 'bin/npm') elif action == install: @@ -49,7 +33,7 @@ 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 -@@ -201,7 +201,7 @@ +@@ -124,7 +124,7 @@ def files(action): # install unconditionally, checking if the platform supports dtrace doesn't # work when cross-compiling and besides, there's at least one linux flavor # with dtrace support now (oracle's "unbreakable" linux) ++++++ nodejs-libpath.patch ++++++ --- /var/tmp/diff_new_pack.AeDhzD/_old 2013-04-29 14:08:12.000000000 +0200 +++ /var/tmp/diff_new_pack.AeDhzD/_new 2013-04-29 14:08:12.000000000 +0200 @@ -1,11 +1,13 @@ ---- ../node-v0.4.11.original/lib/module.js 2011-08-17 18:18:10.000000000 -0700 -+++ lib/module.js 2011-08-22 14:36:11.662283878 -0700 -@@ -422,7 +422,7 @@ - }; +Index: node-v0.10.4/lib/module.js +=================================================================== +--- node-v0.10.4.orig/lib/module.js ++++ node-v0.10.4/lib/module.js +@@ -508,7 +508,7 @@ Module._initPaths = function() { + var homeDir = process.env.HOME; + } - Module._initPaths = function() { - var paths = [path.resolve(process.execPath, '..', '..', 'lib', 'node')]; + var paths = ["/usr/lib/node"]; - if (process.env['HOME']) { - paths.unshift(path.resolve(process.env['HOME'], '.node_libraries')); + if (homeDir) { + paths.unshift(path.resolve(homeDir, '.node_libraries')); ++++++ nodejs-openssl-missing-api.patch ++++++ --- /var/tmp/diff_new_pack.AeDhzD/_old 2013-04-29 14:08:12.000000000 +0200 +++ /var/tmp/diff_new_pack.AeDhzD/_new 2013-04-29 14:08:12.000000000 +0200 @@ -1,14 +1,97 @@ -index fe43359..2c8a557 100644 ---- src/node_crypto.h -+++ src/node_crypto.h -@@ -43,6 +43,10 @@ +NodeJS 0.10 uses APIs introduced with OpenSSL 1.0.0. To make it build against +OpenSSL 0.9.8 we must revert some API changes (298f6bf) and copy some missing +structs/functions from OpenSSL 1.0.0. + +A better long-term solution might be to have the RPM depend on openssl>=1.0.0 +and statically link with the bundled OpenSSL on platforms lacking it. +--- src/node_crypto.cc.orig 2013-04-18 14:27:08.000000000 -0500 ++++ src/node_crypto.cc 2013-04-18 17:37:52.000000000 -0500 +@@ -84,8 +84,13 @@ + static uv_rwlock_t* locks; - #define EVP_F_EVP_DECRYPTFINAL 101 -+#if OPENSSL_VERSION_NUMBER <= 0x009080afL -+# define EVP_PKEY_id(pkey) ((pkey)->type) ++#if OPENSSL_VERSION_NUMBER >= 0x10000000L + static void crypto_threadid_cb(CRYPTO_THREADID* tid) { + CRYPTO_THREADID_set_numeric(tid, uv_thread_self()); ++#else ++static unsigned long crypto_id_cb(void) { ++ return (unsigned long) pthread_self(); +#endif + } + + +@@ -3996,6 +4001,62 @@ + arr->Set(arr->Length(), String::New(from)); + } + ++#if OPENSSL_VERSION_NUMBER < 0x10000000L ++/* Missing structs & functions copied from openssl-1.0.0 evp/names.c, with ++ * explicit casts added to make the C++ compiler happy. ++ */ ++extern "C" { ++struct doall_cipher ++ { ++ void *arg; ++ void (*fn)(const EVP_CIPHER *ciph, ++ const char *from, const char *to, void *arg); ++ }; ++ ++static void do_all_cipher_fn(const OBJ_NAME *nm, void *arg) ++ { ++ struct doall_cipher *dc = (doall_cipher *)arg; ++ if (nm->alias) ++ dc->fn(NULL, nm->name, nm->data, dc->arg); ++ else ++ dc->fn((const EVP_CIPHER *)nm->data, nm->name, NULL, dc->arg); ++ } ++ ++void EVP_CIPHER_do_all_sorted(void (*fn)(const EVP_CIPHER *ciph, ++ const char *from, const char *to, void *x), void *arg) ++ { ++ struct doall_cipher dc; ++ dc.fn = fn; ++ dc.arg = arg; ++ OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_CIPHER_METH, do_all_cipher_fn,&dc); ++ } ++ ++struct doall_md ++ { ++ void *arg; ++ void (*fn)(const EVP_MD *ciph, ++ const char *from, const char *to, void *arg); ++ }; + ++static void do_all_md_fn(const OBJ_NAME *nm, void *arg) ++ { ++ struct doall_md *dc = (doall_md *)arg; ++ if (nm->alias) ++ dc->fn(NULL, nm->name, nm->data, dc->arg); ++ else ++ dc->fn((const EVP_MD *)nm->data, nm->name, NULL, dc->arg); ++ } ++ ++void EVP_MD_do_all_sorted(void (*fn)(const EVP_MD *md, ++ const char *from, const char *to, void *x), void *arg) ++ { ++ struct doall_md dc; ++ dc.fn = fn; ++ dc.arg = arg; ++ OBJ_NAME_do_all_sorted(OBJ_NAME_TYPE_MD_METH, do_all_md_fn, &dc); ++ } ++} ++#endif + + Handle<Value> GetCiphers(const Arguments& args) { + HandleScope scope; +@@ -4024,7 +4085,11 @@ + + crypto_lock_init(); + CRYPTO_set_locking_callback(crypto_lock_cb); ++#if OPENSSL_VERSION_NUMBER >= 0x10000000L + CRYPTO_THREADID_set_callback(crypto_threadid_cb); ++#else ++ CRYPTO_set_id_callback(crypto_id_cb); ++#endif - namespace node { - namespace crypto { + // Turn off compression. Saves memory - do it in userland. + #if !defined(OPENSSL_NO_COMP) ++++++ nodejs-v8-deprecated-api.patch -> nodejs-v8-3.18.0.patch ++++++ ++++ 1111 lines (skipped) ++++ between /work/SRC/openSUSE:Factory/nodejs/nodejs-v8-deprecated-api.patch ++++ and /work/SRC/openSUSE:Factory/.nodejs.new/nodejs-v8-3.18.0.patch -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de