Hello community,

here is the log from the commit of package nodejs for openSUSE:Factory checked 
in at 2016-01-01 19:48:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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-12-29 
12:59:31.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.nodejs.new/nodejs.changes       2016-01-01 
19:50:58.000000000 +0100
@@ -1,0 +2,17 @@
+Tue Dec 29 15:17:47 UTC 2015 - [email protected]
+
+- fix boo#955142: SLES11 compliance of build process
+  * usage of g++ 4.8 needs to be specified on SLES11
+  * python 2.6 does not include the check_output method
+    used in the configure script. We need to patch it
+    into the script
+- add patch: nodejs-sle11-python26-check_output.patch
+- adjust packaging method for nodejs-doc
+  * %{_docdir} will be recreated anyway when *.md is
+    added through %doc macro, so we can't install doc/api
+    in %install section on sle11
+- adjust packaging method for nodejs_sitelib
+  * "install -d" won't work on sle11 for %{_libexecdir},
+    replace with "mkdir -p"
+
+-------------------------------------------------------------------

New:
----
  nodejs-sle11-python26-check_output.patch

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

Other differences:
------------------
++++++ nodejs.spec ++++++
--- /var/tmp/diff_new_pack.WgJPB9/_old  2016-01-01 19:50:59.000000000 +0100
+++ /var/tmp/diff_new_pack.WgJPB9/_new  2016-01-01 19:50:59.000000000 +0100
@@ -24,15 +24,23 @@
 Group:          Development/Languages/NodeJS
 Url:            http://www.nodejs.org
 Source:         http://nodejs.org/dist/v%{version}/node-v%{version}.tar.xz
-Patch3:         support-arm64-build.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
+Patch:          support-arm64-build.patch
+Patch1:         nodejs-lib64path.patch
+Patch2:         nodejs-libpath.patch
+# PATCH-FIX-UPSTREAM use custom addon.gypi by default instead of
+# downloading node source
+Patch3:         node-gyp-addon-gypi.patch
+# PATCH-FIX-SLES python 2.6 doesn't include the check_output method
+# used in the configure, we need to patch it into the script
+Patch4:         nodejs-sle11-python26-check_output.patch
 BuildRequires:  binutils-gold
 BuildRequires:  curl
 BuildRequires:  fdupes
+%if 0%{?sles_version} == 11
+BuildRequires:  gcc48-c++
+%else
 BuildRequires:  gcc-c++
+%endif
 %if 0%{?suse_version}
 BuildRequires:  libopenssl-devel
 %else
@@ -43,7 +51,7 @@
 BuildRequires:  python
 BuildRequires:  xz
 BuildRequires:  zlib-devel
-Recommends:     npm = %{version}
+Recommends:     npm(npm) = %{version}
 
 #we need ABI virtual provides where SONAMEs aren't enough/not present so deps
 #break when binary compatibility is broken
@@ -71,17 +79,6 @@
 %description devel
 This package provides development headers for Node.js.
 
-%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.
-
 %package -n npm
 Summary:        Package manager for Node.js
 Group:          Development/Languages/NodeJS
@@ -94,19 +91,34 @@
 %description -n npm
 A package manager for Node.js.
 
+%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
 %setup -q -n node-v%{version}
-%patch3 -p1
+%patch -p1
 %if %{_lib} == "lib64"
-%patch5 -p1
+%patch1 -p1
 %else
-%patch6 -p1
+%patch2 -p1
+%endif
+%patch3 -p1
+# add check_output to configure script (not part of python
+# 2.6 in SLES11)
+%if 0%{?sles_version} == 11
+%patch4 -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.
-###for dir in v8 openssl zlib; do
 %if 0%{?suse_version} > 1320
 for dir in openssl zlib; do
   find deps/$dir -name *.[ch] -delete
@@ -120,6 +132,11 @@
 # script, so we'll do it thus:
 export CFLAGS="%{optflags}"
 export CXXFLAGS="%{optflags}"
+# SLE_11_SP4 compatible
+%if 0%{?sles_version} == 11
+export CXX="g++-4.8"
+%endif
+
 ./configure \
     --prefix=%{_prefix} \
 %if 0%{?suse_version} > 1320
@@ -148,27 +165,31 @@
 %endif
 
 %install
+# sles: install-no-mkdir-buildroot
+%if 0%{?sles_version} == 11
+rm -rf %{buildroot} && mkdir %{buildroot}
+%endif
+
 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
+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
 mkdir -p %{buildroot}%{_libdir}/node_modules/npm/node_modules/node-gyp/
 install -m 644 common.gypi \
        %{buildroot}%{_libdir}/node_modules/npm/node_modules/node-gyp/
-
 # install addon-rpm.gypi
 install -m 644 addon-rpm.gypi \
        %{buildroot}%{_libdir}/node_modules/npm/node_modules/node-gyp/
 
-# Documentation
-install -d %{buildroot}%{_docdir}/%{name}
-cp -r doc/api %{buildroot}%{_docdir}/%{name}/
-
 # Own nodejs_sitelib
-install -d %{buildroot}%{_libexecdir}/node_modules
+mkdir -p %{buildroot}%{_libexecdir}/node_modules
 
 # clean
 # file duplicates
@@ -200,17 +221,17 @@
 %doc AUTHORS LICENSE *.md
 %dir %{_libexecdir}/node_modules
 %{_bindir}/node
-%{_prefix}/lib/node_modules
+%{_libdir}/node_modules
 %{_mandir}/man1/node.1%{ext_man}
 %exclude %{_libdir}/node_modules/npm
-%exclude %{_docdir}/%{name}/api
 
 %files -n npm
 %defattr(-, root, root)
 %{_bindir}/npm
-%dir %{_libdir}/node_modules
 %{_libdir}/node_modules/npm
-%{_mandir}/man1/npm.1%{ext_man}
+%{_mandir}/man*/*
+%exclude %{_mandir}/man1/node.1%{ext_man}
+
 
 %files devel
 %defattr(-, root, root)
@@ -221,6 +242,6 @@
 
 %files docs
 %defattr(-,root,root)
-%{_docdir}/%{name}/api
+%doc doc/api
 
 %changelog

++++++ nodejs-sle11-python26-check_output.patch ++++++
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')

Reply via email to