mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-17 14:49:30 -07:00
app-admin/filebeat: drop old.
Closes: https://github.com/gentoo/gentoo/pull/3561
This commit is contained in:
committed by
Patrice Clement
parent
a9017f2f18
commit
6d08ccfa96
@@ -1,3 +1 @@
|
||||
DIST filebeat-1.3.1.tar.gz 10225540 SHA256 1d8e41b42a0b2dd59403795ff07cbfd8a9a76477731c38122aa9242b47b054e0 SHA512 60f6d4ae93bb01e74311d7ccc3d367707f888f58898b89a0ea7512c96b6e1369edf7dc2afe3615df97e8c311629d9fc1e9fc2f1abe8edcbb5bc5bcf47c82107c WHIRLPOOL 608b825fa4dc99d792deb9d23672eea0e66318461adb944dc484d42edc3d3acb1cf1f65cd4024cf0437dd5e5ed088ff5b5aeec967f7efad03b82f259793410f0
|
||||
DIST filebeat-5.0.2.tar.gz 15774694 SHA256 feef1e53b978c12b3b3c552534fd666839df5d7d3b974e16636360ca6c4ab7c0 SHA512 2481ed584efda67051e59a27b45ba52039d960d6dc335d9225e2370bc71e5167f5e4e9e7cc0cb7e689c9a73d5edf27655c4764b0acb6f1422f18bfc10fc44fe9 WHIRLPOOL 82d79d09d4c138b40841227e7b4b137b262fb251ec83b736914bb4cda00837d8eedf7af01618d2a04c368cc50650121148cd507da38acce481a3f4dd93281ae8
|
||||
DIST filebeat-5.1.2.tar.gz 16512836 SHA256 7cd554f8be6b02290ebbc17c9820acde3dc59108672ced7a0cf5486faa3e23ce SHA512 f5ade54c3a2471680067fc5f6861ddcc052177c473f40d2135ba281e63172a4ba386368f77e5e4ba77b60c88ee20e5cd0095705aa3ed6e2588fda034de6b116f WHIRLPOOL 438119b4e5664ee0cff2a70b811ea4c247def4b15efdc1bcc243f157fe88669636c6465b93316adc2d774e5b4109856c54cc658bde2636393431b0f30a712f80
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
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"
|
||||
|
||||
DEPEND="dev-lang/go"
|
||||
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_install() {
|
||||
keepdir /etc/${PN}
|
||||
keepdir /var/lib/${PN}
|
||||
|
||||
fperms 0750 /var/lib/${PN}
|
||||
|
||||
newconfd "${FILESDIR}/${PN}.confd" ${PN}
|
||||
newinitd "${FILESDIR}/${PN}.initd" ${PN}
|
||||
|
||||
insinto /etc/${PN}
|
||||
newins ${PN}/etc/${PN}.yml ${PN}.yml.example
|
||||
|
||||
dobin filebeat/filebeat
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
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"
|
||||
|
||||
DEPEND="dev-lang/go"
|
||||
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_install() {
|
||||
keepdir /var/{lib,log}/${PN}
|
||||
|
||||
fperms 0750 /var/{lib,log}/${PN}
|
||||
|
||||
newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
|
||||
newinitd "${FILESDIR}/${PN}.initd-r1" ${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}
|
||||
|
||||
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"
|
||||
}
|
||||
@@ -40,8 +40,8 @@ src_install() {
|
||||
|
||||
fperms 0750 /var/{lib,log}/${PN}
|
||||
|
||||
newconfd "${FILESDIR}/${PN}.confd-r1" ${PN}
|
||||
newinitd "${FILESDIR}/${PN}.initd-r1" ${PN}
|
||||
newconfd "${FILESDIR}/${PN}.confd" ${PN}
|
||||
newinitd "${FILESDIR}/${PN}.initd" ${PN}
|
||||
|
||||
insinto "/usr/share/doc/${PF}/examples"
|
||||
doins ${PN}/{filebeat.yml,filebeat.full.yml}
|
||||
|
||||
@@ -5,8 +5,11 @@
|
||||
# Configuration path
|
||||
#FILEBEAT_CONFIG=""
|
||||
|
||||
# Path to state directory
|
||||
#FILEBEAT_STATEDIR=""
|
||||
# Path to data directory
|
||||
#FILEBEAT_DATADIR=""
|
||||
|
||||
# Path to log directory
|
||||
#FILEBEAT_LOGDIR=""
|
||||
|
||||
# Additional arguments passed to filebeat
|
||||
#FILEBEAT_OPTS=""
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
# 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=""
|
||||
@@ -1,19 +1,21 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# 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_STATEDIR="${FILEBEAT_STATEDIR:-/var/lib/filebeat}"
|
||||
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}"
|
||||
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_STATEDIR}"
|
||||
--chdir ${FILEBEAT_DATADIR}"
|
||||
pidfile="/run/filebeat/filebeat.pid"
|
||||
|
||||
depend() {
|
||||
@@ -26,7 +28,7 @@ checkconfig() {
|
||||
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."
|
||||
@@ -36,7 +38,8 @@ start_pre() {
|
||||
checkconfig || return 1
|
||||
|
||||
checkpath -d -o "${FILEBEAT_USER}":"${FILEBEAT_GROUP}" -m750 "$(dirname "${pidfile}")"
|
||||
checkpath -d -o "${FILEBEAT_USER}":"${FILEBEAT_GROUP}" -m750 "${FILEBEAT_STATEDIR}"
|
||||
checkpath -d -o "${FILEBEAT_USER}":"${FILEBEAT_GROUP}" -m750 "${FILEBEAT_DATADIR}"
|
||||
checkpath -d -o "${FILEBEAT_USER}":"${FILEBEAT_GROUP}" -m750 "${FILEBEAT_LOGDIR}"
|
||||
}
|
||||
|
||||
stop() {
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2016 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}"
|
||||
extra_commands="checkconfig"
|
||||
command_background="true"
|
||||
start_stop_daemon_args="--user ${FILEBEAT_USER}:${FILEBEAT_GROUP} \
|
||||
--chdir ${FILEBEAT_DATADIR}"
|
||||
pidfile="/run/filebeat/filebeat.pid"
|
||||
|
||||
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 "$(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
|
||||
}
|
||||
Reference in New Issue
Block a user