c305b6e35bc9e6b997b94671fd2628e76035a86e
[plcapi.git] / PLCAPI.spec
1 %define name PLCAPI
2 %define version 5.0
3 %define taglevel 24
4
5 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
6
7 Summary: PlanetLab Central API
8 Name: %{name}
9 Version: %{version}
10 Release: %{release}
11 License: PlanetLab
12 Group: System Environment/Daemons
13 Source0: %{name}-%{version}.tar.gz
14 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
15
16 Vendor: PlanetLab
17 Packager: PlanetLab Central <support@planet-lab.org>
18 Distribution: PlanetLab %{plrelease}
19 URL: %{SCMURL}
20
21 Obsoletes: plcapilib
22
23 # We use set everywhere
24 Requires: python >= 2.4
25 Requires: postgresql >= 8.2, postgresql-server >= 8.2
26 Requires: postgresql-python
27 Requires: python-psycopg2
28 Requires: python-pycurl
29 Requires: httpd
30 Requires: mod_python
31 # mod_wsgi will replace mod_python when we are ready
32 Requires: mod_wsgi
33 Requires: mod_ssl
34 Requires: SOAPpy
35 Requires: python-simplejson
36 # for the RebootNodeWithPCU method
37 Requires: pcucontrol >= 1.0-6
38 # for OMF integration
39 Requires: pyaspects >= 0.4
40 Requires: python-twisted-words
41 Requires: python-twisted-web
42 # ldap
43 Requires: python-ldap
44 # for memcache
45 Requires: python-memcached
46 Requires: memcached
47 ### avoid having yum complain about updates, as stuff is moving around
48 # plc.d/api
49 Conflicts: MyPLC <= 4.3
50
51 # We use psycopg2
52 #
53 # but we don't need to rebuild it as we depend on distro's packages - baris
54 # BuildRequires: postgresql-devel
55
56 # Standard xmlrpc.so that ships with PHP does not marshal NULL
57 BuildRequires: php-devel PyXML python-simplejson
58 Obsoletes: php-xmlrpc
59 Provides: php-xmlrpc
60
61 # PostgreSQL and SOAPpy are necessary to run the API server, but not
62 # plcsh. Since the only supported method of running the server is via
63 # MyPLC anyway, don't be so stringent about binary requirements, in
64 # case people want to install this package just for plcsh.
65 # Requires: postgresql-server, SOAPpy
66 AutoReqProv: no
67
68 %description
69 The PLCAPI package provides an XML-RPC and SOAP API for accessing the
70 PlanetLab Central (PLC) database. The API may be accessed directly via
71 the Python shell program plcsh, through a toy standalone server, or
72 through Apache mod_python.
73
74 %prep
75 %setup -q
76
77 %build
78 # python-pycurl and python-psycopg2 avail. from fedora 5
79 # we used to ship our own version of psycopg2 and pycurl, for fedora4
80 # starting with 4.3, support for these two modules is taken out
81
82 # Build __init__.py metafiles and PHP API. 
83 %{__make} %{?_smp_mflags}
84 %{__make} -C wsdl
85
86 %install
87 rm -rf $RPM_BUILD_ROOT
88 %{__make} %{?_smp_mflags} install DESTDIR="$RPM_BUILD_ROOT" datadir="%{_datadir}" bindir="%{_bindir}"
89
90 # Install shell symlink
91 mkdir -p $RPM_BUILD_ROOT/%{_bindir}
92 ln -s %{_datadir}/plc_api/plcsh $RPM_BUILD_ROOT/%{_bindir}/plcsh
93
94 mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/php.d
95 cat > $RPM_BUILD_ROOT/%{_sysconfdir}/php.d/xmlrpc.ini <<EOF
96 ; Enable xmlrpc extension module
97 extension=xmlrpc.so
98 EOF
99
100 # Install initscripts
101 echo "* Installing initscripts"
102 find plc.d | cpio -p -d -u ${RPM_BUILD_ROOT}/etc/
103 chmod 755 ${RPM_BUILD_ROOT}/etc/plc.d/*
104
105 # Install db-config.d files
106 echo "* Installing db-config.d files"
107 mkdir -p ${RPM_BUILD_ROOT}/etc/planetlab/db-config.d
108 cp db-config.d/* ${RPM_BUILD_ROOT}/etc/planetlab/db-config.d
109 chmod 444 ${RPM_BUILD_ROOT}/etc/planetlab/db-config.d/*
110
111 # Install wsdl
112 echo "* Installing wsdl"
113 install -D -m 644 wsdl/plcapi.wsdl $RPM_BUILD_ROOT/var/www/html/wsdl/plcapi.wsdl
114
115 # Install omf_slicemgr.py
116 install -D -m 755 omf/omf_slicemgr.py $RPM_BUILD_ROOT/usr/bin/omf_slicemgr.py
117 install -D -m 755 omf/reset_xmpp_pubsub_nodes.py $RPM_BUILD_ROOT/usr/bin/reset_xmpp_pubsub_nodes.py
118 mkdir -p $RPM_BUILD_ROOT/var/log/omf
119
120 # Install ratelimit log
121 touch $RPM_BUILD_ROOT/var/log/plc_api_ratelimit.log
122 chown apache:apache $RPM_BUILD_ROOT/var/log/plc_api_ratelimit.log
123
124 # Create func directories
125 mkdir -p $RPM_BUILD_ROOT/var/www/html/func
126 mkdir -p $RPM_BUILD_ROOT/var/log/funcaspect/
127 chmod apache:apache $RPM_BUILD_ROOT/var/www/html/func
128 chmod apache:apache $RPM_BUILD_ROOT/var/log/funcaspect/
129
130 %clean
131 rm -rf $RPM_BUILD_ROOT
132
133 %define php_extension_dir %(php-config --extension-dir)
134
135 %files
136 %defattr(-,root,root,-)
137 %dir %{_datadir}/plc_api
138 %dir /var/log/omf/
139 %{_datadir}/plc_api/*
140 %{_bindir}/plcsh
141 %{php_extension_dir}/xmlrpc.so
142 %{_sysconfdir}/php.d/xmlrpc.ini
143 %config (noreplace) %{_datadir}/plc_api/PLC/Accessors/Accessors_site.py
144 /etc/plc.d
145 /etc/planetlab/db-config.d
146 /var/www/html/wsdl/plcapi.wsdl
147 /usr/bin/omf_slicemgr.py*
148 /usr/bin/reset_xmpp_pubsub_nodes.py*
149 /var/log/plc_api_ratelimit.log
150
151
152 %changelog
153 * Wed Dec 08 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-24
154 - tweak doc extraction for fedora14
155
156 * Tue Dec 07 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-23
157 - builtin accessors for the myslice page
158 - Get{Node,Interface}Tags allowed to techs
159 - tweak in ratelimitaspect.py
160
161 * Mon Dec 06 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-22
162 - add admin role to accessor-related tags (arch, {fc,pl}distro)
163
164 * Mon Dec 06 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-21
165 - bugfix in {Update,Delete}PersonTag
166 - updated xml doc for filters, accessors and tagtypes
167 - more explicit msg in case of missing roles
168 - improvements in ratelimitaspects.py
169
170 * Fri Dec 03 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-20
171 - fix the roles for ssh_key and hmac tags
172
173 * Wed Dec 01 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-19
174 - tag permissions system based on roles and not min_role_ids
175 - accessors simplified accordingly (no more min_role_id)
176 - new methods AddRoleToTagType and DeleteRoleFromTagType
177 - accessor-related tagtypes are created sooner, and enforced
178 - cleaned up redundancy between db-config.d and accessors
179
180 * Thu Sep 16 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-18
181 - fix RefreshPeer that was not working in 5.0-17
182
183 * Thu Sep 16 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-17
184 - RefreshPeer is able to cope with 2 peers running different releases of the api
185 - DeletePerson can be used on duplicates
186 - first appearance of ModPythonJson.py
187
188 * Wed Sep 01 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-16
189 - set accessors return the new value
190 - tweaks in the pubsub groups management
191
192 * Wed Jul 28 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - plcapi-5.0-15
193 - convert hostnames to lower case and use ILIKE instead of LIKE
194
195 * Fri Jul 16 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - plcapi-5.0-14
196 - use hrn in pubsub groups
197
198 * Tue Jul 13 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - plcapi-5.0-13
199 - - Add timestamps to Nodes, PCUs and Interfaces to make concrete statements about a node's configuration state.
200 - - OMF fixes
201
202 * Mon Jun 28 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - PLCAPI-5.0-12
203 - automatically set vsys tag for omf controlled slices
204
205 * Sat Jun 26 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-5.0-11
206 - addition of the 'ssh_key' slice tag
207 - first draft of the LDAP interface
208
209 * Tue Jun 22 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-5.0-10
210 - reservation granularity defined in plc-config-tty (requires myplc 5.0.5)
211 - and readable through GetLeaseGranularity
212 - GetSlivers to expose reservation_policy and lease_granularity
213 - GetBootMedium fixed for reservable nodes
214 - tweaks in pcucontrol (requires pcucontrol-1.0-6)
215 - new Apache mod_wsgi python interface
216
217 * Fri May 14 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-5.0-9
218 - the leases system
219
220 * Wed Apr 14 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-5.0-8
221 - previous tag had gone wrong
222
223 * Wed Apr 14 2010 Talip Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - PLCAPI-5.0-6
224 - fix pubsub hostname
225
226 * Fri Apr 02 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-5.0-5
227 - tweaks for the omf support (xmpp groups and RC-controlled slices)
228 - BootNodeUpdate supports also ssh_rsa_key (and logs only changes)
229 - GetNodeFlavour exposes fcdistro
230
231 * Sun Mar 14 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-5.0-4
232 - do not use UpdateNode for handling the 'hrn' tag - should fix refresh peer & foreign nodes more generally
233
234 * Fri Mar 12 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-5.0-3
235 - slice tag 'omf_control' supported for getting OMF's resource controller shipped to slivers
236 - pyaspect hooks allow to  maintain the namespace xmpp groups
237 - new omf_slicemgr is a proxy to xmpp, used by these hooks
238 - nodes have their hrn exposed in the 'hrn' tag
239 - node hrn exposed in GetSlivers, as well as the overall xmpp config
240 - system slice 'drl' gets created by db-config
241 - daniel's changes to Filter for supporting wildcards in lists
242 - AddSliceTag consistency check tweaked
243
244 * Thu Feb 11 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-5.0-2
245 - major cleanup
246 - get rid of all 4.2-related legacy code
247 - reset the migrations code, planetlab5.sql somes with (5,100)
248 - uses hashlib module when available
249
250 * Fri Jan 29 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-5.0-1
251 - first working version of 5.0:
252 - pld.c/, db-config.d/ and nodeconfig/ scripts should now sit in the module they belong to
253 - nodefamily is 3-fold with pldistro-fcdistro-arch
254 - site and person tags
255 - new methods GetSliceFamily and GetNodeFlavour
256 - deprecated the dummynet stuff that were for the external dummyboxes
257 - tags definition : more consistency between db-config scripts and accessors
258 - (get accessor to create the tag type too if absent)
259 - logging an event for AddSliceToNodes
260
261 * Sat Jan 09 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-32
262 - support for fedora 12
263 - fix subtle bug in filtering with ] and quotes
264
265 * Fri Dec 18 2009 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - PLCAPI-4.3-31
266 - * patch for php-5.3 (the one in f12)
267 - * validate email addresses with regex
268 - * add PersonTags and SiteTags
269 - * add additional accessors for node tags (kvariant, serial, ..)
270
271 * Tue Nov 03 2009 Marc Fiuczynski <mef@cs.princeton.edu> - PLCAPI-4.3-30
272 - Redacting password, session, and authstring values from the event log.
273
274 * Mon Oct 19 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-29
275 - let AddSite set ext_consortium_id - required for the poorman registration pages
276 - drop version constraint on Requires: postgresql-python
277 - don't log system calls nor ReportRunLevel
278
279 * Thu Oct 15 2009 Daniel Hokka Zakrisson <daniel@hozac.com> - PLCAPI-4.3-28
280 - Fix requires for CentOS.
281
282 * Fri Oct 09 2009 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - PLCAPI-4.3-27
283 - Require postgresql 8.2 (for array operators && and @>)
284
285 * Thu Oct 08 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-26
286 - Filter now supports the | and & features to match in sequence values
287 - bugfix in the postgresql wrapper for sequence filter values
288 - reviewed GetSlivers to export admin keys more efficiently
289 - fix checking roles in UpdateSliceTag
290
291 * Sat Sep 26 2009 Marc Fiuczynski <mef@cs.princeton.edu> - PLCAPI-4.3-25
292 - - Some typos in the documentation were fixed.
293 - - UpdateSliceTag check if a node's min_role_id is >= (rather than >)
294 - to the tag's min_role_id.
295
296 * Fri Sep 18 2009 anil vengalil <avengali@sophia.inria.fr> - PLCAPI-4.3-24
297
298 * Mon Sep 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-23
299 - Ongoing work to add upcalls, using new SFA class
300 - new methods BindObjectToPeer, UnBindObjectFromPeer, still for SFA
301 - reviewed type-checking for the 3 taggable classes node-interface-slice
302 - cleanup ald dummynet stuff
303 - expose the 'extensions' accessors to the API
304 - tweaked checks in AddSliceTag
305 - GetPersons exposes roles by default
306 - bugfix in ReportRunLevel for non-string levels
307 - tweaks in GetSlivers ( seems that it now exposes the keys for the root context )
308
309 * Fri Jul 10 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-22
310 - new BindObjectToPeer method for sfa
311 - AddSliceTag and UpdateSliceTag open to the 'node' auth method with restrictions
312
313 * Wed Jul 01 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-21
314 - getbootmedium supports options as tags (serial, cramfs, kvariant, kargs, no-hangcheck )
315 - reportrunlevel logs its calls only when run_level changes
316 - pycurl more robust wrt to xmlrpclib.Transport
317
318 * Tue Jun 16 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-20
319 - produce a wsdl interface
320 - bugfix in getbootmedium for nodes with interface tags
321
322 * Sun Jun 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-19
323 - bugfix for some rare pattern-based filters
324
325 * Wed Jun 03 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-18
326 - improvements in the 4.2 legacy layer
327
328 * Sat May 30 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-17
329 - bugfix required for slice tags set on nodegroups
330
331 * Thu May 28 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-16
332 - more complete compatibility layer - second iteration, with legacy code isolated in Legacy/
333
334 * Tue May 26 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-15
335 - more powerful legacy layer with 4.2
336
337 * Fri May 15 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-14
338 - RefreshPeer sets lock per-peer to avoid multiple concurent instances
339 - migration script has an option for running interactively
340
341 * Wed May 06 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-13
342 - skips already added entries
343
344 * Tue Apr 28 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-12
345 - yet another set of fixes for external dummynet boxes
346
347 * Wed Apr 22 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-11
348 - GetDummyBoxMedium returns a base64-encoded boot image, doc is updated
349 - and tmp file is cleaned up
350
351 * Wed Apr 22 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-10
352 - restore missing ResolveSlices
353
354 * Mon Apr 20 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-9
355 - new method GetDummyBoxMedium
356
357 * Fri Apr 17 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-8
358 - remove duplicate in Methods/__init__ that was breaking build of myplc-docs
359
360 * Fri Apr 17 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-7
361 - support for external dummynet boxes back in 4.3 - first draft
362
363 * Thu Apr 09 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-6
364 - fixes for smooth federation between 4.2 and 4.3
365 - peername is not UNIQUE in schema anymore, was preventing delete/recreate
366
367 * Tue Apr 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-5
368 - support for BootCD variants (GetBootMedium ['variant:centos5'])
369 - fix corner case with filters like {'~slice_id':[]}
370 - fix transaction leak that caused the db connections pool to exhaust
371 - properly expose all methods, including Legacy/, and not only Methods/
372
373 * Tue Mar 24 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-4
374 - renumbered as 4.3
375 - nodes have new fields run_level (in addition to boot_state) and verified
376 - tweaked migration from 4.2
377 - tuned rpm dependencies
378 - doc generation more explicit about errors like missing python modules
379 - removed obsolete method GetSlicesMD5
380
381 * Wed Jan 28 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-3
382 - unified all tags
383 - renamed interface settings into interface tags and slice attributes into slice tags
384 - nodes have a node_type
385 - various changes on the way to 4.3
386
387 * Thu Nov 27 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-2
388 - Checkpointing : this version still has interface settings and slice attributes
389
390 * Wed Sep 10 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-1
391 - first iteration with taggable nodes/interfaces/slices
392 - embryo for ilinks
393 - cleaned up boot states
394 - migration script moslty complete
395
396 * Wed May 14 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.2-8
397 - fixed doc build by locating locally installed DTDs at build-time
398
399 * Fri May 09 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.2-7
400 - no more doc packaged outside of myplc-docs - doc/ cleaned up
401 - enhancements in doc on filters 
402 - bootcd-aware GetBootMedium merged from onelab
403
404 * Thu May 08 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.2-6
405 - checkpoint while the new myplc-docs package is underway
406 - bugfix: GetSlivers & conf files
407 - doc: removed target files 
408
409 * Wed Apr 23 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - PLCAPI-4.2-5
410 - Removed conditions on the persons, site, and nodes indexes.  previsouly only
411 - the non-deleted fields were index, resulting in massivly slow queries.
412
413
414 * Wed Mar 26 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.2-3 PLCAPI-4.2-4
415 - plcsh: better handling of options when running as a shell script
416 - getbootmedium exports compute_key
417 - tweaks for accepted args in GetPCUTypes and BootNotifyOwners
418
419 * Thu Feb 14 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.2-2 PLCAPI-4.2-3
420 - GetBootMedium support for build.sh full options, incl. serial & console_spec 
421 - GetBootMedium simpler, cleaner and safer use of tmpdirs in (dated from bootcustom.sh)
422
423 * Fri Feb 01 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.2-1 PLCAPI-4.2-2
424 - refresh peer script to use a month-dependent logfile
425 - tracking the starting point for UniPi integration of the dummynet boxes
426
427 * Thu Jan 31 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.2-0 PLCAPI-4.2-1
428 - plcsh adds its own path to sys.path
429 - fix so GetNodes can be called from a Node
430
431 * Fri Oct 27 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 
432 - Initial build.
433
434 %define module_current_branch 4.3