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