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

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

 



On 8/14/20 4:53 PM, Mat Booth wrote:
> 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 https://docs.fedoraproject.org/en-US/packaging-guidelines/Java/ and https://fedora-java.github.io/howto/latest/.
>> 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 https://src.fedoraproject.org/rpms/derby/pull-request/1#request_diff 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.
>
> E.g.:
>
> BuildRequires: java-1.8.0-openjdk-devel
> ...
> %build
> export JAVA_HOME=%{_jvmdir}/java-1.8.0
> ant ...


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 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.
Noted and 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
> upstream.
>
>
> 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.

Thank you

Ludo
-- 
https://www.hirlimann.net/Ludovic/carnet/


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
java-devel mailing list -- java-devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to java-devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/java-devel@xxxxxxxxxxxxxxxxxxxxxxx

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

  Powered by Linux