Elasticsearch: [debian package] java dependency

Created on 14 May 2014  路  9Comments  路  Source: elastic/elasticsearch

The debian package should have an explicit dependency on java

:DeliverPackaging Delivery

Most helpful comment

This is just doing packaging the wrong way. If you are going to install a java version manually, you can install Elastic Search manually too, because you've already decided that you don't want your package manager to handle dependencies for you.
If you are going to package something, you need to declare dependencies, otherwise the package isn't actually useful.
Anyone who wants to manually install java, and use a package for Elastic Search can use a dummy package that satisfies the JRE requirement.

Please reconsider this decision so your apt repo and deb packages are actually useful

All 9 comments

+1

-1

I want to configure it with my own Java version, so I dont want any Java installed automatically from any Debian/Ubuntu repository. The workaround would only be to install a fake java package, but that makes it harder to install.

Isn't there a virtual package or something that just say "I need some version of Java, you figure it out"? I remember something like that in Debian but not the specifics. It'd be annoying if you aren't using a Debian package for Java though. As much as that's not recommended it'd be nice to support it somehow.

@uschindler Why don't you install your desired java version prior to elasticsearch? If the package is built properly it should "provide" the dependency elasticsearch has, yes? eg: openjdk-6-jre-headless "provides" java6-runtime-headless. Otherwise, why use a package manager if you don't tell the package manager what all your dependencies are?

I want to prevent (and that is the intention of the ES developers) to "automatically" install any crazy java version. Lucene is very sensitive to Java bugs, so unless there is some conflicts in the package on several Java versions like 7u40, 7u45, 7u51 or 7GA (build 147), its very risky to add a dependency on "any" java. Also IBM J9 is a no-go for Lucene.

If you get a good error message on startup that a Java is missing, one can istall one and its his own risk to choose the right one. The package maintainer of a separate repository like ES's cannot do this.

Got to agree with @uschindler here - we recommend the latest JVM and prefer Oracle. Requiring a debian package of Java will just make things more complex.

Closing

This is just doing packaging the wrong way. If you are going to install a java version manually, you can install Elastic Search manually too, because you've already decided that you don't want your package manager to handle dependencies for you.
If you are going to package something, you need to declare dependencies, otherwise the package isn't actually useful.
Anyone who wants to manually install java, and use a package for Elastic Search can use a dummy package that satisfies the JRE requirement.

Please reconsider this decision so your apt repo and deb packages are actually useful

@timwsuqld Incredible that this is even a question, you summed it up really well.

@clintongormley Any chance that closing this can be reconsidered? This is just BAD packaging practices. It makes it stupidly hard to use the packages in a consistent way, and anyone who wants their own version of Java should be installing a dummy java package anyway, otherwise when another package pulls in a Java dependency, they'll potentially end up with Java issues then.

Was this page helpful?
0 / 5 - 0 ratings