1
%define with_gtk2 %{?_with_gtk2: 1} %{!?_with_gtk2: 0}
4
# it seems there is no usable tcmalloc rpm for x86_64; parts of
5
# google-perftools don't compile on x86_64, and apparently the
6
# decision was to not build the package at all, even if tcmalloc
7
# itself would have worked just fine.
10
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
11
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
12
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
15
#################################################################################
17
#################################################################################
21
Summary: User space components of the Ceph file system
23
Group: System Environment/Base
24
URL: http://ceph.newdream.net/
25
Source0: http://ceph.newdream.net/download/%{name}-%{version}.tar.bz2
26
Requires: librbd1 = %{version}-%{release}
27
Requires: librados2 = %{version}-%{release}
28
Requires: libcephfs1 = %{version}-%{release}
29
Requires(post): binutils
30
BuildRoot: %{_tmppath}/%{name}-%{version}-build
31
BuildRequires: gcc-c++
32
BuildRequires: libtool
33
BuildRequires: boost-devel
34
BuildRequires: libedit-devel
37
BuildRequires: pkgconfig
39
BuildRequires: libaio-devel
40
BuildRequires: libcurl-devel
41
BuildRequires: libxml2-devel
43
#################################################################################
45
#################################################################################
46
%if 0%{defined suse_version}
47
BuildRequires: %insserv_prereq
49
BuildRequires: mozilla-nss-devel
50
BuildRequires: keyutils-devel
51
BuildRequires: libatomic-ops-devel
53
BuildRequires: nss-devel
54
BuildRequires: keyutils-libs-devel
55
BuildRequires: libatomic_ops-devel
56
Requires(post): chkconfig
57
Requires(preun):chkconfig
58
Requires(preun):initscripts
61
# use isa so this will not be satisfied by
62
# google-perftools-devel.i686 on a x86_64 box
63
# http://rpm.org/wiki/PackagerDocs/ArchDependencies
64
BuildRequires: google-perftools-devel%{?_isa}
68
Ceph is a distributed network file system designed to provide excellent
69
performance, reliability, and scalability.
71
#################################################################################
73
#################################################################################
75
Summary: Ceph fuse-based client
76
Group: System Environment/Base
77
Requires: %{name} = %{version}-%{release}
78
BuildRequires: fuse-devel
80
FUSE based client for Ceph distributed network file system
84
Group: Development/Libraries
86
Requires: %{name} = %{version}-%{release}
87
Requires: librados2 = %{version}
88
Requires: librbd1 = %{version}
89
Requires: libcephfs1 = %{version}
91
This package contains libraries and headers needed to develop programs
95
Summary: Rados REST gateway
96
Group: Development/Libraries
97
Requires: librados2 = %{version}-%{release}
98
%if 0%{defined suse_version}
99
BuildRequires: libexpat-devel
100
BuildRequires: FastCGI-devel
101
Requires: apache2-mod_fcgid
103
BuildRequires: expat-devel
104
BuildRequires: fcgi-devel
108
radosgw is an S3 HTTP REST gateway for the RADOS object store. It is
109
implemented as a FastCGI module using libfcgi, and can be used in
110
conjunction with any FastCGI capable web server.
113
Summary: synchronize data between cloud object storage providers or a local directory
114
Group: Productivity/Networking/Other
116
Requires: python, python-boto
118
obsync is a tool to synchronize objects between cloud object
119
storage providers, such as Amazon S3 (or compatible services), a
120
Ceph RADOS cluster, or a local directory.
124
Summary: Ceph graphical monitoring tool
125
Group: System Environment/Base
127
Requires: gtk2 gtkmm24
128
BuildRequires: gtk2-devel gtkmm24-devel
129
%description gcephtool
130
gcephtool is a graphical monitor for the clusters running the Ceph distributed
135
%package resource-agents
136
Summary: OCF-compliant resource agents for Ceph daemons
137
Group: System Environment/Base
139
Requires: %{name} = %{version}
140
Requires: resource-agents
141
%description resource-agents
142
Resource agents for monitoring and managing Ceph daemons
143
under Open Cluster Framework (OCF) compliant resource
144
managers such as Pacemaker.
147
%package -n librados2
148
Summary: RADOS distributed object store client library
149
Group: System Environment/Libraries
151
%description -n librados2
152
RADOS is a reliable, autonomic distributed object storage cluster
153
developed as part of the Ceph distributed storage system. This is a
154
shared library allowing applications to access the distributed object
155
store using a simple file-like interface.
158
Summary: RADOS block device client library
159
Group: System Environment/Libraries
161
Requires: librados2 = %{version}-%{release}
162
%description -n librbd1
163
RBD is a block device striped across multiple distributed objects in
164
RADOS, a reliable, autonomic distributed object storage cluster
165
developed as part of the Ceph distributed storage system. This is a
166
shared library allowing applications to manage these block devices.
168
%package -n libcephfs1
169
Summary: Ceph distributed file system client library
170
Group: System Environment/Libraries
172
%description -n libcephfs1
173
Ceph is a distributed network file system designed to provide excellent
174
performance, reliability, and scalability. This is a shared library
175
allowing applications to access a Ceph distributed file system via a
176
POSIX-like interface.
178
%package -n python-ceph
179
Summary: Python libraries for the Ceph distributed filesystem
180
Group: System Environment/Libraries
182
Requires: librados2 = %{version}-%{release}
183
Requires: librbd1 = %{version}-%{release}
184
Requires: libcephfs1 = %{version}-%{release}
185
%if 0%{defined suse_version}
188
%description -n python-ceph
189
This package contains Python libraries for interacting with Cephs RADOS
192
#################################################################################
194
#################################################################################
202
MY_CONF_OPT="$MY_CONF_OPT --with-radosgw"
205
MY_CONF_OPT="$MY_CONF_OPT --with-gtk2"
207
MY_CONF_OPT="$MY_CONF_OPT --without-gtk2"
210
export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/i386/i486/'`
212
# be explicit about --with/without-tcmalloc because the
213
# autoconf default differs from what's needed for rpm
214
%{configure} --prefix=/usr \
216
--localstatedir=/var \
218
--docdir=%{_docdir}/ceph \
222
%{?with_tcmalloc:--with-tcmalloc} %{!?with_tcmalloc:--without-tcmalloc} \
223
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS"
225
# fix bug in specific version of libedit-devel
226
%if 0%{defined suse_version}
227
sed -i -e "s/-lcurses/-lncurses/g" Makefile
228
sed -i -e "s/-lcurses/-lncurses/g" src/Makefile
229
sed -i -e "s/-lcurses/-lncurses/g" man/Makefile
232
make -j$(getconf _NPROCESSORS_ONLN)
235
make DESTDIR=$RPM_BUILD_ROOT install
236
rmdir $RPM_BUILD_ROOT/bin
237
rmdir $RPM_BUILD_ROOT/lib
238
rmdir $RPM_BUILD_ROOT/include
239
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
240
find $RPM_BUILD_ROOT -type f -name "*.a" -exec rm -f {} ';'
241
install -D src/init-ceph $RPM_BUILD_ROOT%{_initrddir}/ceph
242
install -D src/init-radosgw $RPM_BUILD_ROOT%{_initrddir}/ceph-radosgw
243
mkdir -p $RPM_BUILD_ROOT/usr/sbin
244
ln -sf ../../etc/init.d/ceph %{buildroot}/usr/sbin/rcceph
245
ln -sf ../../etc/init.d/ceph-radosgw %{buildroot}/usr/sbin/rcceph-radosgw
246
install -m 0644 -D src/logrotate.conf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/ceph
247
chmod 0644 $RPM_BUILD_ROOT%{_docdir}/ceph/sample.ceph.conf
248
chmod 0644 $RPM_BUILD_ROOT%{_docdir}/ceph/sample.fetch_config
249
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/ceph/tmp/
250
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/ceph/
251
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/ceph/
252
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ceph/
255
rm -rf $RPM_BUILD_ROOT
259
#/sbin/chkconfig --add ceph
262
%if %{defined suse_version}
263
%stop_on_removal ceph
266
/sbin/service ceph stop >/dev/null 2>&1
267
# /sbin/chkconfig --del ceph
272
if [ "$1" -ge "1" ] ; then
273
/sbin/service ceph condrestart >/dev/null 2>&1 || :
275
%if %{defined suse_version}
276
%restart_on_update ceph
280
#################################################################################
282
#################################################################################
284
%defattr(-,root,root,-)
287
%{_docdir}/ceph/sample.ceph.conf
288
%{_docdir}/ceph/sample.fetch_config
292
%{_bindir}/ceph-clsinfo
294
%{_bindir}/monmaptool
295
%{_bindir}/osdmaptool
296
%{_bindir}/ceph-authtool
302
%{_bindir}/ceph-rbdnamer
303
%{_bindir}/ceph-dencoder
304
%{_bindir}/librados-config
307
%{_bindir}/ceph-debugpack
309
%{_bindir}/ceph-coverage
311
%{_bindir}/ceph-kdump-copy
313
%dir %{_libdir}/rados-classes
317
%config %{_sysconfdir}/bash_completion.d/ceph
318
%config %{_sysconfdir}/bash_completion.d/rados
319
%config %{_sysconfdir}/bash_completion.d/radosgw-admin
320
%config %{_sysconfdir}/bash_completion.d/rbd
321
%config(noreplace) %{_sysconfdir}/logrotate.d/ceph
322
%{_mandir}/man8/ceph-mon.8*
323
%{_mandir}/man8/ceph-mds.8*
324
%{_mandir}/man8/ceph-osd.8*
325
%{_mandir}/man8/mkcephfs.8*
326
%{_mandir}/man8/ceph-run.8*
327
%{_mandir}/man8/ceph-syn.8*
328
%{_mandir}/man8/ceph-dencoder.8*
329
%{_mandir}/man8/crushtool.8*
330
%{_mandir}/man8/osdmaptool.8*
331
%{_mandir}/man8/monmaptool.8*
332
%{_mandir}/man8/ceph-conf.8*
333
%{_mandir}/man8/ceph.8*
334
%{_mandir}/man8/cephfs.8*
335
%{_mandir}/man8/mount.ceph.8*
336
%{_mandir}/man8/rados.8*
337
%{_mandir}/man8/rbd.8*
338
%{_mandir}/man1/obsync.1*
339
%{_mandir}/man8/ceph-rbdnamer.8*
340
%{_mandir}/man8/ceph-authtool.8*
341
%{_mandir}/man8/ceph-debugpack.8*
342
%{_mandir}/man8/ceph-clsinfo.8.gz
343
%{_mandir}/man8/librados-config.8.gz
344
%dir %{_localstatedir}/lib/ceph/
345
%dir %{_localstatedir}/lib/ceph/tmp/
346
%dir %{_localstatedir}/log/ceph/
347
%ghost %dir %{_localstatedir}/run/ceph/
348
%dir %{_sysconfdir}/ceph/
350
%{_libdir}/rados-classes/libcls_rbd.so*
351
%{_libdir}/rados-classes/libcls_rgw.so*
353
#################################################################################
355
%defattr(-,root,root,-)
357
%{_mandir}/man8/ceph-fuse.8*
359
#################################################################################
361
%defattr(-,root,root,-)
362
%dir %{_includedir}/cephfs
363
%{_includedir}/cephfs/libcephfs.h
364
%dir %{_includedir}/crush
365
%{_includedir}/crush/crush.h
366
%{_includedir}/crush/hash.h
367
%{_includedir}/crush/mapper.h
368
%{_includedir}/crush/types.h
369
%dir %{_includedir}/rados
370
%{_includedir}/rados/librados.h
371
%{_includedir}/rados/librados.hpp
372
%{_includedir}/rados/buffer.h
373
%{_includedir}/rados/page.h
374
%{_includedir}/rados/crc32c.h
375
%dir %{_includedir}/rbd
376
%{_includedir}/rbd/librbd.h
377
%{_includedir}/rbd/librbd.hpp
378
%{_libdir}/libcephfs.so
380
%{_libdir}/librados.so
382
#################################################################################
384
%defattr(-,root,root,-)
385
%{_initrddir}/ceph-radosgw
387
%{_bindir}/radosgw-admin
388
%{_mandir}/man8/radosgw.8*
389
%{_mandir}/man8/radosgw-admin.8*
390
/usr/sbin/rcceph-radosgw
394
%if %{defined suse_version}
395
%fillup_and_insserv -f -y ceph-radosgw
399
%if %{defined suse_version}
400
%stop_on_removal ceph-radosgw
405
%if %{defined suse_version}
406
%restart_on_update ceph-radosgw
410
#################################################################################
413
%defattr(-,root,root,-)
415
%{_datadir}/ceph_tool/gui_resources/*
418
#################################################################################
420
%files resource-agents
421
%defattr(0755,root,root,-)
422
/usr/lib/ocf/resource.d/%{name}/*
425
#################################################################################
427
%defattr(-,root,root,-)
428
%{_libdir}/librados.so.*
436
#################################################################################
438
%defattr(-,root,root,-)
439
%{_libdir}/librbd.so.*
447
#################################################################################
449
%defattr(-,root,root,-)
450
%{_libdir}/libcephfs.so.*
455
%postun -n libcephfs1
458
#################################################################################
459
%files -n python-ceph
460
%defattr(-,root,root,-)
461
%{python_sitelib}/rados.py*
462
%{python_sitelib}/rbd.py*