commit:     2c7060e2466366483c765a0dceeb0f0d3e3327fe
Author:     William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 20 17:14:46 2022 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun Mar 20 17:16:52 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c7060e2

app-metrics/grok_exporter: add 1.0.0_rc5

Closes: https://bugs.gentoo.org/675710
Closes: https://bugs.gentoo.org/679192
Closes: https://bugs.gentoo.org/722310
Closes: https://bugs.gentoo.org/781230
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>

 app-metrics/grok_exporter/Manifest                 |  1 +
 .../grok_exporter/files/grok_exporter.initd        |  8 ++--
 .../grok_exporter/grok_exporter-1.0.0_rc5.ebuild   | 44 ++++++++++++++++++++++
 3 files changed, 49 insertions(+), 4 deletions(-)

diff --git a/app-metrics/grok_exporter/Manifest 
b/app-metrics/grok_exporter/Manifest
index 87a8a5165a8c..ad6991e1c11a 100644
--- a/app-metrics/grok_exporter/Manifest
+++ b/app-metrics/grok_exporter/Manifest
@@ -7,3 +7,4 @@ DIST 
github.com-prometheus-client_model-56726106282f1985ea77d5305743db7231b0c0a8
 DIST 
github.com-prometheus-common-2998b132700a7d019ff618c06a234b47c1f3f681.tar.gz 
87368 BLAKE2B 
fc6c6e197d4cc61afefa9fb8e3a8d6b36ab029f62e3cf9adf8359e4885554f94427f17218d45c90c9d7f4a6985b2e4143a4d304d39f806bd70d2c6f05de29bc2
 SHA512 
b2095da96596fc500ece6b331cda2558f8c813720853f2489aee3dec65de95eb13f7b0853e3812433fdc040f16990d2f05b2a6b8b41275210c504ff333ca625d
 DIST 
github.com-prometheus-procfs-b1a0a9a36d7453ba0f62578b99712f3a6c5f82d1.tar.gz 
61720 BLAKE2B 
2f9b25506527aaf6e1bf560a1b680b958d1281acbaa2bb896bfea50b5b7de8992d10e8e812f8ae449ab67145c88179c15afe1f719851d1717b28963071088082
 SHA512 
5938b4a8fa9a5ee32be995fed0d0e6b26941765470aca4eda63a7c42db457e83da43fde2f33b2d4ded3545e5643f607ec7060406b0a1b15e64cc732bb2badd4a
 DIST grok_exporter-0.2.6.tar.gz 478354 BLAKE2B 
082331eb7606517fb103af7a74088bae75740ae77d2b1fdeaee87791c4a0be706883ca505cb723f3853d3786692477086183b303de0ad82833499b231fc55909
 SHA512 
5204974702a8d29cc80fb7857a46f3242c78019d8a37e18e595d4bfc2f64662dbd48f9e0d5cae7b2f4f2390c35b0d621a7212718bf3c88d675601af2977de874
+DIST grok_exporter-1.0.0_rc5.tar.gz 2324696 BLAKE2B 
2042067127e18fb63d2ecc412fa75184b410e27a755fd06c3634c7b345c13b1bd1d000e323467d10cc5a0cf13363b6782c4c98532875158a793111fe56a36edd
 SHA512 
5b4772aa4b147dadc2d8298d043cc8329cbfeb081dc9bc686c34e16ae0c8a4fa30e55478a8328293349fda2d3f785a5feeda22d5ea1722ab3fa586375b696a92

diff --git a/app-metrics/grok_exporter/files/grok_exporter.initd 
b/app-metrics/grok_exporter/files/grok_exporter.initd
index d38d0af63ab3..bd25c5170e9a 100644
--- a/app-metrics/grok_exporter/files/grok_exporter.initd
+++ b/app-metrics/grok_exporter/files/grok_exporter.initd
@@ -3,13 +3,13 @@
 # Distributed under the terms of the GNU General Public License v2
 
 description="Unstructured log data exporter for Prometheus"
-config_file="${config_file:-/etc/${RC_SVCNAME}/${RC_SVCNAME}.yml}"
+config_file="/etc/grok_exporter/${RC_SVCNAME}.yml"
 command=/usr/bin/grok_exporter
 command_background=yes
-command_user=${RC_SVCNAME}:${RC_SVCNAME}
+command_user=grok_exporter:grok_exporter
 pidfile=/var/run/${RC_SVCNAME}.pid
-error_log="/var/log/${RC_SVCNAME}/${RC_SVCNAME}.log"
-output_log="/var/log/${RC_SVCNAME}/${RC_SVCNAME}.log"
+error_log="/var/log/grok_exporter/${RC_SVCNAME}.log"
+output_log="/var/log/grok_exporter/${RC_SVCNAME}.log"
 required_files="${config_file}"
 command_args="-config \"${config_file}\""
 

diff --git a/app-metrics/grok_exporter/grok_exporter-1.0.0_rc5.ebuild 
b/app-metrics/grok_exporter/grok_exporter-1.0.0_rc5.ebuild
new file mode 100644
index 000000000000..04782b54343c
--- /dev/null
+++ b/app-metrics/grok_exporter/grok_exporter-1.0.0_rc5.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+MY_PV=${PV/_rc/.RC}
+inherit go-module
+
+DESCRIPTION="Unstructured log data exporter for Prometheus"
+HOMEPAGE="https://github.com/fstab/Grok_exporter";
+SRC_URI="https://github.com/fstab/grok_exporter/archive/v${MY_PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="Apache-2.0 BSD MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+
+COMMON_DEPEND="acct-group/grok_exporter
+       acct-user/grok_exporter"
+DEPEND="${COMMON_DEPEND}
+       >=dev-libs/oniguruma-6.9.0"
+RDEPEND="${COMMON_DEPEND}
+       >=dev-libs/oniguruma-6.9.0:="
+
+RESTRICT="strip"
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+src_compile() {
+       ego build .
+}
+
+src_install() {
+       dobin ${PN}
+       dodoc -r *.md example
+       newinitd "${FILESDIR}"/${PN}.initd ${PN}
+keepdir /etc/"${PN}"
+       keepdir /var/log/${PN}
+       fowners ${PN}:${PN} /var/log/${PN}
+}
+
+pkg_postinst() {
+       if [[ -z "${REPLACING_VERSIONS}" ]]; then
+       elog "You need to create /etc/${PN}/${PN}.yml"
+       elog "Please see /usr/share/doc/${PVR} for examples"
+       fi
+}

Reply via email to