~ubuntu-branches/ubuntu/quantal/ceph/quantal

« back to all changes in this revision

Viewing changes to ceph.spec

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-07-16 09:56:24 UTC
  • mfrom: (0.3.11)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: package-import@ubuntu.com-20120716095624-azr2w4hbhei1rxmx
Tags: upstream-0.48
ImportĀ upstreamĀ versionĀ 0.48

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
%define with_gtk2 %{?_with_gtk2: 1} %{!?_with_gtk2: 0}
2
 
 
3
 
%bcond_with ocf
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.
8
 
%bcond_with tcmalloc
9
 
 
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))")}
13
 
%endif
14
 
 
15
 
#################################################################################
16
 
# common
17
 
#################################################################################
18
 
Name:           ceph
19
 
Version:        0.47.2
20
 
Release:        6%{?dist}
21
 
Summary:        User space components of the Ceph file system
22
 
License:        LGPLv2
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
35
 
BuildRequires:  perl
36
 
BuildRequires:  gdbm
37
 
BuildRequires:  pkgconfig
38
 
BuildRequires:  python
39
 
BuildRequires:  libaio-devel
40
 
BuildRequires:  libcurl-devel
41
 
BuildRequires:  libxml2-devel
42
 
 
43
 
#################################################################################
44
 
# specific
45
 
#################################################################################
46
 
%if 0%{defined suse_version}
47
 
BuildRequires:  %insserv_prereq
48
 
Recommends:     logrotate
49
 
BuildRequires:  mozilla-nss-devel
50
 
BuildRequires:  keyutils-devel
51
 
BuildRequires:  libatomic-ops-devel
52
 
%else
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
59
 
%endif
60
 
%if 0%{with tcmalloc}
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}
65
 
%endif
66
 
 
67
 
%description
68
 
Ceph is a distributed network file system designed to provide excellent
69
 
performance, reliability, and scalability.
70
 
 
71
 
#################################################################################
72
 
# packages
73
 
#################################################################################
74
 
%package fuse
75
 
Summary:        Ceph fuse-based client
76
 
Group:          System Environment/Base
77
 
Requires:       %{name} = %{version}-%{release}
78
 
BuildRequires:  fuse-devel
79
 
%description fuse
80
 
FUSE based client for Ceph distributed network file system
81
 
 
82
 
%package devel
83
 
Summary:        Ceph headers
84
 
Group:          Development/Libraries
85
 
License:        LGPLv2
86
 
Requires:       %{name} = %{version}-%{release}
87
 
Requires:       librados2 = %{version}
88
 
Requires:       librbd1 = %{version}
89
 
Requires:       libcephfs1 = %{version}
90
 
%description devel
91
 
This package contains libraries and headers needed to develop programs
92
 
that use Ceph.
93
 
 
94
 
%package radosgw
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
102
 
%else
103
 
BuildRequires:  expat-devel
104
 
BuildRequires:  fcgi-devel
105
 
Requires:       mod_fcgid
106
 
%endif
107
 
%description radosgw
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.
111
 
 
112
 
%package obsync
113
 
Summary:        synchronize data between cloud object storage providers or a local directory
114
 
Group:          Productivity/Networking/Other
115
 
License:        LGPLv2
116
 
Requires:       python, python-boto
117
 
%description obsync
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.
121
 
 
122
 
%if %{with_gtk2}
123
 
%package gcephtool
124
 
Summary:        Ceph graphical monitoring tool
125
 
Group:          System Environment/Base
126
 
License:        LGPLv2
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
131
 
file system.
132
 
%endif
133
 
 
134
 
%if %{with ocf}
135
 
%package resource-agents
136
 
Summary:        OCF-compliant resource agents for Ceph daemons
137
 
Group:          System Environment/Base
138
 
License:        LGPLv2
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.
145
 
%endif
146
 
 
147
 
%package -n librados2
148
 
Summary:        RADOS distributed object store client library
149
 
Group:          System Environment/Libraries
150
 
License:        LGPLv2
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.
156
 
 
157
 
%package -n librbd1
158
 
Summary:        RADOS block device client library
159
 
Group:          System Environment/Libraries
160
 
License:        LGPLv2
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.
167
 
 
168
 
%package -n libcephfs1
169
 
Summary:        Ceph distributed file system client library
170
 
Group:          System Environment/Libraries
171
 
License:        LGPLv2
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.
177
 
 
178
 
%package -n python-ceph
179
 
Summary:        Python libraries for the Ceph distributed filesystem
180
 
Group:          System Environment/Libraries
181
 
License:        LGPLv2
182
 
Requires:       librados2 = %{version}-%{release}
183
 
Requires:       librbd1 = %{version}-%{release}
184
 
Requires:       libcephfs1 = %{version}-%{release}
185
 
%if 0%{defined suse_version}
186
 
%py_requires
187
 
%endif
188
 
%description -n python-ceph
189
 
This package contains Python libraries for interacting with Cephs RADOS
190
 
object storage.
191
 
 
192
 
#################################################################################
193
 
# common
194
 
#################################################################################
195
 
%prep
196
 
%setup -q
197
 
 
198
 
%build
199
 
./autogen.sh
200
 
MY_CONF_OPT=""
201
 
 
202
 
MY_CONF_OPT="$MY_CONF_OPT --with-radosgw"
203
 
 
204
 
%if %{with_gtk2}
205
 
MY_CONF_OPT="$MY_CONF_OPT --with-gtk2"
206
 
%else
207
 
MY_CONF_OPT="$MY_CONF_OPT --without-gtk2"
208
 
%endif
209
 
 
210
 
export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed -e 's/i386/i486/'`
211
 
 
212
 
# be explicit about --with/without-tcmalloc because the
213
 
# autoconf default differs from what's needed for rpm
214
 
%{configure}    --prefix=/usr \
215
 
                --sbindir=/sbin \
216
 
                --localstatedir=/var \
217
 
                --sysconfdir=/etc \
218
 
                --docdir=%{_docdir}/ceph \
219
 
                --without-hadoop \
220
 
                $MY_CONF_OPT \
221
 
                %{?_with_ocf} \
222
 
                %{?with_tcmalloc:--with-tcmalloc} %{!?with_tcmalloc:--without-tcmalloc} \
223
 
                CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS"
224
 
 
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
230
 
%endif
231
 
 
232
 
make -j$(getconf _NPROCESSORS_ONLN)
233
 
 
234
 
%install
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/
253
 
 
254
 
%clean
255
 
rm -rf $RPM_BUILD_ROOT
256
 
 
257
 
%post
258
 
/sbin/ldconfig
259
 
#/sbin/chkconfig --add ceph
260
 
 
261
 
%preun
262
 
%if %{defined suse_version}
263
 
%stop_on_removal ceph
264
 
%endif
265
 
if [ $1 = 0 ] ; then
266
 
    /sbin/service ceph stop >/dev/null 2>&1
267
 
#    /sbin/chkconfig --del ceph
268
 
fi
269
 
 
270
 
%postun
271
 
/sbin/ldconfig
272
 
if [ "$1" -ge "1" ] ; then
273
 
    /sbin/service ceph condrestart >/dev/null 2>&1 || :
274
 
fi
275
 
%if %{defined suse_version}
276
 
%restart_on_update ceph
277
 
%insserv_cleanup
278
 
%endif
279
 
 
280
 
#################################################################################
281
 
# files
282
 
#################################################################################
283
 
%files
284
 
%defattr(-,root,root,-)
285
 
%docdir %{_docdir}
286
 
%dir %{_docdir}/ceph
287
 
%{_docdir}/ceph/sample.ceph.conf
288
 
%{_docdir}/ceph/sample.fetch_config
289
 
%{_bindir}/ceph
290
 
%{_bindir}/cephfs
291
 
%{_bindir}/ceph-conf
292
 
%{_bindir}/ceph-clsinfo
293
 
%{_bindir}/crushtool
294
 
%{_bindir}/monmaptool
295
 
%{_bindir}/osdmaptool
296
 
%{_bindir}/ceph-authtool
297
 
%{_bindir}/ceph-syn
298
 
%{_bindir}/ceph-run
299
 
%{_bindir}/ceph-mon
300
 
%{_bindir}/ceph-mds
301
 
%{_bindir}/ceph-osd
302
 
%{_bindir}/ceph-rbdnamer
303
 
%{_bindir}/ceph-dencoder
304
 
%{_bindir}/librados-config
305
 
%{_bindir}/rados
306
 
%{_bindir}/rbd
307
 
%{_bindir}/ceph-debugpack
308
 
%{_bindir}/boto_tool
309
 
%{_bindir}/ceph-coverage
310
 
%{_bindir}/obsync
311
 
%{_bindir}/ceph-kdump-copy
312
 
%{_initrddir}/ceph
313
 
%dir %{_libdir}/rados-classes
314
 
/sbin/mkcephfs
315
 
/sbin/mount.ceph
316
 
%{_libdir}/ceph
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/
349
 
/usr/sbin/rcceph
350
 
%{_libdir}/rados-classes/libcls_rbd.so*
351
 
%{_libdir}/rados-classes/libcls_rgw.so*
352
 
 
353
 
#################################################################################
354
 
%files fuse
355
 
%defattr(-,root,root,-)
356
 
%{_bindir}/ceph-fuse
357
 
%{_mandir}/man8/ceph-fuse.8*
358
 
 
359
 
#################################################################################
360
 
%files devel
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
379
 
%{_libdir}/librbd.so
380
 
%{_libdir}/librados.so
381
 
 
382
 
#################################################################################
383
 
%files radosgw
384
 
%defattr(-,root,root,-)
385
 
%{_initrddir}/ceph-radosgw
386
 
%{_bindir}/radosgw
387
 
%{_bindir}/radosgw-admin
388
 
%{_mandir}/man8/radosgw.8*
389
 
%{_mandir}/man8/radosgw-admin.8*
390
 
/usr/sbin/rcceph-radosgw
391
 
 
392
 
%post radosgw
393
 
/sbin/ldconfig
394
 
%if %{defined suse_version}
395
 
%fillup_and_insserv -f -y ceph-radosgw
396
 
%endif
397
 
 
398
 
%preun radosgw
399
 
%if %{defined suse_version}
400
 
%stop_on_removal ceph-radosgw
401
 
%endif
402
 
 
403
 
%postun radosgw
404
 
/sbin/ldconfig
405
 
%if %{defined suse_version}
406
 
%restart_on_update ceph-radosgw
407
 
%insserv_cleanup
408
 
%endif
409
 
 
410
 
#################################################################################
411
 
%if %{with_gtk2}
412
 
%files gcephtool
413
 
%defattr(-,root,root,-)
414
 
%{_bindir}/gceph
415
 
%{_datadir}/ceph_tool/gui_resources/*
416
 
%endif
417
 
 
418
 
#################################################################################
419
 
%if %{with ocf}
420
 
%files resource-agents
421
 
%defattr(0755,root,root,-)
422
 
/usr/lib/ocf/resource.d/%{name}/*
423
 
%endif
424
 
 
425
 
#################################################################################
426
 
%files -n librados2
427
 
%defattr(-,root,root,-)
428
 
%{_libdir}/librados.so.*
429
 
 
430
 
%post -n librados2
431
 
/sbin/ldconfig
432
 
 
433
 
%postun -n librados2
434
 
/sbin/ldconfig
435
 
 
436
 
#################################################################################
437
 
%files -n librbd1
438
 
%defattr(-,root,root,-)
439
 
%{_libdir}/librbd.so.*
440
 
 
441
 
%post -n librbd1
442
 
/sbin/ldconfig
443
 
 
444
 
%postun -n librbd1
445
 
/sbin/ldconfig
446
 
 
447
 
#################################################################################
448
 
%files -n libcephfs1
449
 
%defattr(-,root,root,-)
450
 
%{_libdir}/libcephfs.so.*
451
 
 
452
 
%post -n libcephfs1
453
 
/sbin/ldconfig
454
 
 
455
 
%postun -n libcephfs1
456
 
/sbin/ldconfig
457
 
 
458
 
#################################################################################
459
 
%files -n python-ceph
460
 
%defattr(-,root,root,-)
461
 
%{python_sitelib}/rados.py*
462
 
%{python_sitelib}/rbd.py*
463
 
 
464
 
%changelog