Hello community,

here is the log from the commit of package nodejs for openSUSE:Factory checked 
in at 2013-02-12 16:41:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nodejs (Old)
 and      /work/SRC/openSUSE:Factory/.nodejs.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nodejs", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/nodejs/nodejs.changes    2012-11-26 
19:00:14.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.nodejs.new/nodejs.changes       2013-02-12 
16:41:26.000000000 +0100
@@ -1,0 +2,16 @@
+Thu Jan 31 16:08:14 CST 2013 - [email protected]
+
+- fix node-gyp to use the system v8 headers instead of those bundled with 
nodejs
+    * Without this, dependencies installed via npm will be built against
+      the bundled v8 (3.11.10) but linked against the system libv8 (currently
+      3.16.x) which has ABI incompatibilites, and fail to run with symbol
+      errors.
+    * 3.16 ABI change: 
http://upstream-tracker.org/compat_reports/v8/3.15.11.7_to_3.16.0/abi_compat_report.html
+    * node-gyp patch taken from Fedora SRPM -- 
https://bugzilla.redhat.com/show_bug.cgi?id=891175#c7
+- remove bundled sources for shared dependencies, a la the Fedora 18
+  updates-testing package (but simplified a bit)
+    * without doing this, /usr/include/node will still have the 3.11.0
+      v8 headers, and node-gyp will remain broken
+- patch tools/install.py to not install these removed headers
+
+-------------------------------------------------------------------

Old:
----
  node-v0.8.12.tar.gz

New:
----
  node-gyp-addon-gypi.patch
  node-v0.8.18.tar.gz
  nodejs-no-v8-headers.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ nodejs.spec ++++++
--- /var/tmp/diff_new_pack.A8E5ED/_old  2013-02-12 16:41:28.000000000 +0100
+++ /var/tmp/diff_new_pack.A8E5ED/_new  2013-02-12 16:41:28.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package nodejs
 #
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           nodejs
-Version:        0.8.12
+Version:        0.8.18
 Release:        0
 Summary:        Evented I/O for V8 JavaScript
 License:        MIT
@@ -28,6 +28,8 @@
 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
 BuildRequires:  curl
 BuildRequires:  gcc-c++
 BuildRequires:  procps
@@ -64,12 +66,22 @@
 %prep
 %setup -q -n node-v%{version}
 %if %{_lib} == "lib64"
-%patch0
+%patch0 -p1
 %patch1
 %else
 %patch2
 %endif
 %patch3
+cd deps/npm/node_modules/node-gyp
+%patch4 -p1 
+cd -
+%patch5
+# Make sure nothing gets included from bundled deps:
+# We only delete the source and header files, because
+# the remaining build scripts are still used.
+for dir in v8 openssl zlib; do
+  find deps/$dir -name *.[ch] -delete
+done
 
 %build
 # percent-configure pulls in something that confuses node's configure
@@ -86,12 +98,16 @@
 
 %install
 %{?make_install} %{!?make_install:make install DESTDIR=$RPM_BUILD_ROOT}
+#node-gyp needs common.gypi too
+mkdir -p %{buildroot}%{_datadir}/node
+cp -p common.gypi %{buildroot}%{_datadir}/node
 
 %files
 %defattr(-, root, root)
 %{_bindir}/node
 %{_mandir}/*/*
 %{_libdir}/dtrace
+%{_datadir}/node
 #npm
 %doc AUTHORS LICENSE
 %{_libdir}/node_modules

++++++ node-gyp-addon-gypi.patch ++++++
>From 32f9dc9b1e22ce0ba4a7ca4f40dee023682e5e52 Mon Sep 17 00:00:00 2001
From: "T.C. Hollingsworth" <[email protected]>
Date: Sat, 5 Jan 2013 02:28:01 -0700
Subject: [PATCH 1/2] use custom addon.gypi by default instead of downloading
 node source

---
 addon-rpm.gypi   | 35 +++++++++++++++++++++++++++++++++++
 lib/configure.js | 38 ++++++++++++++++++++------------------
 2 files changed, 55 insertions(+), 18 deletions(-)
 create mode 100644 addon-rpm.gypi

diff --git a/addon-rpm.gypi b/addon-rpm.gypi
new file mode 100644
index 0000000..3e259ef
--- /dev/null
+++ b/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' ],
+      }]
+    ]
+  }
+}
diff --git a/lib/configure.js b/lib/configure.js
index 82de1e6..0e6f76a 100644
--- a/lib/configure.js
+++ b/lib/configure.js
@@ -206,26 +206,27 @@ function configure (gyp, argv, callback) {
         // if --target was given, then determine a target version to compile 
for
         versionStr = gyp.opts.target
         log.verbose('get node dir', 'compiling against --target node version: 
%s', versionStr)
-      } else {
-        // if no --target was specified then use the current host node version
-        versionStr = process.version
-        log.verbose('get node dir', 'no --target version specified, falling 
back to host node version: %s', versionStr)
-      }
 
-      // make sure we have a valid version
-      version = semver.parse(versionStr)
-      if (!version) {
-        return callback(new Error('Invalid version number: ' + versionStr))
-      }
+        // make sure we have a valid version
+        version = semver.parse(versionStr)
+        if (!version) {
+            return callback(new Error('Invalid version number: ' + versionStr))
+        }
 
-      // ensure that the target node version's dev files are installed
-      gyp.opts.ensure = true
-      gyp.commands.install([ versionStr ], function (err, version) {
-        if (err) return callback(err)
-        log.verbose('get node dir', 'target node version installed:', version)
-        nodeDir = path.resolve(gyp.devDir, version)
+        // ensure that the target node version's dev files are installed
+        gyp.opts.ensure = true
+        gyp.commands.install([ versionStr ], function (err, version) {
+            if (err) return callback(err)
+            log.verbose('get node dir', 'target node version installed:', 
version)
+            nodeDir = path.resolve(gyp.devDir, version)
+            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()
-      })
+      }
     }
   }
 
@@ -379,7 +380,8 @@ function configure (gyp, argv, callback) {
 
     // this logic ported from the old `gyp_addon` python file
     var gyp_script = path.resolve(__dirname, '..', 'gyp', 'gyp')
-    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, 'common.gypi')
     var output_dir = 'build'
     if (win) {
-- 
1.7.11.7

++++++ node-v0.8.12.tar.gz -> node-v0.8.18.tar.gz ++++++
/work/SRC/openSUSE:Factory/nodejs/node-v0.8.12.tar.gz 
/work/SRC/openSUSE:Factory/.nodejs.new/node-v0.8.18.tar.gz differ: char 5, line 
1

++++++ nodejs-lib64path.patch ++++++
--- /var/tmp/diff_new_pack.A8E5ED/_old  2013-02-12 16:41:28.000000000 +0100
+++ /var/tmp/diff_new_pack.A8E5ED/_new  2013-02-12 16:41:28.000000000 +0100
@@ -1,8 +1,7 @@
-Index: lib/module.js
-===================================================================
---- lib/module.js.orig
-+++ lib/module.js
-@@ -493,7 +493,7 @@ Module.runMain = function() {
+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 @@
  };
  
  Module._initPaths = function() {
@@ -11,11 +10,10 @@
  
    if (process.env['HOME']) {
      paths.unshift(path.resolve(process.env['HOME'], '.node_libraries'));
-Index: tools/install.py
-===================================================================
---- tools/install.py.orig
-+++ tools/install.py
-@@ -92,7 +92,7 @@ def waf_files(action):
+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'],
@@ -24,7 +22,7 @@
    action(['tools/wafadmin/Tools/ar.py',
            'tools/wafadmin/Tools/cc.py',
            'tools/wafadmin/Tools/ccroot.py',
-@@ -126,7 +126,7 @@ def waf_files(action):
+@@ -131,7 +131,7 @@
            'tools/wafadmin/Tools/winres.py',
            'tools/wafadmin/Tools/xlc.py',
            'tools/wafadmin/Tools/xlcxx.py'],
@@ -33,7 +31,7 @@
  
  def update_shebang(path, shebang):
    print 'updating shebang of %s to %s' % (path, shebang)
-@@ -135,7 +135,7 @@ def update_shebang(path, shebang):
+@@ -140,7 +140,7 @@
    open(path, 'w').write(s)
  
  def npm_files(action):
@@ -42,7 +40,7 @@
  
    # don't install npm if the target path is a symlink, it probably means
    # that a dev version of npm is installed there
-@@ -153,7 +153,7 @@ def npm_files(action):
+@@ -158,7 +158,7 @@
    if action == uninstall:
      action([link_path], 'bin/npm')
    elif action == install:
@@ -51,12 +49,12 @@
      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
-@@ -197,7 +197,7 @@ def files(action):
+@@ -201,7 +201,7 @@
    # 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)
 -  action(['src/node.d'], 'lib/dtrace/')
 +  action(['src/node.d'], 'lib64/dtrace/')
  
-   if 'true' == variables.get('node_install_waf'): waf_files(action)
-   if 'true' == variables.get('node_install_npm'): npm_files(action)
+   if 'freebsd' in sys.platform or 'openbsd' in sys.platform:
+     action(['doc/node.1'], 'man/man1/')

++++++ nodejs-no-v8-headers.patch ++++++
Once nodejs is updated to the 0.9 branch (or newer), this patch will no longer
be necessary.  (Ref: github.com/joyent/node commit 5d9968f53d).
--- tools/install.py.orig       2013-01-31 15:34:48.000000000 -0600
+++ tools/install.py    2013-01-31 15:41:33.000000000 -0600
@@ -176,12 +176,6 @@
   action(['deps/uv/include/ares.h',
           'deps/uv/include/ares_version.h',
           'deps/uv/include/uv.h',
-          'deps/v8/include/v8-debug.h',
-          'deps/v8/include/v8-preparser.h',
-          'deps/v8/include/v8-profiler.h',
-          'deps/v8/include/v8-testing.h',
-          'deps/v8/include/v8.h',
-          'deps/v8/include/v8stdint.h',
           'src/eio-emul.h',
           'src/ev-emul.h',
           'src/node.h',
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to