From: Chapman Flack <chap@anastigmatix.net>
To: Christoph Berg <myon@debian.org>
To: pgsql-pkg-debian@postgresql.org
Subject: Re: advance notice - PL/Java 1.5.0 is in beta
Date: Sat, 06 Feb 2016 15:23:55 -0500
Message-ID: <56B6565B.7070808@anastigmatix.net> (raw)
In-Reply-To: <20160204140409.GH15172@msg.df7cb.de>
References: <56B2B5B8.6090800@anastigmatix.net>
<20160204094809.GA15172@msg.df7cb.de>
<20160204112749.GB15172@msg.df7cb.de>
<56B3588A.6030901@anastigmatix.net>
<20160204140409.GH15172@msg.df7cb.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-pkg-debian>
Hi Christoph,
On 02/04/16 09:04, Christoph Berg wrote:
> Debian wants to be self-contained, which means we don't want to
> download stuff from external sources.
Hmm ... there's a puzzle here, this is a sensible enough policy on
its face, but where it comes to maven-based builds and build-time-
only dependencies, depending on how it's interpreted anyway, it seems
on a direct collision course with the exact way maven is designed
to operate. I am surprised if it has not seemed to cause trouble before
PL/Java.
> At least for the plexus-utils dependency, it looks like pljava is
> trying to use something that is older than what we have packaged in
> Debian. Maybe you could relax that?
This is a good illustration of the problem. pljava does not have
any direct dependency on plexus-utils. That's a transitive dependency
from some build plugin pljava does use. In fact it's probably a
transitive dependency from *several* plugins pljava uses (plexus-utils
being a library plugins would frequently use).
So you see there might be several different plugin authors I could
approach and say "debian only packages plexus-utils 1.5.15-4 and
they block maven from using the repo, so they'll never be able
to build *my* project unless all of you can please update *your*
projects simultaneously so that 1.5.15-4 is the exact version of
plexus-utils that all of your projects depend on, and then everything
will kind of work until the next time debian changes the one version
they happen to provide, could you please do that for me thank you?"
But the thing is--this is really important--*that is the exact
problem maven's design purpose was to never have*. The author of
every artifact and plugin is encouraged, as a best practice, to
specify each dependency with the version number that he or she
knows to work. Maybe some later version is all improved and also
works, maybe it isn't, maybe it breaks something if Maven unexpectedly
substitutes it. Some day each dependency author might evaluate a later
version and decide that it works too, and then update that dependency
version in their pom. There won't ever be a single day when the authors
of all plugins get together and do that and agree on the same one
dependency version that there happens to be a .deb for.
If I run a PL/Java build here starting with an empty local repo, and
collect the mvn -X output, I see that it downloaded the .pom files
for 22 different plexus-utils versions from the central repo.
Based on its own resolution analysis, it then downloaded 10 different
plexus-utils-*.*.jar files. It wrote 54 plexus-utils related
resolution tracking files.
All of that is exactly what Maven normally does, to solve a complicated
transitive dependency problem that we'd be insane to try to do by hand.
That's what makes Maven Maven. To try to apply a policy that says "maven
can't use the repo, we will solve all past/present/future dependency trees
by thinking about them, then settle on the 'blessed' subset of repo
artifacts that we will have .debs for and somehow things will work"
is going to be like cutting William Tell's arms off and then wondering
why he can't shoot straight.
But can all this be looked at another way? What does "Debian wants to be
self-contained" really mean? This is all _build-time_ dependency management
we're talking about here, something that happens on a build server
somewhere, none of it changes the self-contained experience of a debian
installation where the generated .deb will be used.
My suggested approach on the build server would be, make whatever container/
tmpfs arrangements you want, point there for an initially empty maven
repository, sit back and watch maven go to town, then pluck the final
pljava-*.jar file out of there and throw the container away. Make a .deb
out of the jar file. It has exactly two dependencies as far as installation
is concerned: it will need PostgreSQL, and it will need Java. :)
I'm sure PL/Java will not be the last or only Maven-built artifact
that might become available for debian. The build approach I've suggested
here is really the only way I can see to approach it that seems at all
promising....
Cheers,
-Chap
--
Sent via pgsql-pkg-debian mailing list (pgsql-pkg-debian@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-pkg-debian
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-pkg-debian@postgresql.org
Cc: chap@anastigmatix.net, myon@debian.org
Subject: Re: advance notice - PL/Java 1.5.0 is in beta
In-Reply-To: <56B6565B.7070808@anastigmatix.net>
References: <56B2B5B8.6090800@anastigmatix.net> <20160204094809.GA15172@msg.df7cb.de> <20160204112749.GB15172@msg.df7cb.de> <56B3588A.6030901@anastigmatix.net> <20160204140409.GH15172@msg.df7cb.de> <56B6565B.7070808@anastigmatix.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox