1 %global with_doc %{!?_without_doc:1}%{?_without_doc:0}
6 Summary: OpenStack Volume service
8 Group: Applications/System
10 URL: http://www.openstack.org/software/openstack-storage/
11 Source0: https://launchpad.net/cinder/icehouse/2014.1/+download/cinder-%{version}.tar.gz
12 Source1: cinder-dist.conf
13 Source2: cinder.logrotate
14 Source3: cinder-tgt.conf
16 Source10: openstack-cinder-api.init
17 Source11: openstack-cinder-scheduler.init
18 Source12: openstack-cinder-volume.init
19 Source13: openstack-cinder-backup.init
20 Source14: cinder.conf.sample
23 Source20: cinder-sudoers
26 # patches_base=2014.1.1
28 Patch0001: 0001-Remove-runtime-dep-on-python-pbr-python-d2to1.patch
31 BuildRequires: intltool
32 BuildRequires: python-d2to1
33 BuildRequires: python-oslo-sphinx
34 BuildRequires: python-pbr
35 BuildRequires: python-sphinx
36 BuildRequires: python-setuptools
37 BuildRequires: python-netaddr >= 0.7.12
39 Requires: openstack-utils
40 Requires: python-cinder = %{version}-%{release}
43 Requires: python-cinderclient
45 Requires(post): chkconfig
46 Requires(postun): initscripts
47 Requires(preun): chkconfig
48 Requires(pre): shadow-utils
51 Requires: scsi-target-utils
54 OpenStack Volume (codename Cinder) provides services to manage and
55 access block storage volumes for use by Virtual Machine instances.
58 %package -n python-cinder
59 Summary: OpenStack Volume Python libraries
60 Group: Applications/System
64 Requires: MySQL-python
69 Requires: python-paramiko >= 1.13.0
71 Requires: python-paste
74 Requires: python-kombu >= 2.5.0
75 Requires: python-amqplib
77 Requires: python-eventlet >= 0.15.1
78 Requires: python-greenlet >= 0.3.2
79 Requires: python-iso8601 >= 0.1.9
80 Requires: python-lxml >= 2.3
81 Requires: python-netaddr >= 0.7.12
82 Requires: python-oslo-config >= 1:1.4.0
83 Requires: python-oslo-db >= 1.0.0
84 Requires: python-oslo-messaging >= 1.4.0
85 Requires: python-oslo-rootwrap >= 1.3.0
86 Requires: python-oslo.concurrency >= 0.3.0
87 Requires: python-osprofiler >= 0.3.0
88 Requires: python-anyjson >= 0.3.3
89 Requires: python-argparse
90 Requires: python-stevedore >= 1.0.0
91 Requires: python-suds >= 0.4
93 Requires: python-sqlalchemy >= 0.8.4, python-sqlalchemy <= 0.8.99, python-sqlalchemy >= 0.9.7, python-sqlalchemy <= 0.9.99
94 Requires: python-migrate >= 0.9.1, python-migrate < 0.9.2, python-migrate > 0.9.2
96 Requires: python-paste-deploy >= 1.5.0
97 Requires: python-crypto >= 2.6
98 Requires: python-barbicanclient >= 2.1.0
99 Requires: python-glanceclient >= 1:0.14.0
100 Requires: python-routes >= 1.12.3, python-routes < 2.0, python-routes > 2.0
101 Requires: python-webob >= 1.2.3
102 Requires: python-wsgiref >= 0.1.2
103 Requires: python-oslo-i18n >= 1.0.0
105 Requires: python-swiftclient >= 2.2.0
106 Requires: python-requests >= 1.2.1, python-requests < 2.4.0, python-requests > 2.4.0
107 Requires: python-keystoneclient >= 1:0.10.0
108 Requires: python-keystonemiddleware >= 1.0.0
109 Requires: python-novaclient >= 1:2.18.0
111 Requires: python-six >= 1.7.0
113 Requires: python-babel >= 1.3
114 Requires: python-lockfile
116 Requires: python-rtslib-fb >= 2.1.fb39
117 Requires: python-taskflow >= 0.4
119 Requires: python-ceph
120 #Requires: iscsi-initiator-utils
122 %description -n python-cinder
123 OpenStack Volume (codename Cinder) provides services to manage and
124 access block storage volumes for use by Virtual Machine instances.
126 This package contains the cinder Python library.
130 Summary: Documentation for OpenStack Volume
133 Requires: %{name} = %{version}-%{release}
135 BuildRequires: graphviz
137 # Required to build module documents
138 BuildRequires: python-eventlet
139 BuildRequires: python-routes
140 BuildRequires: python-sqlalchemy
141 BuildRequires: python-webob
142 # while not strictly required, quiets the build down when building docs.
143 BuildRequires: python-migrate, python-iso8601
146 OpenStack Volume (codename Cinder) provides services to manage and
147 access block storage volumes for use by Virtual Machine instances.
149 This package contains documentation files for cinder.
153 %setup -q -n cinder-%{version}
157 find . \( -name .gitignore -o -name .placeholder \) -delete
159 find cinder -name \*.py -exec sed -i '/\/usr\/bin\/env python/{d;q}' {} +
161 # TODO: Have the following handle multi line entries
162 sed -i '/setup_requires/d; /install_requires/d; /dependency_links/d' setup.py
164 # Remove the requirements file so that pbr hooks don't add it
165 # to distutils requires_dist config
166 rm -rf {test-,}requirements.txt tools/{pip,test}-requires
168 # We add REDHATCINDERVERSION/RELEASE with the pbr removal patch
169 sed -i s/REDHATCINDERVERSION/%{version}/ cinder/version.py
170 sed -i s/REDHATCINDERRELEASE/%{release}/ cinder/version.py
173 %{__python} setup.py build
176 %{__python} setup.py install -O1 --skip-build --root %{buildroot}
178 # docs generation requires everything to be installed first
179 export PYTHONPATH="$( pwd ):$PYTHONPATH"
184 SPHINX_DEBUG=1 sphinx-build -b html source build/html
185 # Fix hidden-file-or-dir warnings
186 rm -fr build/html/.doctrees build/html/.buildinfo
189 # Create dir link to avoid a sphinx-build exception
190 mkdir -p build/man/.doctrees/
191 ln -s . build/man/.doctrees/man
192 SPHINX_DEBUG=1 sphinx-build -b man -c source source/man build/man
193 mkdir -p %{buildroot}%{_mandir}/man1
194 install -p -D -m 644 build/man/*.1 %{buildroot}%{_mandir}/man1/
199 install -d -m 755 %{buildroot}%{_sharedstatedir}/cinder
200 install -d -m 755 %{buildroot}%{_sharedstatedir}/cinder/tmp
201 install -d -m 755 %{buildroot}%{_localstatedir}/log/cinder
203 # Install config files
204 install -d -m 755 %{buildroot}%{_sysconfdir}/cinder
205 install -p -D -m 640 %{SOURCE1} %{buildroot}%{_datadir}/cinder/cinder-dist.conf
206 install -p -D -m 640 %{SOURCE14} %{buildroot}%{_sysconfdir}/cinder/cinder.conf
207 install -d -m 755 %{buildroot}%{_sysconfdir}/cinder/volumes
208 install -p -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/tgt/conf.d/cinder.conf
209 install -p -D -m 640 etc/cinder/rootwrap.conf %{buildroot}%{_sysconfdir}/cinder/rootwrap.conf
210 install -p -D -m 640 etc/cinder/api-paste.ini %{buildroot}%{_sysconfdir}/cinder/api-paste.ini
211 install -p -D -m 640 etc/cinder/policy.json %{buildroot}%{_sysconfdir}/cinder/policy.json
213 # Install initscripts for services
214 install -p -D -m 755 %{SOURCE10} %{buildroot}%{_initrddir}/openstack-cinder-api
215 install -p -D -m 755 %{SOURCE11} %{buildroot}%{_initrddir}/openstack-cinder-scheduler
216 install -p -D -m 755 %{SOURCE12} %{buildroot}%{_initrddir}/openstack-cinder-volume
217 install -p -D -m 755 %{SOURCE13} %{buildroot}%{_initrddir}/openstack-cinder-backup
220 install -p -D -m 440 %{SOURCE20} %{buildroot}%{_sysconfdir}/sudoers.d/cinder
223 install -p -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-cinder
225 # Install pid directory
226 install -d -m 755 %{buildroot}%{_localstatedir}/run/cinder
228 # Install rootwrap files in /usr/share/cinder/rootwrap
229 mkdir -p %{buildroot}%{_datarootdir}/cinder/rootwrap/
230 install -p -D -m 644 etc/cinder/rootwrap.d/* %{buildroot}%{_datarootdir}/cinder/rootwrap/
232 # Remove unneeded in production stuff
233 rm -f %{buildroot}%{_bindir}/cinder-debug
234 rm -fr %{buildroot}%{python_sitelib}/cinder/tests/
235 rm -fr %{buildroot}%{python_sitelib}/run_tests.*
236 rm -f %{buildroot}/usr/share/doc/cinder/README*
239 getent group cinder >/dev/null || groupadd -r cinder --gid 165
240 if ! getent passwd cinder >/dev/null; then
241 useradd -u 165 -r -g cinder -G cinder,nobody -d %{_sharedstatedir}/cinder -s /sbin/nologin -c "OpenStack Cinder Daemons" cinder
246 for svc in volume api scheduler backup; do
247 /sbin/chkconfig --add openstack-cinder-$svc
251 if [ $1 -eq 0 ] ; then
252 for svc in volume api scheduler backup; do
253 /sbin/service openstack-cinder-${svc} stop > /dev/null 2>&1
254 /sbin/chkconfig --del openstack-cinder-${svc}
259 if [ $1 -ge 1 ] ; then
260 # Package upgrade, not uninstall
261 for svc in volume api scheduler backup; do
262 /sbin/service openstack-cinder-${svc} condrestart > /dev/null 2>&1 || :
269 %dir %{_sysconfdir}/cinder
270 %config(noreplace) %attr(-, root, cinder) %{_sysconfdir}/cinder/cinder.conf
271 %config(noreplace) %attr(-, root, cinder) %{_sysconfdir}/cinder/api-paste.ini
272 %config(noreplace) %attr(-, root, cinder) %{_sysconfdir}/cinder/rootwrap.conf
273 %config(noreplace) %attr(-, root, cinder) %{_sysconfdir}/cinder/policy.json
274 %config(noreplace) %{_sysconfdir}/logrotate.d/openstack-cinder
275 %config(noreplace) %{_sysconfdir}/sudoers.d/cinder
276 %config(noreplace) %{_sysconfdir}/tgt/conf.d/cinder.conf
277 %attr(-, root, cinder) %{_datadir}/cinder/cinder-dist.conf
279 %dir %attr(0750, cinder, root) %{_localstatedir}/log/cinder
280 %dir %attr(0755, cinder, root) %{_localstatedir}/run/cinder
281 %dir %attr(0755, cinder, root) %{_sysconfdir}/cinder/volumes
284 %{_initrddir}/openstack-cinder-*
285 %{_datarootdir}/cinder
286 %{_mandir}/man1/cinder*.1.gz
288 %defattr(-, cinder, cinder, -)
289 %dir %{_sharedstatedir}/cinder
290 %dir %{_sharedstatedir}/cinder/tmp
292 %files -n python-cinder
294 %{python_sitelib}/cinder
295 %{python_sitelib}/cinder-%{version}*.egg-info
303 * Wed Jun 11 2014 Eric Harney <eharney@redhat.com> - 2014.1.1-2
304 - Add dependency on iscsi-initiator-utils
306 * Mon Jun 09 2014 Eric Harney <eharney@redhat.com> - 2014.1.1-1
307 - Update to Icehouse stable release 1
309 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2014.1-4
310 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
312 * Tue Apr 29 2014 Alan Pevec <apevec@redhat.com> - 2014.1-3
313 - drop crudini build dependency
315 * Mon Apr 21 2014 Eric Harney <eharney@redhat.com> - 2014.1-2
316 - Remove qpid settings from cinder-dist.conf
318 * Thu Apr 17 2014 Eric Harney <eharney@redhat.com> - 2014.1-1
319 - Update to 2014.1 (Icehouse)
321 * Tue Apr 15 2014 Eric Harney <eharney@redhat.com> - 2014.1-0.10.rc3
322 - Add python-oslo-messaging requirement
323 - Add GlusterFS delete patch
324 - Add systemd patches (not used yet)
326 * Tue Apr 15 2014 Eric Harney <eharney@redhat.com> - 2014.1-0.9.rc3
327 - Update to Icehouse RC3
329 * Mon Apr 07 2014 Eric Harney <eharney@redhat.com> - 2014.1-0.8.rc2
330 - Update to Icehouse RC2
331 - Icehouse requires newer version of python-six
333 * Thu Mar 27 2014 Eric Harney <eharney@redhat.com> - 2014.1-0.7.rc1
334 - Update to Icehouse RC1
336 * Tue Mar 25 2014 Pádraig Brady <pbrady@redhat.com> - 2014.1-0.6.b3
337 - Depend on python-rtslib and targetcli rather than scsi-target-utils
339 * Fri Mar 21 2014 Pádraig Brady <pbrady@redhat.com> - 2014.1-0.5.b3
340 - Use lioadm iSCSI helper rather than tgtadm
342 * Sun Mar 16 2014 Eric Harney <eharney@redhat.com> - 2014.1-0.4.b3
343 - Update to Icehouse milestone 3
344 - Add deps on python-oslo-rootwrap, python-taskflow
346 * Mon Jan 27 2014 Eric Harney <eharney@redhat.com> - 2014.1-0.3.b2
347 - Update to Icehouse milestone 2
349 * Mon Jan 06 2014 Pádraig Brady <pbrady@redhat.com> - 2014.1-0.2.b1
350 - Set python-six min version to ensure updated
352 * Thu Dec 19 2013 Eric Harney <eharney@redhat.com> - 2014.1-0.1.b1
353 - Update to Icehouse milestone 1
355 * Mon Oct 28 2013 Eric Harney <eharney@redhat.com> - 2013.2-2
356 - Fix GlusterFS volume driver clone operations
358 * Thu Oct 17 2013 Eric Harney <eharney@redhat.com> - 2013.2-1
359 - Update to 2013.2 (Havana)
360 - Restart/remove cinder-backup service during upgrade/uninstallation
362 * Wed Oct 16 2013 Eric Harney <eharney@redhat.com> - 2013.2-0.13.rc3
363 - Update to Havana RC3
365 * Fri Oct 11 2013 Eric Harney <eharney@redhat.com> - 2013.2-0.12.rc2
366 - Update to Havana RC2
368 * Tue Oct 08 2013 Eric Harney <eharney@redhat.com> - 2013.2-0.11.rc1
369 - Update to Havana RC1
370 - Fix python-novaclient req epoch
372 * Mon Sep 23 2013 Eric Harney <eharney@redhat.com> - 2013.2-0.10.b3
373 - Depend on python-novaclient 2.15
375 * Wed Sep 18 2013 Eric Harney <eharney@redhat.com> - 2013.2-0.9.b3
376 - Add cinder-dist.conf
377 - Tighten permissions on /var/log/cinder
379 * Mon Sep 9 2013 Eric Harney <eharney@redhat.com> - 2013.2-0.8.b3
380 - Update to Havana milestone 3
381 - Add dependency on python-novaclient
383 * Thu Aug 29 2013 Pádraig Brady <pbrady@redhat.com> - 2013.2-0.7.b2
384 - Add dependency on sysfsutils to support the fiber channel driver
386 * Mon Aug 26 2013 Eric Harney <eharney@redhat.com> - 2013.2-0.6.b2
387 - Add cinder-backup service init script
389 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2013.2-0.5.b2
390 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
392 * Mon Jul 22 2013 Pádraig Brady <pbrady@redhat.com> - 2013.2-0.4.b2
393 - Add dependency on python-suds to support the netapp driver
394 - Add dependency on python-keystoneclient for auth token middleware
395 - Add dependency on qemu-img for volume creation from Glance images
397 * Sun Jul 21 2013 Pádraig Brady <pbrady@redhat.com> - 2013.2-0.3.b2
398 - Update to Havana milestone 2
400 * Thu Jun 13 2013 Eric Harney <eharney@redhat.com> - 2013.2-0.2.b1
401 - Update to Havana milestone 1
403 * Mon May 13 2013 Eric Harney <eharney@redhat.com> - 2013.1.1-1
404 - Update to Grizzly stable release 1, 2013.1.1
406 * Mon Apr 08 2013 Eric Harney <eharney@redhat.com> - 2013.1-2
407 - Backport fix for GlusterFS driver get_volume_stats
409 * Thu Apr 04 2013 Eric Harney <eharney@redhat.com> - 2013.1-1
410 - Update to Grizzly final release
412 * Tue Apr 2 2013 Pádraig Brady <pbrady@redhat.com> - 2013.1-0.6.rc3
413 - Adjust to support sqlalchemy-0.8.0
415 * Wed Mar 27 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.5.rc3
416 - Update to Grizzly RC3 release
418 * Mon Mar 25 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.5.rc2
419 - Update to Grizzly RC2 release
421 * Mon Mar 18 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.5.rc1
422 - Update to Grizzly RC1 release
424 * Tue Mar 05 2013 Pádraig Brady <P@draigBrady.com> - 2013.1-0.4.g3
425 - Add dependency on python-stevedore
427 * Mon Feb 25 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.3.g3
428 - Fix build issues with G-3 update
430 * Mon Feb 25 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.2.g3
431 - Update to Grizzly milestone 3
433 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2013.1-0.2.g2
434 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
436 * Thu Jan 10 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.1.g2
437 - Update to Grizzly milestone 2
439 * Thu Nov 29 2012 Eric Harney <eharney@redhat.com> - 2013.1-0.1.g1
440 - Update to Grizzly milestone 1
442 * Wed Nov 14 2012 Eric Harney <eharney@redhat.com> - 2012.2-2
443 - Remove unused dependency on python-daemon
445 * Thu Sep 27 2012 Pádraig Brady <P@draigBrady.com> - 2012.2-1
446 - Update to Folsom final
448 * Fri Sep 21 2012 Pádraig Brady <P@draigBrady.com> - 2012.2-0.5.rc1
449 - Update to Folsom RC1
451 * Fri Sep 21 2012 Pádraig Brady <P@draigBrady.com> - 2012.2-0.4.f3
452 - Fix to ensure that tgt configuration is honored
454 * Mon Sep 17 2012 Pádraig Brady <P@draigBrady.com> - 2012.2-0.3.f3
455 - Move user config out of /etc/cinder/api-paste.ini
456 - Require python-cinderclient
458 * Mon Sep 3 2012 Pádraig Brady <P@draigBrady.com> - 2012.2-0.2.f3