Elasticsearch debian packaging: Pre-Depends: java8-runtime-headless missing, apt-get install fails #49983
Labels
:Delivery/Packaging
RPM and deb packaging, tar and zip archives, shell and batch scripts
Team:Delivery
Meta label for Delivery team
Elasticsearch version (
bin/elasticsearch --version
): 6.8.5Plugins installed: [elasticsearch-analysis-icu]
JVM version (
java -version
): openjdk version "11.0.4" 2019-07-16OS 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/LinuxDescription 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:
Any JDK that follows the Debian packaging guidelines will then work.
Steps to reproduce:
Deploy elasticsearch debian package to any apt repository.
Attempt to install elasticsearch using apt.
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):
The text was updated successfully, but these errors were encountered: