-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathopenstack-glance.spec
More file actions
371 lines (277 loc) · 11.9 KB
/
openstack-glance.spec
File metadata and controls
371 lines (277 loc) · 11.9 KB
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
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
%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.20110728.r145%{?dist}
Summary: OpenStack Image Registry and Delivery Service
Group: Development/Languages
License: ASL 2.0
Vendor: Grid Dynamics Consulting Services, Inc.
URL: http://%{prj}.openstack.org
Source0: http://glance.openstack.org/tarballs/glance-2011.3~d3~20110728.r145.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-boto >= 1.9b
Requires: python-daemon = 1.5.5
Requires: python-eventlet >= 0.9.12
Requires: python-gflags >= 1.3
Requires: python-greenlet >= 0.3.1
Requires: python-lockfile = 0.8
Requires: python-mox >= 0.5.0
Requires: python-paste-deploy
Requires: python-routes
Requires: python-sqlalchemy >= 0.6.3
Requires: python-webob >= 1.0.8
Requires: pyxattr >= 0.6.0
Requires: python-kombu
%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}-api.conf %{buildroot}%{_sysconfdir}/%{prj}/%{prj}-api.conf
install -p -D -m 644 etc/%{prj}-registry.conf %{buildroot}%{_sysconfdir}/%{prj}/%{prj}-registry.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
%{_bindir}/%{prj}-cache-prefetcher
%{_bindir}/%{prj}-cache-pruner
%{_bindir}/%{prj}-cache-reaper
%{_bindir}/%{prj}-scrubber
%{_initrddir}/%{name}-api
%{_initrddir}/%{name}-registry
%defattr(-,%{prj},nobody,-)
%config(noreplace) %{_sysconfdir}/%{prj}/%{prj}-api.conf
%config(noreplace) %{_sysconfdir}/%{prj}/%{prj}-registry.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
- Update to bzr134
- Update to bzr133
- Update to bzr132
- Update to bzr131
- Update to bzr130
- Update to bzr129
- Update to bzr128
- Update to bzr126
- Update to bzr125
- Update to bzr124
- Update to bzr123
- Update to bzr122
- Update to bzr121
- Update to bzr120
- Update to bzr119
- Update to bzr118
- Update to bzr117
- Diablo versioning
- Update to bzr114
- Update to bzr113
- Update to bzr112
- Update to bzr111
- Update to bzr109
- Update to bzr108
- Update to bzr107
- Update to bzr106
- Update to bzr104
- Update to bzr103
- Update to bzr102
- Update to bzr101
- Added missed files
- Added new initscripts
- Changed default logging configuration
- fixed path to SQLite db in default config
- Update to bzr100
- Uncommented Changelog back
- Update to bzr99
- Update to bzr96
- Temporary commented Changelog in %doc
- Update to bzr95
- Added /var/lib/glance and subdirs to include images in package
- Update to bzr93
- Update to bzr92
- Added ChangeLog
- Update to bzr90
- Update to bzr88
- Default configs patched
- Added new config files
- Config file moved from /etc/nova to /etc/glance
- pre-Cactus version
- Release 0.1.7
- Release 0.1.5
- Release 0.1.4
- Changed description (thanks to Jay Pipes)
- Added python-argparse to deps, required by /usr/bin/glance-upload
- Release 0.1.3
- Added glance-upload to openstack-glance package
- Added pid directory
- Relocated log to /var/log/glance/glance.log
- Changed permissions on initscript
- Initial build