commit: 9ab083e709e7b243f531f2ba477709bf43fbeed0 Author: Tomas Mozes <hydrapolic <AT> gmail <DOT> com> AuthorDate: Thu Aug 24 05:13:55 2017 +0000 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> CommitDate: Tue Aug 29 09:44:48 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ab083e7
app-admin/filebeat: version bump to 5.5.2. Package-Manager: Portage-2.3.8, Repoman-2.3.2 Closes: https://github.com/gentoo/gentoo/pull/5498 app-admin/filebeat/Manifest | 1 + app-admin/filebeat/filebeat-5.5.2.ebuild | 69 ++++++++++++++++++++++++++++++++ app-admin/filebeat/files/filebeat.initd | 17 +++----- 3 files changed, 75 insertions(+), 12 deletions(-) diff --git a/app-admin/filebeat/Manifest b/app-admin/filebeat/Manifest index 815b25f8795..38b95db6a33 100644 --- a/app-admin/filebeat/Manifest +++ b/app-admin/filebeat/Manifest @@ -1,3 +1,4 @@ DIST filebeat-5.3.2.tar.gz 17595133 SHA256 e8c765531276e4731c5148bd99fad1efc799f3ec68e1d32a2fe116995f2b9e2f SHA512 080d079a063641e3688cc9f1563517e9a314ca834b0fa90fe12d455f984bb83282243736ecf17a7e62214034b71d373afc503d3bc5ff3d106ef5965ce00c3543 WHIRLPOOL ef6aee18d24e2b25439485121f30af2ff4d76c4ac2fe97acd1f6ec70d27c8a49ce9c3323baaa2305f56f20dea0118c970458c0cb8bfa05bc0227fdb3987f1478 DIST filebeat-5.4.3.tar.gz 18074275 SHA256 a7714383de1a610c7318e8a2751a230b64c8ca243058abd59b1886aabcc3965b SHA512 8c193894898a5a07e622a56ef37aba77b57559bc0a66e017e22980ae1e1c5057f4629b25aaa65fb85c8b7a74759b6f6d1e1b8b9df1bfe626e58a3fdb264267b9 WHIRLPOOL 804a28cf4f664a3356c19f0a988921cb01c7a2e05566915b3020dd1884d98e014ff9adc23cd5d1e0d947e0c14c54ccdfeef67bff6454cbd4dd153b6ddcfa070c DIST filebeat-5.5.1.tar.gz 18075818 SHA256 b6c85901b1feb0e184dd56d9012ccda10bf62566ddfbe3d9790c771b73db3a46 SHA512 b77b241afd747298a91242a8040958ab8cfa343df9ab192c11361947d0b633bc192f45f1ae27987324ce2ea3f5b6f4f0dcb521cb684efa349db59a56f0fd6818 WHIRLPOOL 42b1eecd93f76e9fe4c4a4edfffdb5ff54b984f5b179a55f0ddec7883af90404c00695baac7c97fc69d543952eadfd5fbc1eeb3a92367bd8ce6e6b9de682fa67 +DIST filebeat-5.5.2.tar.gz 18075191 SHA256 39e792324a35fe84ef9a63cd5324252bc71d1c665188e8d597e12ca170cfde7a SHA512 ad92b41a9ceaad6c6e6fc80d0adccd7fe03a7056d121484bcf35c6a46b2061a5ef6d32121dd12d59b51e7678769da5c405b1d549fa130631ae3f1989b78fba48 WHIRLPOOL 46d182bd339abd26f3c4cf3f8d3a716180fc00147458f571eec34aefcaa67d9e88a561988e37c47083528024e4e0559b255c7a17efa43e0e4b21b653a575f7fd 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 00000000000..451e2191c7a --- /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/files/filebeat.initd b/app-admin/filebeat/files/filebeat.initd index 01fccad2ea3..92b8369a41d 100644 --- a/app-admin/filebeat/files/filebeat.initd +++ b/app-admin/filebeat/files/filebeat.initd @@ -12,11 +12,12 @@ 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}" -extra_commands="checkconfig" command_background="true" -start_stop_daemon_args="--user ${FILEBEAT_USER}:${FILEBEAT_GROUP} \ - --chdir ${FILEBEAT_DATADIR}" -pidfile="/run/filebeat/filebeat.pid" +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 @@ -37,14 +38,6 @@ checkconfig() { start_pre() { checkconfig || return 1 - checkpath -d -o "${FILEBEAT_USER}":"${FILEBEAT_GROUP}" -m750 "$(dirname "${pidfile}")" checkpath -d -o "${FILEBEAT_USER}":"${FILEBEAT_GROUP}" -m750 "${FILEBEAT_DATADIR}" checkpath -d -o "${FILEBEAT_USER}":"${FILEBEAT_GROUP}" -m750 "${FILEBEAT_LOGDIR}" } - -stop() { - ebegin "Stopping filebeat" - start-stop-daemon --stop \ - --pidfile=${pidfile} \ - --retry=TERM/5/KILL/5 -}