how to build with java -8 in epel-6?

Clark Williams clark.williams at gmail.com
Fri Mar 27 17:41:33 UTC 2015


On Fri, 27 Mar 2015 15:05:36 +0100
Farkas Levente <lfarkas at lfarkas.org> wrote:

> hi,
> i'm try to build a java package for epel-6 which use java-8.
> unfortunately it seem it's not enough to simple add
> BuildRequires:  java-1.8.0-openjdk-devel
> since it's install it, but also still install during the mock setup
> session old java packages ie:
> java-1.5.0-gcj                 x86_64 1.5.0.0-29.1.el6         os
>  137 k
> java-1.6.0-sun                 x86_64 1:1.6.0.45-1jpp.1.el6    os
>   25 M
> java-1.7.0-ibm                 x86_64 1:1.7.0.5.0-1jpp.2.el6_4 os
>   73 M
> java-1.7.0-ibm-devel           x86_64 1:1.7.0.5.0-1jpp.2.el6_4 os
>  7.5 M
> java-1.7.0-oracle              x86_64 1:1.7.0.45-1jpp.2.el6_4  os
>   28 M
> and i'm not bale to exclude them. in rpm the is a Obsoletes: but there
> is no such thing as "BuildRequiresObsoletes":-(
> 
> what's more i can't run system-switch-java since it's required root
> access and there is no command line option to switch to a given specific
> java version.
> 
> so during build the system use the default javac which is not java8 but
> ibm's java7 (IBM J9 VM (build 2.6, JRE 1.7.0).
> 
> is there any way to force java8? or is there any way to exclude other
> java vm jre to install into mock during build?
> 
> thanks in advance.
> regards.
> 
> 

As I recall, the java packages include the base version in the name so
that you can install multiple JVMs and support files in parallel. This
is because some component that you depend on requires an earlier JVM
than your application. So, it *should* be ok for you to have Java
1.{5,6,7,8} installed at the same time. Note I said "ok", not "I think
this is a great idea". I think that it's a special kind of crazy that's
built into the java world, but that's just me. 

All that being said, is your problem that you're getting extra java's,
or are you not getting the correct package being installed into the
chroot? If it's extra java packages, then that is a works-as-designed
issue. 

If your 'BuildRequires: java-1.8.0-openjdk-devel' isn't pulling in the
appropriate packages then we need to dig deeper.

Clark

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.fedoraproject.org/pipermail/buildsys/attachments/20150327/4f7b4909/attachment.sig>


More information about the buildsys mailing list