1 |
commit: e53604532f966e9c3399169b87d30b16cd4e7070 |
2 |
Author: Pedro Arizmendi <dwosky <AT> zoho <DOT> com> |
3 |
AuthorDate: Thu Mar 21 16:45:48 2019 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Apr 9 07:29:06 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5360453 |
7 |
|
8 |
www-misc/monitorix: version bump to 3.11.0. |
9 |
|
10 |
- Updated monitorix to version 3.11.0 |
11 |
- Fixed systemd script bug referencing the wrong path |
12 |
- Updated init.d script to avoid issues |
13 |
|
14 |
Closes: https://bugs.gentoo.org/681348 |
15 |
Signed-off-by: Pedro Arizmendi <dwosky <AT> zoho.com> |
16 |
Package-Manager: Portage-2.3.62, Repoman-2.3.11 |
17 |
Closes: https://github.com/gentoo/gentoo/pull/11446 |
18 |
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org> |
19 |
|
20 |
www-misc/monitorix/Manifest | 1 + |
21 |
www-misc/monitorix/files/monitorix | 30 +++++++++ |
22 |
www-misc/monitorix/files/monitorix.init | 24 ------- |
23 |
www-misc/monitorix/monitorix-3.11.0.ebuild | 105 +++++++++++++++++++++++++++++ |
24 |
4 files changed, 136 insertions(+), 24 deletions(-) |
25 |
|
26 |
diff --git a/www-misc/monitorix/Manifest b/www-misc/monitorix/Manifest |
27 |
index e309e6b68c6..563c78fc9e0 100644 |
28 |
--- a/www-misc/monitorix/Manifest |
29 |
+++ b/www-misc/monitorix/Manifest |
30 |
@@ -1,3 +1,4 @@ |
31 |
DIST monitorix-3.10.0.tar.gz 309688 BLAKE2B 58345fbe02e24be48baecb1b91b4c24de8bec1960557e4713c4007c7c1649627d79caf823893eba4f9c9bc1330cc739f2c4e248421795235107ddf5164e998f5 SHA512 a313b25c4b8a614d62d67e9649227461a0faf83704baebb01318acb8d42dc336b747dd5f4a9fc5ddbd7ef10598d96577d1265c0022dfb0a94826e1da5cfc33d2 |
32 |
DIST monitorix-3.10.1.tar.gz 313587 BLAKE2B 2dfc63499966346cf7e862a44d904f2599a6eb40544c511c9d64f1fa32684bccbecccbbfaff8d46cdb1c4af8b5904c2622ede8d3d8f955bd9bacc32848c2ef02 SHA512 b1e2a5c6a2992c6280129ec7fcdd72783902f475c3c98f09aab86b56305efacce7222732669639dc59b29da2fdf5cda49999ee159f4a95b12e4ee3a491d55c55 |
33 |
+DIST monitorix-3.11.0.tar.gz 318741 BLAKE2B af190e716acea9dfa56ebf3976e387abc19d0254fbebf6b6b18deff98b989266bff7e7c59e57832ad8b29dff8abb220e19da079c004ec185b63845cf70fb2727 SHA512 81832ef569416cc2e587beff8dbd485a6d361c0b5f11611522bde58c06d3156888e8c7b49cb3205adafbf737cd2d2b22e6041cd8b94e6d8c78cb5a4c3b1587de |
34 |
DIST monitorix-3.9.0.tar.gz 288443 BLAKE2B 6203f2950e0061d1ff268a2c42c31e7e14b5103e09ec82411f3ee3b957212c8799ba00710b269e0097ed0a3c060eb2d6972dd7b2c1af820bb09de2281113238c SHA512 599f3fa004c2e9657f255ca0ef0ae69ca63623976d17ebf8883a8c19b8a76193916634844f794da508439336edc37e424263aa6ccd8e06bb3584b6cf3cda783b |
35 |
|
36 |
diff --git a/www-misc/monitorix/files/monitorix b/www-misc/monitorix/files/monitorix |
37 |
new file mode 100755 |
38 |
index 00000000000..389119e2e55 |
39 |
--- /dev/null |
40 |
+++ b/www-misc/monitorix/files/monitorix |
41 |
@@ -0,0 +1,30 @@ |
42 |
+#!/sbin/openrc-run |
43 |
+# Copyright 1999-2019 Gentoo Authors |
44 |
+# Distributed under the terms of the GNU General Public License v2 |
45 |
+ |
46 |
+name="Monitorix" |
47 |
+description="Monitorix is a lightweight system monitoring tool" |
48 |
+command=/usr/sbin/monitorix |
49 |
+command_args="-c /etc/monitorix/monitorix.conf -p /var/run/$name.pid" |
50 |
+pidfile=/var/run/monitorix.pid |
51 |
+ |
52 |
+checkconfig() { |
53 |
+ if [[ ! -e /etc/monitorix/monitorix.conf ]]; then |
54 |
+ eerror "Please check that the configuration file exists." |
55 |
+ return 1 |
56 |
+ fi |
57 |
+} |
58 |
+ |
59 |
+start() { |
60 |
+ checkconfig || return 1 |
61 |
+ ebegin "Starting $name" |
62 |
+ start-stop-daemon --start --name $name --pidfile /var/run/$name.pid --exec $command -- $command_args |
63 |
+ eend $? |
64 |
+} |
65 |
+ |
66 |
+stop() { |
67 |
+ ebegin "Stopping $name" |
68 |
+ start-stop-daemon --stop --pidfile /var/run/$name.pid |
69 |
+ eend $? |
70 |
+} |
71 |
+ |
72 |
|
73 |
diff --git a/www-misc/monitorix/files/monitorix.init b/www-misc/monitorix/files/monitorix.init |
74 |
deleted file mode 100644 |
75 |
index a614bd0bd4a..00000000000 |
76 |
--- a/www-misc/monitorix/files/monitorix.init |
77 |
+++ /dev/null |
78 |
@@ -1,24 +0,0 @@ |
79 |
-#!/sbin/openrc-run |
80 |
- |
81 |
-depend() { |
82 |
- need net |
83 |
-} |
84 |
- |
85 |
-start() { |
86 |
- ebegin "Starting monitorix" |
87 |
- start-stop-daemon --start --exec /usr/sbin/monitorix --pidfile /var/run/monitorix.pid -- -c /etc/monitorix/monitorix.conf -p /var/run/monitorix.pid |
88 |
- local i=0 |
89 |
- local timeout=5 |
90 |
- while [ ! -f /var/run/monitorix.pid ] && [ $i -le $timeout ]; do |
91 |
- sleep 1 |
92 |
- i=$(($i + 1)) |
93 |
- done |
94 |
- [ $timeout -gt $i ] |
95 |
- eend $? |
96 |
-} |
97 |
- |
98 |
-stop() { |
99 |
- ebegin "Stopping monitorix" |
100 |
- start-stop-daemon --stop --signal QUIT --stop --exec /usr/sbin/monitorix --pidfile /var/run/monitorix.pid |
101 |
- eend $? |
102 |
-} |
103 |
|
104 |
diff --git a/www-misc/monitorix/monitorix-3.11.0.ebuild b/www-misc/monitorix/monitorix-3.11.0.ebuild |
105 |
new file mode 100644 |
106 |
index 00000000000..efb99c9012a |
107 |
--- /dev/null |
108 |
+++ b/www-misc/monitorix/monitorix-3.11.0.ebuild |
109 |
@@ -0,0 +1,105 @@ |
110 |
+# Copyright 1999-2019 Gentoo Authors |
111 |
+# Distributed under the terms of the GNU General Public License v2 |
112 |
+ |
113 |
+EAPI="7" |
114 |
+ |
115 |
+inherit systemd user |
116 |
+ |
117 |
+DESCRIPTION="A lightweight system monitoring tool" |
118 |
+HOMEPAGE="https://www.monitorix.org/" |
119 |
+SRC_URI="https://www.monitorix.org/${P}.tar.gz" |
120 |
+ |
121 |
+LICENSE="GPL-2+" |
122 |
+SLOT="0" |
123 |
+KEYWORDS="~amd64 ~x86" |
124 |
+IUSE="" |
125 |
+ |
126 |
+RDEPEND="dev-perl/Config-General |
127 |
+ dev-perl/DBI |
128 |
+ dev-perl/HTTP-Server-Simple |
129 |
+ dev-perl/IO-Socket-SSL |
130 |
+ dev-perl/libwww-perl |
131 |
+ dev-perl/MIME-Lite |
132 |
+ dev-perl/XML-Simple |
133 |
+ net-analyzer/rrdtool[graph,perl] |
134 |
+ dev-perl/CGI" |
135 |
+ |
136 |
+pkg_setup() { |
137 |
+ enewgroup ${PN} |
138 |
+ enewuser ${PN} -1 -1 /var/lib/${PN} ${PN} |
139 |
+} |
140 |
+ |
141 |
+src_prepare() { |
142 |
+ # Put better Gentoo defaults in the configuration file. |
143 |
+ sed -e "s|\(base_dir.*\)/usr/share/${PN}|\1/usr/share/${PN}/htdocs|" \ |
144 |
+ -e "s|\(secure_log.*\)/var/log/secure|\1/var/log/auth.log|" \ |
145 |
+ -e "s|nobody|${PN}|g" -i ${PN}.conf || die |
146 |
+ # Update systemd binary location |
147 |
+ sed -e "s|/usr/bin|/usr/sbin|g" -i docs/${PN}.service || die |
148 |
+ eapply_user |
149 |
+} |
150 |
+ |
151 |
+# Override compile phase |
152 |
+src_compile() { :; } |
153 |
+ |
154 |
+src_install() { |
155 |
+ dosbin ${PN} |
156 |
+ |
157 |
+ newinitd ${FILESDIR}/monitorix ${PN} |
158 |
+ |
159 |
+ insinto /etc/monitorix |
160 |
+ doins ${PN}.conf |
161 |
+ |
162 |
+ keepdir /etc/${PN}/conf.d |
163 |
+ |
164 |
+ insinto /etc/logrotate.d |
165 |
+ newins docs/${PN}.logrotate ${PN} |
166 |
+ |
167 |
+ dodoc Changes README{,.nginx} docs/${PN}-{alert.sh,apache.conf,lighttpd.conf} |
168 |
+ doman man/man5/${PN}.conf.5 |
169 |
+ doman man/man8/${PN}.8 |
170 |
+ |
171 |
+ insinto /var/lib/${PN}/www |
172 |
+ doins logo_bot.png logo_top.png ${PN}ico.png |
173 |
+ |
174 |
+ keepdir /var/lib/${PN}/www/imgs |
175 |
+ fowners monitorix:monitorix /var/lib/${PN}/www/imgs |
176 |
+ |
177 |
+ exeinto /var/lib/${PN}/www/cgi |
178 |
+ doexe ${PN}.cgi |
179 |
+ |
180 |
+ dodir /usr/lib/${PN} |
181 |
+ exeinto /usr/lib/${PN} |
182 |
+ doexe lib/*.pm |
183 |
+ |
184 |
+ keepdir /var/lib/${PN}/usage |
185 |
+ insinto /var/lib/${PN}/reports |
186 |
+ doins -r reports |
187 |
+ |
188 |
+ systemd_dounit docs/${PN}.service |
189 |
+} |
190 |
+ |
191 |
+pkg_postinst() { |
192 |
+ if has_version '<=www-misc/monitorix-3.5.1' ; then |
193 |
+ ewarn "WARNING: ${PN} has changed its config format twice, in versions" |
194 |
+ ewarn "3.0.0 and 3.4.0; this format may be incompatible with your existing" |
195 |
+ ewarn "config file. Please take care if upgrading from an old version." |
196 |
+ ewarn |
197 |
+ elog "${PN} includes its own web server as of version 3.0.0." |
198 |
+ elog "For this reason, the dependency on the webapp framework" |
199 |
+ elog "has been removed." |
200 |
+ elog |
201 |
+ fi |
202 |
+ elog "Optional dependencies:" |
203 |
+ elog " app-admin/hddtemp (disk drive temperatures and health)" |
204 |
+ elog " mail-mta/postfix (email reports/statics)" |
205 |
+ elog " mail-mta/sendmail (email reports/statics)" |
206 |
+ elog " sys-apps/lm_sensors (lm_sensors and GPU temperatures)" |
207 |
+ elog " sys-power/apcupsd (APC UPS statistics)" |
208 |
+ elog " sys-power/nut (Network UPS Tools statistics)" |
209 |
+ elog |
210 |
+ elog "If you wish to use your own web server:" |
211 |
+ elog " Web data can be found at: ${EROOT%/}/var/lib/${PN}/www/" |
212 |
+ elog " Also please check the correct user and group ownership" |
213 |
+ elog " of ${EROOT%/}/var/lib/${PN}/www/imgs/" |
214 |
+} |