Permalink
Browse files

modified to build nodejs on CentOS 6

  • Loading branch information...
1 parent 1fd971c commit 09ead7ce2d4e14c142199cfdba8cded29fb95c9a Jason Antman committed Jan 31, 2013
Showing with 19 additions and 4 deletions.
  1. +12 −1 http-parser.spec
  2. +7 −3 nodejs.spec
View
@@ -6,6 +6,10 @@
%global git_commit_hash cd01361
%global github_seq 7
+%if 0%{?el5}
+%define __python /usr/bin/python26
+%endif
+
Name: http-parser
Version: %{somajor}.%{sominor}
Release: 3.%{git_date}git%{git_commit_hash}%{?dist}
@@ -23,6 +27,9 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Patch1: http-parser-gyp-sharedlib.patch
BuildRequires: gyp
+%if 0%{?el5}
+BuildRequires: python26
+%endif
@tchollingsworth
tchollingsworth Feb 7, 2013

If gyp requires python26 this should be expressed in the gyp RPM instead of the specs that depend on it.

@tchollingsworth
tchollingsworth Feb 7, 2013

That means we can fix gyp to always use python 2.6 instead of overriding it in the environment every time.

@jantman
jantman Feb 8, 2013 Owner

Ok. This was a quick hack to get this to build on Cent5.5, as that has python 2.4 and yes, the gyp scripts require 2.6+

I really should have removed this... it's required for http-parser, but I still don't have a working build of node on cent5, so I don't know how important it is.

%description
This is a parser for HTTP messages written in C. It parses both requests and
@@ -50,6 +57,10 @@ Development headers and libraries for http-parser.
%build
# TODO: fix -fPIC upstream
export CFLAGS='%{optflags} -fPIC'
+%if 0%{?el5}
+export python=%{__python}
+export PYTHON=%{__python}
+%endif
gyp -f make --depth=`pwd` http_parser.gyp
make %{?_smp_mflags} BUILDTYPE=Release
@@ -145,4 +156,4 @@ rm -rf %{buildroot}
- Call ldconfig (Peter Lemenkov)
* Fri Sep 17 2010 Lubomir Rintel <lkundrak@v3.sk> - 0.3-1.20100911git
-- Initial packaging
+- Initial packaging
View
@@ -1,6 +1,6 @@
Name: nodejs
Version: 0.9.5
-Release: 9%{?dist}
+Release: 10%{?dist}
Summary: JavaScript runtime
License: MIT and ASL 2.0 and ISC and BSD
Group: Development/Languages
@@ -25,7 +25,7 @@ Source6: nodejs-fixdep
BuildRequires: v8-devel >= %{v8_ge}
BuildRequires: http-parser-devel >= 2.0
BuildRequires: libuv-devel
-BuildRequires: c-ares-devel
+BuildRequires: c-ares-devel >= 1.9.0
@tchollingsworth
tchollingsworth Feb 7, 2013

What did you do to get c-ares 1.9.0? RHEL Base ships c-ares-1.7.0, and we can't override RHEL Base in EPEL under any circumstances. We'll have to ship some sort of parallel-installable compat package if c-ares 1.9.0 is really necessary.

@jantman
jantman Feb 8, 2013 Owner

Yeah... as I was initially building this for internal only, I just rebuilt the Rawhide c-ares-1.9.1 package and put it in our local repository. I can try rebuilding again, I don't remember if 1.9.0 was actually required, but the spec file called for >= 1.9.0 so I built it. The world of -compat is also beyond my packaging knowledge... and I assume that, given your above comment, just making a "c-ares19" wouldn't suffice for the parallel-installed requirement.

BuildRequires: zlib-devel
# Node.js requires some features from openssl 1.0.1 for SPDY support
BuildRequires: openssl-devel >= 1:1.0.1
@@ -165,9 +165,13 @@ cp -p common.gypi %{buildroot}%{_datadir}/node
%files docs
%{_defaultdocdir}/%{name}-docs-%{version}
-%doc LICENSE
%changelog
+* Thu Jan 31 2013 Jason Antman <Jason.Antman@cmgdigital.com> - 0.9.5-10
+- specify build requirement of c-ares-devel >= 1.9.0
+- specify build requirement of libuv-devel 0.9.4
+- remove duplicate %doc LICENSE that was causing cpio 'Bad magic' error on CentOS6
@tchollingsworth
tchollingsworth Feb 7, 2013

Ugh, we'll need to figure out what's going on here for real, or else make nodejs-docs depend on the main nodejs package so the LICENSE file is always installed.

@jantman
jantman Feb 8, 2013 Owner

Ok. Sorry... that one was beyond my knowledge of packaging practices. I just knew that RPM wouldn't put the same file in two packages, so I removed that one...

+
* Sat Jan 12 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-9
- fix brown paper bag bug in requires generation script

0 comments on commit 09ead7c

Please sign in to comment.