Bug 1442183

Summary: Upgrade nodejs to latest stable
Product: [Community] RDO Reporter: Honza Pokorny <hpokorny>
Component: distributionAssignee: Alan Pevec <apevec>
Status: CLOSED EOL QA Contact: Shai Revivo <srevivo>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: trunkCC: hguemar, hpokorny, markmc, srevivo, ykarel
Target Milestone: ---   
Target Release: trunk   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: nodejs-6.10.2-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-01-13 06:58:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Honza Pokorny 2017-04-13 17:49:06 UTC
Description of problem: the currently available version of nodejs is two major releases behind the latest stable release (4.x vs 6.x).  The tripleo-ui project depends on new features introduced in nodejs for successful builds.  Most notably, newer versions of nodejs support es6 syntax; we currently can't use those features because the build wouldn't succeed.

Affected versions: openstack-tripleo-ui 7.x, Pike, or trunk/master

Comment 1 Alan Pevec 2017-04-13 17:53:58 UTC
EPEL7 has 6.10.2 I'm rebuilding it in RDO Common tag

Comment 2 Alan Pevec 2017-04-13 18:01:46 UTC
Scratch build worked:
https://cbs.centos.org/koji/taskinfo?taskID=176444

x86_64 only with workaround for missing %{epel} macro: https://github.com/rdo-common/nodejs/commits/common-rdo-6.x

TBD if we should include "epel 1" in openstack-macros

Comment 3 Alan Pevec 2017-04-16 07:14:05 UTC
> TBD if we should include "epel 1" in openstack-macros

I tried to import epel-rpm-macros (which pulls python-rpm-macros) but adding it as BuildRequires: is not enough, we'd need to include it in the initial buildroot for RDO.

Instead, I went with small RDO Common fork on top of epel7 branch:
https://github.com/rdo-common/nodejs/commits/common-rdo-6.x

https://github.com/rdo-common/nodejs/commit/220d8ca5723ddd103b74037005dee46c2bfe7816

Candidate build: https://cbs.centos.org/koji/buildinfo?buildID=16990

Honza, please test it if it is safe to tag for all RDO releases, Newton to Pike.

Comment 4 Honza Pokorny 2017-04-18 17:15:04 UTC
I downloaded the necessary RPMs but I wasn't able to install them.  The nodejs and npm RPMs seem to depend on each other.

$ sudo rpm -i nodejs.rpm 
error: Failed dependencies:
	npm = 1:3.10.10-1.6.10.2.1.el7 is needed by nodejs-1:6.10.2-1.el7.x86_64

$ sudo rpm -i npm.rpm 
error: Failed dependencies:
	nodejs = 1:6.10.2-1.el7 is needed by npm-1:3.10.10-1.6.10.2.1.el7.aarch64

Comment 5 Honza Pokorny 2017-04-18 18:32:06 UTC
I just figured out that you can use

$ sudo rpm -i nodejs.rpm npm.rpm

And that works.  So, I installed the RPMs, and managed to build the tripleo-ui project without any issues.  I think the build works well.

Comment 6 Alan Pevec 2017-04-21 10:05:38 UTC
I forgot to mention, easiest way to install a build from CBS Koji is:
# cbs download-build -a x86_64 -a noarch nodejs-6.10.2-1.el7
# yum install *.rpm

> And that works.  So, I installed the RPMs, and managed to build the
> tripleo-ui project without any issues.  I think the build works well.

Does is also work with Newton and Ocata?

Comment 7 Honza Pokorny 2017-04-21 12:19:20 UTC
For tripleo-ui, the answer is yes.  I'm not sure if any other projects are affected.

Comment 8 Alan Pevec 2017-04-24 14:28:42 UTC
tagged cloud7-openstack-common-testing

Comment 9 Yatin Karel 2021-01-13 06:58:14 UTC
Closing as fixed long ago and mentioned releases are already EOL.