On Wed, 7 Mar 2018 11:06:47 -0500 anote...@teknik.io wrote: > Having used Gentoo for a few years now, one thing that has been annoying > to me is the tremendous duplication of effort and uphill battle of > creating ebuilds (build recipes) for language-specific packages that > already have their own build systems. > > For example, many languages such as Python (pip), Node (npm), Ruby > (gems), TeXLive (tlmgr), Haskell (cabal), Rust (cargo) have ways of > redistributing up-to-date dependencies and ensuring that they build > properly in most environments.
I was expecting to see Java's Maven in this list. Gentoo Java is in trouble because we have basically given up trying to keep up with the ecosystem. The last time anything under dev-java was bumped, other than JVMs and Tomcat-related stuff, was January 20th. We could be bumping 5 packages a day and still not keep up, never mind all the things we haven't packaged at all yet. Java's problem is somewhat unique in that although you can have optional dependencies at runtime, unless you go out of your way (and nobody ever does), all these optional dependencies are required at build time. Suddenly a package that might normally only have 2 dependencies now has 20. But wait, that's just the first level of dependencies! This can repeat on and on and you end up battered and bruised having packaged 100 things but still not the one you actually wanted. I therefore put some thought into something along the lines of what you have suggested. Java is supposed to be write (or really build) once, run anywhere so why are we wasting time building things that we don't have to? That's certainly why upstreams look at us like we're crazy whenever we dare to contact them. If we can leverage Maven or whatever to grab the platform-neutral dependencies for us, we can focus attention on the few that have native libraries and also things like icons, desktop entries, etc, that Maven doesn't deal with. But how would this work? I thought perhaps the dependencies we don't care about could be installed into a Maven repository, essentially untracked by Portage but still self-contained, by fetching them in src_unpack (or src_fetch, which I'd like to introduce) and then installing them in pkg_preinst. However, unless src_fetch is implemented, it would not be possible to install Java packages offline. This approach would also break binary packages, effectively forcing Java packages to have RESTRICT="bindist", although there would arguably be little building to do anyway. Apart from the fact that I haven't had time to do any of this, is this even what Gentoo users want? I suspect not. But what's worse, this or a totally stale or practically empty package repository? Others have experimented with from-source ebuild generators but that doesn't change the fact that putting all these ebuilds into the tree is still a huge maintenance burden and because of the build time dependency issue, end users will still have to build hundreds of packages they don't even care about. -- James Le Cuirot (chewi) Gentoo Linux Developer
pgpui06L7uQ_G.pgp
Description: OpenPGP digital signature