1 |
commit: af1becc28309a7351ad34b096bc1e1201da693bd |
2 |
Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jun 29 17:50:41 2011 +0000 |
4 |
Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jun 29 17:52:13 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=af1becc2 |
7 |
|
8 |
[sys-cluster/ganglia_jobmonarch] Import per bug #297587 |
9 |
|
10 |
(Portage version: 2.2.0_alpha41/git/Linux x86_64, signed Manifest commit with key F82F92E6) |
11 |
|
12 |
--- |
13 |
.../files/ganglia_jobmonarch-0.3.1-fix.patch | 79 ++++++++++++++++++++ |
14 |
.../ganglia_jobmonarch/files/job_monarch_link.sh | 64 ++++++++++++++++ |
15 |
.../ganglia_jobmonarch/files/jobarchived.initd | 28 +++++++ |
16 |
sys-cluster/ganglia_jobmonarch/files/jobmond.initd | 28 +++++++ |
17 |
.../ganglia_jobmonarch-0.3.1.ebuild | 76 +++++++++++++++++++ |
18 |
sys-cluster/ganglia_jobmonarch/metadata.xml | 5 + |
19 |
6 files changed, 280 insertions(+), 0 deletions(-) |
20 |
|
21 |
diff --git a/sys-cluster/ganglia_jobmonarch/files/ganglia_jobmonarch-0.3.1-fix.patch b/sys-cluster/ganglia_jobmonarch/files/ganglia_jobmonarch-0.3.1-fix.patch |
22 |
new file mode 100644 |
23 |
index 0000000..e23b12a |
24 |
--- /dev/null |
25 |
+++ b/sys-cluster/ganglia_jobmonarch/files/ganglia_jobmonarch-0.3.1-fix.patch |
26 |
@@ -0,0 +1,79 @@ |
27 |
+diff -Naur ganglia_jobmonarch-0.3.1/web/addons/job_monarch/host_view.php ganglia_jobmonarch-0.3.1-new/web/addons/job_monarch/host_view.php |
28 |
+--- ganglia_jobmonarch-0.3.1/web/addons/job_monarch/host_view.php 2007-07-06 17:05:08.000000000 +0200 |
29 |
++++ ganglia_jobmonarch-0.3.1-new/web/addons/job_monarch/host_view.php 2008-04-14 19:47:12.000000000 +0200 |
30 |
+@@ -73,8 +73,8 @@ |
31 |
+ $trd = new TarchRrdGraph( $clustername, $hostname ); |
32 |
+ $rrdirs = $trd->getRrdDirs( $period_start, $period_stop ); |
33 |
+ |
34 |
+- $longtitle = "Batch Archive Node Report :: Powered by Job Monarch!"; |
35 |
+- $title = "Batch Archive Node Report"; |
36 |
++ $longtitle = "Host Node"; |
37 |
++ $title = "Host Node"; |
38 |
+ |
39 |
+ makeHeader( 'host_view', $title, $longtitle ); |
40 |
+ |
41 |
+diff -Naur ganglia_jobmonarch-0.3.1/web/addons/job_monarch/libtoga.php ganglia_jobmonarch-0.3.1-new/web/addons/job_monarch/libtoga.php |
42 |
+--- ganglia_jobmonarch-0.3.1/web/addons/job_monarch/libtoga.php 2008-02-28 09:33:32.000000000 +0100 |
43 |
++++ ganglia_jobmonarch-0.3.1-new/web/addons/job_monarch/libtoga.php 2008-04-16 20:09:11.000000000 +0200 |
44 |
+@@ -1433,7 +1433,7 @@ |
45 |
+ // |
46 |
+ $colorblue = imageColorAllocate( $image, 0, 0, 255 ); |
47 |
+ |
48 |
+- imageString( $image, $font, 2, 2, "Monarch Joblist - cluster: ".$this->clustername, $colorblue ); |
49 |
++ imageString( $image, $font, 2, 2, "Joblist - cluster: ".$this->clustername, $colorblue ); |
50 |
+ } |
51 |
+ |
52 |
+ if( $this->isBig() && ( isset( $SORT_XLABEL ) || isset( $SORT_YLABEL ) ) ) |
53 |
+@@ -1583,7 +1583,7 @@ |
54 |
+ |
55 |
+ $colorblue = imageColorAllocate( $image, 0, 0, 255 ); |
56 |
+ |
57 |
+- imageString( $image, $font, 2, 2, "Monarch Joblist - cluster: ".$this->clustername, $colorblue ); |
58 |
++ imageString( $image, $font, 2, 2, "Joblist - cluster: ".$this->clustername, $colorblue ); |
59 |
+ } |
60 |
+ |
61 |
+ for( $n = 0; $n < $node_rows; $n++ ) { |
62 |
+@@ -1810,7 +1810,7 @@ |
63 |
+ |
64 |
+ $colorblue = imageColorAllocate( $this->image, 0, 0, 255 ); |
65 |
+ |
66 |
+- imageString( $this->image, $this->font, 1, $this->y_offset, "Monarch Joblist - host: ".$this->host, $colorblue ); |
67 |
++ imageString( $this->image, $this->font, 1, $this->y_offset, "Joblist - host: ".$this->host, $colorblue ); |
68 |
+ $this->newLineOffset(); |
69 |
+ |
70 |
+ $this->drawHeader(); |
71 |
+diff -Naur ganglia_jobmonarch-0.3.1/web/addons/job_monarch/search.php ganglia_jobmonarch-0.3.1-new/web/addons/job_monarch/search.php |
72 |
+--- ganglia_jobmonarch-0.3.1/web/addons/job_monarch/search.php 2007-07-06 17:06:44.000000000 +0200 |
73 |
++++ ganglia_jobmonarch-0.3.1-new/web/addons/job_monarch/search.php 2008-04-14 19:53:38.000000000 +0200 |
74 |
+@@ -261,8 +261,8 @@ |
75 |
+ //printf("start = %s stop = %s\n", $start, $stop ); |
76 |
+ //printf("m %s\n", $metricname ); |
77 |
+ |
78 |
+- $longtitle = "Batch Archive Search :: Powered by Job Monarch!"; |
79 |
+- $title = "Batch Archive Search"; |
80 |
++ $longtitle = "Archive Search"; |
81 |
++ $title = "Archive Search"; |
82 |
+ |
83 |
+ makeHeader( 'search', $title, $longtitle ); |
84 |
+ |
85 |
+diff -Naur ganglia_jobmonarch-0.3.1/web/addons/job_monarch/templates/header.tpl ganglia_jobmonarch-0.3.1-new/web/addons/job_monarch/templates/header.tpl |
86 |
+--- ganglia_jobmonarch-0.3.1/web/addons/job_monarch/templates/header.tpl 2007-04-23 19:17:40.000000000 +0200 |
87 |
++++ ganglia_jobmonarch-0.3.1-new/web/addons/job_monarch/templates/header.tpl 2008-08-06 19:21:50.000000000 +0200 |
88 |
+@@ -1,7 +1,7 @@ |
89 |
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
90 |
+ <HTML> |
91 |
+ <HEAD> |
92 |
+-<TITLE>Ganglia :: {longpage_title}</TITLE> |
93 |
++<TITLE>Ganglia Batch Report of {longpage_title}</TITLE> |
94 |
+ <META http-equiv="Content-type" content="text/html; charset=utf-8"> |
95 |
+ <META http-equiv="refresh" content="{refresh}{redirect}" > |
96 |
+ <LINK rel="stylesheet" href="./styles.css" type="text/css"> |
97 |
+@@ -34,7 +34,7 @@ |
98 |
+ <TR BGCOLOR="#DDDDDD"> |
99 |
+ <TD BGCOLOR="#DDDDDD"> |
100 |
+ <FONT SIZE="+1"> |
101 |
+- <B>{page_title} for {date}</B> |
102 |
++ <B>{page_title} @ {date}</B> |
103 |
+ </FONT> |
104 |
+ </TD> |
105 |
+ <TD BGCOLOR="#DDDDDD" ALIGN="RIGHT"> |
106 |
|
107 |
diff --git a/sys-cluster/ganglia_jobmonarch/files/job_monarch_link.sh b/sys-cluster/ganglia_jobmonarch/files/job_monarch_link.sh |
108 |
new file mode 100644 |
109 |
index 0000000..dfcbfea |
110 |
--- /dev/null |
111 |
+++ b/sys-cluster/ganglia_jobmonarch/files/job_monarch_link.sh |
112 |
@@ -0,0 +1,64 @@ |
113 |
+#!/bin/sh |
114 |
+ |
115 |
+install() { |
116 |
+ cd /var/www/localhost/htdocs/$1 |
117 |
+ mkdir addons; mkdir addons/job_monarch; cd addons/job_monarch |
118 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/cal.gif |
119 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/conf.php |
120 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/document_archive.jpg |
121 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/footer.php |
122 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/graph.php |
123 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/header.php |
124 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/host_view.php |
125 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/image.php |
126 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/index.php |
127 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/jobmonarch.gif |
128 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/libtoga.js |
129 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/libtoga.php |
130 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/logo_ned.gif |
131 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/next.gif |
132 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/overview.php |
133 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/prev.gif |
134 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/redcross.jpg |
135 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/search.php |
136 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/styles.css |
137 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/ts_picker.js |
138 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/ts_validatetime.js |
139 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/version.php |
140 |
+ |
141 |
+ mkdir clusterconf; cd clusterconf |
142 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/clusterconf/example.php |
143 |
+ cd .. |
144 |
+ |
145 |
+ mkdir templates; cd templates |
146 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/templates/footer.tpl |
147 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/templates/header.tpl |
148 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/templates/host_view.tpl |
149 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/templates/index.tpl |
150 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/templates/overview.tpl |
151 |
+ ln /var/www/localhost/htdocs/$2/addons/job_monarch/templates/search.tpl |
152 |
+ ln -s ../../../templates/default/images |
153 |
+ |
154 |
+ cd /var/www/localhost/htdocs/$1 |
155 |
+ mkdir templates/job_monarch; cd templates/job_monarch |
156 |
+ ln /var/www/localhost/htdocs/$2/templates/job_monarch/cluster_extra.tpl |
157 |
+ ln /var/www/localhost/htdocs/$2/templates/job_monarch/host_extra.tpl |
158 |
+ ln -s ../default/images |
159 |
+} |
160 |
+ |
161 |
+uninstall() { |
162 |
+ rm -Rf /var/www/localhost/htdocs/$1/addons/job_monarch/* && rmdir /var/www/localhost/htdocs/$1/addons/job_monarch && rmdir /var/www/localhost/htdocs/$1/addons |
163 |
+ rm -Rf /var/www/localhost/htdocs/$1/templates/job_monarch/* && rmdir /var/www/localhost/htdocs/$1/templates/job_monarch |
164 |
+} |
165 |
+ |
166 |
+case "$1" in |
167 |
+ install) |
168 |
+ install $2 $3 |
169 |
+ ;; |
170 |
+ uninstall) |
171 |
+ uninstall $2 |
172 |
+ ;; |
173 |
+ *) |
174 |
+ echo -e "\033[34;1mUsage: job_monarch_link.sh [ install <ganglia_dir> <jobmonarch_dir> | uninstall <ganglia_dir> ]\033[0m" |
175 |
+ ;; |
176 |
+esac |
177 |
|
178 |
diff --git a/sys-cluster/ganglia_jobmonarch/files/jobarchived.initd b/sys-cluster/ganglia_jobmonarch/files/jobarchived.initd |
179 |
new file mode 100644 |
180 |
index 0000000..e1de75d |
181 |
--- /dev/null |
182 |
+++ b/sys-cluster/ganglia_jobmonarch/files/jobarchived.initd |
183 |
@@ -0,0 +1,28 @@ |
184 |
+#!/sbin/runscript |
185 |
+# Copyright 1999-2011 Gentoo Foundation |
186 |
+# Distributed under the terms of the GNU General Public License v2 |
187 |
+ |
188 |
+PIDFILE=/var/run/jobarchived.pid |
189 |
+ |
190 |
+depend() { |
191 |
+ need gmond |
192 |
+} |
193 |
+ |
194 |
+start() { |
195 |
+ ebegin "Starting Jobarchived" |
196 |
+ start-stop-daemon --start --exec /sbin/jobarchived.py -- -p ${PIDFILE} -c /etc/jobarchived.conf |
197 |
+ eend 0 |
198 |
+} |
199 |
+ |
200 |
+stop() { |
201 |
+ ebegin "Stopping Jobarchived" |
202 |
+ start-stop-daemon --stop --quiet --signal TERM -p ${PIDFILE} |
203 |
+ eend $? |
204 |
+} |
205 |
+ |
206 |
+restart() { |
207 |
+ svc_stop |
208 |
+ sleep 3 |
209 |
+ svc_start |
210 |
+} |
211 |
+# vim:ts=4 |
212 |
|
213 |
diff --git a/sys-cluster/ganglia_jobmonarch/files/jobmond.initd b/sys-cluster/ganglia_jobmonarch/files/jobmond.initd |
214 |
new file mode 100644 |
215 |
index 0000000..619495c |
216 |
--- /dev/null |
217 |
+++ b/sys-cluster/ganglia_jobmonarch/files/jobmond.initd |
218 |
@@ -0,0 +1,28 @@ |
219 |
+#!/sbin/runscript |
220 |
+# Copyright 1999-2011 Gentoo Foundation |
221 |
+# Distributed under the terms of the GNU General Public License v2 |
222 |
+ |
223 |
+PIDFILE=/var/run/jobmond.pid |
224 |
+ |
225 |
+depend() { |
226 |
+ need gmond |
227 |
+} |
228 |
+ |
229 |
+start() { |
230 |
+ ebegin "Starting Jobmond" |
231 |
+ start-stop-daemon --start --exec /sbin/jobmond.py -- -p ${PIDFILE} -c /etc/jobmond.conf |
232 |
+ eend 0 |
233 |
+} |
234 |
+ |
235 |
+stop() { |
236 |
+ ebegin "Stopping Jobmond" |
237 |
+ start-stop-daemon --stop --quiet --signal TERM -p ${PIDFILE} |
238 |
+ eend $? |
239 |
+} |
240 |
+ |
241 |
+restart() { |
242 |
+ svc_stop |
243 |
+ sleep 3 |
244 |
+ svc_start |
245 |
+} |
246 |
+# vim:ts=4 |
247 |
|
248 |
diff --git a/sys-cluster/ganglia_jobmonarch/ganglia_jobmonarch-0.3.1.ebuild b/sys-cluster/ganglia_jobmonarch/ganglia_jobmonarch-0.3.1.ebuild |
249 |
new file mode 100644 |
250 |
index 0000000..dc1b010 |
251 |
--- /dev/null |
252 |
+++ b/sys-cluster/ganglia_jobmonarch/ganglia_jobmonarch-0.3.1.ebuild |
253 |
@@ -0,0 +1,76 @@ |
254 |
+# Copyright 1999-2011 Gentoo Foundation |
255 |
+# Distributed under the terms of the GNU General Public License v2 |
256 |
+# $Header: $ |
257 |
+ |
258 |
+EAPI="4" |
259 |
+ |
260 |
+WEBAPP_OPTIONAL="yes" |
261 |
+inherit eutils webapp depend.php |
262 |
+ |
263 |
+DESCRIPTION="Ganglia addons for Torque" |
264 |
+HOMEPAGE="https://subtrac.sara.nl/oss/jobmonarch/" |
265 |
+SRC_URI="ftp://ftp.sara.nl/pub/outgoing/jobmonarch/latest/${P}.tar.bz2" |
266 |
+ |
267 |
+LICENSE="GPL-2" |
268 |
+SLOT="0" |
269 |
+KEYWORDS="~amd64" |
270 |
+IUSE="vhosts" |
271 |
+WEBAPP_MANUAL_SLOT="yes" |
272 |
+ |
273 |
+GANGLIA="ganglia" |
274 |
+JOBMONARCH="ganglia_jobmonarch" |
275 |
+ |
276 |
+DEPEND=" |
277 |
+ sys-cluster/ganglia |
278 |
+ dev-lang/php[gd,xml,ctype] |
279 |
+ media-libs/gd |
280 |
+ sys-cluster/pbs-python |
281 |
+ dev-python/pypgsql |
282 |
+ ${WEBAPP_DEPEND}" |
283 |
+ |
284 |
+pkg_setup() { |
285 |
+ webapp_pkg_setup |
286 |
+} |
287 |
+ |
288 |
+src_prepare() { |
289 |
+ epatch "${FILESDIR}"/${P}-fix.patch |
290 |
+} |
291 |
+ |
292 |
+src_install() { |
293 |
+ insinto /etc |
294 |
+ doins "${S}/jobmond/jobmond.conf" |
295 |
+ doins "${S}/jobarchived/jobarchived.conf" |
296 |
+ |
297 |
+ insinto /usr/share/jobmonarch/ |
298 |
+ doins "${S}/jobarchived/job_dbase.sql" |
299 |
+ |
300 |
+ dodir /var/lib/jobarchive |
301 |
+ |
302 |
+ insopts -m0755 |
303 |
+ insinto /sbin |
304 |
+ doins "${S}/jobmond/jobmond.py" |
305 |
+ doins "${S}/jobarchived/jobarchived.py" |
306 |
+ doins "${S}/jobarchived/pipe_jobarchived.py" |
307 |
+ doins "${FILESDIR}/job_monarch_link.sh" |
308 |
+ |
309 |
+ newinitd "${FILESDIR}/jobmond.initd" jobmond |
310 |
+ newinitd "${FILESDIR}/jobarchived.initd" jobarchived |
311 |
+ |
312 |
+ cd "${S}/web/templates/job_monarch/" |
313 |
+ rm images/* |
314 |
+ rmdir images |
315 |
+ |
316 |
+ cd "${S}" |
317 |
+ webapp_src_preinst |
318 |
+ insinto "${MY_HTDOCSDIR}" |
319 |
+ doins -r web/* |
320 |
+ |
321 |
+ webapp_configfile "${MY_HTDOCSDIR}"/addons/job_monarch/conf.php |
322 |
+ webapp_src_install |
323 |
+ |
324 |
+ ewarn |
325 |
+ ewarn "You must Execute: job_monarch_link.sh install ${GANGLIA} ${JOBMONARCH} to have the JobMonArch installed under ganglia" |
326 |
+ ewarn |
327 |
+ ewarn "You must Execute: job_monarch_link.sh uninstall ${GANGLIA} to remove link from ganglia directories" |
328 |
+ ewarn |
329 |
+} |
330 |
|
331 |
diff --git a/sys-cluster/ganglia_jobmonarch/metadata.xml b/sys-cluster/ganglia_jobmonarch/metadata.xml |
332 |
new file mode 100644 |
333 |
index 0000000..081af55 |
334 |
--- /dev/null |
335 |
+++ b/sys-cluster/ganglia_jobmonarch/metadata.xml |
336 |
@@ -0,0 +1,5 @@ |
337 |
+<?xml version="1.0" encoding="UTF-8"?> |
338 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
339 |
+<pkgmetadata> |
340 |
+ <herd>cluster</herd> |
341 |
+</pkgmetadata> |