Convert repository plugins to modules (#81870)

Closes #81652.

Convert the `repository-azure`, `repository-gcs` and `repository-s3`
plugins into modules, so that they are always included in the
Elasticsearch distribution. Also change plugin installation, removal
and syncing so that attempting to add or remove these plugins still
succeeds but is now a no-op.
This commit is contained in:
Rory Hunter 2022-01-10 10:45:42 +00:00 committed by GitHub
parent 78509f44d1
commit d2dbef5063
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
286 changed files with 628 additions and 304 deletions

View file

@ -291,8 +291,10 @@ Closure commonDebConfig(String architecture) {
return {
configure(commonPackageConfig('deb', architecture))
// jdeb does not provide a way to set the License control attribute, and ospackage
// silently ignores setting it. Instead, we set the license as "custom field"
// jdeb does not provide a way to set the License control attribute, and
// ospackage silently ignores setting it. This is probably because `License`
// is not actually a field in the Debian control file. So instead, we set
// the license as "custom field".
customFields['License'] = 'Elastic-License'
archiveVersion = project.version.replace('-', '~')

View file

@ -8,6 +8,8 @@
# $1=0 : indicates a removal
# $1=1 : indicates an upgrade
set -e
# source the default env file
if [ -f "@path.env@" ]; then
. "@path.env@"

View file

@ -9,6 +9,8 @@
# $1=0 : indicates a removal
# $1=1 : indicates an upgrade
set -e
# source the default env file
if [ -f "@path.env@" ]; then
. "@path.env@"

View file

@ -1,3 +1,5 @@
set -e
# source the default env file
if [ -f "@path.env@" ]; then
. "@path.env@"

View file

@ -10,6 +10,8 @@
# $1=1 : indicates an new install
# $1=2 : indicates an upgrade
set -e
err_exit() {
echo "$@" >&2
exit 1

View file

@ -9,6 +9,8 @@
# $1=0 : indicates a removal
# $1=1 : indicates an upgrade
set -e
# source the default env file
if [ -f "@path.env@" ]; then
. "@path.env@"

View file

@ -1,10 +1,12 @@
# 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-should-refer-to-common-license-file-for-apache-2
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
@ -21,7 +23,7 @@ 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
# 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
@ -30,7 +32,6 @@ maintainer-script-calls-systemctl
# bundled JDK
embedded-library
arch-dependent-file-in-usr-share usr/share/elasticsearch/jdk/*
unstripped-binary-or-object usr/share/elasticsearch/jdk/*
extra-license-file usr/share/elasticsearch/jdk/legal/*
hardening-no-pie usr/share/elasticsearch/jdk/bin/*
@ -41,3 +42,12 @@ 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.
unknown-field elasticsearch-*.deb License