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