Search code examples
node.jscentosrpmrpm-spec

How to package node-js application into single rpm?


I'm trying to pacakge my node-js application into single rpm-package. The first thing that came to mind: add nodejs and npm as package dependencies.

Requires: node npm

Such rpm worked perfectly on Fedora. But on CentOS rmp installation had been failed on dependency resolution step. The problem is that on CentOS nodejs and npm aren't in default package repository, but they are in EPEL repo. I had tried to add epel-release package to requires, but it didn't help.

So, what's the best option for packaging node-js applications into rpm's? Should I install it from sources instead of from repo? Or this issue with EPEL can be handled?


Solution

  • Add the EPEL repository to yum in order to satisfy the requirements is the easiest path, particularly if you wish to use Fedora node.js pre-built sources.

    You can bundle the EPEL node.js and npm from your own repository. Meanwhile double click install of *.rpm isn't easy (SuSE can do this, just Ick )