On 8/14/20 4:53 PM, Mat Booth wrote:
On Fri, 14 Aug 2020 at 13:36, Ludovic Hirlimann
> I'm ludo - I'd like to package josm - which requires Apcahe derby and
> I've managed to compile derby on my fedora 32 vagrant host.
> For that I had to force the compiler to not be the 1.8 using the JAVA_HOME variable
so ants would use the compiler from the 11-openjdk-devel package.
> I'm reading https://docs.fedoraproject.org/en-US/packaging-guidelines/Java/
> I'm far from being a java programmer and this is my first attempt at building a
linux package. And that's why I'm writing this email.
> I've got some inspiration from
as derby used to be
packaged for fedora/RHEL in the past.
> Looking at that spec file, I don't see how one can specify which version of javac
to use and force while buidling. I also don't understand the need to the patch files
nor do I get the fact that this ant build needs maven magic in the packaging.
> I'll gladly RTFM anything sent to me, but I'd like to figure out the next
steps in order to package derby , now that I have a build that doesn't fail.
> Thanks in advance for your patience and time
From F33 the default version of Java is 11 but you can force a
specific version by adding a BR (BuildRequires) on the appropriate
java-*-devel package and setting JAVA_HOME in the environment before
calling ant or maven.
Thank you very much. This is duly noted, derby's requirement is >9, so
11 is fine.
Patches are probably needed because Lucene and JavaCC dependencies
newer in Fedora than expected by Derby. Where possible we generally
try to carry only the latest version of libraries in order to avoid a
combinatorial explosion of things we'd otherwise need to package.
understood. I'll have a closer look at these then.
Packages should be patched such that they work with the version
available in Fedora. Updating a project to the latest version of one
of its dependencies are patches that are good candidates to be sent
Maven "magic" (actually https://fedora-java.github.io/howto/latest/
does a great job at explaining the macros, see also their man pages)
is needed for the same reason Derby is published to maven central even
though it is built with ant: Maven is the de-facto way of managing
one's dependencies in the Java world. The major build tools maven,
gradle and ant/ivy all speak to maven repositories to resolve their
dependencies. Since other Fedora packages might rely on your package
as a dependency, your packages must be installed in such a way that
Fedora's version of maven can understand.
Does this all make sense?
It does. I just need to read an learn a *lot* more about the Java ecosystem.