From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- app-admin/filebeat/Manifest | 8 ++++ app-admin/filebeat/filebeat-5.5.2.ebuild | 69 ++++++++++++++++++++++++++++++++ app-admin/filebeat/filebeat-5.6.2.ebuild | 69 ++++++++++++++++++++++++++++++++ app-admin/filebeat/files/filebeat.confd | 15 +++++++ app-admin/filebeat/files/filebeat.initd | 43 ++++++++++++++++++++ app-admin/filebeat/metadata.xml | 15 +++++++ 6 files changed, 219 insertions(+) create mode 100644 app-admin/filebeat/Manifest create mode 100644 app-admin/filebeat/filebeat-5.5.2.ebuild create mode 100644 app-admin/filebeat/filebeat-5.6.2.ebuild create mode 100644 app-admin/filebeat/files/filebeat.confd create mode 100644 app-admin/filebeat/files/filebeat.initd create mode 100644 app-admin/filebeat/metadata.xml (limited to 'app-admin/filebeat') diff --git a/app-admin/filebeat/Manifest b/app-admin/filebeat/Manifest new file mode 100644 index 000000000000..a98ee15f4cd7 --- /dev/null +++ b/app-admin/filebeat/Manifest @@ -0,0 +1,8 @@ +AUX filebeat.confd 269 SHA256 c0de5c04228bc7eb683aacba029407238ff8ec66cc1dedb3decf16653791523a SHA512 89f2a8ead476750b3fd9a94dcc84311503907e78e66c70d151f27c7fdc8835e7bae6667a6aed0b6470a8f9b42c850396973fd09b1b6aec2d170e3774c8cfddff WHIRLPOOL aad29bbd4ba57dad89f002c2c2535aa0b9d61b7caf594345e95290de451eba99eb6015605fc705729ceaeaf1833c09527521535e53be7d8b09e310cea4492abe +AUX filebeat.initd 1388 SHA256 e971b72d85f82d94c604fcc647e208110f9d6d85d117cc99c8352ce0624ad1fd SHA512 9b08635b9ba6e180881780de0fa9d6c8c1b2e7496fc803c2b38127fee13d13ca5d00792132cdc8bd4073018e3f6e374d4164a86e450a1dbeb68b2694fa0dbb12 WHIRLPOOL 64afa8526619f7f30149b4befae10e1b2706e29b76f12de1793caeeb7d1d84d25e48639eb5beafb22ffb8ba5d86a231e399a7e2427d30112430bbff416066756 +DIST filebeat-5.5.2.tar.gz 18075191 SHA256 39e792324a35fe84ef9a63cd5324252bc71d1c665188e8d597e12ca170cfde7a SHA512 ad92b41a9ceaad6c6e6fc80d0adccd7fe03a7056d121484bcf35c6a46b2061a5ef6d32121dd12d59b51e7678769da5c405b1d549fa130631ae3f1989b78fba48 WHIRLPOOL 46d182bd339abd26f3c4cf3f8d3a716180fc00147458f571eec34aefcaa67d9e88a561988e37c47083528024e4e0559b255c7a17efa43e0e4b21b653a575f7fd +DIST filebeat-5.6.2.tar.gz 18142395 SHA256 72e247d6ec3586883cd58bc6465d18b7eb0857763ff422259205abf090557e45 SHA512 0132be77bfa51aa43b7d0ca9466bd7ab602bddffe163bd63270a3192601c9f9bc9f85f1ad18bf2e90ba5df1f6a4b14be0fc08148c2e75c264e5da7268b9fb92a WHIRLPOOL e25ebf7594fe54c325d72a8f5db09bfb21ed33df42d682cbff6383390f3daebbf57bd15d687bfff6bc740f44ebad9e4d4e5a1329bd18c213aefdea5de7b8d2dd +EBUILD filebeat-5.5.2.ebuild 1646 SHA256 b9281e14fd3e6acf96adb966e2c1b4c276f45da05548705fb2d298677d161ee9 SHA512 4b36e36a4f95c893bca863c4510e903f6265e4950fa000cae61896915c558beb4d8c4b10d8aa78d154bef7eb67886628f499153f988ff66e5b1066cb949b2029 WHIRLPOOL c80379faf373477d2936b0168dda1e6152e1baf4f7246694664c129c5d8d501d1d015ef912beeeee2eaafc95d863a245e206ac0e8ee41b755f82a8639192a9f8 +EBUILD filebeat-5.6.2.ebuild 1647 SHA256 bb6e6f33a5a6f529bd41f027be1cddce3a71db391a3d64098a137b4ad1c5b7ab SHA512 b64da8481ef50ffc13f51dc82ae0d4cf0101b6b27f502e3341a6513d62984c23b31bcf0ca0f8c4a214f133b19c4eb73d83dcb5ad0c73dc54d8a8131caf866c9c WHIRLPOOL 10c1e883a69517990d050485e0d7dc1c9815cbeaf81642068f40cbc7c8ce708fe40ebc8588e055c2f49926afe7b89aae4350b2cdb525430fe758972903b47a5c +MISC ChangeLog 1060 SHA256 6576a8df817222dcb6b4dd928de9b7a133af968b50f164ce7f2791cafac947da SHA512 69aac439a83b3c58daf3be4d4434eb4715c22c3a1c41e8a250107627eb464f37fee52e2af20ea00a71b703344f4e4f2155c0fccd915c96fb88dc070e26f8f71f WHIRLPOOL b80429d4faf932ca42b3bf8433b03cd3d33a986245e3879c5716aae1caf514899ccc8ab4a26eaa06e254d4dfb185da92d84cc2adccc993822a5efbee86be2e91 +MISC metadata.xml 461 SHA256 94fffc864abb707e5594de973d0bf23fdf364533744acab01d2629e679967889 SHA512 903c43c9cf4b371e34afffd0b425086d5fba6f37af0d761fc0065d114dc843ea0dcdd439682e48749bdf2f9138bfc3dc6cfcc6490503daeb7a71ce5706a779d8 WHIRLPOOL b3e19ddf3062d2903cf3e86a726e82eaf5a3d7c9b247f33b92017a591fc598aace0b65f9d6acba5ed592f6f9d374447fa7b5d4931ffedb41adea057d37a5058c diff --git a/app-admin/filebeat/filebeat-5.5.2.ebuild b/app-admin/filebeat/filebeat-5.5.2.ebuild new file mode 100644 index 000000000000..b61d0fb18c21 --- /dev/null +++ b/app-admin/filebeat/filebeat-5.5.2.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Lightweight log shipper for Logstash and Elasticsearch" +HOMEPAGE="https://www.elastic.co/products/beats" +SRC_URI="https://github.com/elastic/beats/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64 ~x86" + +DEPEND=">=dev-lang/go-1.8.3" +RDEPEND="!app-admin/filebeat-bin" + +ELASTIC="${WORKDIR}/src/github.com/elastic" +BEATS="${ELASTIC}/beats" +S="${BEATS}" + +src_unpack() { + mkdir -p "${ELASTIC}" || die + unpack ${P}.tar.gz + mv beats-${PV} "${BEATS}" || die +} + +src_compile() { + cd ${BEATS}/filebeat || die + GOPATH="${WORKDIR}" emake +} + +src_test() { + cd ${BEATS}/filebeat || die + GOPATH="${WORKDIR}" emake check +} + +src_install() { + keepdir /var/{lib,log}/${PN} + + fperms 0750 /var/{lib,log}/${PN} + + newconfd "${FILESDIR}/${PN}.confd" ${PN} + newinitd "${FILESDIR}/${PN}.initd" ${PN} + + insinto "/usr/share/doc/${PF}/examples" + doins ${PN}/{filebeat.yml,filebeat.full.yml} + + insinto "/etc/${PN}" + doins ${PN}/{filebeat.template.json,filebeat.template-es2x.json,filebeat.template-es6x.json} + + exeinto "/usr/share/${PN}" + doexe libbeat/scripts/migrate_beat_config_1_x_to_5_0.py + + dobin filebeat/filebeat +} + +pkg_postinst() { + if [[ -n "${REPLACING_VERSIONS}" ]]; then + elog "Please read the migration guide at:" + elog "https://www.elastic.co/guide/en/beats/libbeat/5.0/upgrading.html" + elog "" + elog "The migration script:" + elog "${EROOT%/}/usr/share/filebeat/migrate_beat_config_1_x_to_5_0.py" + elog "" + fi + + elog "Example configurations:" + elog "${EROOT%/}/usr/share/doc/${PF}/examples" +} diff --git a/app-admin/filebeat/filebeat-5.6.2.ebuild b/app-admin/filebeat/filebeat-5.6.2.ebuild new file mode 100644 index 000000000000..451e2191c7ae --- /dev/null +++ b/app-admin/filebeat/filebeat-5.6.2.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Lightweight log shipper for Logstash and Elasticsearch" +HOMEPAGE="https://www.elastic.co/products/beats" +SRC_URI="https://github.com/elastic/beats/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +DEPEND=">=dev-lang/go-1.8.3" +RDEPEND="!app-admin/filebeat-bin" + +ELASTIC="${WORKDIR}/src/github.com/elastic" +BEATS="${ELASTIC}/beats" +S="${BEATS}" + +src_unpack() { + mkdir -p "${ELASTIC}" || die + unpack ${P}.tar.gz + mv beats-${PV} "${BEATS}" || die +} + +src_compile() { + cd ${BEATS}/filebeat || die + GOPATH="${WORKDIR}" emake +} + +src_test() { + cd ${BEATS}/filebeat || die + GOPATH="${WORKDIR}" emake check +} + +src_install() { + keepdir /var/{lib,log}/${PN} + + fperms 0750 /var/{lib,log}/${PN} + + newconfd "${FILESDIR}/${PN}.confd" ${PN} + newinitd "${FILESDIR}/${PN}.initd" ${PN} + + insinto "/usr/share/doc/${PF}/examples" + doins ${PN}/{filebeat.yml,filebeat.full.yml} + + insinto "/etc/${PN}" + doins ${PN}/{filebeat.template.json,filebeat.template-es2x.json,filebeat.template-es6x.json} + + exeinto "/usr/share/${PN}" + doexe libbeat/scripts/migrate_beat_config_1_x_to_5_0.py + + dobin filebeat/filebeat +} + +pkg_postinst() { + if [[ -n "${REPLACING_VERSIONS}" ]]; then + elog "Please read the migration guide at:" + elog "https://www.elastic.co/guide/en/beats/libbeat/5.0/upgrading.html" + elog "" + elog "The migration script:" + elog "${EROOT%/}/usr/share/filebeat/migrate_beat_config_1_x_to_5_0.py" + elog "" + fi + + elog "Example configurations:" + elog "${EROOT%/}/usr/share/doc/${PF}/examples" +} diff --git a/app-admin/filebeat/files/filebeat.confd b/app-admin/filebeat/files/filebeat.confd new file mode 100644 index 000000000000..2fcf41aa3322 --- /dev/null +++ b/app-admin/filebeat/files/filebeat.confd @@ -0,0 +1,15 @@ +# Run filebeat under this user/group +#FILEBEAT_USER="" +#FILEBEAT_GROUP="" + +# Configuration path +#FILEBEAT_CONFIG="" + +# Path to data directory +#FILEBEAT_DATADIR="" + +# Path to log directory +#FILEBEAT_LOGDIR="" + +# Additional arguments passed to filebeat +#FILEBEAT_OPTS="" diff --git a/app-admin/filebeat/files/filebeat.initd b/app-admin/filebeat/files/filebeat.initd new file mode 100644 index 000000000000..92b8369a41d7 --- /dev/null +++ b/app-admin/filebeat/files/filebeat.initd @@ -0,0 +1,43 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +FILEBEAT_USER="${FILEBEAT_USER:-root}" +FILEBEAT_GROUP="${FILEBEAT_GROUP:-root}" +FILEBEAT_CONFIG="${FILEBEAT_CONFIG:-/etc/filebeat/filebeat.yml}" +FILEBEAT_DATADIR="${FILEBEAT_DATADIR:-/var/lib/filebeat}" +FILEBEAT_LOGDIR="${FILEBEAT_LOGDIR:-/var/log/filebeat}" +FILEBEAT_OPTS="${FILEBEAT_OPTS:-}" + +command="/usr/bin/filebeat" +command_args="-c ${FILEBEAT_CONFIG} ${FILEBEAT_OPTS} -path.config $(dirname $FILEBEAT_CONFIG) \ + -path.data ${FILEBEAT_DATADIR} -path.home ${FILEBEAT_DATADIR} -path.logs ${FILEBEAT_LOGDIR}" +command_background="true" +command_user="${FILEBEAT_USER}:${FILEBEAT_GROUP}" +extra_commands="checkconfig" +pidfile="/run/filebeat.pid" +retry="TERM/5/KILL/5" +start_stop_daemon_args="--chdir ${FILEBEAT_DATADIR}" + +depend() { + use net + after elasticsearch +} + +checkconfig() { + if [ ! -e ${FILEBEAT_CONFIG} ]; then + eend "Please create a configuration file at ${FILEBEAT_CONFIG}" + return 1 + fi + + ebegin "Checking your configuration" + ${command} ${command_args} -configtest + eend $? "Configuration error. Please fix your configuration files." +} + +start_pre() { + checkconfig || return 1 + + checkpath -d -o "${FILEBEAT_USER}":"${FILEBEAT_GROUP}" -m750 "${FILEBEAT_DATADIR}" + checkpath -d -o "${FILEBEAT_USER}":"${FILEBEAT_GROUP}" -m750 "${FILEBEAT_LOGDIR}" +} diff --git a/app-admin/filebeat/metadata.xml b/app-admin/filebeat/metadata.xml new file mode 100644 index 000000000000..cd032aa33d27 --- /dev/null +++ b/app-admin/filebeat/metadata.xml @@ -0,0 +1,15 @@ + + + + + hydrapolic@gmail.com + Tomáš Mózes + + + proxy-maint@gentoo.org + Proxy Maintainers + + + elastic/beats + + -- cgit v1.2.3