5 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
7 Summary: PlanetLab Central API
12 Group: System Environment/Daemons
13 Source0: %{name}-%{version}.tar.gz
14 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
17 Packager: PlanetLab Central <support@planet-lab.org>
18 Distribution: PlanetLab %{plrelease}
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
31 # mod_wsgi will replace mod_python when we are ready
35 Requires: python-simplejson
36 # for the RebootNodeWithPCU method
37 Requires: pcucontrol >= 1.0-6
39 Requires: pyaspects >= 0.4
40 Requires: python-twisted-words
41 Requires: python-twisted-web
45 Requires: python-memcached
47 ### avoid having yum complain about updates, as stuff is moving around
49 Conflicts: MyPLC <= 4.3
53 # but we don't need to rebuild it as we depend on distro's packages - baris
54 # BuildRequires: postgresql-devel
56 # Standard xmlrpc.so that ships with PHP does not marshal NULL
57 BuildRequires: php-devel PyXML python-simplejson
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
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.
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
82 # Build __init__.py metafiles and PHP API.
83 %{__make} %{?_smp_mflags}
87 rm -rf $RPM_BUILD_ROOT
88 %{__make} %{?_smp_mflags} install DESTDIR="$RPM_BUILD_ROOT" datadir="%{_datadir}" bindir="%{_bindir}"
90 # Install shell symlink
91 mkdir -p $RPM_BUILD_ROOT/%{_bindir}
92 ln -s %{_datadir}/plc_api/plcsh $RPM_BUILD_ROOT/%{_bindir}/plcsh
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
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/*
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/*
112 echo "* Installing wsdl"
113 install -D -m 644 wsdl/plcapi.wsdl $RPM_BUILD_ROOT/var/www/html/wsdl/plcapi.wsdl
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
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
125 rm -rf $RPM_BUILD_ROOT
127 %define php_extension_dir %(php-config --extension-dir)
130 %defattr(-,root,root,-)
131 %dir %{_datadir}/plc_api
133 %{_datadir}/plc_api/*
135 %{php_extension_dir}/xmlrpc.so
136 %{_sysconfdir}/php.d/xmlrpc.ini
137 %config (noreplace) %{_datadir}/plc_api/PLC/Accessors/Accessors_site.py
139 /etc/planetlab/db-config.d
140 /var/www/html/wsdl/plcapi.wsdl
141 /usr/bin/omf_slicemgr.py*
142 /usr/bin/reset_xmpp_pubsub_nodes.py*
143 /var/log/plc_api_ratelimit.log
147 * Wed Mar 09 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-30
148 - working draft for GetSliceSshKeys
150 * Thu Feb 17 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-29
151 - trash getbootmedium tmp file if already exists but is longer than 5 minutes old
152 - (this is for people who cancel their download)
154 * Fri Feb 04 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-28
155 - fix db-config sequence : accessors step now merged in, and occurs at the right time
156 - db-config also more robust
157 - no more explicit 'accessors' step in plc.d
159 * Thu Feb 03 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-27
160 - session auth: do *not* delete session when node runs a method that does not have 'node' role
161 - session auth: remove support for bootonce in old boot CDs
162 - give a reason when caller_may_write_slice_tag fails
163 - remove ugly hack that was setting 'vref' to 'omf' - need to set both tags now
165 * Tue Feb 01 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-26
166 - SetSliceVref needed the node role
167 - protect GetSliceFamily
168 - Fix bugs in tag authorizations
170 * Sun Jan 23 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-25
171 - altered checking of optional fields in Interfaces
172 - UpdateTagType more picky on inputs - msg when trying to set roles, which is not supported
173 - has pyxml and python-simplejson as new deps
175 * Wed Dec 08 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-24
176 - tweak doc extraction for fedora14
178 * Tue Dec 07 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-23
179 - builtin accessors for the myslice page
180 - Get{Node,Interface}Tags allowed to techs
181 - tweak in ratelimitaspect.py
183 * Mon Dec 06 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-22
184 - add admin role to accessor-related tags (arch, {fc,pl}distro)
186 * Mon Dec 06 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-21
187 - bugfix in {Update,Delete}PersonTag
188 - updated xml doc for filters, accessors and tagtypes
189 - more explicit msg in case of missing roles
190 - improvements in ratelimitaspects.py
192 * Fri Dec 03 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-20
193 - fix the roles for ssh_key and hmac tags
195 * Wed Dec 01 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-19
196 - tag permissions system based on roles and not min_role_ids
197 - accessors simplified accordingly (no more min_role_id)
198 - new methods AddRoleToTagType and DeleteRoleFromTagType
199 - accessor-related tagtypes are created sooner, and enforced
200 - cleaned up redundancy between db-config.d and accessors
202 * Thu Sep 16 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-18
203 - fix RefreshPeer that was not working in 5.0-17
205 * Thu Sep 16 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-17
206 - RefreshPeer is able to cope with 2 peers running different releases of the api
207 - DeletePerson can be used on duplicates
208 - first appearance of ModPythonJson.py
210 * Wed Sep 01 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-16
211 - set accessors return the new value
212 - tweaks in the pubsub groups management
214 * Wed Jul 28 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - plcapi-5.0-15
215 - convert hostnames to lower case and use ILIKE instead of LIKE
217 * Fri Jul 16 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - plcapi-5.0-14
218 - use hrn in pubsub groups
220 * Tue Jul 13 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - plcapi-5.0-13
221 - - Add timestamps to Nodes, PCUs and Interfaces to make concrete statements about a node's configuration state.
224 * Mon Jun 28 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - PLCAPI-5.0-12
225 - automatically set vsys tag for omf controlled slices
227 * Sat Jun 26 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-5.0-11
228 - addition of the 'ssh_key' slice tag
229 - first draft of the LDAP interface
231 * Tue Jun 22 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-5.0-10
232 - reservation granularity defined in plc-config-tty (requires myplc 5.0.5)
233 - and readable through GetLeaseGranularity
234 - GetSlivers to expose reservation_policy and lease_granularity
235 - GetBootMedium fixed for reservable nodes
236 - tweaks in pcucontrol (requires pcucontrol-1.0-6)
237 - new Apache mod_wsgi python interface
239 * Fri May 14 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-5.0-9
242 * Wed Apr 14 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-5.0-8
243 - previous tag had gone wrong
245 * Wed Apr 14 2010 Talip Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - PLCAPI-5.0-6
246 - fix pubsub hostname
248 * Fri Apr 02 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-5.0-5
249 - tweaks for the omf support (xmpp groups and RC-controlled slices)
250 - BootNodeUpdate supports also ssh_rsa_key (and logs only changes)
251 - GetNodeFlavour exposes fcdistro
253 * Sun Mar 14 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-5.0-4
254 - do not use UpdateNode for handling the 'hrn' tag - should fix refresh peer & foreign nodes more generally
256 * Fri Mar 12 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-5.0-3
257 - slice tag 'omf_control' supported for getting OMF's resource controller shipped to slivers
258 - pyaspect hooks allow to maintain the namespace xmpp groups
259 - new omf_slicemgr is a proxy to xmpp, used by these hooks
260 - nodes have their hrn exposed in the 'hrn' tag
261 - node hrn exposed in GetSlivers, as well as the overall xmpp config
262 - system slice 'drl' gets created by db-config
263 - daniel's changes to Filter for supporting wildcards in lists
264 - AddSliceTag consistency check tweaked
266 * Thu Feb 11 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-5.0-2
268 - get rid of all 4.2-related legacy code
269 - reset the migrations code, planetlab5.sql somes with (5,100)
270 - uses hashlib module when available
272 * Fri Jan 29 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-5.0-1
273 - first working version of 5.0:
274 - pld.c/, db-config.d/ and nodeconfig/ scripts should now sit in the module they belong to
275 - nodefamily is 3-fold with pldistro-fcdistro-arch
276 - site and person tags
277 - new methods GetSliceFamily and GetNodeFlavour
278 - deprecated the dummynet stuff that were for the external dummyboxes
279 - tags definition : more consistency between db-config scripts and accessors
280 - (get accessor to create the tag type too if absent)
281 - logging an event for AddSliceToNodes
283 * Sat Jan 09 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-32
284 - support for fedora 12
285 - fix subtle bug in filtering with ] and quotes
287 * Fri Dec 18 2009 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - PLCAPI-4.3-31
288 - * patch for php-5.3 (the one in f12)
289 - * validate email addresses with regex
290 - * add PersonTags and SiteTags
291 - * add additional accessors for node tags (kvariant, serial, ..)
293 * Tue Nov 03 2009 Marc Fiuczynski <mef@cs.princeton.edu> - PLCAPI-4.3-30
294 - Redacting password, session, and authstring values from the event log.
296 * Mon Oct 19 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-29
297 - let AddSite set ext_consortium_id - required for the poorman registration pages
298 - drop version constraint on Requires: postgresql-python
299 - don't log system calls nor ReportRunLevel
301 * Thu Oct 15 2009 Daniel Hokka Zakrisson <daniel@hozac.com> - PLCAPI-4.3-28
302 - Fix requires for CentOS.
304 * Fri Oct 09 2009 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - PLCAPI-4.3-27
305 - Require postgresql 8.2 (for array operators && and @>)
307 * Thu Oct 08 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-26
308 - Filter now supports the | and & features to match in sequence values
309 - bugfix in the postgresql wrapper for sequence filter values
310 - reviewed GetSlivers to export admin keys more efficiently
311 - fix checking roles in UpdateSliceTag
313 * Sat Sep 26 2009 Marc Fiuczynski <mef@cs.princeton.edu> - PLCAPI-4.3-25
314 - - Some typos in the documentation were fixed.
315 - - UpdateSliceTag check if a node's min_role_id is >= (rather than >)
316 - to the tag's min_role_id.
318 * Fri Sep 18 2009 anil vengalil <avengali@sophia.inria.fr> - PLCAPI-4.3-24
320 * Mon Sep 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-23
321 - Ongoing work to add upcalls, using new SFA class
322 - new methods BindObjectToPeer, UnBindObjectFromPeer, still for SFA
323 - reviewed type-checking for the 3 taggable classes node-interface-slice
324 - cleanup ald dummynet stuff
325 - expose the 'extensions' accessors to the API
326 - tweaked checks in AddSliceTag
327 - GetPersons exposes roles by default
328 - bugfix in ReportRunLevel for non-string levels
329 - tweaks in GetSlivers ( seems that it now exposes the keys for the root context )
331 * Fri Jul 10 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-22
332 - new BindObjectToPeer method for sfa
333 - AddSliceTag and UpdateSliceTag open to the 'node' auth method with restrictions
335 * Wed Jul 01 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-21
336 - getbootmedium supports options as tags (serial, cramfs, kvariant, kargs, no-hangcheck )
337 - reportrunlevel logs its calls only when run_level changes
338 - pycurl more robust wrt to xmlrpclib.Transport
340 * Tue Jun 16 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-20
341 - produce a wsdl interface
342 - bugfix in getbootmedium for nodes with interface tags
344 * Sun Jun 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-19
345 - bugfix for some rare pattern-based filters
347 * Wed Jun 03 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-18
348 - improvements in the 4.2 legacy layer
350 * Sat May 30 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-17
351 - bugfix required for slice tags set on nodegroups
353 * Thu May 28 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-16
354 - more complete compatibility layer - second iteration, with legacy code isolated in Legacy/
356 * Tue May 26 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-15
357 - more powerful legacy layer with 4.2
359 * Fri May 15 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-14
360 - RefreshPeer sets lock per-peer to avoid multiple concurent instances
361 - migration script has an option for running interactively
363 * Wed May 06 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-13
364 - skips already added entries
366 * Tue Apr 28 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-12
367 - yet another set of fixes for external dummynet boxes
369 * Wed Apr 22 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-11
370 - GetDummyBoxMedium returns a base64-encoded boot image, doc is updated
371 - and tmp file is cleaned up
373 * Wed Apr 22 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-10
374 - restore missing ResolveSlices
376 * Mon Apr 20 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-9
377 - new method GetDummyBoxMedium
379 * Fri Apr 17 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-8
380 - remove duplicate in Methods/__init__ that was breaking build of myplc-docs
382 * Fri Apr 17 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-7
383 - support for external dummynet boxes back in 4.3 - first draft
385 * Thu Apr 09 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-6
386 - fixes for smooth federation between 4.2 and 4.3
387 - peername is not UNIQUE in schema anymore, was preventing delete/recreate
389 * Tue Apr 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-5
390 - support for BootCD variants (GetBootMedium ['variant:centos5'])
391 - fix corner case with filters like {'~slice_id':[]}
392 - fix transaction leak that caused the db connections pool to exhaust
393 - properly expose all methods, including Legacy/, and not only Methods/
395 * Tue Mar 24 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-4
397 - nodes have new fields run_level (in addition to boot_state) and verified
398 - tweaked migration from 4.2
399 - tuned rpm dependencies
400 - doc generation more explicit about errors like missing python modules
401 - removed obsolete method GetSlicesMD5
403 * Wed Jan 28 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-3
405 - renamed interface settings into interface tags and slice attributes into slice tags
406 - nodes have a node_type
407 - various changes on the way to 4.3
409 * Thu Nov 27 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-2
410 - Checkpointing : this version still has interface settings and slice attributes
412 * Wed Sep 10 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-1
413 - first iteration with taggable nodes/interfaces/slices
415 - cleaned up boot states
416 - migration script moslty complete
418 * Wed May 14 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.2-8
419 - fixed doc build by locating locally installed DTDs at build-time
421 * Fri May 09 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.2-7
422 - no more doc packaged outside of myplc-docs - doc/ cleaned up
423 - enhancements in doc on filters
424 - bootcd-aware GetBootMedium merged from onelab
426 * Thu May 08 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.2-6
427 - checkpoint while the new myplc-docs package is underway
428 - bugfix: GetSlivers & conf files
429 - doc: removed target files
431 * Wed Apr 23 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - PLCAPI-4.2-5
432 - Removed conditions on the persons, site, and nodes indexes. previsouly only
433 - the non-deleted fields were index, resulting in massivly slow queries.
436 * Wed Mar 26 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.2-3 PLCAPI-4.2-4
437 - plcsh: better handling of options when running as a shell script
438 - getbootmedium exports compute_key
439 - tweaks for accepted args in GetPCUTypes and BootNotifyOwners
441 * Thu Feb 14 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.2-2 PLCAPI-4.2-3
442 - GetBootMedium support for build.sh full options, incl. serial & console_spec
443 - GetBootMedium simpler, cleaner and safer use of tmpdirs in (dated from bootcustom.sh)
445 * Fri Feb 01 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.2-1 PLCAPI-4.2-2
446 - refresh peer script to use a month-dependent logfile
447 - tracking the starting point for UniPi integration of the dummynet boxes
449 * Thu Jan 31 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.2-0 PLCAPI-4.2-1
450 - plcsh adds its own path to sys.path
451 - fix so GetNodes can be called from a Node
453 * Fri Oct 27 2006 Mark Huang <mlhuang@CS.Princeton.EDU> -
456 %define module_current_branch 4.3