Hi,
Lot of Java packages from JPackage/Fedora and other distros would build
"as is" on openSUSE/SLE except for a small "mess".
- SLE requires target bytecode set to 1.5. (because there is only 1.5
Java for all archs)
- This bytecode requirement is usually fixed by changing the ant call to
ant -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5.
However sometimes you need to pass similar options to javac or mvn-jpp
if they are invoked from the spec file.
- Even while SLE requires 1.5 bytecode, %{ant} evaluates to
"JAVA_HOME=/usr/lib64/jvm/java ant", the same as in openSUSE
- Some specs call %{ant}, but others just call ant.
I am tired of editing spec files only to add this SLE specific
requirement in order to keep packages building for all repositories. So
I am looking for a better solution for our Java:base repository.
One solution I was thinking was to create a helper package installing an
alias in /etc/profile.d so that ant becomes ant
-Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5. Add this
package to the project config surrounded by if sle_version. A similar
alias would be added for mvn-jpp. However I could not get this to work
with rpm.
This would allow to build the packages that use "ant" or "mvn-jpp"
directly without touching the spec file. Fixing the spec files to use
%{ant} would still be possible in parallel, but is not worth while this
fixes do not go upstream and a similar macro would be needed for mvn-jpp.
I am open to hear more solutions. Another may be using source services
to "fix" the spec file, but that would require to add a _service per
package. Only have in mind that the goal is to not touch the spec file,
but either workaround it in the project setup, or to adapt SUSE
conventions so that other's packages become buildable.
And the ideal solution of course would be to fix all packages to use a
target macro, but this is only worth if these changes go upstream to
Fedora and JPackage.
--
Duncan Mac-Vicar P. - Novell® Making IT Work As One™
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix
Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany
--
To unsubscribe, e-mail: opensuse-java+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-java+help(a)opensuse.org