Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

modified to build nodejs on CentOS 6

  • Loading branch information...
commit 09ead7ce2d4e14c142199cfdba8cded29fb95c9a 1 parent 1fd971c
Jason Antman authored

Showing 2 changed files with 19 additions and 4 deletions. Show diff stats Hide diff stats

  1. +12 1 http-parser.spec
  2. +7 3 nodejs.spec
13 http-parser.spec
@@ -6,6 +6,10 @@
6 6 %global git_commit_hash cd01361
7 7 %global github_seq 7
8 8
  9 +%if 0%{?el5}
  10 +%define __python /usr/bin/python26
  11 +%endif
  12 +
9 13 Name: http-parser
10 14 Version: %{somajor}.%{sominor}
11 15 Release: 3.%{git_date}git%{git_commit_hash}%{?dist}
@@ -23,6 +27,9 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
23 27 Patch1: http-parser-gyp-sharedlib.patch
24 28
25 29 BuildRequires: gyp
  30 +%if 0%{?el5}
  31 +BuildRequires: python26
  32 +%endif
26 33
27 34 %description
28 35 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.
50 57 %build
51 58 # TODO: fix -fPIC upstream
52 59 export CFLAGS='%{optflags} -fPIC'
  60 +%if 0%{?el5}
  61 +export python=%{__python}
  62 +export PYTHON=%{__python}
  63 +%endif
53 64 gyp -f make --depth=`pwd` http_parser.gyp
54 65 make %{?_smp_mflags} BUILDTYPE=Release
55 66
@@ -145,4 +156,4 @@ rm -rf %{buildroot}
145 156 - Call ldconfig (Peter Lemenkov)
146 157
147 158 * Fri Sep 17 2010 Lubomir Rintel <lkundrak@v3.sk> - 0.3-1.20100911git
148   -- Initial packaging
  159 +- Initial packaging
10 nodejs.spec
... ... @@ -1,6 +1,6 @@
1 1 Name: nodejs
2 2 Version: 0.9.5
3   -Release: 9%{?dist}
  3 +Release: 10%{?dist}
4 4 Summary: JavaScript runtime
5 5 License: MIT and ASL 2.0 and ISC and BSD
6 6 Group: Development/Languages
@@ -25,7 +25,7 @@ Source6: nodejs-fixdep
25 25 BuildRequires: v8-devel >= %{v8_ge}
26 26 BuildRequires: http-parser-devel >= 2.0
27 27 BuildRequires: libuv-devel
28   -BuildRequires: c-ares-devel
  28 +BuildRequires: c-ares-devel >= 1.9.0
29 29 BuildRequires: zlib-devel
30 30 # Node.js requires some features from openssl 1.0.1 for SPDY support
31 31 BuildRequires: openssl-devel >= 1:1.0.1
@@ -165,9 +165,13 @@ cp -p common.gypi %{buildroot}%{_datadir}/node
165 165
166 166 %files docs
167 167 %{_defaultdocdir}/%{name}-docs-%{version}
168   -%doc LICENSE
169 168
170 169 %changelog
  170 +* Thu Jan 31 2013 Jason Antman <Jason.Antman@cmgdigital.com> - 0.9.5-10
  171 +- specify build requirement of c-ares-devel >= 1.9.0
  172 +- specify build requirement of libuv-devel 0.9.4
  173 +- remove duplicate %doc LICENSE that was causing cpio 'Bad magic' error on CentOS6
  174 +
171 175 * Sat Jan 12 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 0.9.5-9
172 176 - fix brown paper bag bug in requires generation script
173 177

0 comments on commit 09ead7c

T.C. Hollingsworth

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.

T.C. Hollingsworth

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

T.C. Hollingsworth

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.

T.C. Hollingsworth

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

Jason Antman

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...

Jason Antman

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.

Jason Antman

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.

Please sign in to comment.
Something went wrong with that request. Please try again.