1 |
commit: 3bc97e5865f512e218b257563051d8856ca95c75 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 21 03:41:47 2019 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 21 04:04:00 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3bc97e58 |
7 |
|
8 |
app-metrics/redis_exporter: Bump to version 1.1.1 |
9 |
|
10 |
Package-Manager: Portage-2.3.76, Repoman-2.3.17 |
11 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
12 |
|
13 |
app-metrics/redis_exporter/Manifest | 1 + |
14 |
.../redis_exporter/redis_exporter-1.1.1.ebuild | 75 ++++++++++++++++++++++ |
15 |
2 files changed, 76 insertions(+) |
16 |
|
17 |
diff --git a/app-metrics/redis_exporter/Manifest b/app-metrics/redis_exporter/Manifest |
18 |
index ceb2228cdb5..8ccbd89d564 100644 |
19 |
--- a/app-metrics/redis_exporter/Manifest |
20 |
+++ b/app-metrics/redis_exporter/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST redis_exporter-0.20.2.tar.gz 970030 BLAKE2B 55bee727f196fad642944a444220d9f71958d812f5f5f4d79a0c741cada25f29690ff4f185ec4028cf5216139e5351022a134fb1b0f2b5b45b384a831dbf1802 SHA512 eee4cc9de79ea256571c9650abae6b044fc78b7683abef544d5313dad5d46d3516c55e939c33f87849cc52ed2465797d20b606e386aa4fe187dd16d30354173e |
23 |
+DIST redis_exporter-1.1.1.tar.gz 1415085 BLAKE2B 0a687d68864ae00e52c46839c15b24f3ec394e2865ee9ca6fe158f9405da8e7641c8b1e7328e80074aa919c4b28c9cf6bd296bf213de5ff6d1c9c5c62f8c1ce9 SHA512 13d5cbb20b4b52e0d8eb71437f81c2aae10599e1bd2f3e6cd0a907197078298e8d2d8b9d068c0872894a581c1feb0656875f88338acace9c61842033c2d20e35 |
24 |
|
25 |
diff --git a/app-metrics/redis_exporter/redis_exporter-1.1.1.ebuild b/app-metrics/redis_exporter/redis_exporter-1.1.1.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..38a87647407 |
28 |
--- /dev/null |
29 |
+++ b/app-metrics/redis_exporter/redis_exporter-1.1.1.ebuild |
30 |
@@ -0,0 +1,75 @@ |
31 |
+# Copyright 1999-2019 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=7 |
35 |
+inherit user golang-build golang-vcs-snapshot systemd |
36 |
+ |
37 |
+EGO_PN="github.com/oliver006/redis_exporter" |
38 |
+EGIT_COMMIT="1687c56fd0b53a6b36e2140b6c246a5fabe634c2" |
39 |
+ARCHIVE_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
40 |
+KEYWORDS="~amd64" |
41 |
+ |
42 |
+DESCRIPTION="Prometheus Exporter for Redis Metrics. Supports Redis 2.x, 3.x and 4.x" |
43 |
+HOMEPAGE="https://github.com/oliver006/redis_exporter" |
44 |
+SRC_URI="${ARCHIVE_URI}" |
45 |
+LICENSE="MIT Apache-2.0 BSD" |
46 |
+SLOT="0" |
47 |
+IUSE="" |
48 |
+S=${WORKDIR}/${P}/src/${EGO_PN} |
49 |
+ |
50 |
+pkg_setup() { |
51 |
+ enewgroup ${PN} |
52 |
+ enewuser ${PN} -1 -1 -1 ${PN} |
53 |
+} |
54 |
+ |
55 |
+src_prepare() { |
56 |
+ default |
57 |
+ sed -e "s|\(^[[:space:]]*VERSION[[:space:]]*=[[:space:]]*\).*|\1\"${PV}\"|" \ |
58 |
+ -e "s|\(^[[:space:]]*BUILD_DATE[[:space:]]*=[[:space:]]*\).*|\1\"$(LC_ALL=C date -u)\"|" \ |
59 |
+ -e "s|\(^[[:space:]]*COMMIT_SHA1[[:space:]]*=[[:space:]]*\).*|\1\"${EGIT_COMMIT}\"|" \ |
60 |
+ -i main.go || die |
61 |
+ |
62 |
+ sed -e 's:TestCommandStats(:_\0:' \ |
63 |
+ -e 's:TestExportClientList(:_\0:' \ |
64 |
+ -e 's:TestGetKeyInfo(:_\0:' \ |
65 |
+ -e 's:TestGetKeysFromPatterns(:_\0:' \ |
66 |
+ -e 's:TestHTTPEndpoints(:_\0:' \ |
67 |
+ -e 's:TestHostVariations(:_\0:' \ |
68 |
+ -e 's:TestIncludeSystemMemoryMetric(:_\0:' \ |
69 |
+ -e 's:TestKeySizeList(:_\0:' \ |
70 |
+ -e 's:TestKeysReset(:_\0:' \ |
71 |
+ -e 's:TestKeyValuesAndSizes(:_\0:' \ |
72 |
+ -e 's:TestLatencySpike(:_\0:' \ |
73 |
+ -e 's:TestLuaScript(:_\0:' \ |
74 |
+ -e 's:TestScanForKeys(:_\0:' \ |
75 |
+ -e 's:TestSimultaneousRequests(:_\0:' \ |
76 |
+ -e 's:TestSlowLog(:_\0:' \ |
77 |
+ -i exporter_test.go || die |
78 |
+} |
79 |
+ |
80 |
+src_compile() { |
81 |
+ export -n GOCACHE XDG_CACHE_HOME #684052 |
82 |
+ export GO111MODULE=on GOFLAGS="-mod=vendor -v -x" GOBIN="${WORKDIR}/${P}/bin" |
83 |
+ go install -work ${EGO_BUILD_FLAGS} \ |
84 |
+ -ldflags="-X main.BuildVersion=${PV} -X main.BuildCommitSha=${EGIT_COMMIT} -X main.BuildDate=$(date +%F-%T)" \ |
85 |
+ "${EGO_PN}" || die |
86 |
+} |
87 |
+ |
88 |
+src_test() { |
89 |
+ go test -work "${EGO_PN}" || die |
90 |
+} |
91 |
+ |
92 |
+src_install() { |
93 |
+ dobin "${GOBIN}/redis_exporter" |
94 |
+ dodoc README.md |
95 |
+ local dir |
96 |
+ for dir in /var/{lib,log}/${PN}; do |
97 |
+ keepdir "${dir}" |
98 |
+ fowners ${PN}:${PN} "${dir}" |
99 |
+ done |
100 |
+ newinitd "${FILESDIR}"/${PN}.initd ${PN} |
101 |
+ newconfd "${FILESDIR}"/${PN}.confd ${PN} |
102 |
+ insinto /etc/logrotate.d |
103 |
+ newins "${FILESDIR}/${PN}.logrotated" "${PN}" |
104 |
+ systemd_dounit "${FILESDIR}/${PN}.service" |
105 |
+} |