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