I believe I have this working now. I've tried it on a couple of x86_64 machines and it works great. I'm having some problems installing in on aarch64 (raspberry pi 3) machines. But I'm pretty sure it will work.
Here is the packages, spec files, and supporting scripts. https://tdawson.fedorapeople.org/gateway/mozilla-iot-gateway-0.7.0-1.fc29.no... https://tdawson.fedorapeople.org/gateway/mozilla-iot-gateway-0.7.0-1.fc29.sr... https://tdawson.fedorapeople.org/gateway/nodejs-nanomsg-4.0.2-2.fc29.aarch64... https://tdawson.fedorapeople.org/gateway/nodejs-nanomsg-4.0.2-2.fc29.x86_64.... https://tdawson.fedorapeople.org/gateway/nodejs-nanomsg-4.0.2-2.fc29.src.rpm https://tdawson.fedorapeople.org/gateway/mozilla-iot-gateway.spec https://tdawson.fedorapeople.org/gateway/gateway-tarball.sh https://tdawson.fedorapeople.org/gateway/gateway-unbundle.list https://tdawson.fedorapeople.org/gateway/nodejs-nanomsg.spec
Troy
On Thu, Jan 31, 2019 at 3:06 PM Troy Dawson tdawson@redhat.com wrote:
Two things: 1 - I'm calling the package mozilla-iot-gateway -- The reason for my final decision is that everything gets saved in ~/.mozilla-iot Also, I haven't seen anything in it's documentation refering to it as things-gateway, other than that one webpage.
2 - As much as I liked removing the modules for over 400 modules, I just hit bug after bug after bug. Alot of our nodejs modules are very old. versions 0.7 when gateway needs 3.6, things like that. I'm going back to my original design of only unbundling the binary (arch dependent) modules.
I should have a workable package tomorrow.
Troy
On Thu, Jan 31, 2019 at 6:10 AM Russell Doty rdoty@redhat.com wrote:
On Wed, 2019-01-30 at 15:17 -0800, Troy Dawson wrote:
Next release of "gateway" is up, along with a corresponding updated nodejs-nanomsg for all arches. The source rpm[1] has been trimmed by 30M and built rpm[2] by 20M. Ya!! The spec file [3] has an updated license list with all the licenses from the bundled modules. Oddly enough, I didn't find a single GPL, though there was one LGPL. It also has all the unbundled packages now as Requires, and all the bundled packages as Provides: bundled(). Thus making the spec file rather long. I also went through and trimmed out all the cruft that didn't need to be installed for gateway to run (.travis.yml, .babelrc, and others) I also added how to run it as a regular user in the %description area. That's probrubly not the best place to put that, but I figured it's a place a user can always see. The script[4] to download, setup, trim and tar up the source with it's dependencies has been updated to use an external file, that is a list of all the nodejs modules to pull out of the bundled dependencies. It also now goes as deep as it needs to in order to pull out all those modules. And there is the list of modules we are unbundeling.[5] Here is where everything is. [6]
These have been tested on aarch64 (rpi3b+) and x86_64.
I haven't decided between things-gateway and mozilla-iot-gateway.
Have you considered mozillathings-iot-gateway?
Both have good reasons to be the right name. Honestly, I might just flip a coin and let that decide. If anyone has a strong preference for one or the other, let me know.
Troy
[1] - https://tdawson.fedorapeople.org/gateway/gateway-0.7.0-1.1.fc29.src.rpm [2] - https://tdawson.fedorapeople.org/gateway/gateway-0.7.0-1.1.fc29.noarch.rpm [3] - https://tdawson.fedorapeople.org/gateway/gateway.spec [4] - https://tdawson.fedorapeople.org/gateway/gateway-tarball.sh [5] - https://tdawson.fedorapeople.org/gateway/gateway-unbundle.list [6] - https://tdawson.fedorapeople.org/gateway/ On Wed, Jan 30, 2019 at 1:39 PM Jared K. Smith < jsmith@fedoraproject.org> wrote:
On Tue, Jan 29, 2019 at 5:56 PM Troy Dawson tdawson@redhat.com wrote:
Here's a fun fact. gateway depends on 1000 node_modules (exactly I believe) I was able to unbundle 455 of those packages. Ya!! Of course, that means that I have to have 455 lines of "Requires:" and 545 lines of "Provides: bundled()" in the spec file Ya!!?? This spec file just went from a lightweight to a sumo wrestler in one day.
That's the NodeJS way, unfortunately. I know the NodeJS SIG was working on a macro to automagically create the "Provides: bundled()" lines, but I really don't know if they ever got it working.
-Jared
IoT mailing list -- iot@lists.fedoraproject.org To unsubscribe send an email to iot-leave@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/iot@lists.fedoraproject.org
IoT mailing list -- iot@lists.fedoraproject.org To unsubscribe send an email to iot-leave@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/iot@lists.fedoraproject.org