On Tue, Jan 29, 2019 at 6:07 AM Jared K. Smith <jsmith(a)fedoraproject.org> wrote:
On Tue, Jan 22, 2019 at 5:09 PM Troy Dawson <tdawson(a)redhat.com> wrote:
>
> Hi Jared,
> Sorry for this taking so long. I finally got some time to work on the
> gateway rpm. Though really, I need a second opinion to see if I
> should proceed with what I've done or try something else.
No worries on it taking a while -- I was on vacation all last week, and am swamped with
${DAYJOB} work now that I'm back. That being said, here are a few comments on the
spec file as I see it.
1. Trying to build the package from this file (rpmbuild -ba gateway.spec) fails. In
particular, it's failing because several of the things you're copying in line 37
of your spec file don't seem to come from the tarball when it's unpackaged in line
28. Also, there are lots of those things that we wouldn't necessarily want to include
in our package, such as the .gitignore file for the .travis.yml file, just to name a
couple of examples.
Ya, I initially just had what I considered the minimum set of things
we wanted in the package, and that kept failling, after about the 5th
"oh it really does need this .xxx file" I just threw everything in.
I haven't built this in a mock area yet
2. The "license" field is wrong, for a couple of reasons.
One, you should use the abbreviation "MPLv2.0" as listed at
https://fedoraproject.org/wiki/Licensing:Main#Software_License_List. Second, because
you're bundling all of the dependencies, the license on this package needs to reflect
the licenses of *everything* that's bundled with the package. Yes, that means doing a
license audit of everything that's being bundled. And yes, that's a lot of work.
That's going to be a pain, but it's still better than having to create
a package for each of those (where I'd have to find the license
anyway) so ... ok.
3. Nothing seems to be showing that the dependencies are bundled.
At a minimum, I would expect a long list of lines that look something like:
"Provides: bundled(nodejs-abab)=1.0.4", "Provides:
bundled(nodejs-abbrev)=1.1.1", etc. See
https://fedoraproject.org/wiki/Bundled_Software_policy for the bundled software policy
itself.
Yep, I'm still working on getting this working, and pulling things out.
I'll do that step at the end.
But thank you for the link.
4. I would assume that at least *some* of the necessary dependencies
are already in Fedora -- if so, we should use those if possible instead of using the
bundled versions, and if there's a reason we can't use the system version, we
should document it in the spec file.
I can try to find more, the one's I have listed in the Requires are
the "binary" packages.
I'll try to do a more thorough review of the spec file later this
week.
Also, I'm all for renaming this to "things-gateway" or
"moz-iot-gateway" or something more descriptive than just "gateway".
--
Jared Smith
So, I updated to version 0.7.0, and among other things, the output to
the console when it's run is much lower. So I have been able to track
down several of what I was considering bugs.
- We will need to also package gateway-addon-python and gateway-addon-node
-- I just want to let that be known as we talk about the right name
for this. If we make the initial gateway name too long and we have to
tack on two more names for it's packages, then the names are going to
be huge.
-- The good news is this is the reason I thought we had to package all
of the sensors it knows about seperately. It was really failing
because it didn't have the correct add-on.
--- When you click on an addon, if it doesn't already have it, it
downloads that addon.
--- Before there were so many other outputs I missed that it was
successfully downloading those addon's, but then failling because they
were python or nodejs based, and I didn't have the translator for
those languages installed.
- We will also need to package nanomsg and nodejs-nanomsg
For names, I'm still torn between "things-gateway" and
"mozilla-iot-gateway". I'm leaning towards "things-gateway"
because
maybe in the future this might be completely seperate from mozilla.
But, other than that, mozilla-iot-gateway is much more descriptive.
Troy