On Wed, Jul 22, 2020 at 6:31 AM Ben Rosser <rosser.bjr(a)gmail.com> wrote:
On Tue, Jul 21, 2020 at 10:56 AM Tom Hughes via nodejs
<nodejs(a)lists.fedoraproject.org> wrote:
>
> On 21/07/2020 15:39, Troy Dawson wrote:
>
> > Problem2: Many of the bundled libraries are archful, meaning they need
> > to be compiled. What if an essential nodejs library was originally a
> > noarch?
> > Solution2: All bundled nodejs library packages will be treached as
> > archful, meaning they will need to be built on each supported arch.
>
> I think "many" is stretching things.
>
> There were never more than about a dozen or so archful modules in
> Fedora and most of them were not widely used.
>
> I suspect that archful modules are probably best kept packaged as
> they are now mostly just because trying to build them as part of
> a large bundled tree is going to be incredibly painful.
I think this makes sense as well. Essentially, we should just say that
archful nodejs modules are "essential" (in the words of the proposal)
and therefore need to be packaged and shipped separately.
I think a "npm2rpm" script would have to do a couple things-- does
this sound about right?
a) recursively parse package.json to get a list of all dependencies
and tarballs, and use this to write out a list of Sources.
b) for each package, also look at package.json to see what files need
to be installed, and write out instructions for the %install section.
c) generate a "License" field for the package and also install all the
relevant licenses in %license.
There should probably be a way to specify that a given dependency is
not being bundled too, to stop the parser from descending into that
dependency tree. I imagine that (at least during the transition to
this and maybe afterwards, in the case of archful or essential
modules) it would be very useful to have packages with a mixture of
bundled and unbundled dependencies.
Ben Rosser
You are both right.
Odd as it seems, I kept seeing nodejs-sqlite3 come up, which is archful.
I had never done a real search.
It turns out that the various packages I had been working on require
it, and only two other packages.
So ya, Ben, I like you idea. I was looking at a very skewed view.
Troy