On Thu, Sep 10, 2020 at 2:27 PM Ben Rosser <rosser.bjr(a)gmail.com> wrote:
On Thu, Sep 3, 2020 at 1:04 PM Troy Dawson <tdawson(a)redhat.com> wrote:
>
> On Thu, Sep 3, 2020 at 9:28 AM Tom Hughes <tom(a)compton.nu> wrote:
> >
> > On 03/09/2020 16:41, Troy Dawson wrote:
> >
> > > Any changes and/or improvements that people think should be made?
> >
> > Well macros for all that boilerplate in the spec is an
> > obvious one.
> >
> > Also making the script fetch the actual version being packaged
> > rather than the latest version would be good. Something like:
> >
> > VERSION="$(rpmspec --srpm --queryformat=%{VERSION} -q
nodejs-${PACKAGE}.spec)"
> >
> > and then:
> >
> > npm pack ${PACKAGE}@${VERSION}
> >
> > Tom
> >
>
> Good point. I guess I had sorta hard coded both the name and the version.
> So if they provide a version, use it, and if not, use the latest.
Hi Troy,
This looks pretty reasonable to me. (Sorry, I intended to try and work
on something like this myself over the summer but didn't end up having
time. Thanks for working on it!)
I'd been thinking the script would have one source archive per nodejs
module rather than a single source archive with all the bundled
dependencies, but on second thought that probably would be extremely
unwieldy, so perhaps bundling them together into a tarball is better.
What are your thoughts on deploying this? Node packages are going to
be broken in Fedora 33, but it's probably way too late to fix that
now, so perhaps there should be a Fedora 34 Change proposal?
Ben Rosser
I've never done a change proposal, so I'm not sure of everything it
would involve.
Do we say something to the effect of "All non-needed nodejs libraries
are to be removed, and those that are needed will bundle their
dependencies in this way?"
We would then have to define "needed" libraries.
I would think of these as the initial libraries other packages require.
An example would be nodejs-showdown. R-shiny requires nodejs-showdown
to build and run.
So nodejs-showdown would be a needed nodejs-library. But we could
bundle all of its runtime and testing dependencies, so it wouldn't
drag in any extra nodejs libraries.
If we are going along that route, I think saying something similar for
nodejs binaries would be appropriate. Packages like coffee-script,
uglify-js, and other packages like those.
Perhaps not as strong as with libraries, something like
"Nodejs binaries should bundle their nodejs runtime and testing
dependencies whenever possible. If it is not possible, then those
nodejs dependencies should be treated as needed nodejs libraries."
Troy