]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without java # Java binding | |
4 | %bcond_with zfs # ZFS support [needs zfs.pc, not provided yet(?)] | |
5 | # | |
6 | Summary: User space components of the Ceph file system | |
7 | Summary(pl.UTF-8): Działające w przestrzeni użytkownika elementy systemu plików Ceph | |
8 | Name: ceph | |
9 | Version: 0.81 | |
10 | Release: 1 | |
11 | License: LGPL v2.1 (libraries), GPL v2 (some programs) | |
12 | Group: Base | |
13 | Source0: http://ceph.com/download/%{name}-%{version}.tar.bz2 | |
14 | # Source0-md5: 5020b63746ccbaa454aab09450ee7a43 | |
15 | Patch0: %{name}-init-fix.patch | |
16 | Patch1: %{name}.logrotate.patch | |
17 | URL: http://ceph.com/ | |
18 | BuildRequires: autoconf >= 2.59 | |
19 | BuildRequires: automake | |
20 | BuildRequires: boost-devel >= 1.34 | |
21 | BuildRequires: cryptopp-devel | |
22 | BuildRequires: curl-devel | |
23 | BuildRequires: expat-devel >= 1.95 | |
24 | BuildRequires: fcgi-devel | |
25 | BuildRequires: gdbm-devel | |
26 | %if %{with java} | |
27 | BuildRequires: jdk | |
28 | %endif | |
29 | BuildRequires: keyutils-devel | |
30 | BuildRequires: leveldb-devel | |
31 | BuildRequires: libaio-devel | |
32 | BuildRequires: libatomic_ops | |
33 | BuildRequires: libblkid-devel | |
34 | BuildRequires: libedit-devel >= 2.11 | |
35 | BuildRequires: libfuse-devel | |
36 | BuildRequires: libltdl-devel | |
37 | BuildRequires: libs3-devel | |
38 | BuildRequires: libstdc++-devel | |
39 | BuildRequires: libtcmalloc-devel | |
40 | BuildRequires: libtool >= 2:1.5 | |
41 | BuildRequires: libuuid-devel | |
42 | BuildRequires: perl-base | |
43 | BuildRequires: pkgconfig | |
44 | BuildRequires: python >= 1:2.4 | |
45 | BuildRequires: rpmbuild(macros) >= 1.228 | |
46 | BuildRequires: snappy-devel | |
47 | BuildRequires: xfsprogs-devel | |
48 | %ifarch %{x8664} | |
49 | BuildRequires: yasm | |
50 | %endif | |
51 | %{?with_zfs:BuildRequires: zfs-devel} | |
52 | Requires(post,preun): /sbin/chkconfig | |
53 | Requires(preun): rc-scripts | |
54 | Requires: %{name}-libs = %{version}-%{release} | |
55 | Obsoletes: gcephtool | |
56 | Obsoletes: hadoop-cephfs | |
57 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
58 | ||
59 | %define skip_post_check_so libcls_.*.so.* libec_.*.so.* | |
60 | ||
61 | %description | |
62 | Ceph is a distributed network file system designed to provide | |
63 | excellent performance, reliability, and scalability. | |
64 | ||
65 | %description -l pl.UTF-8 | |
66 | Ceph to rozproszony sieciowy system plików zaprojektowany z myślą o | |
67 | dobrej wydajności, wiarygodności i skalowalności. | |
68 | ||
69 | %package libs | |
70 | Summary: Ceph shared libraries | |
71 | Summary(pl.UTF-8): Biblioteki współdzielone Cepha | |
72 | Group: Libraries | |
73 | ||
74 | %description libs | |
75 | Ceph shared libraries. | |
76 | ||
77 | %description libs -l pl.UTF-8 | |
78 | Biblioteki współdzielone Cepha. | |
79 | ||
80 | %package devel | |
81 | Summary: Ceph header files | |
82 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek Cepha | |
83 | License: LGPL v2.1 | |
84 | Group: Development/Libraries | |
85 | Requires: %{name}-libs = %{version}-%{release} | |
86 | Requires: boost-devel >= 1.34 | |
87 | Requires: cryptopp-devel | |
88 | Requires: leveldb-devel | |
89 | Requires: libatomic_ops | |
90 | Requires: libuuid-devel | |
91 | ||
92 | %description devel | |
93 | This package contains the headers needed to develop programs that use | |
94 | Ceph. | |
95 | ||
96 | %description devel -l pl.UTF-8 | |
97 | Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów | |
98 | wykorzystujących Cepha. | |
99 | ||
100 | %package static | |
101 | Summary: Ceph static libraries | |
102 | Summary(pl.UTF-8): Biblioteki statyczne Cepha | |
103 | License: LGPL v2.1 | |
104 | Group: Development/Libraries | |
105 | Requires: %{name}-devel = %{version}-%{release} | |
106 | ||
107 | %description static | |
108 | This package contains static Ceph libraries. | |
109 | ||
110 | %description static -l pl.UTF-8 | |
111 | Ten pakiet zawiera biblioteki statyczne Cepha. | |
112 | ||
113 | %package -n python-ceph | |
114 | Summary: Ceph Python bindings | |
115 | Summary(pl.UTF-8): Wiązania Pythona do bibliotek Cepha | |
116 | Group: Development/Languages/Python | |
117 | Requires: %{name}-libs = %{version}-%{release} | |
118 | ||
119 | %description -n python-ceph | |
120 | Ceph Python bindings. | |
121 | ||
122 | %description -n python-ceph -l pl.UTF-8 | |
123 | Wiązania Pythona do bibliotek Cepha. | |
124 | ||
125 | %package -n java-cephfs | |
126 | Summary: CephFS Java bindings | |
127 | Summary(pl.UTF-8): Wiązania Javy do biblioteki CephFS | |
128 | Group: Libraries/Java | |
129 | Requires: %{name}-libs = %{version}-%{release} | |
130 | ||
131 | %description -n java-cephfs | |
132 | CephFS Java bindings. | |
133 | ||
134 | %description -n java-cephfs -l pl.UTF-8 | |
135 | Wiązania Javy do biblioteki CephFS. | |
136 | ||
137 | %package fuse | |
138 | Summary: Ceph FUSE-based client | |
139 | Summary(pl.UTF-8): Klient Cepha oparty na FUSE | |
140 | Group: Base | |
141 | Requires: %{name} = %{version}-%{release} | |
142 | ||
143 | %description fuse | |
144 | FUSE based client for Ceph distributed network file system. | |
145 | ||
146 | %description fuse -l pl.UTF-8 | |
147 | Oparty na FUSE klient rozproszonego sieciowego systemu plików Ceph. | |
148 | ||
149 | %package radosgw | |
150 | Summary: rados REST gateway | |
151 | Summary(pl.UTF-8): Bramka REST-owa rados | |
152 | Group: Applications/System | |
153 | #Requires: apache-mod_fcgid | |
154 | ||
155 | %description radosgw | |
156 | radosgw is an S3 HTTP REST gateway for the RADOS object store. It is | |
157 | implemented as a FastCGI module using libfcgi, and can be used in | |
158 | conjunction with any FastCGI capable web server. | |
159 | ||
160 | %description radosgw -l pl.UTF-8 | |
161 | radosgw to REST-owa bramka HTTP S3 do przechowalni obiektów RADOS. | |
162 | Jest zaimplementowana jako moduł FastCGI wykorzystujący libfcgi i może | |
163 | być używana w połączeniu z dowolnym serwerem WWW obsługującym FastCGI. | |
164 | ||
165 | %package resource-agents | |
166 | Summary: OCF Resource Agents for Ceph processes | |
167 | Summary(pl.UTF-8): Agenci OCF do monitorowania procesów Cepha | |
168 | Group: Applications/System | |
169 | Requires: %{name} = %{version}-%{release} | |
170 | Requires: resource-agents | |
171 | ||
172 | %description resource-agents | |
173 | OCF Resource Agents for Ceph processes. | |
174 | ||
175 | %description resource-agents -l pl.UTF-8 | |
176 | Agenci OCF do monitorowania procesów Cepha. | |
177 | ||
178 | %prep | |
179 | %setup -q | |
180 | %patch0 -p1 | |
181 | %patch1 -p1 | |
182 | ||
183 | %build | |
184 | %{__libtoolize} | |
185 | %{__aclocal} -I m4 | |
186 | %{__autoconf} | |
187 | %{__autoheader} | |
188 | %{__automake} | |
189 | # ac_cv_prog_uudecode_base64=no is a hack to compile Test.class instead of | |
190 | # using included one which fails with Sun/Oracle JDK 1.6 | |
191 | %configure \ | |
192 | %{?with_java:JAVAC=/usr/bin/javac} \ | |
193 | ac_cv_prog_uudecode_base64=no \ | |
194 | --sbindir=/sbin \ | |
195 | --with-cryptopp \ | |
196 | %{?with_zfs:--with-libzfs} \ | |
197 | --with-ocf \ | |
198 | --with-radosgw \ | |
199 | --with-system-leveldb \ | |
200 | --with-system-libs3 \ | |
201 | %{?with_java:--enable-cephfs-java --with-jdk-dir=%{_jvmdir}/java} \ | |
202 | --disable-silent-rules | |
203 | ||
204 | %{__make} | |
205 | ||
206 | %install | |
207 | rm -rf $RPM_BUILD_ROOT | |
208 | install -d $RPM_BUILD_ROOT%{_localstatedir}/{lib/ceph/tmp,log/ceph/stat} \ | |
209 | $RPM_BUILD_ROOT%{_sysconfdir}/{ceph,bash_completion.d,logrotate.d,rc.d/init.d} | |
210 | ||
211 | %{__make} install \ | |
212 | DESTDIR=$RPM_BUILD_ROOT \ | |
213 | javadir=%{_javadir} | |
214 | ||
215 | install -p src/init-ceph $RPM_BUILD_ROOT/etc/rc.d/init.d/ceph | |
216 | install -p src/logrotate.conf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/ceph | |
217 | ||
218 | # loadable modules | |
219 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ceph/erasure-code/*.{a,la} | |
220 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/rados-classes/*.{a,la} | |
221 | %if %{with java} | |
222 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libcephfs_jni.{la,a} | |
223 | %endif | |
224 | ||
225 | # packaged as %doc | |
226 | %{__rm} $RPM_BUILD_ROOT%{_docdir}/ceph/sample.{ceph.conf,fetch_config} | |
227 | ||
228 | %py_postclean | |
229 | ||
230 | %clean | |
231 | rm -rf $RPM_BUILD_ROOT | |
232 | ||
233 | %post | |
234 | /sbin/chkconfig --add ceph | |
235 | %service ceph restart | |
236 | ||
237 | %preun | |
238 | if [ "$1" = "0" ] ; then | |
239 | %service ceph stop | |
240 | /sbin/chkconfig --del ceph | |
241 | fi | |
242 | ||
243 | %post libs -p /sbin/ldconfig | |
244 | %postun libs -p /sbin/ldconfig | |
245 | ||
246 | %post -n java-cephfs -p /sbin/ldconfig | |
247 | %postun -n java-cephfs -p /sbin/ldconfig | |
248 | ||
249 | %files | |
250 | %defattr(644,root,root,755) | |
251 | # COPYING specifies licenses of individual parts | |
252 | %doc AUTHORS COPYING README src/sample.ceph.conf src/sample.fetch_config | |
253 | %attr(754,root,root) /etc/rc.d/init.d/ceph | |
254 | %dir %{_sysconfdir}/ceph | |
255 | %attr(755,root,root) %{_bindir}/ceph | |
256 | %attr(755,root,root) %{_bindir}/ceph-authtool | |
257 | %attr(755,root,root) %{_bindir}/ceph-brag | |
258 | %attr(755,root,root) %{_bindir}/ceph-clsinfo | |
259 | %attr(755,root,root) %{_bindir}/ceph-conf | |
260 | %attr(755,root,root) %{_bindir}/ceph-coverage | |
261 | %attr(755,root,root) %{_bindir}/ceph-crush-location | |
262 | %attr(755,root,root) %{_bindir}/ceph-debugpack | |
263 | %attr(755,root,root) %{_bindir}/ceph-dencoder | |
264 | %attr(755,root,root) %{_bindir}/ceph-mds | |
265 | %attr(755,root,root) %{_bindir}/ceph-mon | |
266 | %attr(755,root,root) %{_bindir}/ceph-osd | |
267 | %attr(755,root,root) %{_bindir}/ceph-post-file | |
268 | %attr(755,root,root) %{_bindir}/ceph-rbdnamer | |
269 | %attr(755,root,root) %{_bindir}/ceph-rest-api | |
270 | %attr(755,root,root) %{_bindir}/ceph-run | |
271 | %attr(755,root,root) %{_bindir}/ceph-syn | |
272 | %attr(755,root,root) %{_bindir}/ceph_filestore_dump | |
273 | %attr(755,root,root) %{_bindir}/ceph_filestore_tool | |
274 | %attr(755,root,root) %{_bindir}/ceph_mon_store_converter | |
275 | %attr(755,root,root) %{_bindir}/cephfs | |
276 | %attr(755,root,root) %{_bindir}/crushtool | |
277 | %attr(755,root,root) %{_bindir}/librados-config | |
278 | %attr(755,root,root) %{_bindir}/monmaptool | |
279 | %attr(755,root,root) %{_bindir}/osdmaptool | |
280 | %attr(755,root,root) %{_bindir}/rados | |
281 | %attr(755,root,root) %{_bindir}/rbd | |
282 | %attr(755,root,root) %{_bindir}/rbd-fuse | |
283 | %attr(755,root,root) /sbin/ceph-create-keys | |
284 | %attr(755,root,root) /sbin/ceph-disk | |
285 | %attr(755,root,root) /sbin/ceph-disk-activate | |
286 | %attr(755,root,root) /sbin/ceph-disk-prepare | |
287 | %attr(755,root,root) /sbin/ceph-disk-udev | |
288 | %attr(755,root,root) /sbin/mount.ceph | |
289 | %attr(755,root,root) /sbin/mount.fuse.ceph | |
290 | %dir %{_libdir}/ceph | |
291 | %{_libdir}/ceph/ceph_common.sh | |
292 | %dir %{_libdir}/ceph/erasure-code | |
293 | %attr(755,root,root) %{_libdir}/ceph/erasure-code/libec_example.so* | |
294 | %attr(755,root,root) %{_libdir}/ceph/erasure-code/libec_fail_to_initialize.so* | |
295 | %attr(755,root,root) %{_libdir}/ceph/erasure-code/libec_fail_to_register.so* | |
296 | %attr(755,root,root) %{_libdir}/ceph/erasure-code/libec_hangs.so* | |
297 | %attr(755,root,root) %{_libdir}/ceph/erasure-code/libec_jerasure.so* | |
298 | %attr(755,root,root) %{_libdir}/ceph/erasure-code/libec_jerasure_generic.so* | |
299 | %attr(755,root,root) %{_libdir}/ceph/erasure-code/libec_jerasure_sse3.so* | |
300 | %attr(755,root,root) %{_libdir}/ceph/erasure-code/libec_jerasure_sse4.so* | |
301 | %attr(755,root,root) %{_libdir}/ceph/erasure-code/libec_missing_entry_point.so* | |
302 | %attr(755,root,root) %{_libdir}/ceph/erasure-code/libec_test_jerasure_generic.so* | |
303 | %attr(755,root,root) %{_libdir}/ceph/erasure-code/libec_test_jerasure_sse3.so* | |
304 | %attr(755,root,root) %{_libdir}/ceph/erasure-code/libec_test_jerasure_sse4.so* | |
305 | %dir %{_libdir}/rados-classes | |
306 | %attr(755,root,root) %{_libdir}/rados-classes/libcls_hello.so* | |
307 | %attr(755,root,root) %{_libdir}/rados-classes/libcls_kvs.so* | |
308 | %attr(755,root,root) %{_libdir}/rados-classes/libcls_lock.so* | |
309 | %attr(755,root,root) %{_libdir}/rados-classes/libcls_log.so* | |
310 | %attr(755,root,root) %{_libdir}/rados-classes/libcls_rbd.so* | |
311 | %attr(755,root,root) %{_libdir}/rados-classes/libcls_refcount.so* | |
312 | %attr(755,root,root) %{_libdir}/rados-classes/libcls_replica_log.so* | |
313 | %attr(755,root,root) %{_libdir}/rados-classes/libcls_rgw.so* | |
314 | %attr(755,root,root) %{_libdir}/rados-classes/libcls_statelog.so* | |
315 | %attr(755,root,root) %{_libdir}/rados-classes/libcls_user.so* | |
316 | %attr(755,root,root) %{_libdir}/rados-classes/libcls_version.so* | |
317 | %{_datadir}/ceph | |
318 | %config(noreplace) /etc/logrotate.d/ceph | |
319 | %config(noreplace) %{_sysconfdir}/bash_completion.d/rados | |
320 | %config(noreplace) %{_sysconfdir}/bash_completion.d/ceph | |
321 | %config(noreplace) %{_sysconfdir}/bash_completion.d/rbd | |
322 | %{_mandir}/man8/ceph.8* | |
323 | %{_mandir}/man8/ceph-authtool.8* | |
324 | %{_mandir}/man8/ceph-clsinfo.8* | |
325 | %{_mandir}/man8/ceph-conf.8* | |
326 | %{_mandir}/man8/ceph-debugpack.8* | |
327 | %{_mandir}/man8/ceph-dencoder.8* | |
328 | %{_mandir}/man8/ceph-mds.8* | |
329 | %{_mandir}/man8/ceph-mon.8* | |
330 | %{_mandir}/man8/ceph-osd.8* | |
331 | %{_mandir}/man8/ceph-post-file.8* | |
332 | %{_mandir}/man8/ceph-rbdnamer.8* | |
333 | %{_mandir}/man8/ceph-rest-api.8* | |
334 | %{_mandir}/man8/ceph-run.8* | |
335 | %{_mandir}/man8/ceph-syn.8* | |
336 | %{_mandir}/man8/cephfs.8* | |
337 | %{_mandir}/man8/crushtool.8* | |
338 | %{_mandir}/man8/librados-config.8* | |
339 | %{_mandir}/man8/monmaptool.8* | |
340 | %{_mandir}/man8/mount.ceph.8* | |
341 | %{_mandir}/man8/osdmaptool.8* | |
342 | %{_mandir}/man8/rados.8* | |
343 | %{_mandir}/man8/radosgw.8* | |
344 | %{_mandir}/man8/radosgw-admin.8* | |
345 | %{_mandir}/man8/rbd.8* | |
346 | %{_mandir}/man8/rbd-fuse.8* | |
347 | ||
348 | %dir %{_localstatedir}/lib/ceph | |
349 | %dir %{_localstatedir}/lib/ceph/tmp | |
350 | %dir %{_localstatedir}/log/ceph | |
351 | ||
352 | %files libs | |
353 | %defattr(644,root,root,755) | |
354 | %attr(755,root,root) %{_libdir}/libcephfs.so.*.*.* | |
355 | %attr(755,root,root) %ghost %{_libdir}/libcephfs.so.1 | |
356 | %attr(755,root,root) %{_libdir}/librados.so.*.*.* | |
357 | %attr(755,root,root) %ghost %{_libdir}/librados.so.2 | |
358 | %attr(755,root,root) %{_libdir}/librbd.so.*.*.* | |
359 | %attr(755,root,root) %ghost %{_libdir}/librbd.so.1 | |
360 | ||
361 | %files devel | |
362 | %defattr(644,root,root,755) | |
363 | %attr(755,root,root) %{_libdir}/libcephfs.so | |
364 | %attr(755,root,root) %{_libdir}/librados.so | |
365 | %attr(755,root,root) %{_libdir}/librbd.so | |
366 | %{_libdir}/libcephfs.la | |
367 | %{_libdir}/librados.la | |
368 | %{_libdir}/librbd.la | |
369 | %{_includedir}/cephfs | |
370 | %{_includedir}/rados | |
371 | %{_includedir}/rbd | |
372 | ||
373 | %files static | |
374 | %defattr(644,root,root,755) | |
375 | %{_libdir}/libcephfs.a | |
376 | %{_libdir}/librados.a | |
377 | %{_libdir}/librbd.a | |
378 | ||
379 | %files -n python-ceph | |
380 | %defattr(644,root,root,755) | |
381 | %{py_sitescriptdir}/ceph_argparse.py[co] | |
382 | %{py_sitescriptdir}/ceph_rest_api.py[co] | |
383 | %{py_sitescriptdir}/cephfs.py[co] | |
384 | %{py_sitescriptdir}/rados.py[co] | |
385 | %{py_sitescriptdir}/rbd.py[co] | |
386 | ||
387 | %if %{with java} | |
388 | %files -n java-cephfs | |
389 | %defattr(644,root,root,755) | |
390 | %attr(755,root,root) %{_libdir}/libcephfs_jni.so.*.*.* | |
391 | %attr(755,root,root) %ghost %{_libdir}/libcephfs_jni.so.1 | |
392 | %attr(755,root,root) %{_libdir}/libcephfs_jni.so | |
393 | %{_javadir}/libcephfs.jar | |
394 | %endif | |
395 | ||
396 | %files fuse | |
397 | %defattr(644,root,root,755) | |
398 | %attr(755,root,root) %{_bindir}/ceph-fuse | |
399 | %{_mandir}/man8/ceph-fuse.8* | |
400 | ||
401 | %files radosgw | |
402 | %defattr(644,root,root,755) | |
403 | %attr(755,root,root) %{_bindir}/radosgw | |
404 | %attr(755,root,root) %{_bindir}/radosgw-admin | |
405 | %{_sysconfdir}/bash_completion.d/radosgw-admin | |
406 | ||
407 | %files resource-agents | |
408 | %defattr(644,root,root,755) | |
409 | %dir %{_prefix}/lib/ocf/resource.d/ceph | |
410 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/ceph/ceph | |
411 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/ceph/mds | |
412 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/ceph/mon | |
413 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/ceph/osd | |
414 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/ceph/rbd |