forked from griddynamics/openstack-rhel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
openstack-glance.spec
307 lines (231 loc) · 9.68 KB
/
openstack-glance.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
%global with_doc 1
%global prj glance
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%endif
Name: openstack-%{prj}
Version: 2011.3
Release: 0.1.bzr116%{?dist}
Summary: OpenStack Image Registry and Delivery Service
Group: Development/Languages
License: ASL 2.0
URL: http://%{prj}.openstack.org
Source0: http://glance.openstack.org/tarballs/glance-%{version}~bzr116.tar.gz
Source1: %{name}-api.init
Source2: %{name}-registry.init
Source3: %{name}-logging-api.conf
Source4: %{name}-logging-registry.conf
Patch1: %{name}-configs.patch
BuildRoot: %{_tmppath}/%{prj}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: python-devel
BuildRequires: python-setuptools
Requires(post): chkconfig
Requires(postun): initscripts
Requires(preun): chkconfig
Requires(pre): shadow-utils
Requires: python-%{prj} = %{version}-%{release}
%description
The Glance project provides services for discovering, registering, and
retrieving virtual machine images. Glance has a RESTful API that allows
querying of VM image metadata as well as retrieval of the actual image.
This package contains the API server and a reference implementation registry
server, along with a client library.
%package -n python-%{prj}
Summary: Glance Python libraries
Group: Applications/System
Requires: python-anyjson
Requires: python-argparse
Requires: python-daemon = 1.5.5
Requires: python-eventlet >= 0.9.12
Requires: python-gflags >= 1.3
Requires: python-lockfile = 0.8
Requires: python-mox >= 0.5.0
Requires: python-routes
Requires: python-sqlalchemy >= 0.6.3
Requires: python-webob
%description -n python-%{prj}
The Glance project provides services for discovering, registering, and
retrieving virtual machine images. Glance has a RESTful API that allows
querying of VM image metadata as well as retrieval of the actual image.
This package contains the project's Python library.
%if 0%{?with_doc}
%package doc
Summary: Documentation for OpenStack Glance
Group: Documentation
BuildRequires: python-sphinx
BuildRequires: python-nose
# Required to build module documents
BuildRequires: python-boto
BuildRequires: python-daemon
BuildRequires: python-eventlet
BuildRequires: python-gflags
BuildRequires: python-routes
BuildRequires: python-sqlalchemy
BuildRequires: python-webob
%description doc
The Glance project provides services for discovering, registering, and
retrieving virtual machine images. Glance has a RESTful API that allows
querying of VM image metadata as well as retrieval of the actual image.
This package contains documentation files for OpenStack Glance.
%endif
%prep
%setup -q -n %{prj}-%{version}
%patch1 -p1
%build
%{__python} setup.py build
%install
rm -rf %{buildroot}
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
# Delete tests
rm -fr %{buildroot}%{python_sitelib}/tests
%if 0%{?with_doc}
export PYTHONPATH="$( pwd ):$PYTHONPATH"
pushd doc
sphinx-build -b html source build/html
popd
# Fix hidden-file-or-dir warnings
rm -fr doc/build/html/.doctrees doc/build/html/.buildinfo
%endif
# Setup directories
install -d -m 755 %{buildroot}%{_sharedstatedir}/%{prj}/images
# Config file
install -p -D -m 644 etc/%{prj}.conf.sample %{buildroot}%{_sysconfdir}/%{prj}/%{prj}.conf
install -p -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/%{prj}/logging-api.conf
install -p -D -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/%{prj}/logging-registry.conf
# Initscripts
install -p -D -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name}-api
install -p -D -m 755 %{SOURCE2} %{buildroot}%{_initrddir}/%{name}-registry
# Install pid directory
install -d -m 755 %{buildroot}%{_localstatedir}/run/%{prj}
# Install log directory
install -d -m 755 %{buildroot}%{_localstatedir}/log/%{prj}
%clean
rm -rf %{buildroot}
%pre
getent group %{prj} >/dev/null || groupadd -r %{prj}
getent passwd %{prj} >/dev/null || \
useradd -r -g %{prj} -d %{_sharedstatedir}/%{prj} -s /sbin/nologin \
-c "OpenStack Glance Daemons" %{prj}
exit 0
%post
/sbin/chkconfig --add openstack-%{prj}-api
/sbin/chkconfig --add openstack-%{prj}-registry
%preun
if [ $1 = 0 ] ; then
/sbin/service openstack-%{prj}-api stop
/sbin/chkconfig --del openstack-%{prj}-api
/sbin/service openstack-%{prj}-registry stop
/sbin/chkconfig --del openstack-%{prj}-registry
fi
%files
%defattr(-,root,root,-)
%doc README
%{_bindir}/%{prj}
%{_bindir}/%{prj}-api
%{_bindir}/%{prj}-control
%{_bindir}/%{prj}-manage
%{_bindir}/%{prj}-registry
%{_bindir}/%{prj}-upload
%{_initrddir}/%{name}-api
%{_initrddir}/%{name}-registry
%defattr(-,%{prj},nobody,-)
%config(noreplace) %{_sysconfdir}/%{prj}/%{prj}.conf
%config(noreplace) %{_sysconfdir}/%{prj}/logging-api.conf
%config(noreplace) %{_sysconfdir}/%{prj}/logging-registry.conf
%{_sharedstatedir}/%{prj}
%dir %attr(0755, %{prj}, nobody) %{_localstatedir}/log/%{prj}
%dir %attr(0755, %{prj}, nobody) %{_localstatedir}/run/%{prj}
%files -n python-%{prj}
%{python_sitelib}/%{prj}
%{python_sitelib}/%{prj}-%{version}-*.egg-info
%if 0%{?with_doc}
%files doc
%defattr(-,root,root,-)
%doc ChangeLog
%doc doc/build/html
%endif
%changelog
* Fri Apr 15 2011 Andrey Brindeyev <[email protected]> - 2011.3-0.1.bzr116
- Diablo versioning
* Fri Apr 15 2011 Mr. Jenkins GD <[email protected]> - 2011.2-0.30.bzr114
- Update to bzr114
* Thu Apr 14 2011 Mr. Jenkins GD <[email protected]> - 2011.2-0.29.bzr113
- Update to bzr113
* Wed Apr 13 2011 Mr. Jenkins GD <[email protected]> - 2011.2-0.28.bzr112
- Update to bzr112
* Wed Apr 13 2011 Mr. Jenkins GD <[email protected]> - 2011.2-0.27.bzr111
- Update to bzr111
* Tue Apr 12 2011 Mr. Jenkins GD <[email protected]> - 2011.2-0.26.bzr109
- Update to bzr109
* Tue Apr 12 2011 Mr. Jenkins GD <[email protected]> - 2011.2-0.25.bzr108
- Update to bzr108
* Mon Apr 11 2011 Mr. Jenkins GD <[email protected]> - 2011.2-0.24.bzr107
- Update to bzr107
* Mon Apr 11 2011 Mr. Jenkins GD <[email protected]> - 2011.2-0.23.bzr106
- Update to bzr106
* Thu Apr 07 2011 Mr. Jenkins GD <[email protected]> - 2011.2-0.22.bzr104
- Update to bzr104
* Wed Apr 06 2011 Mr. Jenkins GD <[email protected]> - 2011.2-0.21.bzr103
- Update to bzr103
* Wed Apr 06 2011 Mr. Jenkins GD <[email protected]> - 2011.2-0.20.bzr102
- Update to bzr102
* Wed Apr 06 2011 Mr. Jenkins GD <[email protected]> - 2011.2-0.19.bzr101
- Update to bzr101
* Thu Mar 31 2011 Andrey Brindeyev <[email protected]> - 2011.2-0.18.bzr100
- Added missed files
* Thu Mar 31 2011 Andrey Brindeyev <[email protected]> - 2011.2-0.17.bzr100
- Added new initscripts
- Changed default logging configuration
* Thu Mar 31 2011 Andrey Brindeyev <[email protected]> - 2011.2-0.16.bzr100
- fixed path to SQLite db in default config
* Tue Mar 29 2011 Mr. Jenkins GD <[email protected]> - 2011.2-0.15.bzr100
- Update to bzr100
* Tue Mar 29 2011 Andrey Brindeyev <[email protected]> - 2011.2-0.14.bzr99
- Uncommented Changelog back
* Tue Mar 29 2011 Mr. Jenkins GD <[email protected]> - 2011.2-0.13.bzr99
- Update to bzr99
* Fri Mar 25 2011 Andrey Brindeyev <[email protected]> - 2011.2-0.12.bzr96
- Update to bzr96
- Temporary commented Changelog in %doc
* Thu Mar 24 2011 Andrey Brindeyev <[email protected]> - 2011.2-0.11.bzr95
- Update to bzr95
* Mon Mar 21 2011 Andrey Brindeyev <[email protected]> - 2011.2-0.10.bzr93
- Added /var/lib/glance and subdirs to include images in package
* Mon Mar 21 2011 Andrey Brindeyev <[email protected]> - 2011.2-0.9.bzr93
- Update to bzr93
* Mon Mar 21 2011 Andrey Brindeyev <[email protected]> - 2011.2-0.8.bzr92
- Update to bzr92
* Thu Mar 17 2011 Andrey Brindeyev <[email protected]> - 2011.2-0.7.bzr90
- Added ChangeLog
* Thu Mar 17 2011 Andrey Brindeyev <[email protected]> - 2011.2-0.6.bzr90
- Update to bzr90
* Wed Mar 16 2011 Andrey Brindeyev <[email protected]> - 2011.2-0.5.bzr88
- Update to bzr88
* Wed Mar 16 2011 Andrey Brindeyev <[email protected]> - 2011.2-0.4.bzr87
- Default configs patched
* Wed Mar 16 2011 Andrey Brindeyev <[email protected]> - 2011.2-0.3.bzr87
- Added new config files
* Wed Mar 16 2011 Andrey Brindeyev <[email protected]> - 2011.2-0.2.bzr87
- Config file moved from /etc/nova to /etc/glance
* Wed Mar 16 2011 Andrey Brindeyev <[email protected]> - 2011.2-0.1.bzr87
- pre-Cactus version
* Mon Feb 07 2011 Andrey Brindeyev <[email protected]> - 0.1.7-1
- Release 0.1.7
* Thu Jan 27 2011 Andrey Brindeyev <[email protected]> - 0.1.5-1
- Release 0.1.5
* Wed Jan 26 2011 Andrey Brindeyev <[email protected]> - 0.1.4-1
- Release 0.1.4
* Mon Jan 24 2011 Andrey Brindeyev <[email protected]> - 0.1.3-2
- Changed description (thanks to Jay Pipes)
- Added python-argparse to deps, required by /usr/bin/glance-upload
* Mon Jan 24 2011 Andrey Brindeyev <[email protected]> - 0.1.3-1
- Release 0.1.3
- Added glance-upload to openstack-glance package
* Fri Jan 21 2011 Andrey Brindeyev <[email protected]> - 0.1.2-3
- Added pid directory
- Relocated log to /var/log/glance/glance.log
* Fri Jan 21 2011 Andrey Brindeyev <[email protected]> - 0.1.2-2
- Changed permissions on initscript
* Thu Jan 20 2011 Andrey Brindeyev <[email protected]> - 0.1.2-1
- Initial build