tentatively package unittests in rpm sfa-tests, for the nightlies
[sfa.git] / sfa.spec
1 #
2 # $Id$
3 #
4
5 %define url $URL$
6
7 %define name sfa
8 %define version 1.0
9 %define taglevel 5
10
11 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
12 %global python_sitearch %( python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)" )
13 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
14
15 Name: %{name}
16 Version: %{version}
17 Release: %{release}
18 Source0: %{name}-%{version}.tar.bz2
19 License: GPL
20 Group: Applications/System
21 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
22
23 Vendor: PlanetLab
24 Packager: PlanetLab Central <support@planet-lab.org>
25 Distribution: PlanetLab %{plrelease}
26 URL: %(echo %{url} | cut -d ' ' -f 2)
27 Summary: the SFA python libraries
28 Group: Applications/System
29
30 BuildRequires: make
31 Requires: python >= 2.5
32 Requires: m2crypto
33 Requires: xmlsec1-openssl-devel
34 Requires: libxslt-python
35 Requires: python-ZSI
36 # xmlbuilder depends on  lxml
37 Requires: python-lxml
38 Requires: python-setuptools
39 Requires: python-dateutil
40  
41 # python 2.5 has uuid module added, for python 2.4 we still need it.
42 # we can't really check for if we can load uuid as a python module,
43 # it'll be installed by "devel.pkgs". we have the epel repository so
44 # python-uuid will be provided. but we can test for the python
45 # version.
46 # %define has_py24 %( python -c "import sys;sys.exit(sys.version_info[0:2] == (2,4))" 2> /dev/null; echo $? )
47 # %if %has_py24
48 #
49 # this also didn't work very well. I'll just check for distroname - baris
50 #%if %{distroname} == "centos5"
51 #Requires: python-uuid
52 #%endif
53
54 %package cm
55 Summary: the SFA wrapper around MyPLC NodeManager
56 Group: Applications/System
57 Requires: sfa
58 Requires: pyOpenSSL >= 0.6
59
60 %package plc
61 Summary: the SFA wrapper arounf MyPLC
62 Group: Applications/System
63 Requires: sfa
64 Requires: python-psycopg2
65 Requires: myplc-config
66 Requires: pyOpenSSL >= 0.7
67
68 %package client
69 Summary: the SFA experimenter-side CLI
70 Group: Applications/System
71 Requires: sfa
72 Requires: pyOpenSSL >= 0.7
73
74 %package sfatables
75 Summary: sfatables policy tool for SFA
76 Group: Applications/System
77 Requires: sfa
78
79 %Package tests
80 Summary: unit tests suite for SFA
81 Group: Applications/System
82 Requires: sfa
83
84 %description
85 This package provides the python libraries that the SFA implementation requires
86
87 %description cm
88 This package implements the SFA interface which serves as a layer
89 between the existing PlanetLab NodeManager interfaces and the SFA API.
90  
91 %description plc
92 This package implements the SFA interface which serves as a layer
93 between the existing PlanetLab interfaces and the SFA API.
94
95 %description client
96 This package provides the client side of the SFA API, in particular
97 sfi.py, together with other utilities.
98
99 %description sfatables
100 sfatables is a tool for defining access and admission control policies
101 in an SFA network, in much the same way as iptables is for ip
102 networks. This is the command line interface to manage sfatables
103
104 %description tests
105 Provides some binary unit tests in /usr/share/sfa/tests
106
107 %prep
108 %setup -q
109
110 %build
111 make
112
113 %install
114 rm -rf $RPM_BUILD_ROOT
115 make install DESTDIR="$RPM_BUILD_ROOT"
116
117 %clean
118 rm -rf $RPM_BUILD_ROOT
119
120 %files
121 # sfa and sfatables depend each other.
122 %{_bindir}/sfa-server.py*
123 /etc/sfatables/*
124 %{python_sitelib}/*
125 %{_bindir}/keyconvert.py*
126 /var/www/html/wsdl/*.wsdl
127
128 %files cm
129 /etc/init.d/sfa-cm
130 %{_bindir}/sfa_component_setup.py*
131 # cron jobs here 
132
133 %files plc
134 %defattr(-,root,root)
135 %config /etc/sfa/default_config.xml
136 %config (noreplace) /etc/sfa/aggregates.xml
137 %config (noreplace) /etc/sfa/registries.xml
138 /etc/init.d/sfa
139 /etc/sfa/pl.rng
140 %{_bindir}/sfa-config-tty
141 %{_bindir}/sfa-import-plc.py*
142 %{_bindir}/sfa-clean-peer-records.py*
143 %{_bindir}/sfa-nuke-plc.py*
144 %{_bindir}/gen-sfa-cm-config.py*
145 %{_bindir}/sfa-ca.py*
146
147 %files client
148 %config (noreplace) /etc/sfa/sfi_config
149 %{_bindir}/sfi*
150 %{_bindir}/getNodes.py*
151 %{_bindir}/getRecord.py*
152 %{_bindir}/setRecord.py*
153 %{_bindir}/sfadump.py*
154
155 %files sfatables
156 %{_bindir}/sfatables
157
158 %files tests
159 %{_datadir}/sfa/tests
160
161 ### sfa-plc installs the 'sfa' service
162 %post plc
163 chkconfig --add sfa
164
165 %preun plc
166 if [ "$1" = 0 ] ; then
167   /sbin/service sfa stop || :
168   /sbin/chkconfig --del sfa || :
169 fi
170
171 %postun plc
172 [ "$1" -ge "1" ] && service sfa restart
173
174 ### sfa-cm installs the 'sfa-cm' service
175 %post cm
176 chkconfig --add sfa-cm
177
178 %preun cm
179 if [ "$1" = 0 ] ; then
180    /sbin/service sfa-cm stop || :
181    /sbin/chkconfig --del sfa-cm || :
182 fi
183
184 %postun cm
185 [ "$1" -ge "1" ] && service sfa-cm restart
186
187
188 %changelog
189 * Mon Oct 11 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - sfa-1.0-2
190 - deprecated old methods (e.g. List/list, and GetCredential/get_credential)
191 - NOTE:  get_(self_)credential both have type and hrn swapped when moving to Get(Self)Credential
192 - hrn-urn translations tweaked
193 - fixed 'service sfa status'
194 - sfa-nuke-plc has a -f/--file-system option to clean up /var/lib/authorities (exp.)
195 - started to repair sfadump - although not usable yet
196 - trust objects now have dump_string method that dump() actually prints
197 - unit tests under review
198 - logging cleanup ongoing (always safe to use sfalogging.sfa_logger())
199 - binaries now support -v or -vv to increase loglevel
200 - trashed obsolete sfa.util.client
201
202 * Mon Oct 04 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - sfa-1.0-1
203 - various bugfixes and cleanup, improved/harmonized logging
204
205 * Tue Sep 07 2010 Tony Mack <tmack@cs.princeton.edu> - sfa-0.9-16
206 - truncate login base of external (ProtoGeni, etc) slices to 20 characters
207   to avoid returning a PLCAPI exception that might confuse users.
208 - Enhance PLC aggregate performace by using a better filter when querying SliceTags.      
209 - fix build errors.  
210
211 * Tue Aug 24 2010 Tony Mack <tmack@cs.princeton.edu> - sfa-0.9-15
212 - (Architecture) Credential format changed to match ProtoGENI xml format
213 - (Architecture) All interfaces export a new set of methods that are compatible
214    with the ProtoGeni Aggregate spec. These new methods are considered a 
215    replacement  for the pervious methods exported by the interfaces. All 
216    previous methods are still exported and work as normal, but they are 
217    considered deprecated and will not be supported in future releases.  
218 - (Architecture) SFI has been updated to use the new interface methods.
219 - (Architecture) Changed keyconvet implementation from c to python.
220 - (Architecture) Slice Manager now attempts looks for a delegated credential
221   provided by the client before using its own server credential.
222 - (Archiceture) Slice Interface no longers stores cache of resources on disk. 
223   This cache now exists only in memory and is cleared when service is restarted
224   or cache lifetime is exceeded.  
225 - (Performance) SliceManager sends request to Aggregates in parallel instead 
226   of sequentially.
227 - (Bug fix) SFA tickets now support the new rspec format.
228 - (Bug fix) SFI only uses cahced credential if they aren't expired.
229 - (Bug fix) Cerdential delegation modified to work with new credential format.
230 - (Enhancement) SFI -a --aggregatge option now sends requests directly to the
231   Aggregate instead of relaying through the Slice Manager.
232 - (Enhancement) Simplified caching. Accociated a global cache instance with
233   the api handler on every new server request, making it easier to access the 
234   cache and use in more general ways.     
235
236 %changelog
237 * Mon Oct 11 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - sfa-1.0-2
238 - deprecated old methods (e.g. List/list, and GetCredential/get_credential)
239 - NOTE:  get_(self_)credential both have type and hrn swapped when moving to Get(Self)Credential
240 - hrn-urn translations tweaked
241 - fixed 'service sfa status'
242 - sfa-nuke-plc has a -f/--file-system option to clean up /var/lib/authorities (exp.)
243 - started to repair sfadump - although not usable yet
244 - trust objects now have dump_string method that dump() actually prints
245 - unit tests under review
246 - logging cleanup ongoing (always safe to use sfalogging.sfa_logger())
247 - binaries now support -v or -vv to increase loglevel
248 - trashed obsolete sfa.util.client
249
250 * Mon Oct 04 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - sfa-1.0-1
251 - various bugfixes and cleanup, improved/harmonized logging
252
253 * Thu May 11 2010 Tony Mack <tmack@cs.princeton.edu> - sfa-0.9-11
254 - SfaServer now uses a pool of threads to handle requests concurrently
255 - sfa.util.rspec no longer used to process/manage rspecs (deprecated). This is now handled by sfa.plc.network and is not backwards compatible
256 - PIs can now get a slice credential for any slice at their site without having to be a member of the slice
257 - Registry records for federated peers (defined in registries.xml, aggregates.xml) updated when sfa service is started
258 - Interfaces will try to fetch and install gids from peers listed in registries.xml/aggregates.xml if gid is not found in /etc/sfa/trusted_roots dir   
259 - Component manager does not install gid files if slice already has them  
260 - Server automatically fetches and installs peer certificats (defined in registries/aggregates.xml) when service is restarted.
261 - fix credential verification exploit (verify that the trusted signer is a parent of the object it it signed)
262 - made it easier for root authorities to sign their sub's certifiacate using the sfa-ca.py (sfa/server/sfa-ca.py) tool
263      
264 * Thu Jan 21 2010 anil vengalil <avengali@sophia.inria.fr> - sfa-0.9-10
265 - This tag is quite same as the previous one (sfa-0.9-9) except that the vini and max aggregate managers are also updated for urn support.  Other features are:
266 - - sfa-config-tty now has the same features like plc-config-tty
267 - - Contains code to support both urn and hrn
268 - - Cleaned up request_hash related stuff
269 - - SM, AM and Registry code is organized under respective managers
270 - - Site and Slice synchronization across federated aggregates
271 - - Script to generate sfa_component_config
272
273 * Fri Jan 15 2010 anil vengalil <avengali@sophia.inria.fr> - sfa-0.9-9
274 - sfa-config-tty now has the same features like plc-config-tty
275 - Contains code to support both urn and hrn
276 - Cleaned up request_hash related stuff
277 - SM, AM and Registry code is organized under respective managers
278 - Slice synchronization across federated aggregates
279 - some bugs are fixed
280
281 * Wed Jan 06 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - sfa-0.9-8
282 - checkpoint with fewer mentions of geni
283
284 * Tue Jan 05 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - sfa-0.9-7
285 - checkpointing
286 - this is believed to pass the tests; among other things:
287 - reworked configuration based on the myplc config with xml skeleton (no more sfa_config)
288
289 * Mon Nov 16 2009 anil vengalil <avengali@sophia.inria.fr> - sfa-0.9-6
290 - This tag includes:
291 - - Sfatables
292 - - Preliminary version of hash based authentication
293 - - Initial code for Component Manager
294 - - Authority structure is moved to /var/lib/sfa/
295 - - some bug-fixes
296
297 * Fri Oct 09 2009 anil vengalil <avengali@sophia.inria.fr> - sfa-0.9-5
298 - Create_slice and get_resources methods are connected to sfatables.
299 - Other features include compatibility with RP, handling remote objects created as part of federation, preliminary version of sfatables, call tracability and logging.
300
301 * Wed Oct 07 2009 anil vengalil <avengali@sophia.inria.fr> - sfa-0.9-4
302 - Bug fix on update and remove_peer_object methods
303 - Compatibility with RP, preliminiary version of sfatables, call tracability and logging
304
305 * Mon Oct 05 2009 anil vengalil <avengali@sophia.inria.fr> - sfa-0.9-3
306 - Compatibility with RP, two additional methods to handle remote objects, call tracability and logging, PLCDB now has single table for sfa records, preliminary version of sfatables (still under development)
307
308 * Fri Sep 18 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - sfa-0.9-2
309 - compatibility with RefreshPeer
310 - incremental mechanism for importing PLC records into SFA tables
311 - unified single database (still inside the underlying PLC db postgresql server)
312 - includes/improves call traceability and logging features
313 - several bug fixes
314
315 * Thu Sep 17 2009 Baris Metin <tmetin@sophia.inria.fr>
316 - added libxslt-python dependency
317
318 * Thu Sep 10 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - sfa-0.9-1
319 - unified single SFA database in the PLC-DB
320 - upcalls from  PLCAPI to SFA methods
321 - SFA call traceability and logging features
322 - many bug fixes
323 - includes first/rough version of sfatables for policy implementation
324
325 * Thu Jul 23 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - geniwrapper-0.8-6
326 - snapshot after the GEC5 demo
327 - should be the last tag set in the geniwrapper module, are we are now moving to the sfa module
328
329 * Wed Jul 15 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - geniwrapper-0.8-5
330 - snapshot july 15 - has gone through superficial manual testing
331 - hopefully a good basis for gec5 demo
332 - multi-dir sfi client tested as well
333
334 * Wed Jul 08 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - geniwrapper-0.8-4
335 - rename geniwrapper.spec into sfa.spec
336
337 * Wed Jul 08 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - geniwrapper-0.8-3
338 - clean up in xmlrpc/soap, --protocol option to chose between both
339 - keyconvert packaged in /usr/bin, no /usr/share/keyconvert anymore
340 - hopefully more helpful context in case of crashes when importing
341 - bugfixes for using only /etc/sfa for site-dep files
342 - bugfixes in wsdl generation
343
344 * Mon Jul 06 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - geniwrapper-0.8-2
345 - cleanup of the config area; no dependency to a PLC config anymore as sfa can be run in standalone
346 - config variables in sfa_config now start with SFA_ and not GENI_
347 - config.py can be loaded even with no config present
348
349 * Sun Jul 05 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - geniwrapper-0.8-1
350 - first step for cleanup and reorganization
351 - mass-renaming from geni to sfa (some are still needed)
352 - sfa/trust implements the security architecture
353
354 * Wed Jul 01 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - geniwrapper-0.2-7
355 - snapshot for reproducible builds
356
357 * Thu Jun 25 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - geniwrapper-0.2-6
358 - snapshot for the convenience of alpha users
359
360 * Tue Jun 16 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - geniwrapper-0.2-5
361 - build fix - keyconvert was getting installed in /usr/share/keyconvert/keyconvert
362
363 * Tue Jun 16 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - geniwrapper-0.2-4
364 - ongoing work - snapshot for 4.3-rc9
365
366 * Wed Jun 03 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - geniwrapper-0.2-3
367 - various fixes
368
369 * Sat May 30 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - geniwrapper-0.2-2
370 - bugfixes - still a work in progress
371
372 * Fri May 18 2009 Baris Metin <tmetin@sophia.inria.fr>
373 - initial package
374
375
376 %define module_current_branch 0.2