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
21 Source15: openstack-cinder-volume-vmware.init
24 Source20: cinder-sudoers
27 # patches_base=2014.1.1
29 Patch0001: 0001-Remove-runtime-dep-on-python-pbr-python-d2to1.patch
32 BuildRequires: intltool
33 BuildRequires: python-d2to1
34 BuildRequires: python-oslo-sphinx
35 BuildRequires: python-pbr
36 BuildRequires: python-sphinx
37 BuildRequires: python-setuptools
38 BuildRequires: python-netaddr >= 0.7.12
40 Requires: openstack-utils
41 Requires: python-cinder = %{version}-%{release}
44 Requires: python-cinderclient
46 Requires(post): chkconfig
47 Requires(postun): initscripts
48 Requires(preun): chkconfig
49 Requires(pre): shadow-utils
52 Requires: scsi-target-utils
55 OpenStack Volume (codename Cinder) provides services to manage and
56 access block storage volumes for use by Virtual Machine instances.
59 %package -n python-cinder
60 Summary: OpenStack Volume Python libraries
61 Group: Applications/System
65 Requires: MySQL-python
70 Requires: python-pbr >= 0.6, python-pbr < 0.7, python-pbr > 0.7, python-pbr < 1.0
71 Requires: python-anyjson >= 0.3.3
72 Requires: python-argparse
73 Requires: python-babel >= 1.3
74 Requires: python-eventlet >= 0.15.2
75 Requires: python-greenlet >= 0.3.2
76 Requires: python-iso8601 >= 0.1.9
77 Requires: python-keystonemiddleware >= 1.0.0
78 Requires: python-kombu >= 2.5.0
79 Requires: python-lxml >= 2.3
80 Requires: python-netaddr >= 0.7.12
81 Requires: python-oslo-config >= 1:1.4.0
82 Requires: python-oslo.concurrency >= 0.3.0
83 Requires: python-oslo-db >= 1.1.0
84 Requires: python-oslo-messaging >= 1.4.0, python-oslo.messaging < 1.5.0, python-oslo.messaging > 1.5.0
85 Requires: python-oslo-rootwrap >= 1.3.0
86 Requires: python-oslo.serialization >= 1.0.0
87 Requires: python-oslo.utils >= 1.0.0
88 Requires: python-osprofiler >= 0.3.0
89 Requires: python-paramiko >= 1.13.0
90 Requires: python-paste-deploy >= 1.5.0
91 Requires: python-crypto >= 2.6
92 Requires: python-barbicanclient >= 2.1.0, python-barbicanclient < 3.0.0, python-barbicanclient > 3.0.0
93 Requires: python-glanceclient >= 1:0.14.0
94 Requires: python-novaclient >= 1:2.18.0
95 Requires: python-swiftclient >= 2.2.0
96 Requires: python-requests >= 2.2.0, python-requests < 2.4.0, python-requests > 2.4.0
97 Requires: python-routes >= 1.12.3, python-routes < 2.0, python-routes > 2.0
98 Requires: python-taskflow >= 0.4
99 Requires: python-rtslib-fb >= 2.1.fb39
100 Requires: python-six >= 1.7.0
101 Requires: python-sqlalchemy >= 0.9.7, python-sqlalchemy <= 0.9.99
102 Requires: python-migrate >= 0.9.1, python-migrate < 0.9.2, python-migrate > 0.9.2
103 Requires: python-stevedore >= 1.1.0
104 Requires: python-suds >= 0.4
105 Requires: python-webob >= 1.2.3
106 Requires: python-wsgiref >= 0.1.2
107 Requires: python-oslo.i18n >= 1.0.0
109 Requires: python-qpid
110 Requires: python-amqplib
111 Requires: python-keystoneclient >= 1:0.10.0
112 Requires: python-lockfile
113 Requires: python-ceph
114 #Requires: iscsi-initiator-utils
116 %description -n python-cinder
117 OpenStack Volume (codename Cinder) provides services to manage and
118 access block storage volumes for use by Virtual Machine instances.
120 This package contains the cinder Python library.
124 Summary: Documentation for OpenStack Volume
127 Requires: %{name} = %{version}-%{release}
129 BuildRequires: graphviz
131 # Required to build module documents
132 BuildRequires: python-eventlet
133 BuildRequires: python-routes
134 BuildRequires: python-sqlalchemy
135 BuildRequires: python-webob
136 # while not strictly required, quiets the build down when building docs.
137 BuildRequires: python-migrate, python-iso8601
140 OpenStack Volume (codename Cinder) provides services to manage and
141 access block storage volumes for use by Virtual Machine instances.
143 This package contains documentation files for cinder.
147 %setup -q -n cinder-%{version}
151 find . \( -name .gitignore -o -name .placeholder \) -delete
153 find cinder -name \*.py -exec sed -i '/\/usr\/bin\/env python/{d;q}' {} +
155 # TODO: Have the following handle multi line entries
156 sed -i '/setup_requires/d; /install_requires/d; /dependency_links/d' setup.py
158 # Remove the requirements file so that pbr hooks don't add it
159 # to distutils requires_dist config
160 rm -rf {test-,}requirements.txt tools/{pip,test}-requires
162 # We add REDHATCINDERVERSION/RELEASE with the pbr removal patch
163 sed -i s/REDHATCINDERVERSION/%{version}/ cinder/version.py
164 sed -i s/REDHATCINDERRELEASE/%{release}/ cinder/version.py
167 %{__python} setup.py build
170 %{__python} setup.py install -O1 --skip-build --root %{buildroot}
172 # docs generation requires everything to be installed first
173 export PYTHONPATH="$( pwd ):$PYTHONPATH"
178 SPHINX_DEBUG=1 sphinx-build -b html source build/html
179 # Fix hidden-file-or-dir warnings
180 rm -fr build/html/.doctrees build/html/.buildinfo
183 # Create dir link to avoid a sphinx-build exception
184 mkdir -p build/man/.doctrees/
185 ln -s . build/man/.doctrees/man
186 SPHINX_DEBUG=1 sphinx-build -b man -c source source/man build/man
187 mkdir -p %{buildroot}%{_mandir}/man1
188 install -p -D -m 644 build/man/*.1 %{buildroot}%{_mandir}/man1/
193 install -d -m 755 %{buildroot}%{_sharedstatedir}/cinder
194 install -d -m 755 %{buildroot}%{_sharedstatedir}/cinder/tmp
195 install -d -m 755 %{buildroot}%{_localstatedir}/log/cinder
197 # Install config files
198 install -d -m 755 %{buildroot}%{_sysconfdir}/cinder
199 install -p -D -m 640 %{SOURCE1} %{buildroot}%{_datadir}/cinder/cinder-dist.conf
200 install -p -D -m 640 %{SOURCE14} %{buildroot}%{_sysconfdir}/cinder/cinder.conf
201 install -p -D -m 755 %{SOURCE15} %{buildroot}%{_datadir}/cinder/openstack-cinder-volume-vmware
202 install -d -m 755 %{buildroot}%{_sysconfdir}/cinder/volumes
203 install -p -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/tgt/conf.d/cinder.conf
204 install -p -D -m 640 etc/cinder/rootwrap.conf %{buildroot}%{_sysconfdir}/cinder/rootwrap.conf
205 install -p -D -m 640 etc/cinder/api-paste.ini %{buildroot}%{_sysconfdir}/cinder/api-paste.ini
206 install -p -D -m 640 etc/cinder/policy.json %{buildroot}%{_sysconfdir}/cinder/policy.json
208 # Install initscripts for services
209 install -p -D -m 755 %{SOURCE10} %{buildroot}%{_initrddir}/openstack-cinder-api
210 install -p -D -m 755 %{SOURCE11} %{buildroot}%{_initrddir}/openstack-cinder-scheduler
211 install -p -D -m 755 %{SOURCE12} %{buildroot}%{_initrddir}/openstack-cinder-volume
212 install -p -D -m 755 %{SOURCE13} %{buildroot}%{_initrddir}/openstack-cinder-backup
215 install -p -D -m 440 %{SOURCE20} %{buildroot}%{_sysconfdir}/sudoers.d/cinder
218 install -p -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-cinder
220 # Install pid directory
221 install -d -m 755 %{buildroot}%{_localstatedir}/run/cinder
223 # Install rootwrap files in /usr/share/cinder/rootwrap
224 mkdir -p %{buildroot}%{_datarootdir}/cinder/rootwrap/
225 install -p -D -m 644 etc/cinder/rootwrap.d/* %{buildroot}%{_datarootdir}/cinder/rootwrap/
227 # Remove unneeded in production stuff
228 rm -f %{buildroot}%{_bindir}/cinder-debug
229 rm -fr %{buildroot}%{python_sitelib}/cinder/tests/
230 rm -fr %{buildroot}%{python_sitelib}/run_tests.*
231 rm -f %{buildroot}/usr/share/doc/cinder/README*
234 getent group cinder >/dev/null || groupadd -r cinder --gid 165
235 if ! getent passwd cinder >/dev/null; then
236 useradd -u 165 -r -g cinder -G cinder,nobody -d %{_sharedstatedir}/cinder -s /sbin/nologin -c "OpenStack Cinder Daemons" cinder
241 for svc in volume api scheduler backup; do
242 /sbin/chkconfig --add openstack-cinder-$svc
246 if [ $1 -eq 0 ] ; then
247 for svc in volume api scheduler backup; do
248 /sbin/service openstack-cinder-${svc} stop > /dev/null 2>&1
249 /sbin/chkconfig --del openstack-cinder-${svc}
254 if [ $1 -ge 1 ] ; then
255 # Package upgrade, not uninstall
256 for svc in volume api scheduler backup; do
257 /sbin/service openstack-cinder-${svc} condrestart > /dev/null 2>&1 || :
264 %dir %{_sysconfdir}/cinder
265 %config(noreplace) %attr(-, root, cinder) %{_sysconfdir}/cinder/cinder.conf
266 %config(noreplace) %attr(-, root, cinder) %{_sysconfdir}/cinder/api-paste.ini
267 %config(noreplace) %attr(-, root, cinder) %{_sysconfdir}/cinder/rootwrap.conf
268 %config(noreplace) %attr(-, root, cinder) %{_sysconfdir}/cinder/policy.json
269 %config(noreplace) %{_sysconfdir}/logrotate.d/openstack-cinder
270 %config(noreplace) %{_sysconfdir}/sudoers.d/cinder
271 %config(noreplace) %{_sysconfdir}/tgt/conf.d/cinder.conf
272 %attr(-, root, cinder) %{_datadir}/cinder/cinder-dist.conf
274 %dir %attr(0750, cinder, root) %{_localstatedir}/log/cinder
275 %dir %attr(0755, cinder, root) %{_localstatedir}/run/cinder
276 %dir %attr(0755, cinder, root) %{_sysconfdir}/cinder/volumes
279 %{_initrddir}/openstack-cinder-*
280 %{_datarootdir}/cinder
281 %{_mandir}/man1/cinder*.1.gz
283 %defattr(-, cinder, cinder, -)
284 %dir %{_sharedstatedir}/cinder
285 %dir %{_sharedstatedir}/cinder/tmp
287 %files -n python-cinder
289 %{python_sitelib}/cinder
290 %{python_sitelib}/cinder-%{version}*.egg-info
298 * Wed Jun 11 2014 Eric Harney <eharney@redhat.com> - 2014.1.1-2
299 - Add dependency on iscsi-initiator-utils
301 * Mon Jun 09 2014 Eric Harney <eharney@redhat.com> - 2014.1.1-1
302 - Update to Icehouse stable release 1
304 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2014.1-4
305 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
307 * Tue Apr 29 2014 Alan Pevec <apevec@redhat.com> - 2014.1-3
308 - drop crudini build dependency
310 * Mon Apr 21 2014 Eric Harney <eharney@redhat.com> - 2014.1-2
311 - Remove qpid settings from cinder-dist.conf
313 * Thu Apr 17 2014 Eric Harney <eharney@redhat.com> - 2014.1-1
314 - Update to 2014.1 (Icehouse)
316 * Tue Apr 15 2014 Eric Harney <eharney@redhat.com> - 2014.1-0.10.rc3
317 - Add python-oslo-messaging requirement
318 - Add GlusterFS delete patch
319 - Add systemd patches (not used yet)
321 * Tue Apr 15 2014 Eric Harney <eharney@redhat.com> - 2014.1-0.9.rc3
322 - Update to Icehouse RC3
324 * Mon Apr 07 2014 Eric Harney <eharney@redhat.com> - 2014.1-0.8.rc2
325 - Update to Icehouse RC2
326 - Icehouse requires newer version of python-six
328 * Thu Mar 27 2014 Eric Harney <eharney@redhat.com> - 2014.1-0.7.rc1
329 - Update to Icehouse RC1
331 * Tue Mar 25 2014 Pádraig Brady <pbrady@redhat.com> - 2014.1-0.6.b3
332 - Depend on python-rtslib and targetcli rather than scsi-target-utils
334 * Fri Mar 21 2014 Pádraig Brady <pbrady@redhat.com> - 2014.1-0.5.b3
335 - Use lioadm iSCSI helper rather than tgtadm
337 * Sun Mar 16 2014 Eric Harney <eharney@redhat.com> - 2014.1-0.4.b3
338 - Update to Icehouse milestone 3
339 - Add deps on python-oslo-rootwrap, python-taskflow
341 * Mon Jan 27 2014 Eric Harney <eharney@redhat.com> - 2014.1-0.3.b2
342 - Update to Icehouse milestone 2
344 * Mon Jan 06 2014 Pádraig Brady <pbrady@redhat.com> - 2014.1-0.2.b1
345 - Set python-six min version to ensure updated
347 * Thu Dec 19 2013 Eric Harney <eharney@redhat.com> - 2014.1-0.1.b1
348 - Update to Icehouse milestone 1
350 * Mon Oct 28 2013 Eric Harney <eharney@redhat.com> - 2013.2-2
351 - Fix GlusterFS volume driver clone operations
353 * Thu Oct 17 2013 Eric Harney <eharney@redhat.com> - 2013.2-1
354 - Update to 2013.2 (Havana)
355 - Restart/remove cinder-backup service during upgrade/uninstallation
357 * Wed Oct 16 2013 Eric Harney <eharney@redhat.com> - 2013.2-0.13.rc3
358 - Update to Havana RC3
360 * Fri Oct 11 2013 Eric Harney <eharney@redhat.com> - 2013.2-0.12.rc2
361 - Update to Havana RC2
363 * Tue Oct 08 2013 Eric Harney <eharney@redhat.com> - 2013.2-0.11.rc1
364 - Update to Havana RC1
365 - Fix python-novaclient req epoch
367 * Mon Sep 23 2013 Eric Harney <eharney@redhat.com> - 2013.2-0.10.b3
368 - Depend on python-novaclient 2.15
370 * Wed Sep 18 2013 Eric Harney <eharney@redhat.com> - 2013.2-0.9.b3
371 - Add cinder-dist.conf
372 - Tighten permissions on /var/log/cinder
374 * Mon Sep 9 2013 Eric Harney <eharney@redhat.com> - 2013.2-0.8.b3
375 - Update to Havana milestone 3
376 - Add dependency on python-novaclient
378 * Thu Aug 29 2013 Pádraig Brady <pbrady@redhat.com> - 2013.2-0.7.b2
379 - Add dependency on sysfsutils to support the fiber channel driver
381 * Mon Aug 26 2013 Eric Harney <eharney@redhat.com> - 2013.2-0.6.b2
382 - Add cinder-backup service init script
384 * Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2013.2-0.5.b2
385 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
387 * Mon Jul 22 2013 Pádraig Brady <pbrady@redhat.com> - 2013.2-0.4.b2
388 - Add dependency on python-suds to support the netapp driver
389 - Add dependency on python-keystoneclient for auth token middleware
390 - Add dependency on qemu-img for volume creation from Glance images
392 * Sun Jul 21 2013 Pádraig Brady <pbrady@redhat.com> - 2013.2-0.3.b2
393 - Update to Havana milestone 2
395 * Thu Jun 13 2013 Eric Harney <eharney@redhat.com> - 2013.2-0.2.b1
396 - Update to Havana milestone 1
398 * Mon May 13 2013 Eric Harney <eharney@redhat.com> - 2013.1.1-1
399 - Update to Grizzly stable release 1, 2013.1.1
401 * Mon Apr 08 2013 Eric Harney <eharney@redhat.com> - 2013.1-2
402 - Backport fix for GlusterFS driver get_volume_stats
404 * Thu Apr 04 2013 Eric Harney <eharney@redhat.com> - 2013.1-1
405 - Update to Grizzly final release
407 * Tue Apr 2 2013 Pádraig Brady <pbrady@redhat.com> - 2013.1-0.6.rc3
408 - Adjust to support sqlalchemy-0.8.0
410 * Wed Mar 27 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.5.rc3
411 - Update to Grizzly RC3 release
413 * Mon Mar 25 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.5.rc2
414 - Update to Grizzly RC2 release
416 * Mon Mar 18 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.5.rc1
417 - Update to Grizzly RC1 release
419 * Tue Mar 05 2013 Pádraig Brady <P@draigBrady.com> - 2013.1-0.4.g3
420 - Add dependency on python-stevedore
422 * Mon Feb 25 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.3.g3
423 - Fix build issues with G-3 update
425 * Mon Feb 25 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.2.g3
426 - Update to Grizzly milestone 3
428 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2013.1-0.2.g2
429 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
431 * Thu Jan 10 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.1.g2
432 - Update to Grizzly milestone 2
434 * Thu Nov 29 2012 Eric Harney <eharney@redhat.com> - 2013.1-0.1.g1
435 - Update to Grizzly milestone 1
437 * Wed Nov 14 2012 Eric Harney <eharney@redhat.com> - 2012.2-2
438 - Remove unused dependency on python-daemon
440 * Thu Sep 27 2012 Pádraig Brady <P@draigBrady.com> - 2012.2-1
441 - Update to Folsom final
443 * Fri Sep 21 2012 Pádraig Brady <P@draigBrady.com> - 2012.2-0.5.rc1
444 - Update to Folsom RC1
446 * Fri Sep 21 2012 Pádraig Brady <P@draigBrady.com> - 2012.2-0.4.f3
447 - Fix to ensure that tgt configuration is honored
449 * Mon Sep 17 2012 Pádraig Brady <P@draigBrady.com> - 2012.2-0.3.f3
450 - Move user config out of /etc/cinder/api-paste.ini
451 - Require python-cinderclient
453 * Mon Sep 3 2012 Pádraig Brady <P@draigBrady.com> - 2012.2-0.2.f3