Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/kapacitor/, net-analyzer/kapacitor/files/
Date: Mon, 26 Mar 2018 18:01:24
Message-Id: 1522087271.71ce84ea58f61d1febcde93d0ee9416bb42709a0.williamh@gentoo
1 commit: 71ce84ea58f61d1febcde93d0ee9416bb42709a0
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Mon Mar 26 17:59:20 2018 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Mon Mar 26 18:01:11 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71ce84ea
7
8 net-analyzer/kapacitor: 1.4.1-r1 bump for service script fixes
9
10 Package-Manager: Portage-2.3.24, Repoman-2.3.6
11
12 net-analyzer/kapacitor/files/kapacitor.rc | 6 ++-
13 net-analyzer/kapacitor/kapacitor-1.4.1-r1.ebuild | 48 ++++++++++++++++++++++++
14 2 files changed, 53 insertions(+), 1 deletion(-)
15
16 diff --git a/net-analyzer/kapacitor/files/kapacitor.rc b/net-analyzer/kapacitor/files/kapacitor.rc
17 index 8ee907f66d5..b89d0b1cbf9 100644
18 --- a/net-analyzer/kapacitor/files/kapacitor.rc
19 +++ b/net-analyzer/kapacitor/files/kapacitor.rc
20 @@ -9,12 +9,16 @@ make_pidfile=yes
21 command_user="kapacitor:kapacitor"
22
23 # Logging
24 -error_log="${error_log:-/var/log/influxdb/influxd.log}"
25 +error_log="${error_log:-/var/log/kapacitor/kapacitor.err}"
26 output_log="${output_log:-/dev/null}"
27
28 # Max open files
29 rc_ulimit="-n 65536"
30
31 +depend() {
32 + after net
33 +}
34 +
35 start_pre() {
36 # Check if config file exist
37 if [ ! -r ${config} ]; then
38
39 diff --git a/net-analyzer/kapacitor/kapacitor-1.4.1-r1.ebuild b/net-analyzer/kapacitor/kapacitor-1.4.1-r1.ebuild
40 new file mode 100644
41 index 00000000000..dd499480fbd
42 --- /dev/null
43 +++ b/net-analyzer/kapacitor/kapacitor-1.4.1-r1.ebuild
44 @@ -0,0 +1,48 @@
45 +# Copyright 1999-2018 Gentoo Foundation
46 +# Distributed under the terms of the GNU General Public License v2
47 +
48 +EAPI=6
49 +EGO_PN=github.com/influxdata/kapacitor
50 +
51 +inherit golang-build golang-vcs-snapshot systemd user
52 +
53 +DESCRIPTION="Monitoring, processing and alerting on time series data"
54 +HOMEPAGE="https://www.influxdata.com"
55 +SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
56 +
57 +LICENSE="MIT"
58 +SLOT="0"
59 +KEYWORDS="~amd64"
60 +IUSE=""
61 +
62 +pkg_setup() {
63 + enewgroup kapacitor
64 + enewuser kapacitor -1 -1 /var/lib/kapacitor kapacitor
65 +}
66 +
67 +src_compile() {
68 + pushd "src/${EGO_PN}" > /dev/null || die
69 + set -- env GOPATH="${S}" go build -v -work -x ./...
70 + echo "$@"
71 + "$@" || die "compile failed"
72 + popd > /dev/null
73 +}
74 +
75 +src_install() {
76 + pushd "src/${EGO_PN}" > /dev/null || die
77 + set -- env GOPATH="${S}" go install -v -work -x ./...
78 + echo "$@"
79 + "$@" || die
80 + dobin "${S}"/bin/kapacitor{,d}
81 + insinto /etc/kapacitor
82 +doins etc/kapacitor/kapacitor.conf
83 +keepdir /etc/kapacitor/load
84 + insinto /etc/logrotate.d
85 + doins etc/logrotate.d/kapacitor
86 + systemd_dounit scripts/kapacitor.service
87 + keepdir /var/log/kapacitor
88 + fowners kapacitor:kapacitor /var/log/kapacitor
89 + newconfd "${FILESDIR}"/kapacitor.confd kapacitor
90 + newinitd "${FILESDIR}"/kapacitor.rc kapacitor
91 + popd > /dev/null || die
92 +}