We've discussed my packaging of gateway [1] in our weekly IOT
meetings. The decision was made to have it bundle all the
dependencies, and that's what I've been trying to do. It looks like
there are over 1100 node modules required for this. (Nope, that isn't
a typo)
The first problem is that these aren't all pure nodejs (javascript)
packages. Several of them are binary. So that means I need to
download the modules to bundle them, and then build them in koji. By
using yarn, instead of npm install, I've been able to do that, because
yarn has an --offline mode.
Then there is/was the problem with babel-core. During the bundling we
kept ending up with 6.25.0 I believe due to the package.json wanting
7.0.0-beta.49. When it came to building in koji, yarn would freek out
because it wanted to download a newer babel-core, but it was in
offline mode. (Even if it did download the new package, it would
still end up with 6.25.0). So in the end, I hacked package.json so
that it wants 7.2.2 of babel-core.
Ya ... so now it builds on x86_64 in koji.
But ... it now *only* builds on x86_64 in koji [2]
I'm putting this up in this email so others can join in the fun if they want.
Here is the source rpm I have,[3] the one that build the scratch build.
Here is the script I use to make the bundled tarball.[4]
You need to have nodejs-yarn installed to run the tarball bundling script.
I'm going to give this another shot, but any help is appreciated.
Troy Dawson
[1] -
https://github.com/mozilla-iot/gateway/
[2] -
https://koji.fedoraproject.org/koji/taskinfo?taskID=31522050
[3] -
https://tdawson.fedorapeople.org/gateway/gateway-0.6.1-1.fc29.src.rpm
[4] -
https://tdawson.fedorapeople.org/gateway/gateway-tarball.sh