kazuhisya / nodejs-rpm Goto Github PK
View Code? Open in Web Editor NEWnode.js rpm spec
License: MIT License
node.js rpm spec
License: MIT License
Seems like the spec file doesn't work if it is invoked with rpmbuild by a non-root user. This is because the 2nd line of the %install section calls 'make install DESTDIR=$RPM_BUILD_ROOT' and the Makefile install target calls installer.js. Unfortunately, installer.js queries process.config to get the path to node_prefix and doesn't honor the DESTDIR variable.
devtoolset-3
is included in the SCLo
repository.
However, centos-release-SCL
(or centos-release-SCLo
?) corresponding to SCLo
appears to be not out yet.
This will make the corrections as soon as they are released.
It looks like the patch in node-js.centos5.configure.patch no longer works, at least for me when the current python2.7 from ius and on RHEL5
Can someone from CentOS or other platform check and confirm this? I can do a pull request to fix easily but don't want to break other el5 platforms.
Building against:
python27-devel-2.7.10-1.ius.el5
python27-libs-2.7.10-1.ius.el5
python27-setuptools-17.0-1.ius.el5
python27-2.7.10-1.ius.el5
This is just an idea to talk about. I don't know if this is feasible. But every time a node.js version is released, I either need to wait for a spec file update on github, or edit the spec file on my machine.
How about using an environment variable like %nodeVersion or something like that so the same spec file can be re-used across different versions?
This of course assumes that the build process itself is the same across all versions, which for patch releases like 0.8.x, is probably true.
Thoughts?
Build 73 failed.
kazuhisya/nodejs-rpm #73 - CircleCI
https://circleci.com/gh/kazuhisya/nodejs-rpm/73
It seems to be a known problem of copr-cli
.
When releasd modified package. I re-challenge this.
FYI, you should add:
BuildRequires: rpmdevtools
I'm trying to build the new version of nodejs in an i386 machine running Centos 6.7.
The problem is that Centos 6 doesn't fulfill at least the requirements gcc4.8 nor python2.7.
I have installed devtoolset-3 Software Collection that allows me to use gcc4.9.1 and a virtual environtment with python3.4. And still unable to build.
+ '[' -z x86 ']'
+ ./configure --shared-openssl --shared-openssl-includes=/usr/include --shared-zlib --shared-zlib-includes=/usr/include
File "./configure", line 427
'''
^
SyntaxError: Missing parentheses in call to 'print'
error: Estado de salida erróneo de /var/tmp/rpm-tmp.4zlcZ1 (%build)
This is the next error I'm getting. Not sure if this is because of other requirement that is not available in the system or a bug in nodejs and how to solve it. It is the third error and stopped trying by now.
I think buildrequires allows to specify a version so in my opinion the spec should be updated. Don't know which is the correct systems but if possible the version requirement should be specified on the spec so when running yum-builddep it complains about missing requirements.
First of all, thanks for sharing nice spec files!
Could you add LICENSE file?
The following pages might help for choosing a license.
Thanks!
The README.md says:
We use this method in our CI.
Since some day back, the LTS branch no longer exist (and all traces of it ever, seems gone as well).
Which of v4.x and v6.x is the replacement branch?
rpmbuild fails for me with this error:
../deps/openssl/openssl/ssl/t1_lib.c:1241:38: error: equality comparison with
extraneous parentheses [-Werror,-Wparentheses-equality]
if ((s->ctx->next_proto_select_cb == NULL))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
../deps/openssl/openssl/ssl/t1_lib.c:1241:38: note: remove extraneous
parentheses around the comparison to silence this warning
if ((s->ctx->next_proto_select_cb == NULL))
~ ^ ~
../deps/openssl/openssl/ssl/t1_lib.c:1241:38: note: use '=' to turn this
equality comparison into an assignment
if ((s->ctx->next_proto_select_cb == NULL))
^~
=
1 error generated.
First I had to install Clang compiler, as gcc didnt get recognized by rpmbuild, but with clang I get this error on any version of nodejs that I tried to install.
GCC 4.8 will no longer be supported in the future(may be).
Since the default GCC of .el7
is 4.8, we need to consider using SCL.
Notable Changes
No additional commits.
Due to incorrect staging of the upgrade to the GCC 4.9.X compiler, the latest releases for PPC little endian were built using GCC 4.9.X instead of GCC 4.8.X. This caused an ABI breakage on PPCLE based environments. This has been fixed in our infrastructure and we are doing this release to ensure that the hosted binaries are adhering to our platform support contract.
Note that Node.js versions 10.X and later will be built with version 4.9.X or later of the GCC compiler, and it is possible that Node.js version 9.X may be built on the 4.9.X compiler at a later time as the stated minimum compiler requirement for Node.js version 9.X is 4.9.4.
node/CHANGELOG_V9.md at master · nodejs/node
https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V9.md
Node.js and npm was distributed separately before. However, came to be bundled from node.js 0.6.3 before and after.
Since then, I changed it to generate, including the npm to rpm of node.js.
but began to think better to divide it normally is or not good.
For example, it will be added as follows in spec file.
%package npm
Summary: Node Packaged Modules
Group: Development/Libraries
License: MIT License
URL: https://npmjs.org/
RHEL5 and CentOS5 will end-of-life at the end of March this year (March 31, 2017).
So, when that day comes, I will delete patches and fixes that exist only for el5.
Or should I maintain patches and fixes for el5?
spectool -g nodejs-4.2.spec
--2015-10-17 18:17:40-- https://nodejs.org/dist/v4.2.1/node-v4.2.1.tar.gz
Resolving nodejs.org... 104.20.23.46, 104.20.22.46, 2400:cb00:2048:1::6814:162e, ...
Connecting to nodejs.org|104.20.23.46|:443... connected.
ERROR: certificate common name *.nodejs.org' doesn't match requested host name
nodejs.org'.
To connect to nodejs.org insecurely, use `--no-check-certificate'.
Unable to establish SSL connection.
A workaround is to change the url in the spec file to http:// instead of https://
I had to extract the downloaded tar file and repack it with a root dir of node-v0.8.18 instead of the original node-v0.8.18-linux-x64. I'm not sure if the way the node tar is created or maybe I downloaded the wrong file? Perhaps it would be worth modifying the instructions to be more explicit about which files should be downloaded?
The rpmbuild spec file declares "git" as a build-time dependency. This doesn't appear to be needed. If I remove that line and build, it builds fine. Does this need to be there? Installing git probably is a good thing anyway, but I don't like having to install it JUST to build this package from source.
WARNING: C++ compiler too old, need g++ 4.8 or clang++ 3.4 (CXX=g++)
See also: Packaging:DistTag - FedoraProject
Hello,
When trying 'make' in LTS branch (4.5.0) I get an md5 mismatch error:
rm -rf node-v4.5.0-linux-x64
rm -rf out/deps out/Release
/usr/bin/python ./configure
--prefix=/
--dest-cpu=x64
--tag=
--release-urlbase=
--download=all --with-intl=small-icu
creating ./icu_config.gypi
ECMA-402 (Intl) support didn't find ICU in ./deps/icu..
https://ssl.icu-project.org/files/icu4c/56.1/icu4c-56_1-src.zip
Fetch: : 0.0MB total, 0.0MB downloaded
MD5: 01b1e4427b5a406a73ceaa64dab85e12 ./deps/icu4c-56_1-src.zip
Expected: 61d71888f14bf00cc3e8a6f2c087d367 MISMATCH
** Corrupted ZIP? Delete ./deps/icu4c-56_1-src.zip to retry download.
Cannot build Intl without ICU in ./deps/icu.
(Fix, or disable with "--with-intl=none" )
Makefile:558: recipe for target 'node-v4.5.0-linux-x64.tar' failed
make[1]: *** [node-v4.5.0-linux-x64.tar] Error 1
Is there anything else that I need to do ?
Using SLES12
Thank you
There seems to be a line in the configure that doesn't work with the default Python on RHEL 5 systems. If using Python 2.6 or better by altering the PATH to another install, the build process does not experience the failure illustrated below:
$ rpmbuild -bb nodejs.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.94297
+ umask 022
+ cd /home/user/rpm/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /home/user/rpm/BUILD
+ rm -rf node-v0.8.5
+ /usr/bin/gzip -dc /home/user/rpm/SOURCES/node-v0.8.5.tar.gz
+ tar -xf -
tar: Read 1536 bytes from -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd node-v0.8.5
++ /usr/bin/id -u
+ '[' 1000 = 0 ']'
++ /usr/bin/id -u
+ '[' 1000 = 0 ']'
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.88012
+ umask 022
+ cd /home/user/rpm/BUILD
+ cd node-v0.8.5
+ LANG=C
+ export LANG
+ unset DISPLAY
+ ./configure --prefix=/usr
File "./configure", line 325
o['default_configuration'] = 'Debug' if options.debug else 'Release'
el7's libicu
and libicu-devel
is 50.1.2-15.el7
.
fc23's libicu
and libicu-devel
is 54.1-5.fc23
.
fc24's libicu
and libicu-devel
is 56.1-4.fc24
.
nodejs7.1.0 needs emoji palettes. therefor it is necessary to raise the version of icu.( maybe 58 or more? )
We should use the system-specific icu packages.
When build on CentOS7, the package nodejs.x86_64.0.0.10.29-1.el7.centos.rpm conflicts with nodejs-npm-0.10.29-1.el7.centos.rpm
After installing the various dependencies, per the README, and invoking rpmbuild through scl, the build fails as follows:
...
LD_LIBRARY_PATH=/root/rpmbuild/BUILD/node-v5.0.0/out/Release/lib.host:/root/rpmbuild/BUILD/node-v5.0.0/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../deps/v8/tools/gyp; mkdir -p /root/rpmbuild/BUILD/node-v5.0.0/out/Release/obj/gen; python2.7 ../../tools/js2c.py "/root/rpmbuild/BUILD/node-v5.0.0/out/Release/obj/gen/experimental-libraries.cc" EXPERIMENTAL ../../src/macros.py ../../src/messages.h ../../src/proxy.js ../../src/generator.js ../../src/harmony-atomics.js ../../src/harmony-array-includes.js ../../src/harmony-concat-spreadable.js ../../src/harmony-tostring.js ../../src/harmony-regexp.js ../../src/harmony-reflect.js ../../src/harmony-spread.js ../../src/harmony-object.js ../../src/harmony-object-observe.js ../../src/harmony-sharedarraybuffer.js ../../src/harmony-simd.js
LD_LIBRARY_PATH=/root/rpmbuild/BUILD/node-v5.0.0/out/Release/lib.host:/root/rpmbuild/BUILD/node-v5.0.0/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../deps/v8/tools/gyp; mkdir -p /root/rpmbuild/BUILD/node-v5.0.0/out/Release/obj/gen; python ../../tools/js2c.py "/root/rpmbuild/BUILD/node-v5.0.0/out/Release/obj/gen/code-stub-libraries.cc" CODE_STUB ../../src/macros.py ../../src/messages.h ../../src/code-stubs.js
File "../../tools/js2c.py", line 441
except Error as e:
^
SyntaxError: invalid syntax
make[2]: *** [/root/rpmbuild/BUILD/node-v5.0.0/out/Release/obj/gen/code-stub-libraries.cc] Error 1
make[2]: *** Waiting for unfinished jobs....
/tmp/ccrffLjk.s: Assembler messages:
/tmp/ccrffLjk.s:5611: Error: expecting string instruction after rep' /tmp/ccrffLjk.s:5651: Error: expecting string instruction after
rep'
make[2]: *** [/root/rpmbuild/BUILD/node-v5.0.0/out/Release/obj.target/gtest/deps/gtest/src/gtest.o] Error 1
make[2]: Leaving directory /root/rpmbuild/BUILD/node-v5.0.0/out' make[1]: *** [node] Error 2 make[1]: Leaving directory
/root/rpmbuild/BUILD/node-v5.0.0'
make: *** [node-v5.0.0-linux-x64.tar] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.56228 (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.56228 (%build)
Add a conditional branch in the clang++
to Makefile
$ rpmbuild -bb nodejs-4.2.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.40648
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.40648 (%prep)
I'd like to add a user and group for use with node.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.