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/grizzly/%{version}/+download/cinder-%{version}.tar.gz
13 Source2: cinder.logrotate
14 Source3: cinder-tgt.conf
16 Source10: openstack-cinder-api.init
17 Source100: openstack-cinder-api.upstart
18 Source11: openstack-cinder-scheduler.init
19 Source110: openstack-cinder-scheduler.upstart
20 Source12: openstack-cinder-volume.init
21 Source120: openstack-cinder-volume.upstart
23 Source20: cinder-sudoers
26 # patches_base=2013.1.2
28 Patch0001: 0001-Ensure-we-don-t-access-the-net-when-building-docs.patch
29 Patch0002: 0002-Use-updated-parallel-install-versions-of-epel-packag.patch
30 Patch0003: 0003-remove-deprecated-assert_unicode-sqlalchemy-attribut.patch
31 Patch0004: 0004-avoid-code-path-causing-qpid-exchange-leaks.patch
34 BuildRequires: intltool
35 BuildRequires: python-sphinx10
36 BuildRequires: python-setuptools
37 BuildRequires: python-netaddr
38 BuildRequires: openstack-utils
39 # These are required to build due to the requirements check added
40 BuildRequires: python-paste-deploy1.5
41 BuildRequires: python-routes1.12
42 BuildRequires: python-sqlalchemy0.7
43 BuildRequires: python-webob1.0
45 Requires: openstack-utils
46 Requires: python-cinder = %{version}-%{release}
49 Requires: python-cinderclient
51 Requires(post): chkconfig
52 Requires(postun): initscripts
53 Requires(preun): chkconfig
54 Requires(pre): shadow-utils
57 Requires: scsi-target-utils
60 OpenStack Volume (codename Cinder) provides services to manage and
61 access block storage volumes for use by Virtual Machine instances.
64 %package -n python-cinder
65 Summary: OpenStack Volume Python libraries
66 Group: Applications/System
69 Requires: MySQL-python
73 Requires: python-paramiko
76 Requires: python-kombu
77 Requires: python-amqplib
79 Requires: python-eventlet
80 Requires: python-greenlet
81 Requires: python-iso8601
82 Requires: python-netaddr
84 Requires: python-anyjson
85 Requires: python-cheetah
86 Requires: python-stevedore
89 Requires: python-sqlalchemy0.7
90 Requires: python-migrate
92 Requires: python-paste-deploy1.5
93 Requires: python-routes1.12
94 Requires: python-webob1.0
96 Requires: python-glanceclient >= 1:0
97 Requires: python-keystoneclient
98 Requires: python-oslo-config
100 %description -n python-cinder
101 OpenStack Volume (codename Cinder) provides services to manage and
102 access block storage volumes for use by Virtual Machine instances.
104 This package contains the cinder Python library.
108 Summary: Documentation for OpenStack Volume
111 Requires: %{name} = %{version}-%{release}
113 BuildRequires: graphviz
115 # Required to build module documents
116 BuildRequires: python-eventlet
117 BuildRequires: python-routes1.12
118 BuildRequires: python-sqlalchemy0.7
119 BuildRequires: python-webob1.0
120 # while not strictly required, quiets the build down when building docs.
121 BuildRequires: python-migrate, python-iso8601
124 OpenStack Volume (codename Cinder) provides services to manage and
125 access block storage volumes for use by Virtual Machine instances.
127 This package contains documentation files for cinder.
131 %setup -q -n cinder-%{version}
138 find . \( -name .gitignore -o -name .placeholder \) -delete
140 find cinder -name \*.py -exec sed -i '/\/usr\/bin\/env python/{d;q}' {} +
142 # TODO: Have the following handle multi line entries
143 sed -i '/setup_requires/d; /install_requires/d; /dependency_links/d' setup.py
147 # Move authtoken configuration out of paste.ini
148 openstack-config --del etc/cinder/api-paste.ini filter:authtoken admin_tenant_name
149 openstack-config --del etc/cinder/api-paste.ini filter:authtoken admin_user
150 openstack-config --del etc/cinder/api-paste.ini filter:authtoken admin_password
151 openstack-config --del etc/cinder/api-paste.ini filter:authtoken auth_host
152 openstack-config --del etc/cinder/api-paste.ini filter:authtoken auth_port
153 openstack-config --del etc/cinder/api-paste.ini filter:authtoken auth_protocol
155 %{__python} setup.py build
158 %{__python} setup.py install -O1 --skip-build --root %{buildroot}
160 # docs generation requires everything to be installed first
161 export PYTHONPATH="$( pwd ):$PYTHONPATH"
166 SPHINX_DEBUG=1 sphinx-1.0-build -b html source build/html
167 # Fix hidden-file-or-dir warnings
168 rm -fr build/html/.doctrees build/html/.buildinfo
171 # Create dir link to avoid a sphinx-build exception
172 mkdir -p build/man/.doctrees/
173 ln -s . build/man/.doctrees/man
174 SPHINX_DEBUG=1 sphinx-1.0-build -b man -c source source/man build/man
175 mkdir -p %{buildroot}%{_mandir}/man1
176 install -p -D -m 644 build/man/*.1 %{buildroot}%{_mandir}/man1/
181 install -d -m 755 %{buildroot}%{_sharedstatedir}/cinder
182 install -d -m 755 %{buildroot}%{_sharedstatedir}/cinder/tmp
183 install -d -m 755 %{buildroot}%{_localstatedir}/log/cinder
185 # Install config files
186 install -d -m 755 %{buildroot}%{_sysconfdir}/cinder
187 install -p -D -m 640 %{SOURCE1} %{buildroot}%{_sysconfdir}/cinder/cinder.conf
188 install -d -m 755 %{buildroot}%{_sysconfdir}/cinder/volumes
189 install -p -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/tgt/conf.d/cinder.conf
190 install -p -D -m 640 etc/cinder/rootwrap.conf %{buildroot}%{_sysconfdir}/cinder/rootwrap.conf
191 install -p -D -m 640 etc/cinder/api-paste.ini %{buildroot}%{_sysconfdir}/cinder/api-paste.ini
192 install -p -D -m 640 etc/cinder/policy.json %{buildroot}%{_sysconfdir}/cinder/policy.json
194 # Install initscripts for services
195 install -p -D -m 755 %{SOURCE10} %{buildroot}%{_initrddir}/openstack-cinder-api
196 install -p -D -m 755 %{SOURCE11} %{buildroot}%{_initrddir}/openstack-cinder-scheduler
197 install -p -D -m 755 %{SOURCE12} %{buildroot}%{_initrddir}/openstack-cinder-volume
200 install -p -D -m 440 %{SOURCE20} %{buildroot}%{_sysconfdir}/sudoers.d/cinder
203 install -p -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-cinder
205 # Install pid directory
206 install -d -m 755 %{buildroot}%{_localstatedir}/run/cinder
208 # Install upstart jobs examples
209 install -d -m 755 %{buildroot}%{_datadir}/cinder
210 install -p -m 644 %{SOURCE100} %{buildroot}%{_datadir}/cinder/
211 install -p -m 644 %{SOURCE110} %{buildroot}%{_datadir}/cinder/
212 install -p -m 644 %{SOURCE120} %{buildroot}%{_datadir}/cinder/
214 # Install rootwrap files in /usr/share/cinder/rootwrap
215 mkdir -p %{buildroot}%{_datarootdir}/cinder/rootwrap/
216 install -p -D -m 644 etc/cinder/rootwrap.d/* %{buildroot}%{_datarootdir}/cinder/rootwrap/
218 # Remove unneeded in production stuff
219 rm -f %{buildroot}%{_bindir}/cinder-debug
220 rm -fr %{buildroot}%{python_sitelib}/cinder/tests/
221 rm -fr %{buildroot}%{python_sitelib}/run_tests.*
222 rm -f %{buildroot}/usr/share/doc/cinder/README*
225 getent group cinder >/dev/null || groupadd -r cinder --gid 165
226 if ! getent passwd cinder >/dev/null; then
227 useradd -u 165 -r -g cinder -G cinder,nobody -d %{_sharedstatedir}/cinder -s /sbin/nologin -c "OpenStack Cinder Daemons" cinder
232 if [ $1 -eq 1 ] ; then
233 # Initial installation
234 for svc in volume api scheduler; do
235 /sbin/chkconfig --add openstack-cinder-$svc
240 if [ $1 -eq 0 ] ; then
241 for svc in volume api scheduler; do
242 /sbin/service openstack-cinder-${svc} stop > /dev/null 2>&1
243 /sbin/chkconfig --del openstack-cinder-${svc}
248 if [ $1 -ge 1 ] ; then
249 # Package upgrade, not uninstall
250 for svc in volume api scheduler; do
251 /sbin/service openstack-cinder-${svc} condrestart > /dev/null 2>&1 || :
258 %dir %{_sysconfdir}/cinder
259 %config(noreplace) %attr(-, root, cinder) %{_sysconfdir}/cinder/cinder.conf
260 %config(noreplace) %attr(-, root, cinder) %{_sysconfdir}/cinder/api-paste.ini
261 %config(noreplace) %attr(-, root, cinder) %{_sysconfdir}/cinder/rootwrap.conf
262 %config(noreplace) %attr(-, root, cinder) %{_sysconfdir}/cinder/policy.json
263 %config(noreplace) %{_sysconfdir}/logrotate.d/openstack-cinder
264 %config(noreplace) %{_sysconfdir}/sudoers.d/cinder
265 %config(noreplace) %{_sysconfdir}/tgt/conf.d/cinder.conf
267 %dir %attr(0755, cinder, root) %{_localstatedir}/log/cinder
268 %dir %attr(0755, cinder, root) %{_localstatedir}/run/cinder
269 %dir %attr(0755, cinder, root) %{_sysconfdir}/cinder/volumes
272 %{_initrddir}/openstack-cinder-*
273 %{_datarootdir}/cinder
274 %{_mandir}/man1/cinder*.1.gz
276 %defattr(-, cinder, cinder, -)
277 %dir %{_sharedstatedir}/cinder
278 %dir %{_sharedstatedir}/cinder/tmp
280 %files -n python-cinder
282 %{python_sitelib}/cinder
283 %{python_sitelib}/cinder-%{version}*.egg-info
291 * Mon Jul 22 2013 Pádraig Brady <pbrady@redhat.com> - 2013.1.2-4
292 - Add dependency on python-suds to support the netapp driver
293 - Add dependency on python-keystoneclient for auth token middleware
294 - Add dependency on python-oslo-config new in Grizzly
295 - Add dependency on qemu-img for volume creation from Glance images
297 * Wed Jul 17 2013 Pádraig Brady <pbrady@redhat.com> - 2013.1.2-2
298 - Avoid qpid exchange leaks
300 * Mon Jun 20 2013 Eric Harney <eharney@redhat.com> - 2013.1.2-1
301 - Update to Grizzly stable release 2
303 * Fri May 10 2013 Eric Harney <eharney@redhat.com> - 2013.1.1-1
304 - Update to Grizzly stable release 1
306 * Mon Apr 08 2013 Eric Harney <eharney@redhat.com> - 2013.1-2
307 - Backport fix for GlusterFS driver get_volume_stats
308 - Adjust to support sqlalchemy-0.8.0
310 * Thu Apr 04 2013 Eric Harney <eharney@redhat.com> - 2013.1-1
311 - Update to Grizzly final release
313 * Mon Mar 27 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.5.rc3
314 - Update to Grizzly RC3 release
316 * Mon Mar 25 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.5.rc2
317 - Update to Grizzly RC2 release
319 * Mon Mar 18 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.5.rc1
320 - Update to Grizzly RC1 release
322 * Tue Mar 05 2013 Pádraig Brady <P@draigBrady.com> - 2013.1-0.4.g3
323 - Add dependency on python-stevedore
325 * Wed Feb 27 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.2.g3
326 - Update to Grizzly milestone 3
328 * Thu Jan 10 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.1.g2
329 - Update to Grizzly milestone 2
331 * Thu Dec 20 2012 Eric Harney <eharney@redhat.com> - 2013.1-0.1.g1
332 - Update to Grizzly milestone 1
334 * Mon Dec 03 2012 Eric Harney <eharney@redhat.com> - 2012.2.1-1
335 - Update to Folsom stable release 1
337 * Wed Nov 14 2012 Eric Harney <eharney@redhat.com> - 2012.2-4
338 - Remove unused dependency on python-daemon
340 * Wed Oct 31 2012 Pádraig Brady <P@draigBrady.com> - 2012.2-3
341 - Adjust to be compatible with python-migrate-0.6
343 * Wed Oct 24 2012 Pádraig Brady <P@draigBrady.com> - 2012.2-2
344 - Initial Folsom release