1 |
commit: 9342556588081817302a677e071a271b505ba7c8 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Apr 29 10:40:45 2017 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 29 10:40:45 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93425565 |
7 |
|
8 |
app-misc/carbon-c-relay: version bump to 3.1 |
9 |
|
10 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
11 |
|
12 |
app-misc/carbon-c-relay/Manifest | 2 +- |
13 |
...-relay-2.6.ebuild => carbon-c-relay-3.1.ebuild} | 17 +++--- |
14 |
.../carbon-c-relay/files/carbon-c-relay.confd-r1 | 18 ++++++ |
15 |
.../carbon-c-relay/files/carbon-c-relay.initd-r1 | 70 ++++++++++++++++++++++ |
16 |
4 files changed, 96 insertions(+), 11 deletions(-) |
17 |
|
18 |
diff --git a/app-misc/carbon-c-relay/Manifest b/app-misc/carbon-c-relay/Manifest |
19 |
index e6ee5a0930e..f99336178c8 100644 |
20 |
--- a/app-misc/carbon-c-relay/Manifest |
21 |
+++ b/app-misc/carbon-c-relay/Manifest |
22 |
@@ -1,3 +1,3 @@ |
23 |
DIST carbon-c-relay-2.5.tar.gz 102119 SHA256 6d3c538aacd08e9798e294d56b98854fdafe1b3a1d0d8118a406a2d8fe6aad5b SHA512 0b3b04003cda761816ea4bbe9d441366438c8507702f157504b21b66c9ef9b1e135239e6627d3dd3d371c023d71f2cd97ba45bc2ff6296a4998e06bdda219ea3 WHIRLPOOL dc73f9e001217ebbc84bc603fe94bdbf34a8039c65f3d1612c31a2e5de0fe8cb6a5c9db5bb7e79681daf567033b5ee2534a844f9e6d3315ca50f2ab0f1d5befa |
24 |
-DIST carbon-c-relay-2.6.tar.gz 103576 SHA256 580ec4629ab63288ba73259a8b98300d649e253ac940c0343e009ed5c454053f SHA512 652cde8b70118af43d90f053cfc54d458abcacbe63a8f1fffe97df76d3ce956c6903132bc39a6d0bda10406e929bcaed49f8c6285e4de7b4c047b5420b7ec446 WHIRLPOOL faf2d936acfb7a7eddb9fcf50d62ad32560bbca7e998dd327c5473a38faaba5c55713d2c3c243f121a790a5dd001169e38bffc9be8c25a1c292082c3bf176b8b |
25 |
DIST carbon-c-relay-3.0.tar.gz 153479 SHA256 5ae673ed0091a814bc8d6081ff14cfbbda7582fa0c8ccf1a5cf438ba84c2b585 SHA512 046dd19be1791eaf2b50bd7029f0bbe8ad0805113faf9a80b37571c42d76c0f7661a9273876de8cd5bf1d13fdc8133a8eaf9def28dd8077bf667225726797fdc WHIRLPOOL f349475179f762a226c87c87fe12e5b43be4fbff36ed12292c5461e65cbf1a814108daa4e0bd6946b077c230656372e6190fc657136cf6e4fa541e4636dc9b8d |
26 |
+DIST carbon-c-relay-3.1.tar.gz 271011 SHA256 d21203a63fefa7c226f8170da204832d8e519001004f0f6fb44546c5eb147389 SHA512 8c8062e4fa9ec22281b1848923dc73b39c4617b0c6297f57f69080a7aedf07ef8d5c6e0bebbd5ef0faf3a1255ab155475bc40aeee582838d604da1cc2e43ca4e WHIRLPOOL bdc4d238398ac6b981e432bef3c1f4c9d181d1540a0af1e573bb6e8bb0a42deb0e4b504b6b727019e4667aa8188d476e261e0bdbe5b469345f7b17a39b966b6c |
27 |
|
28 |
diff --git a/app-misc/carbon-c-relay/carbon-c-relay-2.6.ebuild b/app-misc/carbon-c-relay/carbon-c-relay-3.1.ebuild |
29 |
similarity index 64% |
30 |
rename from app-misc/carbon-c-relay/carbon-c-relay-2.6.ebuild |
31 |
rename to app-misc/carbon-c-relay/carbon-c-relay-3.1.ebuild |
32 |
index 963456421ce..c017ee525eb 100644 |
33 |
--- a/app-misc/carbon-c-relay/carbon-c-relay-2.6.ebuild |
34 |
+++ b/app-misc/carbon-c-relay/carbon-c-relay-3.1.ebuild |
35 |
@@ -3,11 +3,11 @@ |
36 |
|
37 |
EAPI=6 |
38 |
|
39 |
-inherit toolchain-funcs user |
40 |
+inherit user |
41 |
|
42 |
DESCRIPTION="Enhanced C version of Carbon relay, aggregator and rewriter" |
43 |
HOMEPAGE="https://github.com/grobian/carbon-c-relay" |
44 |
-SRC_URI="https://github.com/grobian/carbon-c-relay/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
45 |
+SRC_URI="https://github.com/grobian/carbon-c-relay/releases/download/v${PV}/${P}.tar.gz" |
46 |
|
47 |
LICENSE="Apache-2.0" |
48 |
SLOT="0" |
49 |
@@ -22,15 +22,12 @@ pkg_preinst() { |
50 |
enewuser carbon -1 -1 -1 carbon |
51 |
} |
52 |
|
53 |
-src_configure() { |
54 |
- tc-export CC |
55 |
-} |
56 |
- |
57 |
src_install() { |
58 |
- newbin relay ${PN} |
59 |
+ default |
60 |
+ # rename too generic name |
61 |
+ mv "${ED}"/usr/bin/{relay,${PN}} || die |
62 |
dodoc ChangeLog.md |
63 |
- doman ${PN}.1 |
64 |
|
65 |
- newinitd "${FILESDIR}"/${PN}.initd ${PN} |
66 |
- newconfd "${FILESDIR}"/${PN}.confd ${PN} |
67 |
+ newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN} |
68 |
+ newconfd "${FILESDIR}"/${PN}.confd-r1 ${PN} |
69 |
} |
70 |
|
71 |
diff --git a/app-misc/carbon-c-relay/files/carbon-c-relay.confd-r1 b/app-misc/carbon-c-relay/files/carbon-c-relay.confd-r1 |
72 |
new file mode 100644 |
73 |
index 00000000000..64e4ab5c832 |
74 |
--- /dev/null |
75 |
+++ b/app-misc/carbon-c-relay/files/carbon-c-relay.confd-r1 |
76 |
@@ -0,0 +1,18 @@ |
77 |
+# Copyright 1999-2017 Gentoo Foundation |
78 |
+# Distributed under the terms of the GNU General Public License v2 |
79 |
+ |
80 |
+# routing file to read |
81 |
+#ROUTES_FILE=/etc/carbon-c-relay.conf |
82 |
+ |
83 |
+# where to store the PID-file |
84 |
+#PIDFILE=/run/carbon-c-relay.pid |
85 |
+ |
86 |
+# where to store the logfile |
87 |
+#LOGFILE=/var/log/carbon-c-relay.log |
88 |
+ |
89 |
+# user and group to run carbon-c-relay as |
90 |
+#USER=carbon |
91 |
+#GROUP=carbon |
92 |
+ |
93 |
+# any options to use when starting the relay |
94 |
+#EXTRA_OPTS= |
95 |
|
96 |
diff --git a/app-misc/carbon-c-relay/files/carbon-c-relay.initd-r1 b/app-misc/carbon-c-relay/files/carbon-c-relay.initd-r1 |
97 |
new file mode 100644 |
98 |
index 00000000000..104a7e0878e |
99 |
--- /dev/null |
100 |
+++ b/app-misc/carbon-c-relay/files/carbon-c-relay.initd-r1 |
101 |
@@ -0,0 +1,70 @@ |
102 |
+#!/sbin/openrc-run |
103 |
+# Copyright 1999-2017 Gentoo Foundation |
104 |
+# Distributed under the terms of the GNU General Public License v2 |
105 |
+ |
106 |
+extra_commands="configtest" |
107 |
+extra_started_commands="reload" |
108 |
+ |
109 |
+description="Lightweight graphite metrics router and aggregator." |
110 |
+description_configtest="Run carbon-c-relay's internal config check." |
111 |
+description_reload="Reload the carbon-c-relay configuration without losing connections." |
112 |
+ |
113 |
+routes_config=${ROUTES_FILE:-/etc/${SVCNAME}.conf} |
114 |
+ |
115 |
+command="/usr/bin/carbon-c-relay" |
116 |
+command_args="-f ${routes_config} ${EXTRA_OPTS}" |
117 |
+pidfile=${PIDFILE:-/run/${SVCNAME}.pid} |
118 |
+logfile=${LOGFILE:-/var/log/${SVCNAME}.log} |
119 |
+user=${USER:-carbon} |
120 |
+group=${GROUP:-carbon} |
121 |
+ |
122 |
+depend() { |
123 |
+ need net |
124 |
+ use dns |
125 |
+} |
126 |
+ |
127 |
+start_pre() { |
128 |
+ if [ "${RC_CMD}" != "restart" ]; then |
129 |
+ configtest || return 1 |
130 |
+ fi |
131 |
+ touch "${logfile}" |
132 |
+ chown ${user}:${group} "${logfile}" |
133 |
+} |
134 |
+ |
135 |
+stop_pre() { |
136 |
+ if [ "${RC_CMD}" = "restart" ]; then |
137 |
+ configtest || return 1 |
138 |
+ fi |
139 |
+} |
140 |
+ |
141 |
+stop_post() { |
142 |
+ rm -f "${pidfile}" |
143 |
+} |
144 |
+ |
145 |
+start() { |
146 |
+ ebegin "Starting ${SVCNAME}" |
147 |
+ start-stop-daemon --start --pidfile "${pidfile}" \ |
148 |
+ --user ${user} --group ${group} \ |
149 |
+ --exec ${command} -- -D -P "${pidfile}" -l "${logfile}" \ |
150 |
+ ${command_args} |
151 |
+ eend $? |
152 |
+} |
153 |
+ |
154 |
+stop() { |
155 |
+ ebegin "Stopping ${SVCNAME}" |
156 |
+ start-stop-daemon --stop --exec ${command} --pidfile "${pidfile}" |
157 |
+ eend $? |
158 |
+} |
159 |
+ |
160 |
+reload() { |
161 |
+ configtest || return 1 |
162 |
+ ebegin "Refreshing ${SVCNAME}'s configuration" |
163 |
+ kill -HUP $(< "${pidfile}") &>/dev/null |
164 |
+ eend $? "Failed to reload ${SVCNAME}" |
165 |
+} |
166 |
+ |
167 |
+configtest() { |
168 |
+ ebegin "Checking ${SVCNAME}'s configuration" |
169 |
+ ${command} -f "${routes_config}" -t < /dev/null > /dev/null |
170 |
+ eend $? "failed, please correct errors above" |
171 |
+} |