summaryrefslogtreecommitdiff
path: root/ceph.spec.in
blob: f2f393084c60ee5a6ea6a97bdc336329ce5eaea1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
%define with_radosgw %{?_with_radosgw: 1} %{!?_with_radosgw: 0}

Name:          ceph
Version:       @VERSION@
Release:       4%{?dist}
Summary:       User space components of the Ceph file system
License:       LGPLv2
Group:         System Environment/Base
URL:           http://ceph.newdream.net/

Source:        http://ceph.newdream.net/download/%{name}-%{version}.tar.gz
BuildRequires: fuse-devel, libtool, libtool-ltdl-devel, boost-devel, 
BuildRequires: libedit-devel, fuse-devel, git, perl, gdbm,
BuildRequires: openssl-devel, libatomic_ops-devel, google-perftools-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires(post): chkconfig, binutils, libedit, google-perftools
Requires(preun): chkconfig
Requires(preun): initscripts

%description
Ceph is a distributed network file system designed to provide excellent
performance, reliability, and scalability.

%package       fuse
Summary:       Ceph fuse-based client
Group:         System Environment/Base
Requires:      %{name} = %{version}-%{release}
BuildRequires: fuse-devel
%description   fuse
FUSE based client for Ceph distributed network file system

%package     devel
Summary:     Ceph headers
Group:       Development/Libraries
License:     LGPLv2
Requires:    %{name} = %{version}-%{release}
%description devel
This package contains the headers needed to develop programs that use Ceph.

%if %{with_radosgw}
%package radosgw
Summary:        rados REST gateway
Group:          Development/Libraries
Requires:       mod_fcgid
BuildRequires:  fcgi-devel
BuildRequires:  expat-devel

%description radosgw
radosgw is an S3 HTTP REST gateway for the RADOS object store. It is
implemented as a FastCGI module using libfcgi, and can be used in
conjunction with any FastCGI capable web server.
%endif

%prep
%setup -q

%build
./autogen.sh
%if %{with_radosgw}
%{configure} --prefix=/usr --sbindir=/sbin --without-hadoop --with-radosgw
%else
%{configure} --prefix=/usr --sbindir=/sbin --without-hadoop --without-radosgw
%endif
make -j$(getconf _NPROCESSORS_ONLN) CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS"

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type f -name "*.a" -exec rm -f {} ';'
install -D src/init-ceph $RPM_BUILD_ROOT%{_initrddir}/ceph
chmod 0644 $RPM_BUILD_ROOT%{_docdir}/ceph/sample.ceph.conf
install -m 0644 -D src/logrotate.conf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/ceph
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/ceph/tmp/
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/ceph/
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/ceph/stat

# To avoid that libcls_rbd.so.1.0.0 is beeing stiped by find-debuginfo.sh
# we petend that the debug symbols have already been extracted
mkdir -p $RPM_BUILD_ROOT/usr/lib/debug/%{_libdir}/rados-classes/
touch $RPM_BUILD_ROOT/usr/lib/debug/%{_libdir}/rados-classes/libcls_rbd.so.1.0.0.debug

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/ldconfig
/sbin/chkconfig --add ceph

%preun
if [ $1 = 0 ] ; then
    /sbin/service ceph stop >/dev/null 2>&1
    /sbin/chkconfig --del ceph
fi

%postun
/sbin/ldconfig
if [ "$1" -ge "1" ] ; then
    /sbin/service ceph condrestart >/dev/null 2>&1 || :
fi

%files
%defattr(-,root,root,-)
%doc README COPYING
%{_bindir}/ceph
%{_bindir}/cephfs
%{_bindir}/cconf
%{_bindir}/cclass
%{_bindir}/cclsinfo
%{_bindir}/crushtool
%{_bindir}/monmaptool
%{_bindir}/osdmaptool
%{_bindir}/cauthtool
%{_bindir}/csyn
%{_bindir}/crun
%{_bindir}/cmon
%{_bindir}/cmds
%{_bindir}/cosd
%{_bindir}/rados
%{_bindir}/radosacl
%{_bindir}/rbd
%{_bindir}/cdebugpack
%{_initrddir}/ceph
%{_libdir}/libceph.so.*
%{_libdir}/libcrush.so.*
%{_libdir}/librados.so.*
%{_libdir}/rados-classes/libcls_rbd.so.*
%{_datadir}/ceph_tool/gui_resources/*
/sbin/mkcephfs
/sbin/mount.ceph
%{_libdir}/ceph
%{_docdir}/ceph/sample.ceph.conf
%{_docdir}/ceph/sample.fetch_config
%config(noreplace) %{_sysconfdir}/logrotate.d/ceph
%{_mandir}/man8/cmon.8*
%{_mandir}/man8/cmds.8*
%{_mandir}/man8/cosd.8*
%{_mandir}/man8/mkcephfs.8*
%{_mandir}/man8/crun.8*
%{_mandir}/man8/csyn.8*
%{_mandir}/man8/crushtool.8*
%{_mandir}/man8/osdmaptool.8*
%{_mandir}/man8/monmaptool.8*
%{_mandir}/man8/cconf.8*
%{_mandir}/man8/ceph.8*
%{_mandir}/man8/mount.ceph.8*
%{_mandir}/man8/radosgw.8*
%{_mandir}/man8/radosgw_admin.8*
%{_mandir}/man8/rados.8*
%{_mandir}/man8/rbd.8*
%{_mandir}/man8/cauthtool.8*
%{_mandir}/man8/cdebugpack.8*
%{_mandir}/man8/cclass.8.gz
%{_mandir}/man8/cclsinfo.8.gz
%dir %{_localstatedir}/lib/ceph/
%dir %{_localstatedir}/lib/ceph/tmp/
%dir %{_localstatedir}/log/ceph/

%files fuse
%defattr(-,root,root,-)
%doc COPYING
%{_bindir}/cfuse
%{_mandir}/man8/cfuse.8*

%files devel
%defattr(-,root,root,-)
%doc COPYING
%{_includedir}/ceph/libceph.h
%{_includedir}/crush/crush.h
%{_includedir}/crush/hash.h
%{_includedir}/crush/mapper.h
%{_includedir}/crush/types.h
%{_includedir}/rados/librados.h
%{_includedir}/rados/librados.hpp
%{_includedir}/rados/buffer.h
%{_includedir}/rados/atomic.h
%{_includedir}/rados/page.h
%{_includedir}/rados/crc32c.h
%{_includedir}/rados/Spinlock.h
%{_includedir}/rados/assert.h
%{_libdir}/libceph.so
%{_libdir}/libcrush.so
%{_libdir}/librados.so
%{_libdir}/rados-classes/libcls_rbd.so

%if %{with_radosgw}
%files radosgw
%{_bindir}/radosgw
%{_bindir}/radosgw_admin
%endif

%changelog
* Fri Apr 30 2010 Sage Weil <sage@newdream.net> 0.19.1-5
- Remove java deps (no need to build hadoop by default)
- Include all required librados helpers
- Include fetch_config sample
- Include rbdtool
- Remove misc debugging, test binaries

* Thu Apr 30 2010 Josef Bacik <josef@toxicpanda.com> 0.19.1-4
- Add java-devel and java tricks to get hadoop to build

* Mon Apr 26 2010 Josef Bacik <josef@toxicpanda.com> 0.19.1-3
- Move the rados and cauthtool man pages into the base package

* Sun Apr 25 2010 Jonathan Dieter <jdieter@lesbg.com> 0.19.1-2
- Add missing libhadoopcephfs.so* to file list
- Add COPYING to all subpackages
- Fix ownership of /usr/lib[64]/ceph
- Enhance description of fuse client

* Tue Apr 20 2010 Josef Bacik <josef@toxicpanda.com> 0.19.1-1
- Update to 0.19.1

* Mon Feb  8 2010 Josef Bacik <josef@toxicpanda.com> 0.18-1
- Initial spec file creation, based on the template provided in the ceph src