d0fb97639839e6f6a895d668b7f4bbb570ffeee7
[raven.git] / rpm_builds / SPECS / gackscentral.spec.template
1 Summary: Gacks Central
2 Name: gackscentral
3 Version: @VER@
4 Release: @REL@
5 License: Public Domain
6 Group: Raven at U of Arizona
7 URL: http://www.cs.arizona.edu/
8 Source RPM: ftp://quadrus.cs.arizona.edu/PlanetLab/V3/gackscentral-@VER@.tar.gz
9 Vendor: University of Arizona
10 BuildRoot: %{_tmppath}/%{name}-root
11 requires: arizona-lib >= 2.2.8, httpd
12
13 %description
14 This rpm provides gacks central.
15 %prep
16 %setup -q
17
18 %build
19
20 %install
21 rm -rf %\{buildroot]
22 install -d -o 0 -g 0 %{buildroot}/usr
23 install -d -o 0 -g 0 %{buildroot}/usr/local/gackscentral
24 install -d -o 0 -g 0 %{buildroot}/usr/local/gackscentral/bin
25 #install -d -o 0 -g 0 %{buildroot}/usr/local/gackscentral/bin/sfa
26 #install -d -o 0 -g 0 %{buildroot}/usr/local/gackscentral/bin/sfa/trust
27 #install -d -o 0 -g 0 %{buildroot}/usr/local/gackscentral/bin/sfa/util
28 install -d -o 0 -g 0 %{buildroot}/usr/local/gackscentral/scripts
29 install -d -o 0 -g 0 %{buildroot}/usr/local/gackscentral/var
30 install -d -o 0 -g 0 %{buildroot}/usr/local/gackscentral/var/trusted_roots
31 install -d -o 0 -g 0 %{buildroot}/usr/local/gackscentral/var/log
32
33 install -d -o 0 -g 0 %{buildroot}/var
34 install -d -o 0 -g 0 %{buildroot}/var/log
35 install -d -o 0 -g 0 %{buildroot}/var/log/gacks
36
37 install -d -o 0 -g 0 %{buildroot}/etc
38 install -d -o 0 -g 0 %{buildroot}/etc/httpd
39 install -d -o 0 -g 0 %{buildroot}/etc/httpd/conf.d
40
41 install -d -o 0 -g 0 %{buildroot}/etc/cron.d
42 install -d -o 0 -g 0 %{buildroot}/etc/init.d
43
44 install -d -o 0 -g 0 %{buildroot}/etc/gacks
45
46 install gacks-api.conf %{buildroot}/etc/httpd/conf.d
47
48 install API.py %{buildroot}/usr/local/gackscentral/bin
49 install ModPython.py %{buildroot}/usr/local/gackscentral/bin
50 install BaseApi.py %{buildroot}/usr/local/gackscentral/bin
51 install AuthenticatedApi.py %{buildroot}/usr/local/gackscentral/bin
52 install ApiExceptionCodes.py  %{buildroot}/usr/local/gackscentral/bin
53
54 install testGacksCalendar.py %{buildroot}/usr/local/gackscentral/bin
55 install gacksaccount.py %{buildroot}/usr/local/gackscentral/bin
56 install gacksaccountmanager.py %{buildroot}/usr/local/gackscentral/bin
57 install gacksaccount_test.py %{buildroot}/usr/local/gackscentral/bin
58 install gacksauth.py %{buildroot}/usr/local/gackscentral/bin
59 install gacksid.py %{buildroot}/usr/local/gackscentral/bin
60 install gacksreset.py %{buildroot}/usr/local/gackscentral/bin
61 install gacksbackend.py %{buildroot}/usr/local/gackscentral/bin
62 install gackscalendar.py %{buildroot}/usr/local/gackscentral/bin
63 install gackscalendar_list.py %{buildroot}/usr/local/gackscentral/bin
64 install gackscalendar_mysql.py %{buildroot}/usr/local/gackscentral/bin
65 install gackscalendar_db.py %{buildroot}/usr/local/gackscentral/bin
66 install gackscli.py %{buildroot}/usr/local/gackscentral/bin
67 install gacksclient.py %{buildroot}/usr/local/gackscentral/bin
68 install gackscollector.py %{buildroot}/usr/local/gackscentral/bin
69 install gacksconfig.py %{buildroot}/usr/local/gackscentral/bin
70 install gacksdaemon.py %{buildroot}/usr/local/gackscentral/bin
71 install gacksdb.py %{buildroot}/usr/local/gackscentral/bin
72 install gacksexcep.py %{buildroot}/usr/local/gackscentral/bin
73 install gacksenforce.py %{buildroot}/usr/local/gackscentral/bin
74 install gackshandle.py %{buildroot}/usr/local/gackscentral/bin
75 install gackshandler_base.py %{buildroot}/usr/local/gackscentral/bin
76 install gackshandler_plc.py %{buildroot}/usr/local/gackscentral/bin
77 install gacksid.py %{buildroot}/usr/local/gackscentral/bin
78 install gacksinvoice.py %{buildroot}/usr/local/gackscentral/bin
79 install gackslogserver.py %{buildroot}/usr/local/gackscentral/bin
80 install gacksjob.py %{buildroot}/usr/local/gackscentral/bin
81 install gacksnodepicker.py %{buildroot}/usr/local/gackscentral/bin
82 install gacksnodestatus.py %{buildroot}/usr/local/gackscentral/bin
83 install gackspolicy.py %{buildroot}/usr/local/gackscentral/bin
84 install gacksqueue.py %{buildroot}/usr/local/gackscentral/bin
85 install gacksqueue_mysql.py %{buildroot}/usr/local/gackscentral/bin
86 install gacksreceipt.py %{buildroot}/usr/local/gackscentral/bin
87 install gacksresource.py %{buildroot}/usr/local/gackscentral/bin
88 install gacksrspec.py %{buildroot}/usr/local/gackscentral/bin
89 install gackslog.py %{buildroot}/usr/local/gackscentral/bin
90 install gackslog_mysql.py %{buildroot}/usr/local/gackscentral/bin
91
92 install localhost-gacks-defragment.sh %{buildroot}/usr/local/gackscentral/bin
93 install localhost-gacks-garbagecollect.sh %{buildroot}/usr/local/gackscentral/bin
94 install localhost-gacks-runasap.sh %{buildroot}/usr/local/gackscentral/bin
95 install localhost-gacks-applyinvoices.sh %{buildroot}/usr/local/gackscentral/bin
96 install localhost-gacks-mailinvoices.sh %{buildroot}/usr/local/gackscentral/bin
97 install gackscentral.cron %{buildroot}/etc/cron.d
98
99 install gacksbackend.init %{buildroot}/etc/init.d
100 install gackslogserver.init %{buildroot}/etc/init.d
101 install gackscollector.init %{buildroot}/etc/init.d
102
103 install gackslog.conf %{buildroot}/etc/gacks
104
105 # Geniwrapper stuff
106 #install __init__.py %{buildroot}/usr/local/gackscentral/bin/sfa
107 #install __init__.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
108 #install certificate.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
109 #install credential.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
110 #install gid.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
111 #install rights.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
112 #install trustedroot.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
113
114 #install __init__.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
115 #install client.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
116 #install faults.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
117 #install sfaticket.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
118 #install misc.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
119 #install namespace.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
120 #install parameter.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
121 #install record.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
122 #install report.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
123 #install rspec.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
124 #install xmlrpcprotocol.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
125
126 %clean
127 rm -rf %{buildroot}
128
129 %post
130 mkdir -p /usr/local/gackscentral/var 2>/dev/null
131 mkdir -p /usr/local/gackscentral/var/log 2>/dev/null
132 mkdir -p /usr/local/gackscentral/var/trusted_roots 2>/dev/null
133
134 ln -sf /usr/local/gackscentral/bin/gackscli.py /usr/bin/gackscli
135
136 # apache can't seem to write the log files
137 chown -R apache /usr/local/gackscentral/var/log
138
139 chkconfig gacksbackend.init on
140 service gacksbackend.init restart
141 chkconfig gackslogserver.init on
142 service gackslogserver.init restart
143 chkconfig gackscollector.init on
144 service gackscollector.init restart
145
146 %preun
147 if [ $1 = 0 ]; then
148   rm -f /usr/bin/gackscli
149 fi
150
151 %files
152 %defattr(-,root,root)
153
154 /etc/httpd/conf.d/gacks-api.conf
155
156 /usr/local/gackscentral/bin/API.py
157 /usr/local/gackscentral/bin/ModPython.py
158 /usr/local/gackscentral/bin/BaseApi.py
159 /usr/local/gackscentral/bin/AuthenticatedApi.py
160 /usr/local/gackscentral/bin/ApiExceptionCodes.py
161
162 /usr/local/gackscentral/bin/testGacksCalendar.py
163 /usr/local/gackscentral/bin/gacksaccount.py
164 /usr/local/gackscentral/bin/gacksaccountmanager.py
165 /usr/local/gackscentral/bin/gacksaccount_test.py
166 /usr/local/gackscentral/bin/gacksauth.py
167 /usr/local/gackscentral/bin/gacksid.py
168 /usr/local/gackscentral/bin/gacksreset.py
169 /usr/local/gackscentral/bin/gacksbackend.py
170 /usr/local/gackscentral/bin/gackscalendar.py
171 /usr/local/gackscentral/bin/gackscalendar_list.py
172 /usr/local/gackscentral/bin/gackscalendar_mysql.py
173 /usr/local/gackscentral/bin/gackscalendar_db.py
174 /usr/local/gackscentral/bin/gackscli.py
175 /usr/local/gackscentral/bin/gacksclient.py
176 /usr/local/gackscentral/bin/gackscollector.py
177 /usr/local/gackscentral/bin/gacksconfig.py
178 /usr/local/gackscentral/bin/gacksdaemon.py
179 /usr/local/gackscentral/bin/gacksdb.py
180 /usr/local/gackscentral/bin/gacksenforce.py
181 /usr/local/gackscentral/bin/gacksexcep.py
182 /usr/local/gackscentral/bin/gackshandle.py
183 /usr/local/gackscentral/bin/gackshandler_base.py
184 /usr/local/gackscentral/bin/gackshandler_plc.py
185 /usr/local/gackscentral/bin/gacksid.py
186 /usr/local/gackscentral/bin/gacksinvoice.py
187 /usr/local/gackscentral/bin/gacksjob.py
188 /usr/local/gackscentral/bin/gacksnodepicker.py
189 /usr/local/gackscentral/bin/gacksnodestatus.py
190 /usr/local/gackscentral/bin/gackspolicy.py
191 /usr/local/gackscentral/bin/gacksqueue.py
192 /usr/local/gackscentral/bin/gacksqueue_mysql.py
193 /usr/local/gackscentral/bin/gacksreceipt.py
194 /usr/local/gackscentral/bin/gacksresource.py
195 /usr/local/gackscentral/bin/gacksrspec.py
196 /usr/local/gackscentral/bin/gackslog.py
197 /usr/local/gackscentral/bin/gackslog_mysql.py
198 /usr/local/gackscentral/bin/gackslogserver.py
199
200 /usr/local/gackscentral/bin/localhost-gacks-defragment.sh
201 /usr/local/gackscentral/bin/localhost-gacks-garbagecollect.sh
202 /usr/local/gackscentral/bin/localhost-gacks-runasap.sh
203 /usr/local/gackscentral/bin/localhost-gacks-applyinvoices.sh
204 /usr/local/gackscentral/bin/localhost-gacks-mailinvoices.sh
205 %attr(0644,root,root) /etc/cron.d/gackscentral.cron
206
207 /etc/gacks/gackslog.conf
208
209 /etc/init.d/gacksbackend.init
210 %attr(0755,root,root) /etc/init.d/gacksbackend.init
211 /etc/init.d/gackslogserver.init
212 %attr(0755,root,root) /etc/init.d/gackslogserver.init
213 /etc/init.d/gackscollector.init
214 %attr(0755,root,root) /etc/init.d/gackscollector.init
215
216 # geniwrapper stuff
217 #/usr/local/gackscentral/bin/sfa/__init__.py
218 #/usr/local/gackscentral/bin/sfa/trust/__init__.py
219 #/usr/local/gackscentral/bin/sfa/trust/certificate.py
220 #/usr/local/gackscentral/bin/sfa/trust/credential.py
221 #/usr/local/gackscentral/bin/sfa/trust/gid.py
222 #/usr/local/gackscentral/bin/sfa/trust/rights.py
223 #/usr/local/gackscentral/bin/sfa/trust/trustedroot.py
224
225 #/usr/local/gackscentral/bin/sfa/util/__init__.py
226 #/usr/local/gackscentral/bin/sfa/util/client.py
227 #/usr/local/gackscentral/bin/sfa/util/faults.py
228 #/usr/local/gackscentral/bin/sfa/util/sfaticket.py
229 #/usr/local/gackscentral/bin/sfa/util/misc.py
230 #/usr/local/gackscentral/bin/sfa/util/namespace.py
231 #/usr/local/gackscentral/bin/sfa/util/parameter.py
232 #/usr/local/gackscentral/bin/sfa/util/record.py
233 #/usr/local/gackscentral/bin/sfa/util/report.py
234 #/usr/local/gackscentral/bin/sfa/util/rspec.py
235 #/usr/local/gackscentral/bin/sfa/util/xmlrpcprotocol.py
236