1 %global with_doc %{!?_without_doc:1}%{?_without_doc:0}
6 Release: 1%{?dist}~mos8.0.1
7 Summary: OpenStack Volume service
9 Group: Applications/System
11 URL: http://www.openstack.org/software/openstack-storage/
12 Source0: cinder-%{version}.tar.gz
13 Source1: cinder-dist.conf
14 Source2: cinder.logrotate
15 Source3: cinder-tgt.conf
17 Source10: openstack-cinder-api.init
18 Source11: openstack-cinder-scheduler.init
19 Source12: openstack-cinder-volume.init
20 Source13: openstack-cinder-backup.init
21 Source14: cinder.conf.sample
23 Source30: openstack-cinder-api.service
24 Source31: openstack-cinder-scheduler.service
25 Source32: openstack-cinder-volume.service
26 Source33: openstack-cinder-backup.service
29 Source20: cinder-sudoers
32 # patches_base=2014.1.1
34 Patch0001: 0001-Remove-runtime-dep-on-python-pbr-python-d2to1.patch
37 BuildRequires: intltool
38 BuildRequires: python-d2to1
39 BuildRequires: python-oslo-sphinx
40 BuildRequires: python-pbr
41 BuildRequires: python-sphinx
42 BuildRequires: python-setuptools
43 BuildRequires: python-netaddr >= 0.7.12
44 BuildRequires: python-stevedore
46 #Requires: openstack-utils
47 Requires: python-cinder = 1:%{version}-%{release}
50 Requires: python-cinderclient
52 Requires(post): chkconfig
53 Requires(postun): initscripts
54 Requires(preun): chkconfig
55 Requires(pre): shadow-utils
58 #Requires: scsi-target-utils
59 Requires: iscsi-initiator-utils
62 OpenStack Volume (codename Cinder) provides services to manage and
63 access block storage volumes for use by Virtual Machine instances.
66 %package -n python-cinder
67 Summary: OpenStack Volume Python libraries
68 Group: Applications/System
72 Requires: MySQL-python
77 Requires: python-pbr >= 1.6
78 Requires: python-anyjson >= 0.3.3
79 Requires: python-argparse
80 Requires: python-babel >= 1.3
81 Requires: python-enum34
82 Requires: python-eventlet >= 0.17.4
83 Requires: python-greenlet >= 0.3.2
84 Requires: python-iso8601 >= 0.1.9
85 Requires: python-keystoneclient >= 1:1.6.0
86 Requires: python-keystonemiddleware >= 2.0.0
87 Requires: python-kombu >= 3.0.7
88 Requires: python-lxml >= 2.3
89 Requires: python-netaddr >= 0.7.12
90 Requires: python-oslo-config >= 1:2.3.0
91 Requires: python-oslo-concurrency >= 2.3.0
92 Requires: python-oslo-context >= 0.2.0
93 Requires: python-oslo-db >= 2.4.1
94 Requires: python-oslo-log >= 1.8.0
95 Requires: python-oslo-messaging >= 1.16.0
96 Requires: python-oslo-middleware >= 2.8.0
97 Requires: python-oslo-policy >= 0.5.0
98 Requires: python-oslo-reports >= 0.1.0
99 Requires: python-oslo-rootwrap >= 2.0.0
100 Requires: python-oslo-serialization >= 1.4.0
101 Requires: python-oslo-utils >= 2.0.0
102 Requires: python-oslo-versionedobjects >= 0.9.0
103 Requires: python-osprofiler >= 0.3.0
104 Requires: python-paramiko >= 1.13.0
105 Requires: python-paste
106 Requires: python-paste-deploy >= 1.5.0
107 Requires: python-crypto >= 2.6
108 Requires: pyparsing >= 2.0.3
109 Requires: python-barbicanclient >= 3.3.0
110 Requires: python-glanceclient >= 1:0.18.0
111 Requires: python-novaclient >= 1:2.28.0
112 Requires: python-swiftclient >= 2.2.0
113 Requires: python-requests >= 2.5.2
114 Requires: python-retrying >= 1.2.3
115 Requires: python-routes >= 1.12.3
116 Requires: python-taskflow >= 1.16
117 Requires: python-rtslib >= 2.1.fb41
118 Requires: python-six >= 1.9.0
119 Requires: python-sqlalchemy >= 0.9.9
120 Requires: python-migrate >= 0.9.6
121 Requires: python-stevedore >= 1.5.0
122 Requires: python-suds-jurko >= 0.6
123 Requires: python-webob >= 1.2.3
124 Requires: python-oslo-i18n >= 1.5.0
125 Requires: python-oslo-vmware >= 1.16.0
127 Requires: os-brick >= 0.4.0
129 #Requires: python-qpid
130 #Requires: python-amqplib
131 #Requires: python-lockfile
132 #Requires: python-ceph
133 #Requires: iscsi-initiator-utils
135 %description -n python-cinder
136 OpenStack Volume (codename Cinder) provides services to manage and
137 access block storage volumes for use by Virtual Machine instances.
139 This package contains the cinder Python library.
143 Summary: Documentation for OpenStack Volume
146 Requires: %{name} = 1:%{version}-%{release}
148 BuildRequires: graphviz
150 # Required to build module documents
151 BuildRequires: python-eventlet
152 BuildRequires: python-routes
153 BuildRequires: python-sqlalchemy
154 BuildRequires: python-webob
155 # while not strictly required, quiets the build down when building docs.
156 BuildRequires: python-migrate, python-iso8601
159 OpenStack Volume (codename Cinder) provides services to manage and
160 access block storage volumes for use by Virtual Machine instances.
162 This package contains documentation files for cinder.
166 %setup -q -n cinder-%{version}
170 find . \( -name .gitignore -o -name .placeholder \) -delete
172 find cinder -name \*.py -exec sed -i '/\/usr\/bin\/env python/{d;q}' {} +
174 # TODO: Have the following handle multi line entries
175 sed -i '/setup_requires/d; /install_requires/d; /dependency_links/d' setup.py
177 # Remove the requirements file so that pbr hooks don't add it
178 # to distutils requires_dist config
179 rm -rf {test-,}requirements.txt tools/{pip,test}-requires
181 # We add REDHATCINDERVERSION/RELEASE with the pbr removal patch
182 sed -i s/REDHATCINDERVERSION/%{version}/ cinder/version.py
183 sed -i s/REDHATCINDERRELEASE/%{release}/ cinder/version.py
186 %{__python} setup.py build
189 %{__python} setup.py install -O1 --skip-build --root %{buildroot}
191 # docs generation requires everything to be installed first
192 export PYTHONPATH="$( pwd ):$PYTHONPATH"
197 SPHINX_DEBUG=1 sphinx-build -b html source build/html
198 # Fix hidden-file-or-dir warnings
199 rm -fr build/html/.doctrees build/html/.buildinfo
202 # Create dir link to avoid a sphinx-build exception
203 mkdir -p build/man/.doctrees/
204 ln -s . build/man/.doctrees/man
205 SPHINX_DEBUG=1 sphinx-build -b man -c source source/man build/man
206 mkdir -p %{buildroot}%{_mandir}/man1
207 install -p -D -m 644 build/man/*.1 %{buildroot}%{_mandir}/man1/
212 install -d -m 755 %{buildroot}%{_sharedstatedir}/cinder
213 install -d -m 755 %{buildroot}%{_sharedstatedir}/cinder/tmp
214 install -d -m 755 %{buildroot}%{_localstatedir}/log/cinder
216 # Install config files
217 install -d -m 755 %{buildroot}%{_sysconfdir}/cinder
218 install -p -D -m 640 %{SOURCE1} %{buildroot}%{_datadir}/cinder/cinder-dist.conf
219 install -p -D -m 640 %{SOURCE14} %{buildroot}%{_sysconfdir}/cinder/cinder.conf
220 install -d -m 755 %{buildroot}%{_sysconfdir}/cinder/volumes
221 install -p -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/tgt/conf.d/cinder.conf
222 install -p -D -m 640 etc/cinder/rootwrap.conf %{buildroot}%{_sysconfdir}/cinder/rootwrap.conf
223 install -p -D -m 640 etc/cinder/api-paste.ini %{buildroot}%{_sysconfdir}/cinder/api-paste.ini
224 install -p -D -m 640 etc/cinder/policy.json %{buildroot}%{_sysconfdir}/cinder/policy.json
227 # Install initscripts for services
228 install -p -D -m 755 %{SOURCE10} %{buildroot}%{_initrddir}/openstack-cinder-api
229 install -p -D -m 755 %{SOURCE11} %{buildroot}%{_initrddir}/openstack-cinder-scheduler
230 install -p -D -m 755 %{SOURCE12} %{buildroot}%{_initrddir}/openstack-cinder-volume
231 install -p -D -m 755 %{SOURCE13} %{buildroot}%{_initrddir}/openstack-cinder-backup
233 # Install initscripts for services
234 install -p -D -m 644 %{SOURCE30} %{buildroot}%{_unitdir}/openstack-cinder-api.service
235 install -p -D -m 644 %{SOURCE31} %{buildroot}%{_unitdir}/openstack-cinder-scheduler.service
236 install -p -D -m 644 %{SOURCE32} %{buildroot}%{_unitdir}/openstack-cinder-volume.service
237 install -p -D -m 644 %{SOURCE33} %{buildroot}%{_unitdir}/openstack-cinder-backup.service
241 install -p -D -m 440 %{SOURCE20} %{buildroot}%{_sysconfdir}/sudoers.d/cinder
244 install -p -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-cinder
246 # Install pid directory
247 install -d -m 755 %{buildroot}%{_localstatedir}/run/cinder
249 # Install rootwrap files in /usr/share/cinder/rootwrap
250 mkdir -p %{buildroot}%{_datarootdir}/cinder/rootwrap/
251 install -p -D -m 644 etc/cinder/rootwrap.d/* %{buildroot}%{_datarootdir}/cinder/rootwrap/
253 # Remove unneeded in production stuff
254 rm -f %{buildroot}%{_bindir}/cinder-debug
255 rm -fr %{buildroot}%{python_sitelib}/cinder/tests/
256 rm -fr %{buildroot}%{python_sitelib}/run_tests.*
257 rm -f %{buildroot}/usr/share/doc/cinder/README*
260 getent group cinder >/dev/null || groupadd -r cinder --gid 165
261 if ! getent passwd cinder >/dev/null; then
262 useradd -u 165 -r -g cinder -G cinder,nobody -d %{_sharedstatedir}/cinder -s /sbin/nologin -c "OpenStack Cinder Daemons" cinder
268 for svc in volume api scheduler backup; do
269 /sbin/chkconfig --add openstack-cinder-$svc
272 %systemd_post openstack-cinder-volume
273 %systemd_post openstack-cinder-api
274 %systemd_post openstack-cinder-scheduler
275 %systemd_post openstack-cinder-backup
280 if [ $1 -eq 0 ] ; then
281 for svc in volume api scheduler backup; do
282 /sbin/service openstack-cinder-${svc} stop > /dev/null 2>&1
283 /sbin/chkconfig --del openstack-cinder-${svc}
287 %systemd_preun openstack-cinder-volume
288 %systemd_preun openstack-cinder-api
289 %systemd_preun openstack-cinder-scheduler
290 %systemd_preun openstack-cinder-backup
295 if [ $1 -ge 1 ] ; then
296 # Package upgrade, not uninstall
297 for svc in volume api scheduler backup; do
298 /sbin/service openstack-cinder-${svc} condrestart > /dev/null 2>&1 || :
302 %systemd_postun_with_restart openstack-cinder-volume
303 %systemd_postun_with_restart openstack-cinder-api
304 %systemd_postun_with_restart openstack-cinder-scheduler
305 %systemd_postun_with_restart openstack-cinder-backup
311 %dir %{_sysconfdir}/cinder
312 %config(noreplace) %attr(-, root, cinder) %{_sysconfdir}/cinder/cinder.conf
313 %config(noreplace) %attr(-, root, cinder) %{_sysconfdir}/cinder/api-paste.ini
314 %config(noreplace) %attr(-, root, cinder) %{_sysconfdir}/cinder/rootwrap.conf
315 %config(noreplace) %attr(-, root, cinder) %{_sysconfdir}/cinder/policy.json
316 %config(noreplace) %{_sysconfdir}/logrotate.d/openstack-cinder
317 %config(noreplace) %{_sysconfdir}/sudoers.d/cinder
318 %config(noreplace) %{_sysconfdir}/tgt/conf.d/cinder.conf
319 %attr(-, root, cinder) %{_datadir}/cinder/cinder-dist.conf
321 %dir %attr(0750, cinder, root) %{_localstatedir}/log/cinder
322 %dir %attr(0755, cinder, root) %{_localstatedir}/run/cinder
323 %dir %attr(0755, cinder, root) %{_sysconfdir}/cinder/volumes
328 %{_initrddir}/openstack-cinder-*
330 %{_unitdir}/*.service
333 %{_datarootdir}/cinder
334 %{_mandir}/man1/cinder*.1.gz
336 %defattr(-, cinder, cinder, -)
337 %dir %{_sharedstatedir}/cinder
338 %dir %{_sharedstatedir}/cinder/tmp
340 %files -n python-cinder
342 %{python_sitelib}/cinder
343 %{python_sitelib}/cinder-%{version}*.egg-info
351 * Mon Sep 28 2015 Mikhail Ivanov <mivanov@mirantis.com> - 7.0.0.0rc1-1~mos8.0.1
352 - Update to a new upstream version
353 - Update build and runtime dependencies
355 * Wed Jun 11 2014 Eric Harney <eharney@redhat.com> - 2014.1.1-2
356 - Add dependency on iscsi-initiator-utils
358 * Mon Jun 09 2014 Eric Harney <eharney@redhat.com> - 2014.1.1-1
359 - Update to Icehouse stable release 1
361 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2014.1-4
362 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
364 * Tue Apr 29 2014 Alan Pevec <apevec@redhat.com> - 2014.1-3
365 - drop crudini build dependency
367 * Mon Apr 21 2014 Eric Harney <eharney@redhat.com> - 2014.1-2
368 - Remove qpid settings from cinder-dist.conf
370 * Thu Apr 17 2014 Eric Harney <eharney@redhat.com> - 2014.1-1
371 - Update to 2014.1 (Icehouse)
373 * Tue Apr 15 2014 Eric Harney <eharney@redhat.com> - 2014.1-0.10.rc3
374 - Add python-oslo-messaging requirement
375 - Add GlusterFS delete patch
376 - Add systemd patches (not used yet)
378 * Tue Apr 15 2014 Eric Harney <eharney@redhat.com> - 2014.1-0.9.rc3
379 - Update to Icehouse RC3
381 * Mon Apr 07 2014 Eric Harney <eharney@redhat.com> - 2014.1-0.8.rc2
382 - Update to Icehouse RC2
383 - Icehouse requires newer version of python-six
385 * Thu Mar 27 2014 Eric Harney <eharney@redhat.com> - 2014.1-0.7.rc1
386 - Update to Icehouse RC1
388 * Tue Mar 25 2014 Pádraig Brady <pbrady@redhat.com> - 2014.1-0.6.b3
389 - Depend on python-rtslib and targetcli rather than scsi-target-utils
391 * Fri Mar 21 2014 Pádraig Brady <pbrady@redhat.com> - 2014.1-0.5.b3
392 - Use lioadm iSCSI helper rather than tgtadm
394 * Sun Mar 16 2014 Eric Harney <eharney@redhat.com> - 2014.1-0.4.b3
395 - Update to Icehouse milestone 3
396 - Add deps on python-oslo-rootwrap, python-taskflow
398 * Mon Jan 27 2014 Eric Harney <eharney@redhat.com> - 2014.1-0.3.b2
399 - Update to Icehouse milestone 2
401 * Mon Jan 06 2014 Pádraig Brady <pbrady@redhat.com> - 2014.1-0.2.b1
402 - Set python-six min version to ensure updated
404 * Thu Dec 19 2013 Eric Harney <eharney@redhat.com> - 2014.1-0.1.b1
405 - Update to Icehouse milestone 1
407 * Mon Oct 28 2013 Eric Harney <eharney@redhat.com> - 2013.2-2
408 - Fix GlusterFS volume driver clone operations
410 * Thu Oct 17 2013 Eric Harney <eharney@redhat.com> - 2013.2-1
411 - Update to 2013.2 (Havana)
412 - Restart/remove cinder-backup service during upgrade/uninstallation
414 * Wed Oct 16 2013 Eric Harney <eharney@redhat.com> - 2013.2-0.13.rc3
415 - Update to Havana RC3
417 * Fri Oct 11 2013 Eric Harney <eharney@redhat.com> - 2013.2-0.12.rc2
418 - Update to Havana RC2
420 * Tue Oct 08 2013 Eric Harney <eharney@redhat.com> - 2013.2-0.11.rc1
421 - Update to Havana RC1
422 - Fix python-novaclient req epoch
424 * Mon Sep 23 2013 Eric Harney <eharney@redhat.com> - 2013.2-0.10.b3
425 - Depend on python-novaclient 2.15
427 * Wed Sep 18 2013 Eric Harney <eharney@redhat.com> - 2013.2-0.9.b3
428 - Add cinder-dist.conf
429 - Tighten permissions on /var/log/cinder
431 * Mon Sep 9 2013 Eric Harney <eharney@redhat.com> - 2013.2-0.8.b3
432 - Update to Havana milestone 3
433 - Add dependency on python-novaclient
435 * Thu Aug 29 2013 Pádraig Brady <pbrady@redhat.com> - 2013.2-0.7.b2
436 - Add dependency on sysfsutils to support the fiber channel driver
438 * Mon Aug 26 2013 Eric Harney <eharney@redhat.com> - 2013.2-0.6.b2
439 - Add cinder-backup service init script
441 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2013.2-0.5.b2
442 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
444 * Mon Jul 22 2013 Pádraig Brady <pbrady@redhat.com> - 2013.2-0.4.b2
445 - Add dependency on python-suds to support the netapp driver
446 - Add dependency on python-keystoneclient for auth token middleware
447 - Add dependency on qemu-img for volume creation from Glance images
449 * Sun Jul 21 2013 Pádraig Brady <pbrady@redhat.com> - 2013.2-0.3.b2
450 - Update to Havana milestone 2
452 * Thu Jun 13 2013 Eric Harney <eharney@redhat.com> - 2013.2-0.2.b1
453 - Update to Havana milestone 1
455 * Mon May 13 2013 Eric Harney <eharney@redhat.com> - 2013.1.1-1
456 - Update to Grizzly stable release 1, 2013.1.1
458 * Mon Apr 08 2013 Eric Harney <eharney@redhat.com> - 2013.1-2
459 - Backport fix for GlusterFS driver get_volume_stats
461 * Thu Apr 04 2013 Eric Harney <eharney@redhat.com> - 2013.1-1
462 - Update to Grizzly final release
464 * Tue Apr 2 2013 Pádraig Brady <pbrady@redhat.com> - 2013.1-0.6.rc3
465 - Adjust to support sqlalchemy-0.8.0
467 * Wed Mar 27 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.5.rc3
468 - Update to Grizzly RC3 release
470 * Mon Mar 25 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.5.rc2
471 - Update to Grizzly RC2 release
473 * Mon Mar 18 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.5.rc1
474 - Update to Grizzly RC1 release
476 * Tue Mar 05 2013 Pádraig Brady <P@draigBrady.com> - 2013.1-0.4.g3
477 - Add dependency on python-stevedore
479 * Mon Feb 25 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.3.g3
480 - Fix build issues with G-3 update
482 * Mon Feb 25 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.2.g3
483 - Update to Grizzly milestone 3
485 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2013.1-0.2.g2
486 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
488 * Thu Jan 10 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.1.g2
489 - Update to Grizzly milestone 2
491 * Thu Nov 29 2012 Eric Harney <eharney@redhat.com> - 2013.1-0.1.g1
492 - Update to Grizzly milestone 1
494 * Wed Nov 14 2012 Eric Harney <eharney@redhat.com> - 2012.2-2
495 - Remove unused dependency on python-daemon
497 * Thu Sep 27 2012 Pádraig Brady <P@draigBrady.com> - 2012.2-1
498 - Update to Folsom final
500 * Fri Sep 21 2012 Pádraig Brady <P@draigBrady.com> - 2012.2-0.5.rc1
501 - Update to Folsom RC1
503 * Fri Sep 21 2012 Pádraig Brady <P@draigBrady.com> - 2012.2-0.4.f3
504 - Fix to ensure that tgt configuration is honored
506 * Mon Sep 17 2012 Pádraig Brady <P@draigBrady.com> - 2012.2-0.3.f3
507 - Move user config out of /etc/cinder/api-paste.ini
508 - Require python-cinderclient
510 * Mon Sep 3 2012 Pádraig Brady <P@draigBrady.com> - 2012.2-0.2.f3