I am part of the Fedora Minimization team. I am dealing specifically with build dependency minimization. I am working on minimizing the build dependencies of nodejs libraries. This has two benefits. For the packager, it allows more flexibility. Currently, the nodejs libraries are so intertwined, it is taking a lot of effort to change the version of any specific nodejs library. For downstream, such as RHEL and EPEL, it allows those package maintainers to use the Fedora packages without having to pull in hundreds of nodejs library dependencies. I have found that if the build dependencies of nodejs-less and nodejs-clone were bundled, it would drop over 200 build dependencies for some non-nodejs packages. If you could bundle the build dependency of nodejs-less, it would help me with my minimization efforts. If you do not have an easy way to do this already, we do have a script we have successfully used on other packages.
Bundling of nodejs dependencies is next to impossible because upstream distributions do not include them so the only way to do it is a whole load of manual fiddling to unpack the tar ball, run npm install, and then repack the tar ball. I do in fact do bundling for some non-public builds that I maintain but I do that by just running npm in the spec file and building in an environment with network access which obviously doesn't work for public Fedora packages. Bundling also creates huge problems with updates, especially with such a deep dependency tree, because you need to analyse the new version to see what new modules it has pulled in, review their licenses and so on. I'd love it to be possible. Well I wouldn't, but I admit it's probably the only way to make nodejs things workable, but I'm not convinced it really is any more workable than the current situation - the problems are just different :-(
Thank you for your reply. I will bring this up with the non-nodejs packages that depend on nodejs-less. Perhaps it will be easier to do the bundling there. If you don't mind, I'd like to keep this ticket open while I discuss it with those packages.
@tomhughes: What I've been doing lately is similar to what you are, except instead of enabling internet access during the build, I'm caching the results of the npm install in tarball that I stick in Fedora's lookaside cache. Have a look at https://src.fedoraproject.org/rpms/js-jquery/tree/master for an example of this. Yes, the nested license situation makes me hesitate a bit, but I'm pretty sure there's no other practical way to do things.
That looks... massively overcomplicated... Maybe as a generic tool but for a package specific script you could do that in about half a dozen lines and also make it easier to use. I'll try and have a look later, but long term I think we should write a nodejs-build-bundle or something that can live in nodejs-packaging but it really needs to be as automated as possible, so trying to figure out the package and version by default in the common case.
(In reply to Tom Hughes from comment #4) > That looks... massively overcomplicated... Maybe as a generic tool but for a > package specific script you could do that in about half a dozen lines and > also make it easier to use. > You can ignore most of that script; the majority of it is generic argument-handling code provided by argbash (https://argbash.io/). I usually use it in my scripts because it's really easy to extend. But yes, the meat of the code is below "### END OF CODE GENERATED BY Argbash (sortof) ### ])" > I'll try and have a look later, but long term I think we should write a > nodejs-build-bundle or something that can live in nodejs-packaging but it > really needs to be as automated as possible, so trying to figure out the > package and version by default in the common case. Yeah, that's a good long-term goal, but I'd prefer not to wait for that.
Looks like things slowed down. Anything I can do to help finish this up?
It's blocked on finding a way to switch a symlink to a directory on upgrade (and no, the recipe in the wiki doesn't seem to work). It's also waiting on resolving some issues with the requires script in nodejs-packaging.
(In reply to Troy Dawson from comment #6) > Looks like things slowed down. Anything I can do to help finish this up? Sorry, Troy. This is on me; I've had other things going on, but I'll try to get to this today.
Hmm, the problem with the directory/symlink on upgrade appears to be a bug in DNF. If I do `rpm -Uvh nodejs-less...` it works just fine. I'm going to try to track down the source of the issue there. It's incorrectly detecting a conflict. Probably following symlinks somewhere that it should not be.
It turns out that it's a bug in RPM, which I've opened and linked to this one. We'll see where that goes...
This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle. Changing version to 33.
Automation has figured out the package is retired in Fedora 33. If you like it to be unretired, please open a ticket at https://pagure.io/releng/new_issue?template=package_unretirement