Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elasticsearch debian packaging: Pre-Depends: java8-runtime-headless missing, apt-get install fails #49983

Closed
minfrin opened this issue Dec 9, 2019 · 2 comments
Labels
:Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts Team:Delivery Meta label for Delivery team

Comments

@minfrin
Copy link

minfrin commented Dec 9, 2019

Elasticsearch version (bin/elasticsearch --version): 6.8.5

Plugins installed: [elasticsearch-analysis-icu]

JVM version (java -version): openjdk version "11.0.4" 2019-07-16

OS version (uname -a if on a Unix-like system): Linux x-jm-unstable-black-els01 4.15.0-1056-aws #58-Ubuntu SMP Tue Nov 26 15:14:34 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Description of the problem including expected versus actual behavior:

The elasticsearch Debian packaging does not following the Debian packaging guidelines at

https://www.debian.org/doc/debian-policy/ch-relationships.html#binary-dependencies-depends-recommends-suggests-enhances-pre-depends

nor the Java packaging guideline at

https://wiki.debian.org/Java#Java_and_Debian

Most specifically:

"Pre-Depends are also required if the preinst script depends on the named package. It is best to avoid this situation if possible."

and

"There are several virtual packages used in Debian for Java. These cover runtime compatibility and come in two flavours; headless (omits graphical interfaces) and normal. A dependency on javaX-runtime means that the package can work with any runtime which implements version X."

To fix this, the elasticsearch package must add a Pre-Depends with the virtual package for Java as follows:

Pre-Depends: java8-runtime-headless

Any JDK that follows the Debian packaging guidelines will then work.

Steps to reproduce:

  1. Deploy elasticsearch debian package to any apt repository.

  2. Attempt to install elasticsearch using apt.

  3. apt fails as follows, and apt is broken from this point on until elasticsearch is manually removed:

    Errors were encountered while processing:
    /tmp/apt-dpkg-install-EqsMZQ/21-elasticsearch_6.8.5_all.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)

Provide logs (if relevant):

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Packaging)

@rjernst
Copy link
Member

rjernst commented Dec 9, 2019

Please see #31845. This was a long known issue, which we have now solved since 7.0 by bundling java in Elasticsearch. As we have no plans to backport that change to 6.8 (it was quite invasive on our packaging build structure, and changes the packages themselves to be platform dependent), I hope you don't mind that I close this issue.

@rjernst rjernst closed this as completed Dec 9, 2019
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts Team:Delivery Meta label for Delivery team
Projects
None yet
Development

No branches or pull requests

5 participants