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: 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.1
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
33 BuildRequires: intltool
34 BuildRequires: python-sphinx10
35 BuildRequires: python-setuptools
36 BuildRequires: python-netaddr
37 BuildRequires: openstack-utils
38 # These are required to build due to the requirements check added
39 BuildRequires: python-paste-deploy1.5
40 BuildRequires: python-routes1.12
41 BuildRequires: python-sqlalchemy0.7
42 BuildRequires: python-webob1.0
44 Requires: openstack-utils
45 Requires: python-cinder = %{version}-%{release}
48 Requires: python-cinderclient
50 Requires(post): chkconfig
51 Requires(postun): initscripts
52 Requires(preun): chkconfig
53 Requires(pre): shadow-utils
56 Requires: scsi-target-utils
59 OpenStack Volume (codename Cinder) provides services to manage and
60 access block storage volumes for use by Virtual Machine instances.
63 %package -n python-cinder
64 Summary: OpenStack Volume Python libraries
65 Group: Applications/System
69 Requires: MySQL-python
71 Requires: python-paramiko
74 Requires: python-kombu
75 Requires: python-amqplib
77 Requires: python-eventlet
78 Requires: python-greenlet
79 Requires: python-iso8601
80 Requires: python-netaddr
82 Requires: python-anyjson
83 Requires: python-cheetah
84 Requires: python-stevedore
86 Requires: python-sqlalchemy0.7
87 Requires: python-migrate
89 Requires: python-paste-deploy1.5
90 Requires: python-routes1.12
91 Requires: python-webob1.0
93 Requires: python-glanceclient >= 1:0
95 %description -n python-cinder
96 OpenStack Volume (codename Cinder) provides services to manage and
97 access block storage volumes for use by Virtual Machine instances.
99 This package contains the cinder Python library.
103 Summary: Documentation for OpenStack Volume
106 Requires: %{name} = %{version}-%{release}
108 BuildRequires: graphviz
110 # Required to build module documents
111 BuildRequires: python-eventlet
112 BuildRequires: python-routes1.12
113 BuildRequires: python-sqlalchemy0.7
114 BuildRequires: python-webob1.0
115 # while not strictly required, quiets the build down when building docs.
116 BuildRequires: python-migrate, python-iso8601
119 OpenStack Volume (codename Cinder) provides services to manage and
120 access block storage volumes for use by Virtual Machine instances.
122 This package contains documentation files for cinder.
126 %setup -q -n cinder-%{version}
132 find . \( -name .gitignore -o -name .placeholder \) -delete
134 find cinder -name \*.py -exec sed -i '/\/usr\/bin\/env python/{d;q}' {} +
136 # TODO: Have the following handle multi line entries
137 sed -i '/setup_requires/d; /install_requires/d; /dependency_links/d' setup.py
141 # Move authtoken configuration out of paste.ini
142 openstack-config --del etc/cinder/api-paste.ini filter:authtoken admin_tenant_name
143 openstack-config --del etc/cinder/api-paste.ini filter:authtoken admin_user
144 openstack-config --del etc/cinder/api-paste.ini filter:authtoken admin_password
145 openstack-config --del etc/cinder/api-paste.ini filter:authtoken auth_host
146 openstack-config --del etc/cinder/api-paste.ini filter:authtoken auth_port
147 openstack-config --del etc/cinder/api-paste.ini filter:authtoken auth_protocol
149 %{__python} setup.py build
152 %{__python} setup.py install -O1 --skip-build --root %{buildroot}
154 # docs generation requires everything to be installed first
155 export PYTHONPATH="$( pwd ):$PYTHONPATH"
160 SPHINX_DEBUG=1 sphinx-1.0-build -b html source build/html
161 # Fix hidden-file-or-dir warnings
162 rm -fr build/html/.doctrees build/html/.buildinfo
165 # Create dir link to avoid a sphinx-build exception
166 mkdir -p build/man/.doctrees/
167 ln -s . build/man/.doctrees/man
168 SPHINX_DEBUG=1 sphinx-1.0-build -b man -c source source/man build/man
169 mkdir -p %{buildroot}%{_mandir}/man1
170 install -p -D -m 644 build/man/*.1 %{buildroot}%{_mandir}/man1/
175 install -d -m 755 %{buildroot}%{_sharedstatedir}/cinder
176 install -d -m 755 %{buildroot}%{_sharedstatedir}/cinder/tmp
177 install -d -m 755 %{buildroot}%{_localstatedir}/log/cinder
179 # Install config files
180 install -d -m 755 %{buildroot}%{_sysconfdir}/cinder
181 install -p -D -m 640 %{SOURCE1} %{buildroot}%{_sysconfdir}/cinder/cinder.conf
182 install -d -m 755 %{buildroot}%{_sysconfdir}/cinder/volumes
183 install -p -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/tgt/conf.d/cinder.conf
184 install -p -D -m 640 etc/cinder/rootwrap.conf %{buildroot}%{_sysconfdir}/cinder/rootwrap.conf
185 install -p -D -m 640 etc/cinder/api-paste.ini %{buildroot}%{_sysconfdir}/cinder/api-paste.ini
186 install -p -D -m 640 etc/cinder/policy.json %{buildroot}%{_sysconfdir}/cinder/policy.json
188 # Install initscripts for services
189 install -p -D -m 755 %{SOURCE10} %{buildroot}%{_initrddir}/openstack-cinder-api
190 install -p -D -m 755 %{SOURCE11} %{buildroot}%{_initrddir}/openstack-cinder-scheduler
191 install -p -D -m 755 %{SOURCE12} %{buildroot}%{_initrddir}/openstack-cinder-volume
194 install -p -D -m 440 %{SOURCE20} %{buildroot}%{_sysconfdir}/sudoers.d/cinder
197 install -p -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-cinder
199 # Install pid directory
200 install -d -m 755 %{buildroot}%{_localstatedir}/run/cinder
202 # Install upstart jobs examples
203 install -d -m 755 %{buildroot}%{_datadir}/cinder
204 install -p -m 644 %{SOURCE100} %{buildroot}%{_datadir}/cinder/
205 install -p -m 644 %{SOURCE110} %{buildroot}%{_datadir}/cinder/
206 install -p -m 644 %{SOURCE120} %{buildroot}%{_datadir}/cinder/
208 # Install rootwrap files in /usr/share/cinder/rootwrap
209 mkdir -p %{buildroot}%{_datarootdir}/cinder/rootwrap/
210 install -p -D -m 644 etc/cinder/rootwrap.d/* %{buildroot}%{_datarootdir}/cinder/rootwrap/
212 # Remove unneeded in production stuff
213 rm -f %{buildroot}%{_bindir}/cinder-debug
214 rm -fr %{buildroot}%{python_sitelib}/cinder/tests/
215 rm -fr %{buildroot}%{python_sitelib}/run_tests.*
216 rm -f %{buildroot}/usr/share/doc/cinder/README*
219 getent group cinder >/dev/null || groupadd -r cinder --gid 165
220 if ! getent passwd cinder >/dev/null; then
221 useradd -u 165 -r -g cinder -G cinder,nobody -d %{_sharedstatedir}/cinder -s /sbin/nologin -c "OpenStack Cinder Daemons" cinder
226 if [ $1 -eq 1 ] ; then
227 # Initial installation
228 for svc in volume api scheduler; do
229 /sbin/chkconfig --add openstack-cinder-$svc
234 if [ $1 -eq 0 ] ; then
235 for svc in volume api scheduler; do
236 /sbin/service openstack-cinder-${svc} stop > /dev/null 2>&1
237 /sbin/chkconfig --del openstack-cinder-${svc}
242 if [ $1 -ge 1 ] ; then
243 # Package upgrade, not uninstall
244 for svc in volume api scheduler; do
245 /sbin/service openstack-cinder-${svc} condrestart > /dev/null 2>&1 || :
252 %dir %{_sysconfdir}/cinder
253 %config(noreplace) %attr(-, root, cinder) %{_sysconfdir}/cinder/cinder.conf
254 %config(noreplace) %attr(-, root, cinder) %{_sysconfdir}/cinder/api-paste.ini
255 %config(noreplace) %attr(-, root, cinder) %{_sysconfdir}/cinder/rootwrap.conf
256 %config(noreplace) %attr(-, root, cinder) %{_sysconfdir}/cinder/policy.json
257 %config(noreplace) %{_sysconfdir}/logrotate.d/openstack-cinder
258 %config(noreplace) %{_sysconfdir}/sudoers.d/cinder
259 %config(noreplace) %{_sysconfdir}/tgt/conf.d/cinder.conf
261 %dir %attr(0755, cinder, root) %{_localstatedir}/log/cinder
262 %dir %attr(0755, cinder, root) %{_localstatedir}/run/cinder
263 %dir %attr(0755, cinder, root) %{_sysconfdir}/cinder/volumes
266 %{_initrddir}/openstack-cinder-*
267 %{_datarootdir}/cinder
268 %{_mandir}/man1/cinder*.1.gz
270 %defattr(-, cinder, cinder, -)
271 %dir %{_sharedstatedir}/cinder
272 %dir %{_sharedstatedir}/cinder/tmp
274 %files -n python-cinder
276 %{python_sitelib}/cinder
277 %{python_sitelib}/cinder-%{version}*.egg-info
285 * Fri May 10 2013 Eric Harney <eharney@redhat.com> - 2013.1.1-1
286 - Update to Grizzly stable release 1
288 * Mon Apr 08 2013 Eric Harney <eharney@redhat.com> - 2013.1-2
289 - Backport fix for GlusterFS driver get_volume_stats
290 - Adjust to support sqlalchemy-0.8.0
292 * Thu Apr 04 2013 Eric Harney <eharney@redhat.com> - 2013.1-1
293 - Update to Grizzly final release
295 * Mon Mar 27 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.5.rc3
296 - Update to Grizzly RC3 release
298 * Mon Mar 25 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.5.rc2
299 - Update to Grizzly RC2 release
301 * Mon Mar 18 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.5.rc1
302 - Update to Grizzly RC1 release
304 * Tue Mar 05 2013 Pádraig Brady <P@draigBrady.com> - 2013.1-0.4.g3
305 - Add dependency on python-stevedore
307 * Wed Feb 27 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.2.g3
308 - Update to Grizzly milestone 3
310 * Thu Jan 10 2013 Eric Harney <eharney@redhat.com> - 2013.1-0.1.g2
311 - Update to Grizzly milestone 2
313 * Thu Dec 20 2012 Eric Harney <eharney@redhat.com> - 2013.1-0.1.g1
314 - Update to Grizzly milestone 1
316 * Mon Dec 03 2012 Eric Harney <eharney@redhat.com> - 2012.2.1-1
317 - Update to Folsom stable release 1
319 * Wed Nov 14 2012 Eric Harney <eharney@redhat.com> - 2012.2-4
320 - Remove unused dependency on python-daemon
322 * Wed Oct 31 2012 Pádraig Brady <P@draigBrady.com> - 2012.2-3
323 - Adjust to be compatible with python-migrate-0.6
325 * Wed Oct 24 2012 Pádraig Brady <P@draigBrady.com> - 2012.2-2
326 - Initial Folsom release