Update opendistro plugin ebuilds

Rename opendistro-kibana-plugin to opendistro-security-kibana-plugin;
Add opendistro-security-kibana-plugin-0.10.0.3-r1.ebuild;
Update INSTALL_PATH and src_install() in other opendistro plugin ebuilds;
Fix header and dependency revision issues;
This commit is contained in:
Grigory Antsiferov 2019-10-24 13:35:27 +03:00
parent a00a337bf6
commit 49067c53fd
7 changed files with 36 additions and 180 deletions

View File

@ -1,4 +1,4 @@
# Copyright 2019 RBK.money
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -20,16 +20,18 @@ declare -A my_dep_ref=(
[security_ssl]="refs/tags/v${PV}"
)
S="${WORKDIR}/security"
INSTALL_PATH="/usr/share/elasticsearch/plugins_archive/"
PLUGIN_NAME="opendistro_security-${PV}"
INSTALL_PATH="/usr/share/elasticsearch/plugins/${PLUGIN_NAME}"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
RESTRICT="mirror"
COMMON_DEPS="dev-libs/openssl:0
virtual/jdk:11"
RDEPEND="${COMMON_DEPS}
=app-misc/elasticsearch-6.8.1"
~app-misc/elasticsearch-6.8.1"
DEPEND="${COMMON_DEPS}
dev-java/maven-bin
app-arch/unzip"
@ -64,6 +66,6 @@ src_compile() {
mvn install -Dmaven.repo.local="${WORKDIR}"/.m2/repository -DskipTests=true -P advanced || die
}
src_install() {
dodir "/usr/share/elasticsearch/plugins/${PN}"
unzip "target/releases/opendistro_security-${PV}.zip" -d "${D}/usr/share/elasticsearch/plugins/${PN}" || die
dodir "${INSTALL_PATH}"
unzip "target/releases/${PLUGIN_NAME}.zip" -d "${D}${INSTALL_PATH}" || die
}

View File

@ -1,71 +0,0 @@
# Copyright 2019 RBK.money
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit git-r3
DESCRIPTION="Open Distro for Elasticsearch Security"
HOMEPAGE="https://github.com/opendistro-for-elasticsearch/"
declare -A my_dep_repo=(
[security]="https://github.com/rbkmoney/opendistro-security"
[security_parent]="https://github.com/rbkmoney/opendistro-security-parent"
[security_ssl]="https://github.com/rbkmoney/opendistro-security-ssl"
[security_advanced]="https://github.com/rbkmoney/opendistro-security-advanced-modules"
)
declare -A my_dep_ref=(
[security]="dcab69a0d5e32723ac1b182e3924fb0abc512130"
[security_parent]="b3ddd5c012904f00c8765194790fb4558ca8da36"
[security_ssl]="e684e6004d96f5a611b0ca176d87039d03220ddd"
[security_advanced]="35d2daf52b9f71c193092bab53af600b7f4c9bf7"
)
S="${WORKDIR}/security"
INSTALL_PATH="/usr/share/elasticsearch/plugins_archive/"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="dev-libs/openssl:0
>=virtual/jdk-1.8:*"
DEPEND="${RDEPEND}
dev-java/maven-bin"
my_fetch_dep() {
local name="${1}"
local repo="${my_dep_repo[${name}]}" ref="${my_dep_ref[${name}]}"
git-r3_fetch "${repo}" "${ref}"
git-r3_checkout "${repo}" "${WORKDIR}/${name}"
}
my_compile_dep() {
local name="${1}"
einfo "Compiling ${name}"
cd "${WORKDIR}/${name}" || die
mvn install -Dmaven.repo.local="${WORKDIR}"/.m2/repository -DskipTests=true || die
cd "${S}" || die
}
src_unpack() {
for name in security security_parent security_ssl security_advanced; do
my_fetch_dep "${name}"
done
}
src_prepare() {
mkdir -p "${WORKDIR}"/.m2/repository
eapply_user
}
src_compile() {
for name in security_parent security_ssl security security_advanced; do
my_compile_dep "${name}"
done
# Package security and security-advanced as plugin
mvn install -Dmaven.repo.local="${WORKDIR}"/.m2/repository -DskipTests=true -P advanced || die
}
src_install() {
insinto ${INSTALL_PATH}
doins target/releases/opendistro_security-${PV}-rbkmoney.zip
}
pkg_postinst() {
elog "You may install plugin by executing command:"
elog "/usr/share/elasticsearch/bin/elasticsearch-plugin install -b file://${INSTALL_PATH}opendistro_security-${PV}-rbkmoney.zip"
}

View File

@ -1,4 +1,4 @@
# Copyright 2019 RBK.money
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@ -18,7 +18,8 @@ declare -A my_dep_ref=(
[security_advanced]="refs/tags/v${PV}"
)
S="${WORKDIR}/security"
INSTALL_PATH="/usr/share/elasticsearch/plugins_archive/"
PLUGIN_NAME="opendistro_security-${PV}"
INSTALL_PATH="/usr/share/elasticsearch/plugins/${PLUGIN_NAME}"
LICENSE="MIT"
SLOT="0"
@ -27,7 +28,7 @@ KEYWORDS="~amd64"
COMMON_DEPS="dev-libs/openssl:0
virtual/jdk:11"
RDEPEND="${COMMON_DEPS}
=app-misc/elasticsearch-7.2.0"
~app-misc/elasticsearch-7.2.0"
DEPEND="${COMMON_DEPS}
dev-java/maven-bin
app-arch/unzip"
@ -62,6 +63,6 @@ src_compile() {
mvn install -Dmaven.repo.local="${WORKDIR}"/.m2/repository -DskipTests=true -P advanced || die
}
src_install() {
dodir "/usr/share/elasticsearch/plugins/${PN}"
unzip "target/releases/opendistro_security-${PV}.zip" -d "${D}/usr/share/elasticsearch/plugins/${PN}" || die
dodir "${INSTALL_PATH}"
unzip "target/releases/${PLUGIN_NAME}.zip" -d "${D}${INSTALL_PATH}" || die
}

View File

@ -1,69 +0,0 @@
# Copyright 2019 RBK.money
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit git-r3
DESCRIPTION="Open Distro for Elasticsearch Security"
HOMEPAGE="https://github.com/opendistro-for-elasticsearch/"
declare -A my_dep_repo=(
[security]="https://github.com/opendistro-for-elasticsearch/security"
[security_parent]="https://github.com/opendistro-for-elasticsearch/security-parent"
[security_advanced]="https://github.com/opendistro-for-elasticsearch/security-advanced-modules"
)
declare -A my_dep_ref=(
[security]="refs/tags/v${PV}"
[security_parent]="refs/tags/v${PV}"
[security_advanced]="refs/tags/v${PV}"
)
S="${WORKDIR}/security"
INSTALL_PATH="/usr/share/elasticsearch/plugins_archive/"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="dev-libs/openssl:0
virtual/jdk:11"
DEPEND="${RDEPEND}
dev-java/maven-bin"
my_fetch_dep() {
local name="${1}"
local repo="${my_dep_repo[${name}]}" ref="${my_dep_ref[${name}]}"
git-r3_fetch "${repo}" "${ref}"
git-r3_checkout "${repo}" "${WORKDIR}/${name}"
}
my_compile_dep() {
local name="${1}"
einfo "Compiling ${name}"
cd "${WORKDIR}/${name}" || die
mvn install -Dmaven.repo.local="${WORKDIR}"/.m2/repository -DskipTests=true || die
cd "${S}" || die
}
src_unpack() {
for name in security security_parent security_advanced; do
my_fetch_dep "${name}"
done
}
src_prepare() {
mkdir -p "${WORKDIR}"/.m2/repository
eapply_user
}
src_compile() {
for name in security_parent security security_advanced; do
my_compile_dep "${name}"
done
# Package security and security-advanced as plugin
mvn install -Dmaven.repo.local="${WORKDIR}"/.m2/repository -DskipTests=true -P advanced || die
}
src_install() {
insinto ${INSTALL_PATH}
doins target/releases/opendistro_security-${PV}.zip
}
pkg_postinst() {
elog "You may install plugin by executing command:"
elog "/usr/share/elasticsearch/bin/elasticsearch-plugin install -b file://${INSTALL_PATH}opendistro_security-${PV}-rbkmoney.zip"
}

View File

@ -1,32 +1,34 @@
# Copyright 2019 RBK.money
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit git-r3
DESCRIPTION="Open Distro for Elasticsearch Security"
DESCRIPTION="Open Distro security Kibana plugin"
HOMEPAGE="https://github.com/opendistro-for-elasticsearch/"
declare -A my_dep_repo=(
[security_kibana_plugin]="https://github.com/rbkmoney/opendistro-security-kibana-plugin"
[security_parent]="https://github.com/rbkmoney/opendistro-security-parent"
[security_kibana_plugin]="https://github.com/opendistro-for-elasticsearch/security-kibana-plugin"
[security_parent]="https://github.com/opendistro-for-elasticsearch/security-parent"
)
declare -A my_dep_ref=(
[security_kibana_plugin]="b102040d0c4442cbd9bf96a8b5fe709f64e057d2"
[security_parent]="b3ddd5c012904f00c8765194790fb4558ca8da36"
[security_kibana_plugin]="refs/tags/v${PV}"
[security_parent]="refs/tags/v0.10.0.1"
)
S="${WORKDIR}/security_kibana_plugin"
INSTALL_PATH="/usr/share/elasticsearch/plugins_archive/"
PLUGIN_NAME="opendistro_security_kibana_plugin-${PV}-rbkmoney"
PLUGIN_NAME="opendistro_security_kibana_plugin-${PV}"
INSTALL_PATH="/var/lib/kibana/plugins/${PLUGIN_NAME}"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND=""
DEPEND=">=virtual/jdk-1.8:*
>=net-libs/nodejs-8.15.1
dev-java/maven-bin"
RDEPEND=">=net-libs/nodejs-10.16
~www-apps/kibana-bin-6.8.1"
DEPEND="${RDEPEND}
virtual/jdk:11
dev-java/maven-bin
app-arch/unzip"
my_fetch_dep() {
local name="${1}"
@ -64,11 +66,6 @@ src_compile() {
}
src_install() {
insinto ${INSTALL_PATH}
doins target/releases/${PLUGIN_NAME}.zip
}
pkg_postinst() {
elog "You may install plugin by executing command:"
elog "/usr/share/elasticsearch/bin/elasticsearch-plugin install -b file://${INSTALL_PATH}${PLUGIN_NAME}.zip"
dodir "${INSTALL_PATH}"
unzip "target/releases/${PLUGIN_NAME}.zip" -d "${D}${INSTALL_PATH}" || die
}

View File

@ -1,10 +1,10 @@
# Copyright 2019 RBK.money
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit git-r3
DESCRIPTION="Open Distro for Elasticsearch Security"
DESCRIPTION="Open Distro security Kibana plugin"
HOMEPAGE="https://github.com/opendistro-for-elasticsearch/"
declare -A my_dep_repo=(
@ -16,8 +16,8 @@ declare -A my_dep_ref=(
[security_parent]="refs/tags/v1.2.0.0"
)
S="${WORKDIR}/security_kibana_plugin"
INSTALL_PATH="/usr/share/elasticsearch/plugins_archive/"
PLUGIN_NAME="opendistro_security_kibana_plugin-${PV}"
INSTALL_PATH="/var/lib/kibana/plugins/${PLUGIN_NAME}"
LICENSE="MIT"
SLOT="0"
@ -26,7 +26,8 @@ KEYWORDS="~amd64"
RDEPEND=""
DEPEND="virtual/jdk:11
>=net-libs/nodejs-10.16
dev-java/maven-bin"
dev-java/maven-bin
app-arch/unzip"
my_fetch_dep() {
local name="${1}"
@ -64,11 +65,6 @@ src_compile() {
}
src_install() {
insinto ${INSTALL_PATH}
doins target/releases/${PLUGIN_NAME}.zip
}
pkg_postinst() {
elog "You may install plugin by executing command:"
elog "/usr/share/elasticsearch/bin/elasticsearch-plugin install -b file://${INSTALL_PATH}${PLUGIN_NAME}.zip"
dodir "${INSTALL_PATH}"
unzip "target/releases/${PLUGIN_NAME}.zip" -d "${D}${INSTALL_PATH}" || die
}