# we don't have a changelog, but we put our copyright file
# under /usr/share/doc/elasticsearch, which triggers this warning
# Note that this is renamed to `no-changelog` in newer versions of
# lintian, but we still support Debian 8+, so we can't change this.
changelog-file-missing-in-native-package

# we intentionally copy our copyright file for all deb packages
copyright-file-contains-full-apache-2-license
copyright-not-using-common-license-for-apache2
copyright-without-copyright-notice

# we still put all our files under /usr/share/elasticsearch even after transition to platform dependent packages
arch-dependent-file-in-usr-share

# we have a bundled jdk, so don't use jarwrapper
missing-dep-on-jarwrapper

# we prefer to not make our config and log files world readable
non-standard-file-perm etc/default/elasticsearch 0660 != 0644
non-standard-dir-perm etc/elasticsearch/ 2750 != 0755
non-standard-dir-perm etc/elasticsearch/jvm.options.d/ 2750 != 0755
non-standard-file-perm etc/elasticsearch/*
non-standard-dir-perm var/lib/elasticsearch/ 2750 != 0755
non-standard-dir-perm var/log/elasticsearch/ 2750 != 0755

# this lintian tag is simply wrong; contrary to the explanation, Debian systemd
# does actually look at /usr/lib/systemd/system
systemd-service-file-outside-lib usr/lib/systemd/system/elasticsearch.service

# the package scripts handle systemd directly and don't need to use deb helpers
maintainer-script-calls-systemctl

# bundled JDK
embedded-library
unstripped-binary-or-object usr/share/elasticsearch/jdk/*
extra-license-file usr/share/elasticsearch/jdk/legal/*
hardening-no-pie usr/share/elasticsearch/jdk/bin/*
hardening-no-pie usr/share/elasticsearch/jdk/lib/*

# the system java version that lintian assumes is far behind what elasticsearch uses
unknown-java-class-version

# elastic licensed modules contain elastic license
extra-license-file usr/share/elasticsearch/modules/*

# This dependency appears to have a packaging flaw, and includes a
# generated source file alongside the compiled version
jar-contains-source usr/share/elasticsearch/modules/repository-gcs/api-common*.jar *

# There's no `License` field in Debian control files, but earlier versions
# of `lintian` were more permissive. Override this warning so that we can
# run `lintian` on different releases of Debian. The format of this override
# varies between `lintian` versions.
unknown-field elasticsearch-*.deb License
unknown-field License

# Intel MKL libraries are not linked directly to libc. They are linked
# indirectly to libc via libdl. This might not be best practice but we
# don't build them ourselves and the license precludes us modifying them
# to fix this.
library-not-linked-against-libc usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/lib/libmkl_*.so
