Re: N00b questions - I need help getting started on packaging.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Fri, 14 Aug 2020 at 13:36, Ludovic Hirlimann <ludovic@xxxxxxxxxxxxx> wrote:
> Hi,
> I'm ludo - I'd like to package josm - which requires Apcahe derby and apache-common-jcs-*.
> 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 and
> 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
> Ludovic

>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.


BuildRequires: java-1.8.0-openjdk-devel
export JAVA_HOME=%{_jvmdir}/java-1.8.0
ant ...

Patches are probably needed because Lucene and JavaCC dependencies are
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.
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
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?


Mat Booth
java-devel mailing list -- java-devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to java-devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct:
List Guidelines:
List Archives:

[Index of Archives]     [Red Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux